LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author]
  From: Mark Newton <newton@atdot.dotat.org>
  To  : Jake Hawkes <jake@infinitylimited.net>
  Date: Tue, 11 Apr 2000 17:29:26 +0930

Re: Device is busy....

On Tue, Apr 11, 2000 at 06:15:22PM +0930, Jake Hawkes wrote:
 
 > anyone tried to unmount /dev/cdrom, and been told that the device is
 > busy?
 > <looks over see of hands>
 > Ok, every tried to find out *who* or *what* has it open?
 > <looks over see of hands>
 > Anyone got a cool way of doing this? I tried grep'ing through the /proc
 > directory looking at the 'cwd' link, but i think it might have been a
 > samba process.

Try:

    fuser -m /mnt/cdrom/

to find a list of PIDs, and:

    fuser -k -m /mnt/cdrom/

to kill that set of processes.

You can use fuser to find out which processes are accessing any
given file on the system, generally speaking;  So, to see if 
anyone is accessing /tmp/filename, you can do:

    fuser /tmp/filename

to get a list of PIDs.  

    - mark

--------------------------------------------------------------------
I tried an internal modem,                    newton@atdot.dotat.org
     but it hurt when I walked.                          Mark Newton
----- Voice: +61-4-1620-2223 ------------- Fax: +61-8-82231777 -----

-- 
LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author]
Return to the LinuxSA Mailing List Information Page