I'm trying to back up a disk that has been acting very strangely lately, but my back-up attempts fail after a few minutes, because the disk's file system (at
/dev/disk4) "spontaneously" unmounts. (I doubt this unmounting is literally "spontaneous", but to my ignorance it looks that way.)
I would like to "lock" the mount, so that no other process can unmount it (other than something like
umount /dev/disk4 issued by me). Is there a way to achieve such a lock?
(The flavor of Unix I'm dealing with happens to be OS X, but I am interested in, say Linux-specific solutions too, since they may provide useful keyword for further Googling. Also solutions for any other BSD-ish flavor of Unix would be welcome.)
(It goes without saying that I am interested only in locking schemes that do not prevent me from backing up the disk!)
If there is no way to "lock the mount" or how can I determine why the unmounting is happening?