Bug 117945 - "Safely Remove" menu item of removeable media doesn't work.
Summary: "Safely Remove" menu item of removeable media doesn't work.
Status: RESOLVED FIXED
: 131546 135999 (view as bug list)
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: Other SuSE Linux 10.0
: P1 - Urgent : Major
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-20 02:56 UTC by Zhe Su
Modified: 2006-02-28 15:29 UTC (History)
7 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zhe Su 2005-09-20 02:56:26 UTC
How to reproduct:

Plug a USB disk, open "My Computer" (konqueror), then right click on the device
icon, choose "Safely Remove" menu item. Then a dialog will popup with message
:"unmount /media/usbdisk is not in the fstab (and you are not root) Please check
that the disk is entered correctly."
Comment 1 Danny Al-Gaaf 2005-09-20 08:25:44 UTC
Hm ... looks like a KDE problem. For umount a device must not be in the fstab. 
Reassign the bug
Comment 2 Danny Al-Gaaf 2005-10-11 14:37:44 UTC
This is already present in the final version of 10.0
Comment 3 Zhe Su 2005-10-24 12:05:36 UTC
It's also available in GNOME environment. So it's likely an underlying issue.
Comment 4 Danny Al-Gaaf 2005-10-24 12:18:14 UTC
I think this a problem of GNOME and KDE in this case. If you want to mount or umount a device you don't need a entry in fstab. Maybe check /proc/mounts instead of /etc/fstab or change the called umount command. 
Comment 5 Justin Sheckler 2005-11-02 00:30:11 UTC
This issue existed in 9.3 and is not present in other distros that use KDE.
Comment 6 Danny Al-Gaaf 2005-11-02 18:27:31 UTC
*** Bug 131546 has been marked as a duplicate of this bug. ***
Comment 7 Felix Rommel 2005-11-06 22:03:06 UTC
In Ubuntu you don't have these problems with KDE and Gnome. There my partitions are mounted automatically and Gnome adds some icons on the desktop. With a right click on it I can umount my devices as normal user without any problems.

So I don't think that this is a Gnome or KDE problem except the Ubuntu people have patched the versions in their distributions.

I'm also not able to umount the devices in a terminal as normal user. Another prob is that my external hard disc is mounted 2 times in /proc/mounts but I don't think that there is the problem for not being able to umount the devices as normal user.
Comment 8 Danny Al-Gaaf 2005-11-06 23:10:45 UTC
Ubuntu maybe sync the fstab, but we do not want that on SUSE. If KDE or GNOME look for fstab, this is a Bug, because you can also mount manually devices without fstab and you must in this case also be able to umount from KDE/GNOME.

Btw. This are automatically automounted hotpluggable devices. You don't need to umount them as user. You only need to remove them. If you see the device double in /proc/mounts this is o.k. one is the subfs mount and the other the real mount to the fs if the volume is in use. If there is only one mount in mounts you can remove the device savely. 
Comment 9 Zhe Su 2005-11-07 01:49:02 UTC
In any case, we need fix this issue in our product. It's very annoying.
Comment 10 Bryce Nesbitt 2005-11-12 03:55:41 UTC
I get the same thing: Plug in a USB hard drive. Attempt to remove the partitions and you'll get:

  umount: /media/usbdisk_2 is not in the fstab (and you are not root)
  Please check that the disk is entered correctly.

Similar results come from the command line:
   bryce@linux:/media> umount usbdisk_6
   umount: /media/usbdisk_6 is not in the fstab (and you are not root)

bryce> cat /proc/mounts
rootfs / rootfs rw 0 0
...
/dev/hdb9 /mnt/hdb9 ext2 rw,noatime 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/sda1 /media/usbdisk_2 subfs rw,sync,nosuid,nodev 0 0
/dev/sda5 /media/usbdisk_3 subfs rw,sync,nosuid,nodev 0 0
/dev/sda7 /media/usbdisk_4 subfs rw,sync,nosuid,nodev 0 0
/dev/sda9 /media/usbdisk_6 subfs rw,sync,nosuid,nodev 0 0
/dev/sda6 /media/usbdisk_7 subfs rw,sync,nosuid,nodev 0 0
/dev/hdd /media/dvd subfs ro,nosuid,nodev 0 0
Comment 11 Danny Al-Gaaf 2005-11-30 07:37:45 UTC
*** Bug 135999 has been marked as a duplicate of this bug. ***
Comment 12 Bryce Nesbitt 2005-12-03 06:54:15 UTC
It would be nice, once this works, to get feedback that the drive is actually unmounted and safe to unplug.  Have *all* partitions been unmounted, for example?
Comment 13 Carlos Sanchis 2006-01-17 00:46:36 UTC
This is what I got when I reported it at bugs.kde.org:
http://bugs.kde.org/show_bug.cgi?id=116209

So either the action for that entry in the context menu is changed for something else in the SuSE packages, or the option is removed (you can just remove the device; the only problem is if you're not carefull and interrupt some transfer).
Comment 14 Karl Pietrzak 2006-01-17 21:03:28 UTC
I would just like to say that I too am having this problem, and the KDE folks say it's a SuSE thing and have their bug on this topic:
http://bugs.kde.org/show_bug.cgi?id=116209

Apparently there's a solution with an alternative HAL policy:
http://idud.blogspot.com/2005/12/alternative-suses-hal-policy.html

This seriously needs to be fixed ASAP.
Comment 15 Roberto Grassi 2006-01-21 23:12:46 UTC
"Safely Remove" menu item in KDE is controlled by /opt/kde3/share/apps/konqueror/servicemenus/media_safelyremove.desktop: in the last line you can see that 'kio_media_mounthelper' is called with the -s option:

Exec=kio_media_mounthelper -s %u

I think that a good fix is to change this option to -e:

Exec=kio_media_mounthelper -e %u

AFAIK, with the -s option you first call 'umount' and then 'eject', while with the -e one you simply call 'eject'. I think however that the two options are equivalent because 'man eject' says that "If the device is currently mounted, it is unmounted before ejecting". Unlike 'umount', the 'eject' command has the suid bit set, allowing a normal user to get root's privileges and remove the device.
Comment 16 jo de baer 2006-01-22 11:24:55 UTC
Hi,

this bug is somewhat related to the "slow (writing to) USB device" problem that we have since recently - and for which I don't know SuSE 10.1 will have a solution (since there is discussion on how to fix this the best way).

Now I don't know if we can do this, but would it be possible to, in the same right-click menu that you get when clicking on the icon for the USB MS device, add an item "Remount async" that basically does "mount -o remount,<old options>,async" <device file> ? This is what I do in a terminal now each time I want to do something with USB. And yes - after that I do "eject" - also in a terminal :-) (so letting the GUI do that would be ok I think) .

What would be neat would be that - when you select that option, that you get a warning pop-up saying "Now before removing the device remember to select "Safely remove media" from this same menu" or something. 

This would at least for now I think be a "workable" solution that is easy to implement and which prevents having to open a terminal ...

Of course I don't know if it is (easily) possible to let the user do the remount (user controlled umount seems to be a problem ...) ?

Just an idea - Jo.
Comment 17 Stephan Kulow 2006-01-27 13:49:54 UTC
works now (beta2 should already work, beta3 for sure)
Comment 18 jo de baer 2006-01-27 14:39:21 UTC
USB stick however gets still mounted without subfs and with sync (slow) ... but so is the cdrom it seems! No more subfs anywhere then (ok - for cdrom it didn't maybe make sense) ?

I still think we should allow the user to easily (i.e. within GUI) remount removable storage with "async" ... ok - I guess you can do it somewhere (permanently) in hal-device-manager, but I mean _easy_ :-)
Comment 19 Stephan Kulow 2006-01-27 14:56:06 UTC
try beta3 when it comes out: http://ktown.kde.org/~coolo/snapshot1.png 
Comment 20 jo de baer 2006-01-27 15:07:37 UTC
Great!!! If that thing also pops a warning in your face (you know which one) when ever you switch to "async" then I think this is a excellent solution for the problem. If not then I think we are still "good". I'll test with my parents ;-)
Comment 21 su zu 2006-02-21 08:16:35 UTC
Let's go easy on the idiot messages here. I'd hate to see this become a microsoft "are you really, really sure....?" syndrome where I have to battle through 3 or 4 dumb messages at every turn.

The user needs to learn this once , not be pestered for the rest of his life.

[If KDE is broken and is not getting fixed upstream then it's upto the distro to patch it before distributing. Remove the redundant call to umount in the helper.
.]

Requests should also be made at the kernel level to fix this vfat module. The sync option has been seriously flawed since 2.6.12 

The beta looks very encouraging , nice to have high-level access to these options rather than having to hack hal config files to get the desired result.

That notwithstanding , the above issues need fixing it that has not now been done.

Regards.
Comment 22 su zu 2006-02-21 09:18:23 UTC
Stephan , what's the release schedule for beta3 you refer to above? I dont see anything about beta releases on developers corner schedules.

Can I find snapshots of kde beta or do I need to hook up to svn?

Thz.
Comment 23 Stephan Kulow 2006-02-28 15:29:12 UTC
this talks about 10.1 beta