You are not logged in.
Hi,
I am not that experienced in linux, and I laways thought 'umount'ing an USB-device was enough to safely remove it, but my Sandisk Sansa MP3-player proved this wrong, since my DB was always corrupted after a umount + disconnect.
The solution was to do a umount AND an eject for all partitions on the USB-device.
My question: why does no file manager that I have used already (nautilus, pcmanfm, thunar) have the functionality to safely remove the hardware? Or does it and did I just miss this?
Zl.
Offline
As far as I know there is a way to accomplish this in nautilus: Nautilus-scripts. I don't have experience on that, but I guess http://g-scripts.sourceforge.net/ was a good point to start. Hope this helps.
Offline
Hmmm... Thank you for the suggestion, but why isn't this done by default by any file manager? I don't think it has anything to do with KISS? I would like to know if there is a (good) reason not to include such a trivial but very useful function to a file manager.
Since pcman resides on this forum (and I am a huge fan of pcmanfm and lxde), I will ask his opinion on this subject...
Zl.
Offline
What about a normal USB pen? Does it corrupt you filesystems?
Arch - It's something refreshing
Offline
Thunar-volman has the ability to eject usb volumes as far as I remember. It is of course an addition to Thunar... but Thunar doesn't do any volume management at all without it.
I haven't lost my mind; I have a tape back-up somewhere.
Twitter
Offline
About the USB-pen: it is not the FS of the pc I'm worried about, it's the FS on the removable device. I haven't had any problems with this, other than a corrupted dbase on my MP3-player (which is annoying, but not problematic).
Maybe it is safe to remove hardware after (all) partition(s) on that device are unmounted, but it is kind of scary to see all LED lights turned on when you'd like to unplug the device...
About Thunar-volman: I know the package, but I didn't know that it had such function. I'll look into that, but still I am left with the question why it isn't built in into the filemanager. If it is but a script to be added to the package, than why leave it out? Am I missing something? Is the 'safely remove hardware' something specificly for windows and not necessary in linux?
Zl.
Offline
Funny you should ask this. I had the misfortune of spending all afternoon trying to do this as a regular user (not my computer) on a system that had hal-automount, but did not have any way to unmount using hal (eject was not updated).
It works like this:
If you have hald (pacman -S hal) running, and it is configured correctly, your devices will automount. You should not mount them yourself. The best way to do this, in my opinion, is to use thunar and thunar-volman, turn on and configure volume management from the thunar preferences, and make sure hal is running in your x-session. Throw it in .xinitrc or what have you.
Then, you can either use the eject command, which will safely unmount when it's ready, or just right click and unmount from thunar itself. Thunar will tell you when the device is ready.
If you're morbidly curious, all thunar-volman (or nautilus-scripts) is doing is using dbus to send a mount or unmount message to hal. The message is very long and very complex and you will be very, very thankful you have these nice scripts to do it for you.
EDIT: In answer to your question...it's not builtin because it's communicating with an outside package: hal. Using dbus. Both nautilus and thunar run perfectly fine without dbus/hal running.
Last edited by buttons (2008-09-11 23:28:45)
Cthulhu For President!
Offline
Thank you for your answer. I guess it makes sense to make it an extra package on top of the base file manager-package because of the extra dependencies.
Then it might be time for me to check out thunar again.
On a sidenote: I'm using a udev-rule to mount my removable storage automatically and 'safely removing USB devices' is just a matter of a combination of 'umount -l <partition>' and 'eject <device>' - Maybe it is hal that makes it so complex to eject?
Zl.
Offline