The best OS to deal with Flash Cards

D. Hugh Redelmeier hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Mon Aug 29 15:08:22 UTC 2005


| From: Lennart Sorensen <lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org>

| As for OS, well watch out for redhat/fedora and a few others that have
| auto mounting of usb memory devices, since they have sync enabled by
| default in a lot of cases, and vfat with sync enabled is very slow and
| causes a ton of extra updates of the FAT tables and can actually wear
| out a flash card very quickly if it doesn't have decent wear leveling
| (and even if it does, it will still reduce its life span).
| 
| Not sure where the hotplug or udev or whatever scripts are that decide
| on the mount options for new devices, but hunt it down to be sure.

This worried me.  I'd not heard it before.  So I did some googling.

Michael Warfield has been making this claim.  Not all agree
wholeheartedly, but it looks as if he is at least partly right.

Starts of threads:
https://www.redhat.com/archives/fedora-list/2005-May/msg01859.html
http://www.ussg.iu.edu/hypermail/linux/kernel/0505.1/1249.html

Redhat bugzilla entry:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=157674

Here is the fix recommended by Michael for a Fedora system.  Who knows
if it applies to others.  Appears to not be needed on Fedora Core 4.
https://www.redhat.com/archives/fedora-list/2005-May/msg02183.html

Plugging in a USB flash memory on a Fedora Core 3 system, I get the
following line added to /etc/fstab:
/dev/sda                /media/DHR_Cigar        vfat    pamconsole,exec,noauto,iocharset=utf8,noatime,sync,fscontext=system_u:object_r:removable_t,managed 0 0
Notice "sync".  BTW, also notice "noatime" (good for flash, but does
not matter for VFAT in any case).

On Fedora Core 4, I get:
/dev/sdi                /media/DHR_Cigar        vfat    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
It mounted automatically, like this:
/dev/sdi on /media/DHR_Cigar type vfat (rw,nosuid,nodev,_netdev,fscontext=system_u:object_r:removable_t,user=hugh)
Notice the lack of "sync" (good for flash).  Notice the lack of "noatime" (questionable).

These settings don't appear to be under easy control of the user.  The
control files are encrypted in XML.  The man pages don't seem to
explain what to do to take control of the settings.  Linux sure is
growing a lot of fancy cruft.
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list