CephLXI · ScrubbingScrubbing
Pausing scrub
What you'll learn
- Apply the correct flag to pause scrubbing
- Distinguish cluster-wide and per-pool control
- Judge when pausing is justified
- Resume reliably
Prerequisites
None — start here.
Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18
Why this matters in production
Pausing scrub is sometimes correct and is very easy to leave paused. The flags produce a health warning specifically because forgetting them is the common failure.
The flags
ceph osd set noscrub
ceph osd set nodeep-scrub
ceph osd dump | grep flags
| Flag | Stops |
|---|---|
noscrub | new shallow scrubs (and, in effect, deep scrubs) |
nodeep-scrub | new deep scrubs only |
Note what these do not do: ceph osd pause is a different flag
entirely — it stops all client I/O and is not a scrub control.
ceph osd set pause # stops client I/O, not scrubbing — not what you want
Per-pool control
ceph osd pool set scratch noscrub true
ceph osd pool set scratch nodeep-scrub true
ceph osd pool get scratch noscrub
Per-pool flags are almost always the better choice: they express the actual intent — this pool does not need scrubbing right now — without removing the check from every other pool.
When pausing is justified
| Situation | Justified? |
|---|---|
| An active incident with client impact | yes, briefly |
| A large recovery in progress | yes, until it completes |
| A planned load test or benchmark | yes, for its duration |
| Ongoing latency the team has not investigated | no — investigate instead |
| Permanently, to save I/O | no — tune the interval instead |
The distinction is between a bounded pause with a resume condition and an open-ended one, which is disabling by another name.
Resuming reliably
ceph osd unset noscrub
ceph osd unset nodeep-scrub
ceph osd dump | grep flags
ceph health detail | grep -i OSDMAP_FLAGS
The habit that works is attaching the resume to a condition rather than to a memory:
# resume when the recovery finishes
while ! ceph health detail | grep -q HEALTH_OK; do sleep 300; done
ceph osd unset nodeep-scrub
After a long pause, expect a burst as overdue PGs become eligible:
ceph health detail | grep NOT_DEEP_SCRUBBED
Re-enabling gradually — per pool, or by widening the window — spreads that burst.
Quiz
Knowledge check · 4 questions
Q1. Which flag pauses deep scrubbing without stopping shallow scrubs?
Q2. `ceph osd pause` is the correct way to halt scrubbing.
Q3. Handle a request to pause scrubbing indefinitely.
A team asks for deep scrub to be disabled because it causes latency spikes. They have no plan to re-enable it and describe the pause as "until we upgrade the disks", with no date.
Q4. Why does a long scrub pause produce a burst of scrubbing on resume?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Use per-pool noscrub and nodeep-scrub rather than cluster-wide
flags where the intent is pool-specific. Attach every pause to a resume
condition — ideally a scripted one — and re-enable gradually after a long
pause, since every PG becomes eligible simultaneously.
Cross-course references
- Kubernetes: silenced alerts without an expiry become permanently disabled monitoring
- Linux: disabling a periodic integrity job is the same trade in a different system