[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Linux-cluster] umount failed - device is busy

On Mon, 2005-10-10 at 23:22 +0200, Herta Van den Eynde wrote:
> > Odd.  Well, "umount -f" actually doesn't do what most people think it
> > does.

> FWIIW, I don't think the force unmount works.  True, lsof/fuser don't 
> report processes against the filesystem, but "df" and "mount" show that 
>   it's still there, and I can write to and read from it after I try a 
> "umount -f".

(/me waves his hand and says, "This is not the force unmount you are
looking for...")

* "umount -f" only works for NFS-mounted file systems, and only then in
certain cases.  If there is pending I/O (e.g. processes in disk wait),
it will not work (I may be wrong about this one, but I think this is the
case).  In any case, it does not currently do anything for local file
systems like ext3, jfs, reiserfs, xfs, etc...  If there are open
references on any local file system, the umount fails with -EBUSY,
regardless of whether or not "umount -f" was used.

This means, if there is a process, say a bash shell, running with CWD in
a local file system's mount point, running "umount -f" on that mount
point will fail the same as running "umount" without the "-f" flag.

* The "force unmount" option in Cluster Manager, by contrast, attempts
to clear references on a locally mounted file systems by killing
processes using those file systems.  Put more clearly: it attempts to do
what most people think "umount -f" does (or should do) in a general way.
So, back to our example:

That bash shell is sitting in the mountpoint.  We look for all processes
using the mount point, see that bash (pid 11034) is using it, and kill
pid 11034 with signal 9 (SIGKILL).  Bash certainly no longer has a
reference on our file system ;)

Now, there are no more processes using the mount point, so we issue
"umount"...  which should work.  However, this is not working in your
case.  There are a couple of things which come to mind which might cause

* nfsd holding a reference (which is why I asked you to stop nfs;
"exportfs -ua" should work too).

* another mounted file system below the mount point (e.g. trying to
umount /a while another file system is mounted on /a/b).

-- Lon

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]