1837818 Members
5226 Online
110120 Solutions
New Discussion

Unmounting CD-ROM

 
SOLVED
Go to solution
Sanjay Verma
Super Advisor

Unmounting CD-ROM

Friends, at present the CD-ROM is mounted as /cdrom. Whenever I'm trying to unmount the CD-ROM it gives the err msg. "# umount /cdrom
umount: cannot unmount /cdrom : Device busy". Is there any tweak to unmount the cdrom?
Co-operation - The biggest chain reaction
8 REPLIES 8
Robert Kerr
Advisor

Re: Unmounting CD-ROM

you can use fuser -cu command to see who is using it or has it as their current directory.
G. Vrijhoeven
Honored Contributor
Solution

Re: Unmounting CD-ROM

Hi,

This is becouse you or anyone else / a process is in the path or using the cdrom.

Use fuser -cu /cdrom or cd / and than umount /cdrom.

Gideon
Patrick Wallek
Honored Contributor

Re: Unmounting CD-ROM

Do an 'fuser -cu /cdrom' to see if there are any processes that are using the /cdrom directory. Make sure you are not in the /cdrom directory when trying to do the umount.

If you happened to start any background processes while in /cdrom then those processes can be seen as using the directory even though they may not be writing to any file.

Try fuser and see what you find.
Robert Kerr
Advisor

Re: Unmounting CD-ROM

sorry

fuser -cu /cdrom
Jeff Schussele
Honored Contributor

Re: Unmounting CD-ROM

Hi Sanjay,

Depends on a couple factors:

1) How it was mounted. If mounted with the normal mount command then umount would be used. If mounted with pfs_mount then pfs_umount must be used.

2) The device not being busy - i.e. nothing running from it & no one being in that dir at unmount time - run fuser -u /cdrom. Also if it was NFS exported, the export must be halted - run showmount -e.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sanjay Verma
Super Advisor

Re: Unmounting CD-ROM

Hi Robert,
I'm the only user logged in to the system.
The output is:
# fuser -cu /cdrom
/cdrom: 11444c(root) 2891c(root)
How can I forcefully umount the cdrom fs?
Co-operation - The biggest chain reaction
Sanjay Verma
Super Advisor

Re: Unmounting CD-ROM

Thanks guys for the quick & correct responses. It was my fault ..... from another session I was in the /cdrom directory.... This proves how talented we Sys Admins are.... Thanks again.
Co-operation - The biggest chain reaction
Robert Kerr
Advisor

Re: Unmounting CD-ROM

looks like root has it's current directory as /cdrom (the "c" before the username indicates that) you probably just need to move out of that directory if you're the only one on and no processes are trying to read it.