HAL and what drives me crazy: "umount: /mnt/cdrom: device is busy"

Norbert Frese postfach at nfrese.net
Wed Oct 1 10:18:56 EEST 2003


hi!

I use Linux every day, but i am not a system/kernel-expert. Here are my
thoughts on HAL etc...

1) DEVICES & MOUNTING/UNMOUNTING IN GENERAL

Personally i prefer to mount and unmount things manually. It's clean,
you know what's going on and there is no danger of data-loss... I don't
like supermount, automount, vfs too much - they seem to cause a lot of
trouble - mainly because they establish a confusing layer on top of the
traditional unix concept of filesystem and mounting and unmounting...

The GUI&Desktop should show a consistent and logical (tree-like)
structure of hardware to the user:

Adapters
|
+-- Devices/Media (--> apps which can handle them)
     |
     + Mountpoints (mounted or not)

For USB the "Adapter" could be a Usb-Controller-Icon, for CDs the
CD-Drive,... Sometimes it makes no sense to mount certain media (like
audio-cds, empty cds (for cd-burning)), but they should still show up on
the desktop.

Examples:

Usb Adapter -- External-CDRom -- CD -- Mount-Point
CD-Drive -- Audio-CD


2) UNMOUNTING "BUSY" DEVICES

"umount: /mnt/cdrom: device is busy". This is one of the messages that
really drives me crazy. Sometimes it's really hard for me to find out
which app is "blocking" a certain mount-point. Sometimes i have to close
all apps or even log out or restart the computer (If there is some
crashed or orphan app running in the background).

I don't think the HAL-spec tackles the problem of unmounting devices
which are 'blocked' by applications (like file-managers...).

My proposal would be a three stage umount procedure:

the user clicks eject or umount on the desktop-icon (or types something
like "want2umount" in the terminal) ->

a) "umount aware" applications which register to the HAL receive a
callback or signal that a certain mount-point wants to be released. They
can react by prompting the user to save data, shut down or change to a
different directory.

b) if there are still apps "blocking" the mount-point -> a pop-up list
of those apps is displayed - with a term/kill button next to them.

c) umount is performed (if it still doesn't succeed the user is prompted
for "lazy umount").

i dont know if this makes sense to a unix/linux expert - and maybe there
are better ways to cope with this problem...

regards
norbert


















More information about the xdg mailing list