File system for compact flash or SD for linux to run off of.

Tod Hansmann plug.org at todandlorna.com
Wed Aug 31 18:24:39 MDT 2011


On 8/31/2011 5:06 PM, Michael Torrie wrote:
> I'm trying to put together a mini server (almost an embedded system) and
> I'm struggling to know what kind of file system to use.  Most of the
> boards I'm looking at (must be x86) have either compact flash or SD
> slot.  Given that the computer will run like an embedded system and
> could be powered off at any time, I'd like to get a file system on it
> that won't wear out the CF, and won't get corrupted with power outages.
>   For the most part, the server won't do too much disk I/O.  There are no
> databases, and logging isn't that important.  So some of the file system
> could be read-only.  I need about 1-2 GB (this baby has to run CentOS 5
> or 6 and run data acquisition software written in labview) of storage.
>
> I've had experience on sheeva plugs running both JFFS2 and UBIFS with
> standard debian installs (standard syslog, etc) and they run great, but
> both file systems are designed for MTD devices, but both CF and SD are
> block-level devices with internal wear-leveling, so neither file system
> is appropriate here.  Besides that fact, I created a virtual 4 GB (about
> the size I need) CF disk and used the block2mtd driver to make it be a
> MTD device, and though I can format it with ubiformat, I cannot attach
> it. It gives me a kernel memory allocation error.  Even 1 GB gives me
> this error.  I can get a 512 MB image to work, but that's not enough
> space for what I need anyway.  I know I can do a jffs2 emulation on
> compact flash, but the mount time for a large volume is horrendous.
> Even 512 MB takes a while to mount.
>
> So at the moment I'm considering doing read-only ext4 for most of the
> partitions, with a small R/W ext4 partition for variable things. But if
> anyone has any better ideas or experience in this area, I welcome
> suggestions.
We had a situation at work where we are working with an embedded linux 
device and have to use an SD card for the filesystem.  After a bunch of 
benchmarking, we chose ext4 and now have a 32GB class 10 SD card working 
at about 7-9 MB/s writing (which was our only concern.  Reading can go 
slower than 2MB/s for all we care, but I'm pretty sure its performance 
is equally good.)

The trick was we had to disable extents, and possibly play with the 
block size, but I don't recall on the latter.  YMMV, but I think you'll 
like ext4's performance.

-Tod Hansmann


More information about the PLUG mailing list