Excerpts from Denis A. Altoé Falqueto's message of 2010-06-29 00:09:11 +0200:
On Mon, Jun 28, 2010 at 5:52 PM, Philipp Überbacher <hollunder@lavabit.com> wrote:
Actually I was recently wondering a bit about the unmounting part, especially with USB sticks. I do have udev rules, taken from the wiki, in place that handle automatic mounting. There's also a unmounting part, which afair removes created dirs, but I guess this is only called after the usb drive is removed. It did happen more than once to me that a file transfer seemed to be complete, but when I just removed the drive, the data was gone. Is there a way to provide automatic safe removal? Manual unmounting is a bit of a PITA, as you need to have a terminal ready, guess sdN and type a line, where the device guessing part is the most problematic. I tend to use /dev/sdN to make sure that I remove the device from all mount points. Thanks for any advice.
Well, automounting is really easy, but auto-unmounting (!?) is complex, because what triggers the event is the removal of the device, but after you take it, the S.O. can't do anything about it anymore. I use KDE, so I can mount and unmount easily. Gnome and XFCE also offer good services for that. But without those, I fear that you'll need to issue unmount manually.
That's what I thought. At this time I still use XFCEs thunar in case I want a graphical file manager, which uses HAL for mounting/unmounting, but I never managed to configure it correctly, so all I get is an error. But since HAL is gradually becoming unnecessary I don't want to bother with it. Mounting works well with udev alone. I was hoping that the device could, when inactive, be put into a state that prevents data loss. Not sure, kind of mount-on-demand maybe. I know far to little of what's going on to see a solution, I'm not even sure what causes the data loss when the writing is apparently finished. Indications for being finished is with my usb stick for example a differently glowing light and the indication in software of course. -- Regards, Philipp -- "Wir stehen selbst enttäuscht und sehn betroffen / Den Vorhang zu und alle Fragen offen." Bertolt Brecht, Der gute Mensch von Sezuan