umount "device is busy" error
Hi,
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 [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! |
I remember reading on IBM's website that there was some command that would essentially force a umount on any busy device. Too bad I can't remember it
|
Found the command. Here's an example:
Code:
fuser -k /dev/sda2 |
Nope, I tried the fuser -k option already. It did not help.
Thanks for the suggestion. |
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 ?
You might also try "umount -l" ("lazy" umount). |
Quote:
|
Thanks for the suggestions.
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? |
Quote:
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. It costs you nothing. Good luck. |
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? |
Quote:
Quote:
Have you tried the -m option to fuser? This shows processes that are using the specified mounted filesystem. Code:
fuser -m /usr/home |
Quote:
Meawhile, I'll be interested to read the solution to this problem. |
Quote:
Code:
lsof -n|grep /your/mounted/directory |
My 2 cents
You can't force umount it as root? #umount -f /usr/home http://linuxcommand.org/man_pages/umount8.html |
Another update:
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? |
All times are GMT -5. The time now is 12:26 AM. |