Skip to content

snapraid-scrub — read 12 % of the oldest blocks and check them against parity

Weekly. Verifies data + parity for blocks not scrubbed in ≥ 7 days, 12 % of the array per pass, so a full pass takes ~8 weeks. Rewrites the content files (which is why item 12 used a -p 1 -o 0 scrub to force the 4th copy).

Input → Movement → Output

Reads blocks, compares hashes, reports silent corruption; never modifies data (a fix would). Output is the log and the "N % unscrubbed" figure in snapraid status.

Why this shape

Parity only helps if it is correct when needed. Scrub is the only thing that reads the parity disk end to end over time — the ~35-minute Sunday spin-up of the otherwise-sleeping HGST is deliberate.

Steps

  1. snapraid-scrub.timersnapraid-scrub.service; ExecStart overridden to /usr/bin/snapraid -l /var/log/snapraid/scrub-%%D.log scrub -p 12 -o 7 (snapraid-scrub.service.d/override.conf; the base unit's -p 10 is dead text).
  2. OnFailure=snapraid-alert@%n (.d/alert.conf).
  3. Last run 09-06 04:00–04:42: 0 errors; array 25 % unscrubbed after item 06's rewrite (was 28 %).

Do not confuse with snapraid check (verifies files against the last sync's hashes; used for drills) — see item 15 on the hardening card.

If you change this

  • Hits: -p changes how long a full pass takes and the Sunday window; sdb's Saturday long self-test can overlap if deferred by standby (harmless).
  • Does not hit: data, parity contents, any container.

See

  • Objects: snapraid-array
  • Source: systemctl cat snapraid-scrub.service