Bug 182374 - USB storage devices with ext3 fs get automatically mounted but desktop not notified
Summary: USB storage devices with ext3 fs get automatically mounted but desktop not no...
Alias: None
Product: Fedora
Classification: Fedora
Component: kdelibs   
(Show other bugs)
Version: 5
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ngo Than
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2006-02-22 02:22 UTC by Stefan Becker
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-04-29 04:13:44 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Stefan Becker 2006-02-22 02:22:09 UTC
Description of problem:

When USB storage devices are attached they are automatically mounted. KDE pops
up the "device inserted" requestor but of course choosing "Open Window" fails,
because the device is already mounted. Additionally the icons on the desktop are
shown as "unmounted" so when you double-click them it tries to mount which again

Version-Release number of selected component (if applicable):


How reproducible: Always

Steps to Reproduce:
1. Attach USB storage device with ext3 fs
2. mount
3. umount /media/*
4. remove USB device
Actual results:

mount shows devices are already mounted.
KDE opens "device attached" action window.
Device icons appear on KDE desktop in "unmounted" state.
After removal the /media directories don't disappear.

Expected results:

Devices should not automatically be mounted.
Removal should also remove /media directories.

Additional info:

If the USB storage device is formatted with the FAT fs then it is still
automatically mounted but at least the desktop show it correctly as "mounted"
and after removal the entry in /media disappears.

Comment 1 Ngo Than 2006-02-22 16:48:37 UTC
I cannot reproduce this problem with latest KDE in rawhide. The desktop shows
the device icons correctly as "mounted" and the kded daemon opens the windows
without any problem!

The kded daemon does not mount automatically the devices. It seems that the hal
backend does it. So it's a bug (or feature?) in hald daemon, but not in KDE.

Comment 2 John (J5) Palmieri 2006-02-22 16:55:47 UTC
We do not auto mount devices.  gnome-volume-manager does that in gnome.  It
shouldn't be running if you are running KDE.

Comment 3 Stefan Becker 2006-02-22 17:12:31 UTC
The devices seem to be mounted by root and not with user rights, ie. user can't
unmount them. So I doubt that they are mounted by a KDE process.

Is there anything I can monitor to see which process does the mount?

Comment 4 Stefan Becker 2006-02-23 08:21:35 UTC
I now disabled all KDE components which have something to do with media

    KDED Media Manager
    Media Notifier Daemon (kded)

-> the devices don't get mounted anymore BUT also no directories are created in

If I start "KDED Media Manager" again the problem reappears.

Looking at the audit.log shows that the UID for the mount command is mine and
not root.

Looking at lshal output you see:

udi = '/org/freedesktop/Hal/devices/volume_uuid_a07092a0_d89c_467a_81c4_c247191d
  info.hal_mount.mounted_by_uid = 500  (0x1f4)  (int)
  info.hal_mount.created_mount_point = '/media/Backup'  (string)
  volume.is_partition = true  (bool)
  volume.is_disc = false  (bool)
  volume.is_mounted = false  (bool)
  volume.mount_point = ''  (string)
  volume.label = 'Backup'  (string)

So HAL thinks it's not mounted (that would explain why the desktop shows them as
unmounted) but still it has been mounted by UID=500 (that's me). If the KDED
Media Manager is not running the first two lines (.hal_mount.) don't exist.

I couldn't find any configuration options for "KDED Media Manager" that controls
the automatic mounting.

I have the feeling that something is missing in the KDED Media Manager. Maybe it
is not updating the information to HAL correctly?

Please tell me if you need more complete logs...

Comment 5 Stefan Becker 2006-02-24 06:19:27 UTC
I just deleted my KDE configuration and started with a fresh one for KDE 3.5.1.
The problem still exists, so it is not a KDE setting which might have been wrong
while migrating through different KDE 3.x versions in FC4.

Comment 6 Stefan Becker 2006-03-11 08:54:56 UTC
OK, now I tried with GNOME: same problems with USB storage devices which have
ext3 fs. USB sticks with vfat only get automatically mounted if you have
selected the option in the preferences.

BTW: After the ext3 volumes are mounted, they don't show up on KDE/GNOME
desktop. So the only chance to unmount them is for root to use "umount
/media/*". I noticed that this changes the security context of /etc/mtab so that
future updates of /etc/mtab fail and thus "mount" doesn't work correctly
anymore. Only /proc/mounts shows all mounts correctly. You can restore normal
behavior with "restorecon -v /etc/mtab", but you have to do that after each
"umount /media/*".

If you only hot-plug USB devices with vfat fs, the security context of /etc/mtab
doesn't change and therefore "mount" works correctly all the time.

Can you please retest with an USB device formatted with ext3 fs?

Comment 7 Stefan Becker 2006-03-11 18:15:31 UTC
Tested also with CD & DVD: they behave like vfat formatted storage devices, ie.
they get mounted automatically but their status is shown correctly on the desktop.

So it seems that only ext3 (or maybe other than vfat/is9660/udf) formatted
removable storage devices don't work correctly.

Comment 8 Stefan Becker 2006-03-16 02:24:38 UTC
I found out that the Media Manager stores the user preferences in


If you change the properties of a storage media device it stores the changes
there indexed by the HAL identifier, e.g.



Comparison of the Properties... dialog of vfat/iso9660 vs. ext3 shows that the
KDE Media Manager doesn't offer any filesystem specific options for ext3, ie.
"Mount as user". Maybe it needs to be recompiled with ext3 support? Or maybe
it's totally missing from the code, ie. this would be an upstream bug?

Comment 9 Stefan Becker 2006-04-29 04:13:44 UTC
It works OK now with the latest updates for FC5:

$ rpm -q kdebase dbus hal kernel

Maybe it was a bug in KDE 3.5.1...

Note You need to log in before you can comment on or make changes to this bug.