file system question
G'day,
I'm porting the software for an embedded medical device from DOS to Linux and am wondering which file systems are appropriate and which are not. The device's mass storage is a Disk-on-Module solid state flash drive. Data is presently written at approx 100 bytes every 30 seconds but that might change to 100 bytes every second. The device has a watchdog (recently activated) and during today's session it was triggered and wiped out my file system. Anybody have recommendations on which file system to use and the appropriate settings? Anybody have suggested readings so I can educate myself? Thank you. David |
file system question
On Mon, Mar 29, 2010 at 06:42:15PM -0400, David Relson wrote:
> G'day, > > I'm porting the software for an embedded medical device from DOS to > Linux and am wondering which file systems are appropriate and which are > not. The device's mass storage is a Disk-on-Module solid state flash > drive. Data is presently written at approx 100 bytes every 30 seconds > but that might change to 100 bytes every second. The device has a > watchdog (recently activated) and during today's session it was > triggered and wiped out my file system. > > Anybody have recommendations on which file system to use and the > appropriate settings? > > Anybody have suggested readings so I can educate myself? First I would read about Wear Levelling (Wikipedia). Maybe your device already implements TrueFFS or ExtremeFFS with low-level wear levelling, so it might be enough to just use any other file system upon. Then I would choose a simple ext2 file system, though I can't tell the wear levelling really works. Are there methods to debug that? I think the best choose for you might be a JFFS2 Filesystem. Or just choose one from "Flash file system" in Wikipedia. bye ingo |
file system question
On Tue, 30 Mar 2010 10:40:25 +0200
Ingo Krabbe wrote: > On Mon, Mar 29, 2010 at 06:42:15PM -0400, David Relson wrote: > > G'day, > > > > I'm porting the software for an embedded medical device from DOS to > > Linux and am wondering which file systems are appropriate and which > > are not. The device's mass storage is a Disk-on-Module solid state > > flash drive. Data is presently written at approx 100 bytes every > > 30 seconds but that might change to 100 bytes every second. The > > device has a watchdog (recently activated) and during today's > > session it was triggered and wiped out my file system. > > > > Anybody have recommendations on which file system to use and the > > appropriate settings? > > > > Anybody have suggested readings so I can educate myself? > > First I would read about Wear Levelling (Wikipedia). Maybe your > device already implements TrueFFS or ExtremeFFS with low-level wear > levelling, so it might be enough to just use any other file system > upon. Then I would choose a simple ext2 file system, though I can't > tell the wear levelling really works. Are there methods to debug > that? > > I think the best choose for you might be a JFFS2 Filesystem. Or just > choose one from "Flash file system" in Wikipedia. > > bye ingo Hello Ingo, I've been using ext2 and have encountered some problems. In addition to porting from DOS to Linux, the PC-104 board that has been used for years has reached end-of-life, so there's a new PC-104 board that's also involved. With the new board life has been good. With the old board a file system problem has been encountered many times. For reasons totally unclear (at least to me), all of a sudden a file can't be read or a shared library doesn't load. When I check using ls, the message "Stale NFS file handle" appears. The device has _never_ been on a network, so NFS doesn't actually play any role in the device's life cycle. This has been happening at least a couple of times a week for the last month. Often it happens several times in the same day. The file handle problem has only happened with the old board, never with the new. As there are several thousand "old board" devices in use, the Linux port needs to support them. FWIW, the cpu is a 486 and we're using the 2.6.29.6 kernel. Regards, David P.S. The "flash file system" suggestion is appreciated! I'll check into it. |
file system question
On Tue, Mar 30, 2010 at 1:47 PM, David Relson <relson@osagesoftware.com> wrote:
> For reasons totally unclear (at least to me), all of a sudden a file > can't be read or a shared library doesn't load. *When I check using ls, > the message "Stale NFS file handle" appears. *The device has _never_ Ext2 throws these when it's damaged. Happens to me usually on unclean or missing unmounts (i.e. yanking power cord). Maybe mounting it with "sync" may alleviate this somewhat on the problematic boards. Manuel |
file system question
On 03/30/2010 10:40 AM, Ingo Krabbe wrote:
On Mon, Mar 29, 2010 at 06:42:15PM -0400, David Relson wrote: G'day, I'm porting the software for an embedded medical device from DOS to Linux and am wondering which file systems are appropriate and which are not. The device's mass storage is a Disk-on-Module solid state flash drive. Data is presently written at approx 100 bytes every 30 seconds but that might change to 100 bytes every second. The device has a watchdog (recently activated) and during today's session it was triggered and wiped out my file system. Anybody have recommendations on which file system to use and the appropriate settings? Anybody have suggested readings so I can educate myself? First I would read about Wear Levelling (Wikipedia). Maybe your device already implements TrueFFS or ExtremeFFS with low-level wear levelling, so it might be enough to just use any other file system upon. Then I would choose a simple ext2 file system, though I can't tell the wear levelling really works. Are there methods to debug that? I think the best choose for you might be a JFFS2 Filesystem. Or just choose one from "Flash file system" in Wikipedia. bye ingo You should ignore this advice about a wear leveling FS, if your Disk-on-module device does it's own internal wear leveling. Check your module specs. For example Compact Flash modules have their own internal wear leveling and a wear leveling FS will do more writes to the flash then necessary. |
file system question
On 03/30/2010 12:42 AM, David Relson wrote:
G'day, I'm porting the software for an embedded medical device from DOS to Linux and am wondering which file systems are appropriate and which are not. The device's mass storage is a Disk-on-Module solid state flash drive. Data is presently written at approx 100 bytes every 30 seconds but that might change to 100 bytes every second. The device has a watchdog (recently activated) and during today's session it was triggered and wiped out my file system. It sounds like some kind of data logging application. If this is the case what i would do is. 1. Mount read only a partition that contains the main system, to ensure you can always boot and to avoid damage to the systems file 2. Mount read/write the partition that data gets written to. On boot you can detect errors in this partition and reformat it if is totally hosed. 3. In your application call fsync() on the file and perhaps the directory after the writes to make sure the data gets to the flash. If you are in fact logging, rotate your logs files so after they are X size write to a new file. Files that are most likely to be damaged are ones that are opened and being written to the moment the power cord gets yanked. As Manual said, using the 'sync' option may help. Also see "man mount" and /usr/src/linux/Documentation/filesystems/ext3.txt Other options the improve reliability are data=journal and barrier=1 I've used ext3 and riserfs on CompactFlash but neither seems to be 100% error proof. I've wanted to try NILFS2 but haven't done it yet. -- Karl |
file system question
David Relson wrote:
> The device has a watchdog (recently activated) and during today's > session it was triggered and wiped out my file system. > > Anybody have recommendations on which file system to use and the > appropriate settings? I would consider ext3. In order to deal with sudden resets (or power loss) you really want a journalling filesystem. In that case you can lose data (and need to check for, and handle, that on startup) but at least the filesystem will be structurally ok. Which filesystem to use on the flash module depends mostly on the circumstances of systems in the field, such as how often they are serviced, service personnel skill level and so on. > Anybody have suggested readings so I can educate myself? Hm, not so much. : The situation you're in is probably pretty common, I have customers in the exact same situation, but it is very different from what JFFS2, YAFFS and friends are made for, which is that the filesystem actually has direct contact with the flash array. Any kind of consumer level flash module, including disk-on-modules, CF, SD, you name it, implements wear-levelling transparently. And everyone considers their particular wear-levelling to be an important competitive advantage, so they'll never give out details. The likes of JFFS2, YAFFS require immediate addressing of NAND flash chips connected to some bus, but that's never the case unless you're making your own PCBs. //Peter |
file system question
Manuel,
I like the "sync" suggestion and shall add it to fstab shortly. Regards, David -----Original Message----- From: Manuel Lauss [mailto:manuel.lauss@googlemail.com] Sent: Tuesday, March 30, 2010 8:18 AM To: gentoo-embedded@lists.gentoo.org Cc: ikrabbe.ask@web.de Subject: Re: [gentoo-embedded] file system question On Tue, Mar 30, 2010 at 1:47 PM, David Relson <relson@osagesoftware.com> wrote: > For reasons totally unclear (at least to me), all of a sudden a file > can't be read or a shared library doesn't load. *When I check using ls, > the message "Stale NFS file handle" appears. *The device has _never_ Ext2 throws these when it's damaged. Happens to me usually on unclean or missing unmounts (i.e. yanking power cord). Maybe mounting it with "sync" may alleviate this somewhat on the problematic boards. Manuel |
file system question
On 03/30/10 16:28, Karl Hiramoto wrote:
> I've used ext3 and riserfs on CompactFlash but neither seems to be 100% > error proof. I've wanted to try NILFS2 but haven't done it yet. Let us know then, because something must be done to nilfs2_cleanerd which like to write a lot. |
file system question
Karl Hiramoto wrote:
> I've used ext3 and riserfs on CompactFlash I would avoid reiserfs3. It can very easily become corrupted beyond repair on power failure. //Peter |
| All times are GMT. The time now is 09:17 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.