Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

(Apologies in advance for giving so few details below, but trust me that the set-up and the problem I'm dealing with are truly baroque, and even a superficial description would result in a far lengthier and complicated post than any of you would want to read!)

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 to speak, 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"

how can I determine why the unmounting is happening?


share|improve this question
up vote 2 down vote accepted

If the mount is busy it shouldn't be able to unmount*.

An easy way to make a mount busy is to have at least one process with its CWD under the mount point.

*Lazy unmounts will still return but it shouldn't actually unmount until the filesystem is no longer busy.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.