Operating System - Linux
1753710 Members
4632 Online
108799 Solutions
New Discussion юеВ

Re: Unable to eject cdrom manually or via command line on Linux server

 
frederick hannah
Super Advisor

Unable to eject cdrom manually or via command line on Linux server

I unmounted a cdrom using "umount -l" but attempts to to manually eject the medium fails. I used the umount -l option since the basic umount command always returned "device busy". I can remount the disk without a problem. I just cant get it out of the server. The "eject -d" command doesnt work, either. Any suggestions?
8 REPLIES 8
prasadb
Super Advisor

Re: Unable to eject cdrom manually or via command line on Linux server

hello frederick hannah ..

>>the basic umount command always returned "device busy".

it seems that you are on the same mount point,

you might have done cd /mnt (the mounted point) may in the other session..

please check it out..

frederick hannah
Super Advisor

Re: Unable to eject cdrom manually or via command line on Linux server

I have unmount the cdrom, but i cant get it to eject manually or through the software
melvyn burnard
Honored Contributor

Re: Unable to eject cdrom manually or via command line on Linux server

Well as this seems to have nothing to do with HP-UX, I am moving it to a more appropriate forum
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Court Campbell
Honored Contributor

Re: Unable to eject cdrom manually or via command line on Linux server

get a paper clip and use it to open the cdrom drive.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Matti_Kurkela
Honored Contributor

Re: Unable to eject cdrom manually or via command line on Linux server

You've done a "lazy" umount.

Now you'll need to find what is still holding the device open. It might be some process: run "lsof | grep ".

Before doing a lazy umount, the fuser command might have found out the culprit easily: "fuser -m ". Adding the -k option would have killed any process(es) hanging onto the mountpoint. I'm not sure if the fuser command works after a lazy umount.

If you had the cdrom exported as a NFS filesystem, the kernel itself may be hanging on to the cdrom. The lsof command might not be able to detect that. Unexport the cdrom mountpoint, or simply run "exportfs -ar" to refresh the NFS export state to match the current filesystem state.

MK
MK
Nuwan Alwis
Valued Contributor

Re: Unable to eject cdrom manually or via command line on Linux server

Try if any luck with "eject" command
frederick hannah
Super Advisor

Re: Unable to eject cdrom manually or via command line on Linux server

Using the "lazy" umount command was a last resort as none of the other mentioned commands worked. I know this is a bit extreme, but I see rebooting as the only option left.
Ivan Kuznetsov
Frequent Advisor

Re: Unable to eject cdrom manually or via command line on Linux server

Hello

Probably your CDROM drive has a firmware bug and unlocking/ejecting the tray is someway broked. I have two drives doing the same after writing of some DVDs or CDs.