Gentoo Archives: gentoo-embedded

From: Ed W <lists@××××××××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] file system question
Date: Tue, 30 Mar 2010 15:10:53
Message-Id: 4BB20C81.5010102@wildgooses.com
In Reply to: [gentoo-embedded] file system question by David Relson
1 On 29/03/2010 23:42, David Relson wrote:
2 > G'day,
3 >
4 > I'm porting the software for an embedded medical device from DOS to
5 > Linux and am wondering which file systems are appropriate and which are
6 > not. The device's mass storage is a Disk-on-Module solid state flash
7 > drive. Data is presently written at approx 100 bytes every 30 seconds
8 > but that might change to 100 bytes every second. The device has a
9 > watchdog (recently activated) and during today's session it was
10 > triggered and wiped out my file system.
11 >
12 > Anybody have recommendations on which file system to use and the
13 > appropriate settings?
14 >
15 > Anybody have suggested readings so I can educate myself?
16 >
17
18 In addition to what everyone else has already noted you really need to
19 state your tradeoff between lifetime of the flash cards and minimising
20 the risk of loosing data. Fundamentally you can buffer the data and
21 write less frequently to the device (your device has a finite number of
22 writes before it perishes), or you can write more frequently, hence less
23 risk of dataloss
24
25 Any journal'ed fs is *supposed* to be reasonably robust against disk
26 crashes during writes, but often there are layered levels of safety, eg
27 ext3 has three write modes depending how you want to trade safety for
28 speed (hint newest defaults are probably not optimal if your data is
29 very precious)
30
31 I think one of the issues you will face is that whilst a journaling fs
32 with appropriate options should be very safe against you flipping the
33 power off whenever you feel like, long term your failure mode with flash
34 appears to be random files disappearing and getting corrupted - the wear
35 levelling appears to mean that unrelated files can get trashed as the
36 flash shuffles data around to maximise wear levels until the card
37 basically pretty much gives up? I haven't experienced this yet...
38
39 I guess just plan ahead for this.
40
41 Good luck
42
43 Ed W

Replies

Subject Author
Re: [gentoo-embedded] file system question wireless <wireless@×××××××××××.com>