Storage · Data Integrity
Scrubbing
Cheat sheet · https://pcornel.dk/topic.php?topic=4315
Answer
Scrubbing is a scheduled background read of all data to verify checksums and repair bad blocks from redundant copies, for example zpool scrub, btrfs scrub or RAID consistency checks.
Remember
- Scrubs read everything and repair from redundancy.
- Run them regularly, for example monthly.
- Scrubs add I/O load.
First checks
zpool status <pool> | grep scan— last scrubbtrfs scrub status <mount>— last scrubecho check > /sys/block/md0/md/sync_action— md check
Commands
zpool scrub tankzpool status
Verify in this order
scrub → read all → verify → repair
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.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4315