Data Corruption
Cheat sheet · https://pcornel.dk/topic.php?topic=4408
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 errorsdmesg | grep -i -e corrupt -e csum— kernelsha256sum 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 boundary | What to verify | Proof limit |
|---|---|---|
| Scope / identity | Exact workload, object/device identity, affected hosts and incident window | Symptom naming alone is not root-cause proof |
| Dependency path | Expected application data → file/object/block validation → filesystem → volume/pool → checksum/redundancy → controller/path → media → independent recovery copy → read-back | Healthy adjacent layers do not prove end-to-end health |
| Failure boundary | A 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 |
| Acceptance | Healthy 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