Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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. :-)
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.