Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128590 - Can't unmount cdrom - "device is busy"
Summary: Can't unmount cdrom - "device is busy"
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-02 18:52 UTC by Dima Ryazanov
Modified: 2006-04-03 01:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dima Ryazanov 2006-04-02 18:52:00 UTC
Very often, after accessing a CD, some program (e.g. konqueror) keeps some file open even if I think I closed it.

Pressing the "eject" button on the CD-ROM drive doesn't do anything. If I tell KDE to eject it, I get a pretty stupid error message:
   umount: /media/hdc is not in the fstab (and you are not root)
   Please check that the disk is entered correctly.
Well, it was able to *mount* it without being root (using pmount), so it better unmount it, too.

If I run "pumount /dev/cdrom" manually, I get:
   umount: /media/hdc: device is busy
   umount: /media/hdc: device is busy
   Error: umount failed

Why is it busy? Who is using it?

I try "fuser /media/hdc" - nothing. "lsof /media/hdc" - still nothing.

Only "/usr/sbin/lsof | grep /media" gives me:
konqueror  2324 dima   18r      REG       22,0 6069716      8706 /media/hdc/books/KnoppixKompakt_2005-06-18.pdf


Shouldn't there be a more user-friendly way to eject a CD?

Ideally, I think, "umount" (or "pumount") itself should be able to find out what program is using the device. Then, KDE or other programs could tell the user, and ask if he/she wants to close that program first.

Alternatively, it would be nice if a device could be unmounted even if it is in use. "supermount" used to do that, right? It would invalidate all of device's file descriptors, or something like that - and everything worked nicely.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-04-03 01:02:12 UTC
(In reply to comment #0)
> Only "/usr/sbin/lsof | grep /media" gives me:
> konqueror  2324 dima   18r      REG       22,0 6069716      8706
> /media/hdc/books/KnoppixKompakt_2005-06-18.pdf

OK, so - apparently it *is* busy.

> Ideally, I think, "umount" (or "pumount") itself should be able to find out
> what program is using the device. Then, KDE or other programs could tell the
> user, and ask if he/she wants to close that program first.

Patches are welcome, preferably send them upstream.