Pcornel
Storage · Storage Troubleshooting

Data Corruption

Cheat sheet · https://pcornel.dk/topic.php?topic=4408

Back to the Topic

Answer

Trace expected data semantics → file/object/block checksum or known-good value → filesystem → logical volume/object layer → redundancy/checksum layer → path/controller → media → independent backup/recovery point.

Remember

  • Unreadable data ≠ corruption automatically; permissions, path and availability can mimic it.
  • Checksum mismatch proves content differs from expected at that checksum boundary, not the original cause.
  • Redundancy ≠ guaranteed repair if all copies share the same corruption.
  • Repairing metadata ≠ restoring correct application data.

First checks

  • zpool status -v / btrfs device stats — checksum errors
  • dmesg | grep -i -e corrupt -e csum — kernel
  • sha256sum against known good — verify files

Commands

sha256sum -c checksums.txt
Operational command for Verify file checksums against a manifest. Focus fields: file path and OK/FAILED checksum result.
zpool status -v

Verify in this order

corruption → affected data → restore → fix source

Where it usually breaks

First mismatch in media/provider → controller/pool → logical object → path/protocol → filesystem/share/object namespace → consumer workload; preserve identity/pre-state before mutation.

Storage Troubleshooting → Data Corruption proof map

Troubleshooting boundaryWhat to verifyProof limit
Scope / identityExact workload, object/device identity, affected hosts and incident windowSymptom naming alone is not root-cause proof
Dependency pathExpected application data → file/object/block validation → filesystem → volume/pool → checksum/redundancy → controller/path → media → independent recovery copy → read-backHealthy adjacent layers do not prove end-to-end health
Failure boundaryA checksum or application validation failure proves data differs from the expected value at that point; it does not by itself establish where or when corruption originated.Correlate evidence for the same operation and timestamps
AcceptanceHealthy evidence shows data matching the trusted expected value after recovery, stable lower-layer integrity checks and no recurring corruption under controlled writes/reads.Close only after the original workload/recovery test and regression check

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4408

Confirmation

Confirm action

Continue?