Explain why unmounting of DVD/CDROM media via command line says "its busy"

0

I'm communicating a bug on Bugzilla regarding DVD and HFS+ with Fedora 15 that requires me to mount many disks to my system. (I'm not CS, nor am I a newbie so there are bits here and there missing from my experience, command line mounting HW is one o'them). To make it necessary to learn this, xWindows File Manager apps are not mounting the DVD. Everything must be done on the command line (I use bash). To now, I've worked around the trouble to unmount by logging out.


I am using #mount successfully, but #umount fails,

# umount -f /media
umount2: Device or resource busy
umount: /media: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
umount2: Device or resource busy
umount2: Device or resource busy

How can the disk be busy immediately on mounting? I have not opened the contents. I've only listed the /media directory to see the disk is in fact mounted. Again, my File Manager apps are not showing the disk as mounted--another bug. So, if the File Manager is not using the disk, and I've not opened any of the contents, what process got a'hold of the disk to fail the force command?

xtian

Posted 2011-08-08T14:31:39.230

Reputation: 782

What's the output of lsof and fuser? umount's suggestion may give you a clue. – Klox – 2011-08-09T01:55:36.847

I don't understand this. In each instance bash was listed as having something connected with the file system or mount point. How can bash have an active and running process with either? Simply for having listed the files? This seems horribly inefficient. I think the answer needs be a lesson in bash... – xtian – 2011-08-17T12:20:07.037

The only way that bash normally would interfere with unmounting is if you've changed directories into that path. Any program who's current working directory is in the mounted path will prevent unmounting, not just bash. If you don't have a bash shell in that path, then I can't explain it. – Klox – 2011-08-17T13:23:53.357

Answers

1

Mounting of devices in /media is now managed through this command

e.g.

devkit-disks --mount /dev/dvd

Robbie

Posted 2011-08-08T14:31:39.230

Reputation: 11

+1 but, btw, title says: Explain why – bakytn – 2012-08-19T22:23:48.553