LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-01-2005, 12:41 PM   #1
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
mount nightmare


OK guys, every time I critisize the whole mounting thing it upsets people, but I seem to have more problems with mounting and unmounting than anything else, this really is driving me up the wall.

I type umount /dev/hda3 and its says "device is busy". Busy doing what? how do I find out what its busy doing? Because look as I might I cannot find any open program that is referencing the drive.

I have tried using -f to force the umount but even though I',m root it doesn't let me do it.

Now the command line has just locked up. If I type umount /dev/hda3 at the command line it gives me a new-line and then sits there indefinitely. This really isn't good.

I'm using knoppix 3.9 btw.

Any guidence would be much appreciated - and I apologise if this post sounds pissed off, its not directed at anyone just general frustration. :-)

Thanks
 
Old 08-01-2005, 01:15 PM   #2
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
forcing unmountign is the worst thing to do, it's a good way to crash application, or the whole system. If the kernel tell you the device is busy, it most probably is. You can use the command "lsof /dev/hdX " to find the pid of the process locking the disk.

About device is busy message...
If you "are" in the drive (mean, used "cd" to position yourself in a directory that is on the device), you need to get out first --> cd /
If an application was started from the device, you need to close/kill the application before umounting the device. Some application might hang sometime, use "ps -xa" to find out the pid of the process and "kill -9" to kill it.
If your mounted device is shared (as example using samba) and there is user on it, you may get a device busy message as well. Stop the server (/etc/init.d/samba stop as example) then unmount.

...

Mount/umount is wonderful. You have to understand that linux was first made for server. Server sometime use exotic hardwares that support hotswapping, which is really easier to manage in Unix world than in windoze. Even USB support is better in Linux atmo and I don't mention that I was doing hotswapping with "standard" IDE on Linux some time ago... the kind of trick I wouldn't even think to try in a windoze world. Linux is a server OS, not really a desktop one.
 
Old 08-02-2005, 09:45 AM   #3
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Original Poster
Rep: Reputation: 184Reputation: 184
oops, OK I won't try forcing it again then Thats probably why the whole command line started acting up and I had to reboot.

The lsof command is exactly what I was looking for, gives me a fighting chance next time!

I was in the process of partitioning for Gentoo when this problem arose. I know, I know I'm way out of my depth but hey you look stupid drowing in a puddle, might as well do it in the ocean!!

Thank Half_Elf, it never ceases to amaze me how you guys put up with us newbies
 
  


Reply



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
My 9600XTR nightmare! Andy@DP Linux - Hardware 2 05-17-2004 03:01 AM
New Stereo, what a nightmare. BajaNick General 13 01-05-2004 09:07 PM
Dependancy Nightmare slooper Linux - Software 2 08-17-2003 03:33 AM
ML 8.2 Nightmare! descras Linux - General 2 08-22-2002 04:06 AM
Symlink Nightmare!! Help NightSky Slackware 1 05-19-2002 07:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:29 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration