CDROM will not eject - says device busy

Hi,

I've seen similar posts on this board about ejecting CDROMs but I've tried the solutions people suggested but still cannot eject the CD. It's stuck in a production box so I can't reboot it...

bash-3.00# eject -f cdrom
/vol/dev/dsk/c0t0d0/sol_10_106_sparc/s0: Device busy

bash-3.00# fuser -cu /cdrom/sol_10_106_sparc/s0
/cdrom/sol_10_106_sparc/s0:    10163c(root)     514c(root)
bash-3.00#

So far I have tried the following:

  • Physically pressing eject button
  • volmgt start / stop
  • eject -f cdrom
  • Umount - f /vol/dev/dsk/c0t0d0/sol_10_106_sparc/s0
  • umount /cdrom
  • fuser command

Any help would be much appreciated!

Thanks
Jimmy

Did you just try "eject" command? cd to the "/" and tried? If not use a pin to "pok" the hole near the drive

when you restarting the solaris box you can eject the CD rom.

The problem is, its a prod box and he cant restart anytime he wants to.

What are the processes with PIDs 10163 and 514 ?

ptree 10163
ptree 514
ptree $$

Well, you are already half way there. Look at the output of the fuser command. It tells you that there are 2 login instances of root somewhere in the /cdrom directory. The numbers 10163 and 514 should correspond to the process IDs of those root instances' login shells; I'm even venturing to say one of those is your current login.

So, change to another directory, run fuser again, and kill the process(es) that remain. That will free up /cdrom, and you will be able to eject the disk

# cd
# fuser /cdrom
   514c
# kill -9 514  # or whatever process number(s) show
# eject cd

Great.. You're sharp.. I was sleepy and never notice the first post outputs

"kill -9" is never a good advice though, too much cow-boy style.

As I suggested previously, you should first figure out what these processes are and have them stopped gently instead.

Thanks for all the feedback.

I managed to solve it by...

# volmgt stop

physically ejecting CD

# volmgt start

Yepee-Ky-yay, Hans.

It's the cdrom directory. He's trying to remove the cd. Why is it never good advice to use -9?

Useless use of kill -9

.. i take it that's in response to what I posted.. what am I supposed to be? Impressed? "Educated" by a random link? I don't see anything in that link that even resembles technical writing, just a "this may happen because I think it may happen" statement.

i realy don't care if you are impressed or not... this is the article from the "useless use of ..." series which i posted without any comment cause it doesn't impress or confess me... it's just what i think the comment earlier was about.

It's a matter of best practices.

As pointed out by the document referenced by the link, sigkill cannot be caught. Hence, a process cannot exit nicely. This is not a good thing on a mission critical system.

And even in non mission critical ones. Abruptly killing a process without even trying to understand what this process is and why it uses some directory is ... overkill.