Device is busy

Place to discuss Fedora and/or Red Hat

Device is busy

Postby X11 » Sun May 22, 2005 11:29 pm

[x11@kintaro ~]$ sudo umount /exeleven/pub
umount: /exeleven/pub: device is busy
umount: /exeleven/pub: device is busy

How do I find out whats using it?
X11
guru
guru
 
Posts: 674
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia

Postby Tux » Mon May 23, 2005 5:40 am

/sbin/lsof | grep exeleven
Tux
guru
guru
 
Posts: 689
Joined: Wed Jan 08, 2003 10:40 am

Postby Void Main » Mon May 23, 2005 7:54 am

Or a faster way:

Code: Select all
fuser -m /exeleven/pub


If you wanted to kill all processes using that file system you could add a "-k" to the command line (run as root).
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby caveman » Mon May 23, 2005 6:01 pm

This is something I've been meaning to write about as well..

So now - when I get a device busy - I use "umount -fl /mnt/somemount"
That tries to "force" unmount - and if that fails do a "lazy" unmount..
<quote>
Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore.
(Requires kernel 2.4.11 or later.)
</quote>

Sometime my system hangs during a shutdown - waiting, waiting on a umount when a device is busy.

I've grepped the files in rc.d - made backups and changed all calls to
"umount -f" with "umount -f -l" and the others
"umount -a...." with "umount -a -l..." etc.

so-far it seems to do what I expect without any problems.
caveman
programmer
programmer
 
Posts: 130
Joined: Sun Feb 09, 2003 1:08 pm
Location: Midrand Gauteng, South Africa

Postby Void Main » Mon May 23, 2005 6:05 pm

And to make the fuser list a little nicer:

fuser -muv /exeleven/pub
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby X11 » Tue May 24, 2005 1:03 am

[x11@kintaro ~]$ fuser -m /exeleven/pub
/exeleven/pub: Input/output error
[x11@kintaro ~]$ fuser -mk /exeleven/pub
/exeleven/pub: Input/output error

It was mounted via samba to my Windows 2003 box, which crashed like a Windows 2003 box does. I might just have to reboot my poor laptop.
X11
guru
guru
 
Posts: 674
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia

Postby X11 » Tue May 24, 2005 1:04 am

umount -fl worked.
X11
guru
guru
 
Posts: 674
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia

Postby Tux » Tue May 24, 2005 2:03 am

I used to have problems with drives mounted on my Samba fileserver.
Changing the filesystem type from smbfs to cifs mysteriously solved many of them.
Tux
guru
guru
 
Posts: 689
Joined: Wed Jan 08, 2003 10:40 am

Postby X11 » Tue May 24, 2005 8:16 pm

I thought cifs was automatically used if the server supported it. Silly me.
X11
guru
guru
 
Posts: 674
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia


Return to Fedora/Red Hat

Who is online

Users browsing this forum: No registered users and 1 guest

cron