[Gllug] Determine usage/lifespan of disks
Richard W.M. Jones
rich at annexia.org
Thu Jan 13 12:52:09 UTC 2011
On Thu, Jan 13, 2011 at 08:18:01AM +0000, jayeola at gmail.com wrote:
> I remember reading somewhere that the lifetime of a typical usb
> key/disk is 2x10^6 writes.
Actually what kills blocks of flash are erase cycles, which are not
directly correlated with writes.
> Are there any tools out for me to see how many writes there have
> been to a disk? Would be nice to be able to see this for myself.
I think the answer is no, the number of erase cycles is probably not
There are two things to consider: firstly your average CF or SD card
exposes a high level block device to Linux, _not_ the raw flash
blocks. These basically hide all the details from you and the
operating system, so forget about getting anything useful from them.
If on the other hand you have some flash memory as often found on
embedded devices, then it is probably exposed directly (as an 'mtd'
device). Now these you can find out a whole lot more information.
The kernel API is this:
and this page describes a little bit more about the OOB data available
and use of the 'nand' program:
It may be that the number of erase cycles is stored in the OOB area,
but that seems to depend on specifics of the flash chips and
Gllug mailing list - Gllug at gllug.org.uk
More information about the GLLUG