[Hampshire] Re: Use of 4 Gb USB data stick for backup

Top Page

Reply to this message
Author: David Webb
Date:  
To: hampshire
Subject: [Hampshire] Re: Use of 4 Gb USB data stick for backup
After all your input, for and against, I splurged out on a cheap 8 Gb PEAK III
USB 2.0 Flash Drive (dabs £46.20 with delivery). Then ... .

1.0 Nice unit but the data write speed was only ~100 kbyte/sec. The
manufacturer quotes 12.1 MB/s for read, 2.1 MB for write (I presume B means
byte). So maybe it was too cheap. Searched with Google and found slow
transfers were common with Linux. The drive has a fat32 file system which
was mounted in sync mode. Apparently that increases the number of writes by
a factor of 10 or so (sorry I lost the link that told me that). Microsoft is
reported to use async - treating it as a CD. The linux kernel group are
treating it as a feature: http://bugzilla.kernel.org/show_bug.cgi?id=4882

SuSE 10.0 has a solution written up in the release notes. This sets up an xml
file for hal, which identifies the drive using the volume uuid (from "lshal")
and turns off sync. I suspect that /etc/mtab can be modified in the same way.
Once mounted, root can also use "mount -o remount,async /dev/sd?" the ? being
the device. In all these cases the command "sync" should be used before
removing the drive. With async my write speed increased to about 1 Mbyte/s.

2.0 Many of the pages I found from Google also mention the rewrite limit of
flash memory and dead drives. What worried me is that one web page stated
that writing a file of a few hundred Mbytes could easily wear out the drive
because of the many writes to the file table. In my case backing up some
large, slightly changed files every night might soon wreck the drive.

I found it difficult to get hard information. Wikipedia (Flash Memory) talks
of only 1000 write-erase-cycles per block in one part but later this becomes
100,000 for NOR and 1,000,000 for NAND memory.

One solution is to use the JFFS2 or YAFFS2 file systems (see wikipedia) which
use a trick of marking links as being dead without rewriting a block of
memory. This is because you can set a bit as many times as you like - it is
the erase, which has to be done a block at a time, which causes wear.
However some (all?) manufacturers are supposed to have hardware which moves
logical blocks around in memory to prevent wear.

Unfortunately PEAK do not say if they have done this (they do not even say
wether it is NOR or NAND memory) but by paying extra I am supposed to get a
warranty extended to 2020 - so I presume they have both NAND memory and the
extra hardware.

Anyway be warned and try and find out what you are buying. I have just about
decided I do not need JFFS2 or YAFFS. However should I stay with vfat, which
does not like the many soft links I use, or should I reformat with ext2/3 or
reiserfs? Is there anyone in the linux community looking at the trade offs?

Regards,

David Webb