Pcornel
Storage · ZFS

Resilver

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

Back to the Topic

Answer

Resilvering reconstructs blocks needed to restore redundancy for the affected device/vdev by reading valid data from surviving replicas/parity and writing the required blocks to the target. It is different from a scrub because its purpose is to synchronize redundancy after device state changes rather than verify every allocated copy across the entire pool.

Remember

  • Resilver ≠ scrub.
  • Resilver complete ≠ backup or application-integrity proof.
  • Target device ONLINE before completion ≠ full redundancy restored.
  • Resilver speed ≠ fixed device throughput; workload, topology, errors and allocation shape matter.

First checks

  • zpool status <pool> — resilver progress
  • zpool replace <pool> <old> <new> — replace disk
  • zpool get autoreplace <pool> — auto replace setting

Commands

zpool replace -s

Verify in this order

disk replaced → resilver → ONLINE

Where it usually breaks

First mismatch in member media → metadata/layout → allocation/placement → redundancy/recovery → logical object → consumer; preserve identity/pre-state before mutation.

ZFS → Resilver ZFS map

ZFS boundaryWhat to verifyProof limit
Identity / topologyPool GUID/name, dataset/zvol, top-level vdev class, leaf-device identity and effective propertiesObject presence alone does not prove integrity, performance or recovery
Capacity / protectionPool free space, quotas/reservations, snapshot retention, redundancy and active scrub/resilver stateFree space or ONLINE state at one layer does not prove end-to-end health
Failure boundaryA completed resilver proves ZFS synchronized the required allocated block replicas for that event without remaining reported failure; it does not prove every block copy was scrubbed or the application is consistent.Correlate ZFS evidence with both workload and lower device/path evidence
AcceptanceHealthy evidence: resilver completes, intended member is restored to the correct vdev, no persistent errors remain or grow, and representative workload plus subsequent integrity checks are clean.Close only after original workload plus checksum/read-back/recovery verification succeeds

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

Confirmation

Confirm action

Continue?