CephXC · Scaling OutScaling Out
Expanding during degraded conditions
What you'll learn
- Decide whether to expand during a recovery
- Recognise when expansion is the remedy
- Sequence a combined recovery and expansion
- Bound the combined impact
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
Adding capacity during a recovery is usually wrong and occasionally the only remedy. The distinction is specific.
When it compounds the problem
Recovery running, cluster has adequate capacity
→ adding OSDs starts a rebalance
→ both compete for the same devices and network
→ recovery slows, extending the degraded window
→ the rebalance slows too
→ both take longer than either would alone
| Situation | Expand now? |
|---|---|
| Recovery running, capacity adequate | no — wait |
| Recovery running, cluster nearfull | no — but free space urgently |
Recovery stalled on backfill_toofull | yes — it is the remedy |
| Recovery complete, expansion planned | yes |
A degraded pool at min_size | no — restore redundancy first |
When expansion is the remedy
ceph health detail | grep -i BACKFILL_FULL
ceph pg dump pgs | grep -c toofull
A recovery stalled because destinations are too full does not resolve without more space. Here expansion is not competing with the recovery — it is what unblocks it.
# but faster remedies exist and should be tried first
POOL=rbd-vms
NON_CRITICAL=non_critical
ceph balancer status
rbd snap ls --all --pool ${POOL}
ceph osd pool set ${NON_CRITICAL} size 2
Expansion has a procurement and racking lead time; balancing, deleting, and reducing a pool’s size are available immediately.
Sequencing a combined operation
If expansion must happen during a recovery:
1. add the OSDs with norebalance set
2. verify they are up and healthy
3. let the recovery complete
4. clear norebalance
5. let the expansion rebalance run
ceph osd set norebalance
ceph orch daemon add osd ceph-04:/dev/sdb
ceph osd tree | grep -A3 ceph-04
# wait for recovery
while ! ceph health | grep -q HEALTH_OK; do sleep 60; done
ceph osd unset norebalance
This serialises the two rather than overlapping them, which is faster in total and keeps the degraded window shorter.
Bounding the combined impact
# if they must overlap
ceph config set osd osd_mclock_profile high_recovery_ops
ceph config set osd osd_max_backfills 1
Prioritising recovery over the rebalance is correct when they overlap: the recovery restores redundancy and the rebalance improves distribution, and the first matters more.
ceph -s | grep -E 'degraded|misplaced'
Watching both counts separately shows which is progressing.
Quiz
Knowledge check · 4 questions
Q1. When is adding OSDs during an active recovery the correct action?
Q2. Adding the OSDs with norebalance set and clearing it only once the recovery has finished gets both jobs done sooner than letting them overlap.
Q3. Decide whether to expand during a recovery.
A disk failed and recovery is running. New hardware for a planned expansion has just arrived and the team wants to install it now to save a maintenance window.
Q4. Which faster remedies should be tried before expansion when a recovery is capacity-blocked?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Add expansion hardware with norebalance set during a recovery and
release it afterwards — the installation and the data movement are
separable, and serialising them is faster than overlapping. The exception
is a backfill_toofull stall, where expansion supplies exactly what the
recovery is waiting for.
Cross-course references
- Kubernetes: adding capacity during a rescheduling storm compounds it the same way
- Linux: concurrent maintenance operations on shared devices extend each other