2

After experiencing some crash related file system outages (requiring manual fsck and repair, we are looking for the optimum file system and fs config for an embedded linux with HDD or SDD mass storage.

A good candidate so far is using ext3fs with "journal_data" mount option to minimize the risk on inconsistent data and meta data after a crash.

I would be happy to hear about other/better options any experiences.

NB "crash" here refers mostly to unexpected shutdown due to power loss. The ext4fs does not seem to handle this very gracefully.

2 Answers2

2

One way to make embedded filesystems reliable is to make the entire filesystem read-only. If you really need to write things you can use tmpfs and lose them at reboot, or have a separate filesystem for that data that isn't necessary for successful boot (i.e. boot scripts fsck or rebuild that fs if it's damaged.)

1

The Embedded Linux Wiki has a File Systems section with a lot of useful info. However, it focuses more on the low-hardware-specs / very-specialized-purpose end of embedded; if you're dealing with hard drives and ext3, you may be closer to a traditional PC environment.

Making your root filesystem read-only, as in Eric Seppanen's answer, is an excellent suggestion.

For solid state drives and flash drives, journaling may not be a good idea; the drives' faster seek times mean that the performance gain of journaling is less noticeable, and journaling means extra writes which means less disk lifespan. See this Slashdot question and especially these comments for discussion.

Josh Kelley
  • 963
  • 1
  • 7
  • 17