Re: Compactflash cards dying?

Martin K. Petersen
2003-02-03T13:59:00Z

>>>>> "Bryan" == Bryan Andersen <bryan@bogonomicon.net> writes:

Bryan> Use a file system that is designed for use on FLASH devices.
Bryan> In general FLASH devices are not very useable for systems that
Bryan> need to modify data on the disk often.

Just a heads up that flash (as in MTD) != Compact Flash.

For all practical purposes a Compact Flash is an IDE disk (Or a an IDE
controller with a disk behind it. Depends how you wire it).

Internally, the Compact Flash does all the wear averaging that a flash
filesystem like jffs2 provides. Transparently to the application.

All Linux sees is a linear stream of bytes. Just like a disk. And it
should be treated as such.

Bryan> You may wish to look at the virtual memory file system
Bryan> available in the kernel if you have enough RAM. You would
Bryan> mount your CompactFlash device read only and have all updates
Bryan> go to the virtual memory filesystem. When you want to commit
Bryan> the changes, remount the CompactFlash read/write and save the
Bryan> changes then remount it read only.

tmpfs to the rescue!

Bryan> You would be surprised how fast a million writes can happen on
Bryan> a disk.

Yup.

You would also be surprised how long it takes to actually *perform* a
million writes on a slow piece of media like Compact Flash ;)

--
Martin K. Petersen Wild Open Source, Inc.
mkp@wildopensource.com http://www.wildopensource.com/