Skip to main content
RunBook Academy

CephCXII · OSD Host LossOSD Host Loss

Whether the recovery will fit

Advanced⏱ ~18 minceph

What you'll learn

  • Compute the headroom a host loss requires
  • Interpret the three fullness ratios
  • Recognise a backfill stalled on capacity
  • Buy room safely during an incident

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

Recovery from a host loss writes that host’s data onto the survivors, and a cluster with plenty of free space in aggregate can still stall on a single OSD.

The arithmetic

ceph df
ceph osd df tree | tail -5
TOTAL   1.1 PiB  310 TiB  790 TiB   71.82
MIN/MAX VAR: 0.83/1.19  STDDEV: 4.12
A 12-OSD host in a 120-OSD cluster holds roughly a tenth of the data.
Recovery spreads that over the remaining 108, so each gains about a
ninth of its current contents — and the OSD already at VAR 1.19 gains
the same proportion as the one at 0.83.
ceph osd df --format json | python3 -c '
import sys,json
n = [o for o in json.load(sys.stdin)["nodes"] if o.get("device_class")]
n.sort(key=lambda o: -o["utilization"])
for o in n[:5]:
    print("osd.%-4d %6.2f%%  var %.2f" % (o["id"], o["utilization"], o["var"]))'

The three ratios

ceph osd dump | grep -E 'full_ratio|nearfull_ratio'
RatioDefaultBehaviour when crossed
nearfull_ratio0.85HEALTH_WARN, nothing stops
backfillfull_ratio0.90backfill into that OSD stops
full_ratio0.95the OSD refuses writes; pools using it block
ceph health detail | grep -E 'OSD_NEARFULL|OSD_BACKFILLFULL|POOL_NEARFULL|PG_BACKFILL_FULL'
ceph pg ls backfill_toofull | head

Reading MAX AVAIL

ceph df detail
POOL          ID  STORED   OBJECTS  USED    %USED  MAX AVAIL
rbd-primary    3   210 TiB   55.31M  630 TiB  87.4    30 TiB
MAX AVAIL is derived from the most constrained OSD the pool's rule can
reach, divided by the replication factor. It falls faster than raw free
space as the distribution skews, which is exactly what a host loss does.

Device classes bound the arithmetic

ceph osd crush class ls
ceph osd df tree --class ssd | tail -3
Recovery only reaches OSDs the pool rule can select. Losing a host of
SSDs is absorbed by the remaining SSDs alone, and spare HDD capacity in
the same cluster contributes nothing to it.

Buying room during an incident

ceph osd set-backfillfull-ratio 0.92
ceph osd set-nearfull-ratio 0.87
ceph osd test-reweight-by-utilization 110
ceph osd reweight-by-utilization 110
ActionEffectCaveat
Raise backfillfull_ratiobackfill resumesthe space is not created, only unlocked
reweight-by-utilizationshifts PGs off the fullest OSDscauses its own data movement
Delete or expire datareal capacityslowest to take effect
Add OSDsreal capacityrecovery competes with the new backfill

Quiz

Knowledge check · 4 questions

  1. Q1. A recovery stalls with the degraded percentage flat and the cluster serving normally. What should you check first?

  2. Q2. Backfill stops at a threshold lower than the one that stops client writes.

  3. Q3. Size a recovery before allowing it to start.

    A 120-OSD cluster at 71% average utilisation loses a 12-OSD host. The fullest surviving OSD is at 86% and `ceph df` reports 30 TiB MAX AVAIL for the largest pool.

  4. Q4. Why does MAX AVAIL fall faster than raw free space during a recovery?

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

Production discipline

Size a recovery against the fullest OSD and the pool MAX AVAIL, never against average utilisation — backfill is bound by the most constrained device. Treat a plateau in the degraded percentage as a capacity stall until ceph pg ls backfill_toofull proves otherwise.

Cross-course references

  • Kubernetes: a node with free memory in aggregate still evicts on the binding resource
  • Linux: filesystem free space is meaningless when one device in the set is full