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

Sometimes when I want to umount a device, e.g.

sudo umount /dev/loop0

I will get the message

umount: /mnt: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

I usually solve this issue by closing a console window (in my case xfce4-terminal) and then umount.

What does this problem mean? Is there some smarter solution?


share|improve this question
That happens for example if you are still in a shell in that directory to where the device is mounted. – klapaucius Sep 1 '11 at 15:15
I don't remember if I was there but I tried it and you're right, this happened. – xralf Sep 2 '11 at 13:31
up vote 10 down vote accepted

It means that some process has a working directory or an open file handle underneath the mount point. The best thing to do is to end the offending process, change its working directory or close the file handle before unmounting.

There is an alternative on Linux though. Using umount -l calls a "lazy" unmount. The filesystem will still be mounted but you won't be able to see or use it, except for processes that are already using it. When the offending program exits (through whatever means) the system will "finish" unmounting the filesystem.

share|improve this answer
Is there a way to find out which process has the open file handle and should be terminated? – xralf Sep 1 '11 at 19:04
Using lsof is probably the best way. – bahamat Sep 1 '11 at 20:48
e.g. lsof | grep loop0? – xralf Sep 2 '11 at 13:28
No, grep for the mount point. It should list any files underneath. I don't think it will show things that simply have a working directory under the mount point, so it isn't a perfect method. – bahamat Sep 2 '11 at 15:44
solve my issue, thanks! – cwhsu Nov 17 '14 at 5:06

Given your "usual solution", it means that the shell you have running in your console window has a directory in a file system on that device as its current working directory.

Linux, and Unixes in general, want very badly to keep a file system mounted if a process has a current working directory in that filesystem.

You could just use cd in the console window to get out of a directory in or under /mnt rather than killing the console window, and the shell running inside it.

share|improve this answer

I encountered the same problem today ,and I've succeed to solve it . my problem is result from mounting a directory to my current working directory,so when I run "umount" ,it happened. the way to solution it is change the current directory and then run "umount ..". i hope it works.

share|improve this answer

I discovered a situation which can interfere with unmounting a device that I will share as an answer even though this question is very old.

If you have NFS shares being hosted on the machine, and any of those NFS shares are backed by the device you are trying to unmount, you will have to stop sharing them (best done by stopping the NFS service, e.g. sudo service nfs-kernel-server stop on recent versions of Ubuntu). The NFS server may not show up in lsof or fuser, which can make the issue difficult to identify.

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.