Skip to contentSkip to conversation

File system recommendation for SD cards

OT? Albrecht Dreß 3 participants 4 messages May 18, 2006 – May 24, 2006 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,

sorry if this is an ot question - I could not find an answer for this question on the web. Hope the question is not /too/ dumb, though...

I plan to use an SD card in an embedded system (arm9/Linux 2.6 based). The SD card shall buffer measurement data files which are created about every minute and are each ~20 kByte large. On a regular basis, a remote machine will load the files from the embedded system which in turn unlinks them, thus creating a big "ring buffer".

After reading a Sandisk whitepaper about wear levelling [1] I thought about using a standard vfat file system on it (mainly to have the ability to remove the sd card and to read it on a Winbloze pc). However, I read a report that using a sync vfat fs could lead to fast corruption of the SD card [2].

Questions:
Would using JFFS2 on the SD card improve the lifetime of the device? Does anyone have experiences about the achievable lifetime in my scenario, for both vfat or jffs2?
How would I practically set up a jffs2 fs on the sd card?

Thanks in advance for any input,
Albrecht

[1]
http://www.sandisk.com/Assets/File/OEM/WhitePapersAndBrochures/RS-MMC/WPaperWearLevelv1.0.pdf
[2] http://www.ussg.iu.edu/hypermail/linux/kernel/0506.0/0058.html

Signature · 9 lines
LIOS Technology GmbH
Dr. Albrecht Dreß
Project Engineering / Software Design
Schanzenstrasse 6 - 20
D-51063 Köln
Germany

Phone +49 221 676 2742
Fax   +49 221 676 2069
#1 lore raw
Quoted 1 line · Albrecht Dreß

Would using JFFS2 on the SD card improve the lifetime of the device?

Possibly, yes.

Quoted 3 lines

Does anyone have experiences about the achievable lifetime in my scenario, for both vfat or jffs2?
How would I practically set up a jffs2 fs on the sd card?

The SD card won't present itself as a normal flash device. It has flash _internally_ but you can't get at it directly -- you can only treat it like a hard drive with 512-byte sectors. So you need to use the 'block2mtd' driver so that you can use it as an MTD device and use JFFS2 on it.

Signature · 1 line
dwmw2
#2 lore raw
In reply to Albrecht Dreß

Hello Albrecht,

Am Donnerstag, 18. Mai 2006 12:15 schrieb Albrecht Dreß:

Quoted 5 lines

After reading a Sandisk whitepaper about wear levelling [1] I thought about using a standard vfat file system on it (mainly to have the ability to remove the sd card and to read it on a Winbloze pc). However, I read a report that using a sync vfat fs could lead to fast corruption of the SD card [2].

Why don't you use async vfat (standard up to 2.6.13(?)), because vfat has not implemented the sync option until then.

I've had no problems with it - dirty data is written to sd very fast.

regards
Wolfgang

Signature · 4 lines
Wolfgang Muees                    Vor den Grashoefen 1
Auerswald GmbH & Co. KG       	  D-38162 Cremlingen
Hardware Development              Germany
Tel +49 5306 9219 0               Fax +49 5306 9219 94
#3 lore raw

Thanks! [Was: File system recommendation for SD cards]

Thanks a lot to all users who replied to my question - the input was /really/ helpful for me!

Regards,
Albrecht

Signature · 9 lines
LIOS Technology GmbH
Dr. Albrecht Dreß
Project Engineering / Software Design
Schanzenstrasse 6 - 20
D-51063 Köln
Germany

Phone +49 221 676 2742
Fax   +49 221 676 2069