Hi all, first, please excuse me if this is a very dump question...I use Linux (inter alia) on an ARM9 system which is attached to a measurement device. The device produces a new data set of ~10 kByte about every 20 seconds, and the ARM system stores the data on a 1GB SD card attached to it. The kernel is unfortunately rather old - 2.6.11, including several vendor (Digi) supplied drivers. I didn't have time yet to port them all to a recent kernel.
My first approach was to use the SD card with a VFAT file system on it, as such cards usually come pre-formatted with it and as the VFAT cluster size of 16k matches the erase block size of the card, which should help its built-in wear leveller to do its job.
After some time, though, I noticed that several files with measurement data were empty, although the directory indicated that they were not. The system was not switched off, and I always call sync() after producing a new file. Running dosfsck on the file system, I got several errors like
File size is 13978 bytes, cluster chain length is 0 bytes. Truncating file to 0 bytes. or Cluster 0 out of range (4849729 > 247450). Setting to EOF. Orphaned long file name part "5d"My first idea was that the (Digi supplied) MMC driver is somewhat broken. Just to check that, I re-formatted the SD card with ext2, and ran the test again - and all files looked fine! Called "e2fsck -f" - no problems with the file system. That seems to indicate that the MMC layer /does/ actually work.
Questions:- Is the conclusion correct that the problem seems to be in the VFAT part, not in the MMC layer? - Are there known issues with VFAT in 2.6.11 which might lead to the observed problems? Were they fixed? - Is it possible to change the block size in ext2 to 16k (to match the SD card's erase block size)?
Thanks in advance for any help, Cheers, Albrecht. -- Albrecht Dreß - Johanna-Kirchner-Straße 13 - D-53123 Bonn (Germany) Phone (+49) 228 6199571 - mailto:albrecht.dress@xxxxxxxx GnuPG public key: http://www.mynetcologne.de/~nc-dreszal/pubkey.asc
Attachment:
pgpooSFkJwYW8.pgp
Description: PGP signature