SUMMARY: eject cdrom -- device busy

Oscar Goldes (ogolde@impsat1.com.ar)
Sat, 12 Apr 1997 13:43:27 -0300

***************
Original question:
It happens frequently that after somebody has used the cdrom drive
in a Ultra/Solaris 2.5, trying ti eject the cd gets the message
/cdrom: device busy
It is not a matter of a user logged in /cdrom; some process is using it. The
question is:

Is there a command that will tell which process is using /cdrom?

I tried "fuser /cdrom" but it does not tell anything useful.
After killing the most suspect process, the problem gets solved, but I am
looking for a more systematic approach.

***************
Thanks to
Sean Ward
Daniel Baker
Mathew Stier
Jim Harmon
tim@mailhost.dciem.dnd.ca
David Robson
and others
*******************************
Solutions proposed to find who is using the cdrom:
1. get lsof (list open files) and run it
2. run fuser -c /cdrom or fuser -c /cdrom/cdrom0 (whichever appropiate to
the mount opint) (my apologies for not reading thoroughly the man page
before posting!)

Solutions to release the cdrom
1. run fuser -ck /cdrom or fuser -ck /cdrom/cdrom0 as root
2. kill vold and restart it

Regards and thanks again
-- Oscar Goldes
-- Orden Argentina SA