Direct writing with Thunar/XFCE when copying/moving files to flash memory

Preston Hagar prestonh at gmail.com
Thu Oct 14 20:48:52 UTC 2010


I am currently using Xubuntu Lucid 10.04, AMD64, although I had the
same issue with Xubuntu Hardy AMD64.

When I insert flash media into my computer (an SD Card or a USB flash
drive), I can easily mount it either through "Places" on my panel or
through the Thunar file manager.  I then can drag file or cut and
paste them with Thunar to move them to the flash media.

My problem is when I am ready to remove the card/flash drive.  If I
right-click the card in the "Places" menu on the panel, and then click
Umount, I always get a notification of "Data still needs to be written
to disk, please wait".  If I move a lot of data (say 500 MB or more)
then I pretty much never get another notification of when the writes
are completed.  If I write a small amount of information, I will get a
notification of the write being completed.

Usually, after receiving the "Data still needs to be written" message,
I run the sync command from the command line in hopes that it will
force a flush to disk.  The problem is I still occasionally remove the
media too soon and end up with either corrupted files or a corrupted
file system.


In Windows, I know I can set it where removable media is direct write.
 That is to say, writes are never cached, but instead always written
directly and immediately when the copy/move is started.  That way,
once I see the "copying" dialog go away, I know my write is complete
and can remove the card at any time.

Is there anyway to set it so that writes to flash media are direct?  I
have looked through all the GUI config options I can find and have
tried googling "linux sd direct write", "ubuntu sd direct write",
"ubuntu sd delay write" and things like that with no luck.

Anyway, I would appreciate any advice anyone might have.


Preston




More information about the ubuntu-users mailing list