1 |
<history>For those who didn't read previous related threads, the |
2 |
underlying problem encountered is "Stale NFS file handle" errors |
3 |
appearing for no obvious reason. As best I recall, they have occurred |
4 |
even when care has been taken to properly use halt, sync, shutdown, etc. |
5 |
</history> |
6 |
|
7 |
We're presently running with 3 partitions: |
8 |
|
9 |
/dev/hda1 - /boot FAT16,ro - syslinux boot partition |
10 |
/dev/hda2 - / EXT2,fo - linux system and application program |
11 |
/dev/hda3 - /var EXT2,rw,sync - data partition |
12 |
|
13 |
The program is calling sync() after every call to close(). This is |
14 |
slow, but the number of open,write,close,sync cycles is 4 per minute, so |
15 |
the slowness is livable. Probably this redundant "belt and suspenders" |
16 |
approach can be optimized to rw,async and sync(). An alternate idea is |
17 |
to use FAT16 for the data partition (which would work fine because the |
18 |
program has been ported from DOS and uses 8.3 filenames). |
19 |
|
20 |
Regards, |
21 |
|
22 |
David |
23 |
-----Original Message----- |
24 |
From: Peter Stuge [mailto:peter@×××××.se] |
25 |
Sent: Thursday, April 08, 2010 8:15 PM |
26 |
To: gentoo-embedded@l.g.o |
27 |
Subject: Re: [gentoo-embedded] embedded ext2 and fsck |
28 |
|
29 |
Relson, David wrote: |
30 |
> My embedded environment is evolving. The Disk-On-Module currently |
31 |
> has the following partitions: |
32 |
> /dev/hda2 - / - root (ext2) |
33 |
> /dev/hda1 - /boot - syslinux boot partition (FAT16) |
34 |
> /dev/hda3 - /var - ext2, rw |
35 |
.. |
36 |
> How important is running fsck in an embedded ext2 environment? |
37 |
|
38 |
For read-only partitions on perfect media it is never needed. |
39 |
|
40 |
|
41 |
> When do y'all do and recommend? |
42 |
|
43 |
Since you are having problems related to writes, I would recommending |
44 |
splitting things up so that you have one physical media which is |
45 |
exclusively read-only, and another physical media which is |
46 |
read-write. This is what I use for my customers. |
47 |
|
48 |
|
49 |
Ed W wrote: |
50 |
> 1) The CF card is quietly shuffling data around, so in theory it |
51 |
> might move a good sector onto a patch of flash which is worn out, |
52 |
> causing it to be corrupted on next read. |
53 |
|
54 |
This will of course destroy a previously healthy ext2 fs. |
55 |
|
56 |
|
57 |
> 2) Sudden shutdowns causing the ext2 to be marked dirty and causing |
58 |
> subsequent problems (ie not fully read-only mounted |
59 |
> |
60 |
> To be honest, I don't know a lot about how ext2 is mounted |
61 |
> read-only, but option 2) above seems unlikely...? |
62 |
|
63 |
If ext2 is mounted ro then it will never be written to by the kernel |
64 |
and thus never corrupted by power failure. |
65 |
|
66 |
Of course, if the media itself gets corrupted for whatever reason, |
67 |
you lose anyway. Hence; use separate media. |
68 |
|
69 |
|
70 |
//Peter |