Gentoo Archives: gentoo-embedded

From: Ed W <lists@××××××××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] embedded ext2 and fsck
Date: Fri, 09 Apr 2010 13:05:14
Message-Id: 4BBF1D50.9020006@wildgooses.com
In Reply to: Re: [gentoo-embedded] embedded ext2 and fsck by Peter Stuge
1 > Ed W wrote:
2 >
3 >> 1) The CF card is quietly shuffling data around, so in theory it
4 >> might move a good sector onto a patch of flash which is worn out,
5 >> causing it to be corrupted on next read.
6 >>
7 > This will of course destroy a previously healthy ext2 fs.
8 >
9 >
10 >
11 >> 2) Sudden shutdowns causing the ext2 to be marked dirty and causing
12 >> subsequent problems (ie not fully read-only mounted
13 >>
14 >> To be honest, I don't know a lot about how ext2 is mounted
15 >> read-only, but option 2) above seems unlikely...?
16 >>
17 > If ext2 is mounted ro then it will never be written to by the kernel
18 > and thus never corrupted by power failure.
19 >
20
21 Sure - but my theory was that badly implemented wear levelling + power
22 failure during writes could perhaps cause data to be lost on a read-only
23 partition when writing to another partition on the same media?
24
25 I have no basis for this claim, just pondering how wear levelling is
26 actually implemented in a random off the shelf device...?
27
28 I agree that separate media is an excellent idea, but it's not always
29 easy to achieve using off the shelf boards?
30
31 Anyway, curious to hear of anyone loosing data on a read-only partition
32 in a manner like the above. It's perhaps only theoretical curiousity,
33 but...
34
35 Cheers
36
37 Ed W