Question on the fs choice
VanBaren, Gerald (AGRE)
Gerald.VanBaren at smiths-aerospace.com
Wed May 12 22:36:53 EST 2004
Journaling file systems don't cure corruption on power fail, they just make the power fail recovery faster by eliminating the full fsck disk scan and significantly reduce the probability of corruption due to the transactional nature. The assumption with a journaling file system is that the power fail only corrupted the last (partial) transaction. With normal usage patterns this is a good assumption (spinning disk physics probably help, but write caches in disks are going to hurt). With CF under heavy power failure cycles, this might not be as good an assumption.
There was a slashdot item yesterday pointing to a benchmark of various journaling file systems. In the discussion, one point that was made was that ext3 journals the data as well as the metadata by default where the other journaling file systems journal only the metadata (directory info). I presume this was accurate (hey, it was on ./ which guarantees accuracy, right? ;-). Whichever fs you pick, you probably want to journal the data as well as the metadata.
A suggestion is to have multiple partitions on your CF and use RAID-3 or RAID-5. The assumption here is that a power fail-induced physical corruption would corrupt only one of the partitions which could then be rebuilt due to the RAID redundancy. The journaled file system would then eliminate the fsck on start up and make the file system itself consistant and the RAID redundancy would (presumably) fix any low level errors that the unexpected power fail could induce.
...or maybe a journaling file system is good enough.
gvb
> -----Original Message-----
> From: owner-linuxppc-embedded at lists.linuxppc.org
> [mailto:owner-linuxppc-embedded at lists.linuxppc.org]On Behalf Of Zajac
> Adam-AAZ004
> Sent: Tuesday, May 11, 2004 7:20 PM
> To: 'linuxppc-embedded at lists.linuxppc.org'
> Subject: Question on the fs choice
>
>
>
> Hello,
>
> We've built a custom board based on MPC8540 that runs Linux
> OS and utilizes
> compact flash card to store the kernel on a raw-data
> partition (read-only)
> and root file system on an Ext2 partition (read-write). As
> Ext2 is not a
> journaling FS, in case of any power failure the file system
> is not cleanly
> unmounted and the fscheck complains upon a system start-up.
> Also, sometimes the file system partition gets corrupted when
> we power-cycle
> the card instead of shutting the system down gracefully (the
> card is build
> to be "hot-swappable" so we test it on purpose).
>
> I saw Wolfgang Denx's post discouraging any use of the CF cards for an
> embedded platform where write operations are performed under
> power-failure
> prone environment. Unfortunately, this is the reality we're
> facing on our
> card.
>
> I'm seeking some help with selecting the file system that
> would survive
> power failure if the CF card didn't get damaged during a
> write cycle (we're
> gonna perform a thorough testing to assess the severity of
> that issue).
>
> I've seen some articles suggesting one of the journaling
> systems, like Ext3,
> XFS or ReiserFS.
>
> Has anybody successfully implemented any of these FS systems
> on an embedded
> platform equipped with a compact flash card working as a main storage
> medium?
>
> Any help would be greatly appreciated.
>
> Adam Zajac
> Motorola Inc, Global Telecom Solutions Sector
> 5555 N Beach St, Mailstop 8E, Fort Worth, TX 76137-2794
> Phone: (817) 245-7963
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list