How to format a pen drive?

Mike McCarty Mike.McCarty at sbcglobal.net
Fri Nov 10 17:00:54 UTC 2006


Tim wrote:
> On Fri, 2006-11-10 at 22:51 +0800, FuziOK wrote:
> 
>>What does "premature wearout" mean? Why does it happen?
> 
> 
> They only have a finite number of writes that they can manage, before
> wearing out.  And it's not a very high value.

More precisely, they have a finite number of erasures. FLASH is a type
of EEPROM (Electrically Erasable Programmable Read Only Memory). It is
divided into chunks called sectors. When one wants to write a value to
a byte in a sector, the device erases the sector, and then writes the
byte. In practical terms, this means that one reads the entire sector,
modifies the byte(s) in question in RAM, and then rewrites the entire
sector from the modified copy.

Whether the value be "very high" is a subjective matter. Typical number
of erasures to wearout is on the order of 100,000 erasures for each
sector. OTOH, having things like prelink which go looking all through
everywhere can make the number of accesses higher than one would at
first think. Typical sector size is 128KB, so several directory entries
may be in a single sector. If each of them needs updating, then the
sector may be written multiple times as a result of an ls, for example.

> If you have a filing system that is continually writing something to the
> drive, it'll wear it out quicker.  Such as, updating file accessed
> times, etc.

That is certainly one of the considerations. If one is careful not
to store access times, for example by mounting with -o noatime,
one can alleviate this somewhat. But that means that you have to make
the appropriate entry in /etc/fstab on all machines which you intend to
use the intentionally portable FLASH drive, to make sure this is done.
I suggest that this is not best practice, as some of the machines may
not be yours, and one may also forget.

Also, there is the issue of not all machines one might want to mount
the device on supporting a *NIX type FS. But that is a separate issue.

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the users mailing list