1761301 Members
1998 Online
108901 Solutions
New Discussion юеВ

how to kill

 
Chris Fadrowski
Super Advisor

how to kill

i have a /cdrom (mount point) that i can't umount. What do i grep for to kill the processes being held?
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: how to kill

Hi Chris:

Before you kill anything, make sure that you (or no one else) is CD'd into the mountpoint:

# fuser -cu

This is a common reason for not being able to unmount.

Regards!

...JRF...
Sridhar Bhaskarla
Honored Contributor

Re: how to kill

First find out the device file by doing a

#bdf /cdrom
/dev/dsk/c0t2d0 12121 121 1212 60% /cdrom

List the processes that are using this.
#fuser /dev/dsk/c0t2d0

Kill them all with a single shot

#fuser -k /dev/dsk/c0t2d0

Make sure there are no more processes

#fuser /dev/dsk/c0t2d0

Some processes will not die immediately. So wait for few seconds

#umount /cdrom

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sanjay_6
Honored Contributor

Re: how to kill

Hi,

Before you kill soemone, try this.

fuser -cu /cdrom

This will list the user(s) who are using the directory, ask them to cd out of it, or logout, else grep for the process run by these user(s), and kill the one using /cdrom , the processes i mean. or you can do

fuser -ck /cdrom

This will kill all the processes using /cdrom directory. Then you should be able to unmount the cdrom

umount /cdrom

Thanks
harry d brown jr
Honored Contributor

Re: how to kill

Chris,

One of the best utilities that you could ever have on a unix system is "lsof". For hp systems you can find 9, 10.20, 11, and 11i versions here:

http://wuarchive.wustl.edu/packages/security/lsof/binaries/hpux/

With it, you can do a "lsof | grep cdrom" and it will display every process that has /cdrom open.
Live Free or Die