Storage · Ceph
Scrubbing
Cheat sheet · https://pcornel.dk/topic.php?topic=4053
Answer
OSDs schedule PG scrubs and compare metadata/attributes and selected consistency information among copies. A scrub can expose latent inconsistency even while a PG remains available to clients.
Remember
- Scrub ≠ backup.
- Scrub ≠ recovery.
- Scrub success ≠ every byte was deeply verified.
- Detected inconsistency ≠ safe automatic repair in every case.
First checks
ceph pg dump | awk '{print $1,$(NF-2)}' | head— last scrub stampsceph health detail | grep -i scrub— not scrubbed warningsceph config get osd osd_scrub_begin_hour— scrub window
Verify in this order
PG → compare replicas → report inconsistency
Where it usually breaks
First mismatch in member media → metadata/layout → allocation/placement → redundancy/recovery → logical object → consumer; preserve identity/pre-state before mutation.
Ceph → Scrubbing Ceph map
| Ceph boundary | What to verify | Proof limit |
|---|---|---|
| Control / placement | MON/map/auth, pool, PG and CRUSH context for the exact workload | Cluster visibility or one healthy daemon does not prove the data path |
| Data / redundancy | Acting OSD set, device/network state, capacity and replica/EC availability | Up/in or active state alone does not prove clean redundancy or integrity |
| Failure boundary | Scrub proves consistency checks within its scope; it does not replace deep data verification, backup or application-level integrity testing. | Correlate Ceph, host, device and network evidence in the same time window |
| Acceptance | Healthy evidence: scheduled scrubs complete without errors and affected PGs remain consistent/available. | Close only after original client operation plus redundancy/read-back verification |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4053