linux - Should I fsck ext3 on embedded system? -


There are several such embedded systems for which the file system requires R / W access, which includes flash storage with block device emulation. lives on. Our oldest platform runs on compact flash and these systems have been used for more than three years without any FSK being played during bootup and so far we have no failure for file system or CF .

Forums we used USB Flash for initial production and are now being migrated to disk / on-modules for R / W storage. A long time ago we had some problems with file systems on many devices running USB-storage, so I've enabled e2fsck to see if it would be helpful. As it came to know that we had received shipments of bad flash memories, so once their problem was changed. I have disabled e2fsck since then because we did not have any indication that it has done the system more reliable and historically correct without it.

Now when we have inserted disk-on-modules units, the file system started to look at the errors, suddenly the system is unable to read / write some files and if I use the file from emergency console If I try, I get " input / output error ". I re-enabled e2fsck and all files were correct.

O Reilly's "Building Embedded Linux System " recommends running e2fsck on the ext2 filesystem but it does not refer to ext3, I'm a bit confused that I Should or should not be enabled.

What is your ESAX running on an embedded system? We are considering putting binaries on the AR / O partition and only the same file has to be modified on R / V partition, so that FSAC can never remove important system binaries; Good / bad)?

I think the answer to your question is more related to what type of customization requirements you apply to your Relates to the data. That is, if the power is lost without the formal shutdown of the system, then what should be guaranteed? Typically, any of the desktop operating system type file systems handles all this well, shutting down / synchronized files and disc cache flushing etc. without any special applications. On the important transaction points in the application to ensure that what you need to maintain is the fact media is committed to.

The fsck fixes the file system, but without taking care of the above, there is no guarantee that the changes you made will actually be kept. That is: It is not really deterministic that what you will lose as a result of power failure.

I believe that by inserting your binaries or other important read-only data on a separate read-only partition, it ensures that they do not throw incorrectly due to fsck improvements for file system structures. Can. In the form of minimum, R / W data will be organized by putting them in separate subdirectories from the root. But in both cases, if you support software updates, you still need a plan to deal with writing "read-only" areas.

In our application, we actually maintain a pair of directories for things like binaries and systems are setup to boot from one of the two areas. During software updates, Update, sync everything to the media and verify the MD5 checksum on the disk before going to the update of the second copy. During boot, they are used only if the MD5 checksum is good ensures that you are always booting a compatible image.


Comments