Use this when replicas must be compared byte for byte.
Deep Scrub · Data Integrity
A deep scrub reads every stored copy of the data and compares full contents or checksums, not just metadata. In Ceph it finds bit-level inconsistencies between replicas that a light scrub misses.
1. Deep scrub compares full data, not only metadata.
2. Heavier I/O.
3. Catches media/bit rot.
4. Weekly to monthly.
5. Investigate inconsistencies.
data read → compare/verify → report
Context & applicabilityCommon mistakes · platform/version boundaries
- Deep scrubs overdue (
HEALTH_WARN pgs not deep-scrubbed in time) because the schedule is too narrow or the cluster too busy. - Deep scrubs during peak hours hurting latency — set
osd_scrub_begin_hour/end_hour. - Inconsistent PGs found: run
rados list-inconsistent-obj <pg>beforeceph pg repair <pg>.
Operational reference
Fast context before you go deeper.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Deep scrub reads all data; light scrub checks metadata.
- It is I/O heavy; schedule off-peak.
- In Ceph it finds replica inconsistencies.
ceph pg deep-scrub <pgid>— Ceph deep scrubzpool scrub <pool>— ZFS full scrubarray consistency check— controller
ReferenceHow it works1 section · depth on demand
Ceph deep scrub
ceph pg deep-scrub <pgid>
ceph osd pool deep-scrub vm-pool
ceph health detail | grep -i scrub
ceph config get osd osd_deep_scrub_interval
Deep scrub compares full object data between replicas (light scrub only compares metadata). "PGs not deep-scrubbed in time" warnings mean scrubs cannot keep up — check OSD load and osd_scrub_begin_hour/end_hour. Inconsistent PGs: inspect with rados list-inconsistent-obj <pgid> before ceph pg repair.
ReferenceImportant terms & boundaries3 sections · depth on demand
In depth
Deep scrub reads data and verifies checksums
The Ceph OSD configuration reference separates two scrub types. A light scrub checks object sizes and attributes, usually daily. A deep scrub reads object data and verifies checksums, usually weekly.
| Option | Default | Effect |
|---|---|---|
osd_scrub_begin_hour / osd_scrub_end_hour | 0 / 0 | Daily window for periodic scrubs; 0/0 = all day |
osd_scrub_min_interval | 1 day | Desired minimum time between scrubs of a PG |
osd_scrub_max_interval | 7 days | A PG is scrubbed at least this often |
osd_deep_scrub_interval | 7 days | A PG is deep-scrubbed at least this often |
osd_scrub_load_threshold | 10.0 | No new periodic scrub above this normalised load |
osd_max_scrubs | 3 | Concurrent scrubs per OSD |
# ceph config get osd osd_deep_scrub_interval
# ceph config set osd osd_scrub_begin_hour 22
# ceph config set osd osd_scrub_end_hour 6
# ceph pg deep-scrub 2.1f
# ceph pg dump pgs | awk '{print $1, $NF}' | head # inspect last deep-scrub stamps
Operational balance
| Problem | Adjustment |
|---|---|
| Client latency rises during scrubs | Restrict the hour window; lower concurrency |
PG_NOT_DEEP_SCRUBBED warnings on large HDD clusters | Lengthen osd_deep_scrub_interval deliberately, or widen the window |
| Scrub errors found | rados list-inconsistent-obj <pgid> before ceph pg repair |
Don't disable deep scrubbing with nodeep-scrub for long. It is the mechanism that finds silent corruption while redundancy can still repair it.
Illustrative example (not a system capture).
Worked example
A deep scrub reads and compares the full data, not just metadata — Ceph's deep scrub is the common example (weekly per PG by default), and array "consistency checks" are the equivalent for RAID parity.
Plan its cost: a deep scrub of 500 TB spread over 7 days needs ~830 MB/s of sustained read across the cluster in addition to client load. Limit with scrub windows and load thresholds (osd_scrub_begin_hour, osd_scrub_load_threshold), but do not let deep scrubs fall weeks behind — that window is where latent errors hide.
Settings
| Setting | Default | Meaning |
|---|---|---|
osd_deep_scrub_interval | 7 days | How often each PG is deep-scrubbed |
osd_scrub_begin_hour / end_hour | 0 / 0 (any time) | Allowed window |
osd_max_scrubs | 1 (3 in newer releases) | Concurrent scrubs per OSD |
Check the values for your release with ceph config get osd <option>.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Data Integrity → Deep Scrub. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://csrc.nist.gov/pubs/sp/800/209/final · confidence 94%