Whitepaper: Preventing Filesystem Corruption in Embedded Linux

If you’ve ever been concerned with or experienced disk and filesystem corruption in an embedded Linux environment, you’ll want to take a look at this whitepaper to help you understand and prevent it.

Preventing Filesystem Corruption in Embedded Linux

Almost any computer system is subject to unexpected power failures. For some embedded systems, this only occurs when the power grid goes down. For others, it may happen when a user decides to pull the plug instead of using a documented shutdown procedure. Automotive and remote systems need to anticipate that power will stop and start several times a day. If an embedded system is implemented without thinking about what happens when the power goes down it could lead to catastrophic failures down the road. Due to the nature of failures caused by unexpected power loss an embedded system may run for weeks, months, or years before users experience an unexpected and catastrophic failure. From the user’s perspective, their device worked fine yesterday and today it doesn’t even turn on, and they don’t tie it back to the unexpected power failure event.

One collection of failure types caused by unexpected power loss are those related to issues with the boot medium. Investigating the boot medium failure as a result of power loss may show an unclean filesystem, missing files, or more commonly a filesystem that only mounts as read only. The latter happens when the filesystem detects a serious problem with filesystem metadata during runtime that it cannot fix automatically causing it to remount read only to avoid writing to prevent further corruption on the disk. Many people turn to common journaled filesystems like ext3/ext4 to attempt to address these failures. While journaled filesystems like ext3/ext4 are less prone to corruption, they are far from immune.

Read the rest on Technologic System’s offical website, Preventing Filesystem Corruption in Embedded Linux

Author: Mark Featherston

Embedded Engineer for Technologic Systems