Storage Fundamentals Series

🔍 Understanding Bit Rot (Silent Data Corruption) and Checksums From a Top 1% Perspective — RAID Protects Only Against 'Disk Failure,' Never Against 'Quiet Data Corruption'

Introduction

This article is part of the Top 1% Series Complete Article Guide, and article 6.1 in the Storage Fundamentals Series.

Prerequisite Knowledge

Getting the Big Picture

What traditional RAID (RAID1’s mirroring, or RAID5/6’s parity) can handle is a disk that fully fails and reports a read error. But a disk can also quietly — silently — return data that’s off by just one bit, with no error reported at all. This is bit rot. A RAID controller can detect that two mirrored copies disagree, but it has no means at all, to begin with, of judging which one holds the correct data.

graph TB
    Disk1["Disk A (healthy data)"] --> Compare{"RAID1<br/>consistency check"}
    Disk2["Disk B (corrupted by bit rot)"] --> Compare
    Compare -->|"Detects a mismatch"| Problem["RAID has no way to judge<br/>which one is correct"]
    Disk1B["Disk A"] --> CheckSum{"Recomputes and compares<br/>the checksum"}
    Disk2B["Disk B (corrupted by bit rot)"] --> CheckSum
    CheckSum -->|"Identifies which checksum doesn't match"| Fix["Automatically repairs the corrupted side"]

Deep Dive Into the Fundamentals

A Checksum Is Stored Independently, Separate From the Data Itself

A filesystem like ZFS stores, for each data block, a checksum calculated from that data’s content, in a location separate from the data itself (in ZFS’s case, the parent block pointer). Every time data is read, it recomputes the checksum from the content and compares it against the stored checksum. If they don’t match, it can confidently conclude “this copy is corrupted,” recover the correct data from the other mirror or from parity, and automatically overwrite and repair the corrupted side.

Scrubbing: an Active, Whole-Pool Inspection

A “scrub” is a process that periodically reads the entire storage pool’s data — including parity blocks, which normally never get read — and verifies every checksum. This creates a chance to discover and repair bit rot that’s been quietly progressing, before the disk actually fails. As long as enough redundancy (mirrors or parity) remains, a scrub repairs corruption automatically — but if it detects corruption where redundancy is insufficient, ZFS reports it as an error rather than returning the corrupted data as-is.

A Mismatch in Traditional RAID's Mirror Often Just Gets "Overwritten From One Side"

In traditional RAID1 with no checksum (mdadm, or most hardware RAID), detecting a mirror mismatch during a consistency check commonly leads to a behavior where, with no means of judging which side is correct, one side simply overwrites the other. If that overwrite happens to use the corrupted side’s content to overwrite the healthy side, the corruption can actually spread — a counterintuitive outcome. This is the decisive difference from a filesystem with checksums.

What a Pro Sees Here (Top 1% Understanding)

“Having RAID” and “Data Integrity Being Guaranteed” Are Different Layers of the Question Entirely

The idea “I have RAID set up, so my data is safe” only ever addresses one kind of failure: a disk fully failing. Handling the other kind of failure, bit rot, requires a mechanism at an entirely different layer from RAID itself: checksums and scrubbing. When discussing reliability, separating “which kind of failure” from “what’s actually protecting against it,” layer by layer, is the perspective a top-1% engineer carries.

Common Misconceptions and Pitfalls

Troubleshooting Perspective

  1. Disks are all healthy, but one specific file occasionally comes out corrupted: Consider the possibility of bit rot, and consider migrating to a filesystem with checksumming (ZFS or Btrfs).
  2. A RAID1 consistency check reports a mirror mismatch warning: Assume you can’t judge which disk holds the correct data without a checksum, and also consider recovering from a backup.
  3. A ZFS scrub reports an error: Redundancy may be insufficient — prioritize checking the state of the affected disk.

Summary

Takeaways to Apply Today

  1. When you hear “it’s safe because we have RAID,” check which kind of failure that safety actually covers.
  2. If data integrity genuinely matters to you, consider adopting a filesystem with checksumming.

References

Comments

Feel free to leave thoughts, questions, or corrections below (sign in with a GitHub account to comment or react).