[mythtv-users] Storage directory file system: too easy to unmount?
Dave Ulrick
d-ulrick at comcast.net
Mon Feb 17 19:10:14 UTC 2020
On 2/15/20 2:24 PM, Simon Hobson wrote:
> Have you considered something that opens a file on the filesystem after it's been mounted ?
> If a process is holding a lock on an open file then it will stop you accidentally unmounting the FS. If you do want to unmount the FS, you just need to end the process holding the open file lock.
When I ran 'fuser -m /storage' and saw no processes listed, that's
pretty much what came to my mind. For instance, mythbackend might parse
through the list of storage directories and do an opendir() on each,
then closedir() at shutdown. If you wanted to unmount a FS that hosted
any storage directories, you'd stop mythbackend, unmount the FS, then
start mythbackend back up. This is pretty much what I've come to expect
to do when I want to unmount an FS that's used by a Web server,
database, etc.. When I discovered that mythbackend only opened a file on
a storage directory when it was recording or playing back a recording,
this seemed quite different from how other apps lock their data
directories and files (hence my original post) but according to Stephen
Worthington's reply this behavior is by design. No big deal...now that I
know it's intentional behavior I can live with it.
Dave
More information about the mythtv-users
mailing list