GrepBoard/Manuals
605 manuals ·

Fix Ceph "pgs not deep-scrubbed in time" (PG_NOT_DEEP_SCRUBBED)

·Tested on Ceph official docs (Tentacle) · 2026-10·Test scope ↓·7 steps

When PG_NOT_DEEP_SCRUBBED appears, check scrub flags, the allowed scrub window, then the interval settings — and see what raising the interval only postpones.

If ceph health shows PG_NOT_DEEP_SCRUBBED: 1161 pgs not deep-scrubbed in time, work through the steps below in order. The checks are read-only; commands that change settings are called out.

[1] List the late PGs. Each one is printed with the time of its last deep scrub.

console
# ceph health detail

The docs show lines like these:

output
[WRN] PG_NOT_DEEP_SCRUBBED: 1161 pgs not deep-scrubbed in timepg 86.fff not deep-scrubbed since 2024-08-21T02:35:25.733187+0000

[2] Look for scrub flags. In the OSDMAP_FLAGS section the docs list noscrub and nodeep-scrub as the flags that disable scrubbing. A flag set during maintenance and forgotten shows up here.

console
# ceph health detail

Clear flags you no longer need. This changes the cluster.

console
# ceph osd unset nodeep-scrub# ceph osd unset noscrub

The same flags exist per pool (1 sets, 0 clears). If only one pool is blocked:

console
# ceph osd pool set <pool-name> nodeep-scrub 0

[3] Check the scrub window. osd_scrub_begin_hour restricts scrubbing to that hour or later, osd_scrub_end_hour to hours earlier than that value. osd_scrub_begin_week_day and osd_scrub_end_week_day do the same for weekdays.

console
# ceph config get osd osd_scrub_begin_hour# ceph config get osd osd_scrub_end_hour

A narrow window can be too short for a cluster with many PGs to finish its deep scrubs. Widen the window before you raise the interval. The commands below set the documented defaults (0, 0).

console
# ceph config set osd osd_scrub_begin_hour 0# ceph config set osd osd_scrub_end_hour 0

[4] Check what stops a scrub from starting. The docs give these conditions:

  • The PG must be clean. Misplaced or degraded PGs are not scrubbed — fix PG_AVAILABILITY and PG_DEGRADED first.
  • With osd_scrub_during_recovery at false (default), no scrubs run during recovery.
  • Periodic scrubs do not start when the normalized load (load average ÷ online CPUs) exceeds osd_scrub_load_threshold (default 10.0).
  • One OSD runs at most osd_max_scrubs scrubs at a time (default 3).
console
# ceph config get osd osd_scrub_during_recovery# ceph config get osd osd_scrub_load_threshold# ceph config get osd osd_max_scrubs

[5] Check the interval. The default osd_deep_scrub_interval is 7 days. If one full deep-scrub round over big, numerous PGs takes longer, the warning stays. The docs name large clusters with many large PGs as a cause.

console
# ceph config get osd osd_deep_scrub_interval

The documented procedure raises the interval, in seconds. The example 1209600 is 14 days. Set it for OSDs and the manager:

console
# ceph config set osd osd_deep_scrub_interval 1209600# ceph config set mgr osd_deep_scrub_interval 1209600

The docs also show the global form:

console
# ceph config set global osd_deep_scrub_interval 1209600

A single pool can have its own interval. The default 0 means "use the central osd_deep_scrub_interval".

console
# ceph osd pool get <pool-name> deep_scrub_interval# ceph osd pool set <pool-name> deep_scrub_interval <seconds>

[6] To deep-scrub a late PG by hand, the docs give ceph pg deep-scrub <pgid>.

console
# ceph pg deep-scrub <pgid>

[7] Run ceph health detail again. The warning shrinks as scrubs complete; it will not vanish at once.

Related: other warning codes are covered in Read Ceph HEALTH_WARN causes with health detail.

#ceph#scrub#pg