Repairing a corrupt ext4 root partitionFeeding the Cloud
<a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>
https://feeding.cloud.geek.nz/posts/repairing-corrupt-ext4-root-partition/Feeding the Cloudikiwiki2020-10-04T18:33:59ZSuggestions about filesystem corruptionhttps://feeding.cloud.geek.nz/posts/repairing-corrupt-ext4-root-partition/comment_1_212a8a6ad1ed4a94c76d530f00631934/Tomaž2020-10-04T18:33:59Z2020-09-27T11:19:20Z
<p>Hi. Two things you might want to check, if you haven't already.</p>
<p>See if the "UDMA_CRC_Error_Count" or "CRC_Error_Count" attribute (199) reported by your smartctl is >0 and slowly increasing over time. It's not marked as an error by smartctl and it's easy to miss. It's an indication of a flaky SATA bus connection and I've seen this cause filesystem corruption (I'm guessing because every once in a while CRC will randomly end up OK for a corrupted command).</p>
<p>The other thing is to check if you're running "fstrim". Some SSDs are known to have bugs with that and you might be running a kernel that doesn't yet have a workaround or blacklist for your particular model or SSD firmware version. See <a href="https://github.com/torvalds/linux/blob/master/drivers/ata/libata-core.c#L3774">https://github.com/torvalds/linux/blob/master/drivers/ata/libata-core.c#L3774</a>.</p>