Bug 182374
Summary: | USB storage devices with ext3 fs get automatically mounted but desktop not notified | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Stefan Becker <chemobejk> |
Component: | kdelibs | Assignee: | Than Ngo <than> |
Status: | CLOSED WORKSFORME | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-04-29 04:13:44 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Stefan Becker
2006-02-22 02:22:09 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. We do not auto mount devices. gnome-volume-manager does that in gnome. It shouldn't be running if you are running KDE. 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? I now disabled all KDE components which have something to do with media plugging/mount: KDED Media Manager Media Notifier Daemon (kded) kwikdisk -> the devices don't get mounted anymore BUT also no directories are created in /media. 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 9681' 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... 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. 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? 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. I found out that the Media Manager stores the user preferences in .kde/share/config/mediamanagerrc If you change the properties of a storage media device it stores the changes there indexed by the HAL identifier, e.g. [/org/freedesktop/Hal/devices/volume_label_EOS_DIGITAL] atime=false automount=false mountpoint=/media/EOS_DIGITAL quiet=false ro=false shortname=lower sync=false uid=true utf8=true [/org/freedesktop/Hal/devices/volume_uuid_357f7cd6_e340_47e2_9a1e_0393ada49c8b] ... 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? It works OK now with the latest updates for FC5: $ rpm -q kdebase dbus hal kernel kdebase-3.5.2-0.2.fc5 dbus-0.61-3 hal-0.5.7-3 kernel-2.6.16-1.2096_FC5 Maybe it was a bug in KDE 3.5.1... |