[Arm-dev] File system corruption

Stephan Guilloux

stephan.guilloux at free.fr
Thu Dec 13 10:34:48 UTC 2018


Hello all,

I noticed many many filesystem corruptions, after raspberry 3B reboot.
For instance, with image Raspberry 1804, "yum update and reboot" made my 
RPM DB corrupted rather often after reboot.
We found some other scenarios, but all less easy to reproduce.

Somehow, we came to the conclusion that we had to start some kind of 
stressing tool, and this how it comes out:
- install SD-Card with last CentOS image available (kernel 4.14.82)
- create a 4Gb primary partition #4, starting at 2Gb with help of fdisk.
- then, grow partition #3 with rootfs-expand.
- format partition #4 as EXT4, with default parameters.

In a stress-loop
- mount partition #4
- copy huge number of files (/usr/) to partition #4
    (cd /usr ; tar -c . ) | (cd /mnt/ ; tar -x)
- umount part #4
- fsck on partition #4
The script breaks the loop when FSCK returns status different than 0.
Only a couple of iterations are enough to crash partition #4.

I just tried the same with EXT2, and result is identical.


Any idea to make this "system" less vulnerable ?




More information about the Arm-dev mailing list