Skip to main content
RunBook Academy

CephLX · Recovery TuningRecovery Tuning

Per-pool recovery priority

Intermediate⏱ ~16 minceph

What you'll learn

  • Set recovery priority per pool
  • Understand what the priority influences
  • Choose priorities that reflect business impact
  • Verify the priority is being respected

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

Not yet marked complete on this device.

Why this matters in production

A cluster hosting VM disks, a backup archive, and a scratch pool recovers all three at once by default. The VM pool recovering last is a business outcome that nobody chose.

Setting the priority

ceph osd pool set rbd-vms recovery_priority 10
ceph osd pool set backups recovery_priority -5
ceph osd pool get rbd-vms recovery_priority

Higher is more urgent. The value is added to the PG’s computed recovery priority, so it biases the ordering rather than establishing a strict ordering.

ceph osd pool ls detail | grep -E 'pool|recovery_priority'

What it influences

It doesIt does not
bias the order PGs are recovered inreserve capacity for a pool
raise a pool ahead of peers at the same degradation leveloverride degradation-based priority
apply to both recovery and backfillchange the total recovery rate

The degradation level still dominates: a PG below min_size in a low-priority pool is recovered ahead of a merely degraded PG in a high-priority one. The setting breaks ties, it does not invert the safety ordering.

Choosing values that reflect impact

PoolPriorityReasoning
rbd-vms10running workloads; unavailability is immediate
cephfs_metadata15the whole filesystem depends on it
rgw-primary5user-facing but tolerant of latency
backups-5recovery can wait; nothing reads it under normal operation
scratch-10recreatable

Setting these once, in advance, means the ordering during an incident reflects a decision made calmly rather than one made at 03:00.

Verifying

# a recovering PG id from the dump above:
PGID=3.1f

ceph pg dump pgs | awk '{print $1, $10}' | head -20
ceph pg "$PGID" query | grep -A5 recovery_state

During a recovery, checking which pools’ PGs are progressing first confirms whether the priorities are having the intended effect.

Quiz

Knowledge check · 4 questions

  1. Q1. What does a pool's `recovery_priority` setting actually do?

  2. Q2. A PG below min_size in a pool set to recovery_priority -10 still recovers before a merely misplaced PG in a pool set to 15.

  3. Q3. Set recovery priorities for a mixed-workload cluster.

    A cluster hosts a CephFS metadata pool, a CephFS data pool, an RBD pool for production VMs, an RGW pool for user uploads, and a pool holding nightly backups. No recovery priorities are set.

  4. Q4. Why is it better to set recovery priorities during pool creation than during an incident?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Set recovery_priority on every pool at creation time, with the reasoning documented; the values encode which workloads matter and the ordering during an incident then needs no decision. Verify during the next recovery that the ordering matches the intent.

Cross-course references

  • Kubernetes: priority classes express the same ordering intent for scheduling
  • Linux: I/O priorities via ionice serve the same purpose for competing jobs