-   Linux - Newbie (
-   -   can not un-mount external drive, please help (

mhg 07-22-2007 07:05 AM

can not un-mount external drive, please help
Hi All,

Normally I can right-click on the desktop icon for this external drive and unmount it, and all is good. Today when I try that, I get the message "can not unmount, an application is preventing it". When I try to unmount with the command line I get message the the device is busy.

There are no applications open, and I can see nothing running when I open my system monitor. I know from past experience if I turn off the PC without unmounting properly, I will end up with broken links I have made on this drive, which leads to much work redoing all that.

Any ideas what I can do to safely unmount this drive?

Thanks for all help.

blackhole54 07-22-2007 07:28 AM

First thing, make sure you aren't using a directory on that disk as a current working directory. (If so, cd out of it.)

Otherwise try a "lazy" unmount using the -l option. (My guess is you have to do this as root, so put a sudo command in front of it. I think if you then power down the machine normally, everything should be OK.

From the umount man page:


Lazy unmount. Detach the filesystem from the filesystem hierar-
chy now, and cleanup all references to the filesystem as soon as
it is not busy anymore. This option allows a `busy' filesystem
to be unmounted. (Requires kernel 2.4.11 or later.)

jay73 07-22-2007 08:17 AM

You can also kill whatever is accessing the directory like this (as root, of course):

fuser -k [directory] (for example, fuser -k /home/username)

Of course, this won't work if umounting is failing simply because you are still inside that directory; as pointed out, above, a "cd" will take you out of the external drive and back to your home directory.

mhg 07-22-2007 09:00 PM

Thanks for the replies.

This is what I did, and what results I got. The final command, when I typed it correctly, seems to have unmounted the external drive. FYI, I did not have any directories open, so still not sure why I was having the problem.

Thanks for the link to the Man page with the descriptions of umount. Very helpful. I will have to spend some time on that page. This is not the first time someone has referred me to a great page like that on that I did not know existed.

Thanks for the help. Now I will reboot, and see if all is OK with that drive.

mhg 07-22-2007 09:41 PM

Oh yea!

The lazy umount did the trick for the external, though the PC would not shut down. I had to unplug it, then boot up, but the external drive and links survived, so I am happy.

Many thanks.

blackhole54 07-23-2007 01:29 AM


Originally Posted by mhg
though the PC would not shut down. I had to unplug it

That sounds like a bug. You might want to report it if nobody else has. The Ubuntu website has info about reporting bugs.


Thanks for the link to the Man page with the descriptions of umount.
FYI, you should have a set of man pages on your local machine as well. To view the page for mount (for example) you would open a terminal window and type:


man mount
Most of the CLI commands should have a man page you can access that way.

All times are GMT -5. The time now is 04:12 PM.