Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
On a small self made Linux for a PC104 board (i586) I have the following issue:
Unmounting the /usr/home directory (/dev/hda2) gives the error "device is busy". All other partitions unmount without problems.
This is what I tried so far:
* Killed all user processes. Only a few system processes are still running.
* Verified with mount that only / (/dev/hda1) and /usr/home (/dev/hda2) are mounted
* Verified with fuser that no process is using /usr/home
* Verified with lsof that nobody is using /usr/home
* Removed all the sub directories from /usr/home
The home dir of root resides on the root partition (/root on /dev/hda1)
What could still be causing the unmount "busy" error?
Background information:
System is based on busybox and uses kernel 2.4.23 patched with the RT patches. The file system is minix.
Please help!!! Any suggestion is highly appreciated!
You are running some weird installation. I moved to a 2.6 kernel some years ago, and a "minix" filesystem? Why choose that? Perhaps you have your reasons.
Does
Code:
lsof /usr/home
help?
[Edit:] Perhaps not, I just re-read your post, you have checked this, and there should be no output. Otherwise I am lost for an answer. Sorry.[/Edit]
But welcome to LQ!
Last edited by tredegar; 08-07-2008 at 01:53 PM.
Reason: As above
Are you completely sure that you are root, X is off (runlevel 3 or 1), you aren't within mounted directory, and no other process has current directory on mounted volume ?
I am root and I am sure that I am not in the mounted directory. I am not using runlevels either, since busbox doesn't support them.
Wouldn't lsof and fuser tell me if there were still processes holding the directory? I have almost no process running anymore on the system. Are there other things that can hold on to the directory (pipes?), and if so, how do I check this?
Are there other things that can hold on to the directory (pipes?), and if so, how do I check this?
I'd like to help, but you are waaaaaay out of date. The 2.4 kernel was abandoned years ago. Linux has moved on, very fast. This is called "progress".
It's a bit like you coming to a MicroSoft forum and asking about DOS 3.11 or windows 3.0 (1984?). Things have moved on and generally improved. We abandoned the previous linux kernel releases for very good reasons: many things were broken and needed to be redesigned from the ground up. This has happened, and continues to happen, much faster than MS is "improving" things (just take a look at "vista" ).
Bite the bullet and upgrade, or give us reasons why you cannot / will not.
Thanks for the suggestion to upgrade to kernel 2.6, but unfortunately this does not solve the issue either. Our Linux is running in a commercial (embedded) product and upgrading to kernel 2.6 would involve a lot of testing. Besides that, I evaluated kernel 2.6 before and it actually performed worse than kernel 2.4 in our application. Kernel 2.4 is still used a lot in embedded systems.
Did any of you had similar unmounting issues before? Are there utilities that tell more than fuser and lsof? Maybe some other tests I can perform?
Have you tried the -m option to fuser? This shows processes that are using the specified mounted filesystem.
Code:
fuser -m /usr/home
fuser -k won't (I think) kill processes that aren't accessing that specific file/directory, anything in a subdirectory won't be affected and I just tried 'fuser -k /dev/sda1' (usb flash drive) and it did nothing, though I had a shell open on the mount point (/cf). However, 'fuser -m /cf' does show the pid of the shell.
Last edited by smoked kipper; 08-10-2008 at 11:56 AM.
The issue somehow seems to be related to mgetty, even though "lsof -m" doesn't report it. (I have mgetty running on ttyS1.) When I remove the mgetty entry from inittab and reboot the system, I can unmount and remount the /usr/home directory without problems. After starting mgetty manually again, the directory cannot be unmounted anmymore.
Any mgetty expert out there who knows how to fix this?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.