Darron Black

Using MMC/SD cards in a Linux system with unpredictable power losses

Discussion created by Darron Black on Dec 10, 2011
Latest reply on Dec 26, 2011 by Darron Black

How might we best configure a MX28 Linux-based platform so that we can write data to MMC/SD cards and not lose data in the event of a power loss? (or how to reduce that risk as much as possible)

 

I am open to formatting the data in any way necessary.  (Any filesystem, etc)

 

Our performance requirements are quite low (writes of ~100 bytes every couple of seconds).

 

I'm currently considering using JFFS2 via block2mtd...  is there any serious problem with this on MMC/SD?  Anything in the MMC/SD layer that invalidates all the protections it attempts? I would try to take care to match erase block sizes to a reasonable minimum that should always work (128KB)

 

Alternatively, we could keep VFAT and preallocate large files to write into.  However, we'd have to somehow enforce erase block alignment and remove metadata updates like "last modified time".  That is attractive in the sense that customers could stick the cards into their PCs to get data in a bind.

 

Or...  does anyone have experience with configuring this platform to do emergency disk syncs as the voltage drops below a threshold? MMC/SD might not be predictable enough and almost certainly isn't fast enough for that.

 

Our platform does not have any battery (just one for an external RTC).

Outcomes