<history>For those who didn't read previous related threads, the
underlying problem encountered is "Stale NFS file handle" errors
appearing for no obvious reason. As best I recall, they have occurred
even when care has been taken to properly use halt, sync, shutdown, etc.
</history>
We're presently running with 3 partitions:
/dev/hda1 - /boot FAT16,ro - syslinux boot partition
/dev/hda2 - / EXT2,fo - linux system and application program
/dev/hda3 - /var EXT2,rw,sync - data partition
The program is calling sync() after every call to close(). This is
slow, but the number of open,write,close,sync cycles is 4 per minute, so
the slowness is livable. Probably this redundant "belt and suspenders"
approach can be optimized to rw,async and sync(). An alternate idea is
to use FAT16 for the data partition (which would work fine because the
program has been ported from DOS and uses 8.3 filenames).
Regards,
David
-----Original Message-----
From: Peter Stuge [mailto

eter@stuge.se]
Sent: Thursday, April 08, 2010 8:15 PM
To: gentoo-embedded@lists.gentoo.org
Subject: Re: [gentoo-embedded] embedded ext2 and fsck
Relson, David wrote:
> My embedded environment is evolving. The Disk-On-Module currently
> has the following partitions:
> /dev/hda2 - / - root (ext2)
> /dev/hda1 - /boot - syslinux boot partition (FAT16)
> /dev/hda3 - /var - ext2, rw
..
> How important is running fsck in an embedded ext2 environment?
For read-only partitions on perfect media it is never needed.
> When do y'all do and recommend?
Since you are having problems related to writes, I would recommending
splitting things up so that you have one physical media which is
exclusively read-only, and another physical media which is
read-write. This is what I use for my customers.
Ed W wrote:
> 1) The CF card is quietly shuffling data around, so in theory it
> might move a good sector onto a patch of flash which is worn out,
> causing it to be corrupted on next read.
This will of course destroy a previously healthy ext2 fs.
> 2) Sudden shutdowns causing the ext2 to be marked dirty and causing
> subsequent problems (ie not fully read-only mounted
>
> To be honest, I don't know a lot about how ext2 is mounted
> read-only, but option 2) above seems unlikely...?
If ext2 is mounted ro then it will never be written to by the kernel
and thus never corrupted by power failure.
Of course, if the media itself gets corrupted for whatever reason,
you lose anyway. Hence; use separate media.
//Peter