Unmounting USB flash disks
Hi everyone, I'm running Suse Linux 10.0 and my desktop is KDE. I have an issue with USB disks. When I plug one in, it gets recognised and mounted, and KDE asks if I want to open it in konqueror. So far so good. However, after I've finished working with it, I can't unmount it. If I right-click on it in, and select "safely remove", I get an error which says that there's no entry for this device in fstab, and I'm not root. So I have to open a shell window, become root, and unmount it. Gnome, running on Fedora Core 4 can unmount such hotplugged disks, so it must be possible. Any idea how it can be done in Suse/KDE? Do I need any extra software or configuration? Or is this a bug that I should file? Anand
On Wed, 2005-11-02 at 23:15 +0100, Anand Buddhdev wrote:
Hi everyone,
I'm running Suse Linux 10.0 and my desktop is KDE. I have an issue with USB disks. When I plug one in, it gets recognised and mounted, and KDE asks if I want to open it in konqueror. So far so good. However, after I've finished working with it, I can't unmount it. If I right-click on it in, and select "safely remove", I get an error which says that there's no entry for this device in fstab, and I'm not root. So I have to open a shell window, become root, and unmount it. Gnome, running on Fedora Core 4 can unmount such hotplugged disks, so it must be possible. Any idea how it can be done in Suse/KDE? Do I need any extra software or configuration? Or is this a bug that I should file?
Anand
I am also having this problem - it doesn't seem to hurt anything if I just remove it, but I would prefer to unmount it. Te exact error I get is: Error - kio_media_mounthelper (in the title bar) unmount:/media/Kingston is not in fstab (and you are not root) Please check that the disk is entered correctly Any help would be great.
Chris Edwards wrote:
I am also having this problem - it doesn't seem to hurt anything if I just remove it, but I would prefer to unmount it. Te exact error I get is: Error - kio_media_mounthelper (in the title bar)
unmount:/media/Kingston is not in fstab (and you are not root) Please check that the disk is entered correctly
Any help would be great.
As I understand it, if it mounts automagically, you don't have to unmount it.
On Thursday 03 November 2005 02:31, James Knott wrote:
Chris Edwards wrote:
I am also having this problem - it doesn't seem to hurt anything if I just remove it, but I would prefer to unmount it. Te exact error I get is: Error - kio_media_mounthelper (in the title bar)
unmount:/media/Kingston is not in fstab (and you are not root) Please check that the disk is entered correctly
Any help would be great.
As I understand it, if it mounts automagically, you don't have to unmount it.
That's right, you wait for activity to finish and then you can just pull the plug. SuSE will automatically see the disk is gone and then is quite happy. You're wasting your time trying to unmount manually, don't worry about it. I've been doing this with CF and SD card readers for months now with no worries. HTH Fergus
On Thursday 03 November 2005 10:18, Fergus Wilde wrote:
As I understand it, if it mounts automagically, you don't have to unmount it.
That's right, you wait for activity to finish and then you can just pull the plug. SuSE will automatically see the disk is gone and then is quite happy. You're wasting your time trying to unmount manually, don't worry about it.
I've been doing this with CF and SD card readers for months now with no worries.
Ok, thanks for this advice. Do you think it would be ok even if the external disk has an ext2 file system on it? I have a Lacie external USB disk, which I use to backup my files, and I formatted it as ext2. I know that it gets mounted with the sync option, so in theory, all my data should be on the disk when the command completes, but I want to be sure.
On Thursday 03 November 2005 10:24, Anand Buddhdev wrote:
On Thursday 03 November 2005 10:18, Fergus Wilde wrote:
As I understand it, if it mounts automagically, you don't have to unmount it.
That's right, you wait for activity to finish and then you can just pull the plug. SuSE will automatically see the disk is gone and then is quite happy. You're wasting your time trying to unmount manually, don't worry about it.
I've been doing this with CF and SD card readers for months now with no worries.
Ok, thanks for this advice. Do you think it would be ok even if the external disk has an ext2 file system on it? I have a Lacie external USB disk, which I use to backup my files, and I formatted it as ext2. I know that it gets mounted with the sync option, so in theory, all my data should be on the disk when the command completes, but I want to be sure.
I haven't done this using a disk with ext2 on it, so I don't know for sure. I was talking about the flash cards (typically from cameras) mentioned by the OP (I think). But if your disk is being mounted magically under /media, and the mount type is sync, then the same should apply: once you're sure file operations have finished, there is no cache waiting to be flushed and thus you should be fine to just pull the plug. I have actually had difficulty getting my external disk to mount as it should under /media, so I've made it a conventional mountpoint in /etc/fstab and am mounting and umounting it by hand. You could always go that route; then you'll know you've successfully umounted the disk before removing the device. But AFAIK you'd be fine doing it the first way. HTH Fergus
soneone
Ok, thanks for this advice. Do you think it would be ok even if the external disk has an ext2 file system on it? I have a Lacie external USB
May I suggest using ext3 in this disk ? (tune2fs -j /dev/sdX1 where X is your drive letter)
disk, which I use to backup my files, and I formatted it as ext2. I know that it gets mounted with the sync option, so in theory, all my data should be on the disk when the command completes, but I want to be sure.
OK, if you use an external USB disk as a backup, be vewwy vewwy wawwy (very weary). I have had a few too many of these external disks die on me. And there is no advance warning, they just all of a sudden stop .
I haven't done this using a disk with ext2 on it, so I don't know for sure. I
I have (well ext3), in fact I am currently using a 60G laptop disk hooked up to one of those fancy (and cheap) IDE2USB converter thingies, and it just works. You have to make sure there is no activity on the disk (easy, just see if the light is flashing) and then pull the plug. However, again, if that disk is your sole and only copy of important data, I would take the extra 5 seconds it takes, and become root and eject the disk eject /dev/sdX1 before unplugging it. Gerhard, <faliquid@xs4all.nl> == The Acoustic Motorbiker == -- __O The complete works of William Shakespeare, adapted for this =`\<, signature by nailing them to a piece of wood, and banging it (=)/(=) repeatedly on the keyboard ,km, nmvbnmfcvvfgjehyfty7t4690iu8p-oilpm/l;.k, ,.mnnmbvvbchfdtgr5rt4es
On Wed, 2005-11-02 at 20:30 -0600, Chris Edwards wrote:
On Wed, 2005-11-02 at 23:15 +0100, Anand Buddhdev wrote:
Hi everyone,
I'm running Suse Linux 10.0 and my desktop is KDE. I have an issue with USB disks. When I plug one in, it gets recognised and mounted, and KDE asks if I want to open it in konqueror. So far so good. However, after I've finished working with it, I can't unmount it. If I right-click on it in, and select "safely remove", I get an error which says that there's no entry for this device in fstab, and I'm not root. So I have to open a shell window, become root, and unmount it. Gnome, running on Fedora Core 4 can unmount such hotplugged disks, so it must be possible. Any idea how it can be done in Suse/KDE? Do I need any extra software or configuration? Or is this a bug that I should file?
Anand
I am also having this problem - it doesn't seem to hurt anything if I just remove it, but I would prefer to unmount it. Te exact error I get is: Error - kio_media_mounthelper (in the title bar)
unmount:/media/Kingston is not in fstab (and you are not root) Please check that the disk is entered correctly
This has been bugging me for a while and some clues in this thread have led me to figure out what is going on. As others point out the "disk" is mounted with the sync option (unless you turn it off as per the 10.0 release notes) and yanking it out is OK but it offends my sensibilities to do so. If you right click on the desktop device you get a "Safely Remove" action but this complains that you don't have permission to unmount the device. This action is controlled in this menu option: /opt/kde3/share/apps/konqueror/servicemenus/media_safelyremove.desktop The action to perform is 'Exec=kio_media_mounthelper -s %u' which will unmount and eject the media. Change this, or add another menu option, to just eject the media with 'Exec=kio_media_mounthelper -e %u' and you can now issue the eject which will remove the device cleanly and the icon will disappear automatically. Possibly only a cosmetic enhancement but it makes me feel a lot happier. Cosmo
On Tuesday 15 November 2005 09:15, Mr Banana wrote:
On Wed, 2005-11-02 at 20:30 -0600, Chris Edwards wrote:
On Wed, 2005-11-02 at 23:15 +0100, Anand Buddhdev wrote:
Hi everyone,
I'm running Suse Linux 10.0 and my desktop is KDE. I have an issue with USB disks. When I plug one in, it gets recognised and mounted, and KDE asks if I want to open it in konqueror. So far so good. However, after I've finished working with it, I can't unmount it. If I right-click on it in, and select "safely remove", I get an error which says that there's no entry for this device in fstab, and I'm not root. So I have to open a shell window, become root, and unmount it. Gnome, running on Fedora Core 4 can unmount such hotplugged disks, so it must be possible. Any idea how it can be done in Suse/KDE? Do I need any extra software or configuration? Or is this a bug that I should file?
Anand
I am also having this problem - it doesn't seem to hurt anything if I just remove it, but I would prefer to unmount it. Te exact error I get is: Error - kio_media_mounthelper (in the title bar)
unmount:/media/Kingston is not in fstab (and you are not root) Please check that the disk is entered correctly
This has been bugging me for a while and some clues in this thread have led me to figure out what is going on. As others point out the "disk" is mounted with the sync option (unless you turn it off as per the 10.0 release notes) and yanking it out is OK but it offends my sensibilities to do so. If you right click on the desktop device you get a "Safely Remove" action but this complains that you don't have permission to unmount the device. This action is controlled in this menu option:
/opt/kde3/share/apps/konqueror/servicemenus/media_safelyremove.desktop
The action to perform is 'Exec=kio_media_mounthelper -s %u' which will unmount and eject the media. Change this, or add another menu option, to just eject the media with 'Exec=kio_media_mounthelper -e %u' and you can now issue the eject which will remove the device cleanly and the icon will disappear automatically.
Possibly only a cosmetic enhancement but it makes me feel a lot happier.
Cosmo
Many thanks for that pointer. I had written a msg asking the same thing b-4 getting my afternoon e-mail. -- ...Yogich
On Tuesday 15 November 2005 09:15, Mr Banana wrote:
This has been bugging me for a while and some clues in this thread have led me to figure out what is going on. As others point out the "disk" is mounted with the sync option (unless you turn it off as per the 10.0 release notes) and yanking it out is OK but it offends my sensibilities to do so. If you right click on the desktop device you get a "Safely Remove" action but this complains that you don't have permission to unmount the device. This action is controlled in this menu option:
/opt/kde3/share/apps/konqueror/servicemenus/media_safelyremove.desktop
The action to perform is 'Exec=kio_media_mounthelper -s %u' which will unmount and eject the media. Change this, or add another menu option, to just eject the media with 'Exec=kio_media_mounthelper -e %u' and you can now issue the eject which will remove the device cleanly and the icon will disappear automatically.
Possibly only a cosmetic enhancement but it makes me feel a lot happier.
Cosmo
Would you per-chance know about writing a udev rule for something of this nature? All attempts to do so while following the manual have failed. :-\ ..And I thought the last distro was difficult. It was EASY by comparison. -- ...Yogich
On Tue, 2005-11-15 at 13:11 -0600, Yogich wrote:
On Tuesday 15 November 2005 09:15, Mr Banana wrote:
This has been bugging me for a while and some clues in this thread have led me to figure out what is going on. As others point out the "disk" is mounted with the sync option (unless you turn it off as per the 10.0 release notes) and yanking it out is OK but it offends my sensibilities to do so. If you right click on the desktop device you get a "Safely Remove" action but this complains that you don't have permission to unmount the device. This action is controlled in this menu option:
/opt/kde3/share/apps/konqueror/servicemenus/media_safelyremove.desktop
The action to perform is 'Exec=kio_media_mounthelper -s %u' which will unmount and eject the media. Change this, or add another menu option, to just eject the media with 'Exec=kio_media_mounthelper -e %u' and you can now issue the eject which will remove the device cleanly and the icon will disappear automatically.
Possibly only a cosmetic enhancement but it makes me feel a lot happier.
Cosmo
Would you per-chance know about writing a udev rule for something of this nature? All attempts to do so while following the manual have failed. :-\
I did try playing around with a udev rule that would mount the device with the user option set so that I could at least unmount it without being root. I followed the example in the SuSE 10 release notes where they show how to unset the sync flag for a USB device: file:///usr/share/doc/release-notes/RELEASE-NOTES.en.html#18 Although I could get the rule excepted it would not actually honour the addition of a user option. I gave up this route when it looked like I'd have to pull the source for udev to see what was going on. Cosmo
participants (7)
-
Anand Buddhdev
-
Chris Edwards
-
Fergus Wilde
-
Gerhard den Hollander
-
James Knott
-
Mr Banana
-
Yogich