LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-22-2007, 07:05 AM   #1
mhg
Member
 
Registered: Apr 2007
Location: Utah
Distribution: BodhiLinux
Posts: 205

Rep: Reputation: 30
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.
 
Old 07-22-2007, 07:28 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
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:

Quote:
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.)
 
Old 07-22-2007, 08:17 AM   #3
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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.
 
Old 07-22-2007, 09:00 PM   #4
mhg
Member
 
Registered: Apr 2007
Location: Utah
Distribution: BodhiLinux
Posts: 205

Original Poster
Rep: Reputation: 30
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 LQ.org that I did not know existed.

Thanks for the help. Now I will reboot, and see if all is OK with that drive.
 
Old 07-22-2007, 09:41 PM   #5
mhg
Member
 
Registered: Apr 2007
Location: Utah
Distribution: BodhiLinux
Posts: 205

Original Poster
Rep: Reputation: 30
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.
 
Old 07-23-2007, 01:29 AM   #6
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
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.

Quote:
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:

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

Last edited by blackhole54; 07-23-2007 at 01:30 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mount external drive problem DotHQ Linux - General 1 06-12-2007 10:47 PM
Can't mount to external firewire drive jonthelam Linux - Hardware 1 03-04-2007 04:39 PM
How to Mount External USB CD Drive? ArchiMark Linux - Laptop and Netbook 12 05-29-2006 07:10 PM
cannot mount external hard drive vash331 Linux - Newbie 1 12-31-2005 07:19 AM
can't mount fs on external hard drive fatblueduck Linux - General 11 06-10-2005 03:03 PM


All times are GMT -5. The time now is 09:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration