Skip to main content
RunBook Academy

CephXIV · CRUSH Failure DomainsCRUSH Failure Domains

Weights across failure domains

Intermediate⏱ ~16 minceph

What you'll learn

  • Explain how weights aggregate through the hierarchy
  • Predict distribution across unevenly weighted domains
  • Detect weight problems from utilisation patterns
  • Correct weights safely on a live cluster

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

Weight aggregation is what makes CRUSH distribute proportionally at every level. It is also the reason an unbalanced rack strands capacity, and the reason a single wrong OSD weight is visible cluster-wide.

How aggregation works

osd.0  weight 3.638   ┐
osd.1  weight 3.638   ├─ host ceph-01  weight 7.276  ┐
                                                      ├─ rack-a  weight 14.552
osd.2  weight 3.638   ┐                              │
osd.3  weight 3.638   ├─ host ceph-02  weight 7.276  ┘

Each bucket’s weight is the sum of its children. CRUSH selects among siblings in proportion to weight, at every level.

ceph osd df tree
ceph osd crush tree

What that means for uneven domains

Within a level, a domain with twice the weight receives twice the data — subject to the rule’s separation requirement.

That qualifier is where the confusion lives. Under a type host rule on a cluster with racks defined, a rack with twice the hosts receives twice the data, which is fine.

Under a type rack rule, each rack receives exactly one replica per PG regardless of weight, so the weights determine only which OSDs within a rack are chosen. The rack with more capacity does not receive more data; it receives the same share, spread across more OSDs, and fills more slowly.

Detecting weight problems

The characteristic pattern is an OSD or a domain whose utilisation differs markedly from its peers while the balancer cannot correct it:

ceph osd df tree | awk 'NR>1 {print $1, $3, $(NF-2), $(NF-1)}'

Compare the weight column against actual device capacity, and the utilisation column against the mean. A device with the wrong weight is underfilled or overfilled by exactly the ratio of the error.

Correcting weights

ceph osd crush reweight osd.12 14.552

This changes the CRUSH computation and moves data proportional to the correction. On a cluster with many wrong weights, correct them in batches rather than all at once:

ceph config set osd osd_max_backfills 1
for osd in 12 13 14; do ceph osd crush reweight osd.$osd 14.552; done
# wait for active+clean, then continue

The checks worth running

  • Do OSD CRUSH weights match device capacities?
  • Do domain weights at the rule’s level differ substantially?
  • Are there non-1.0 reweight values that nobody remembers setting?

Quiz

Knowledge check · 4 questions

  1. Q1. A three-rack cluster with a rack-level rule gains 20 new OSDs in one rack. What happens to usable capacity?

  2. Q2. reweight-by-utilization is the preferred way to correct uneven OSD utilisation on a current Ceph cluster.

  3. Q3. A cluster shows one rack at 80% utilisation and two at 55% under a rack-level rule. Diagnose.

    Three racks under a size 3 rack rule. ceph osd df tree shows rack-a total weight 145, rack-b 200, rack-c 200. Utilisation is 80% in rack-a and 55% in the others. All OSD weights within each rack match their device sizes. The balancer is enabled in upmap mode and reports no further improvements available.

  4. Q4. Explain how weights aggregate in a CRUSH hierarchy and why that behaves differently under a host rule than a rack rule.

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

Production discipline

Compare domain weights at the rule’s level before ordering expansion hardware, because under a domain-level rule adding capacity to one domain buys nothing — the smallest domain binds the cluster. Check OSD weights against real device capacities as a routine audit, since a wrong weight is silent and the balancer cannot override it. And alert on the binding domain’s utilisation rather than the cluster mean, which will look comfortable while the constraint fills.

Cross-course references

  • Ceph: Part XIII (CRUSH Fundamentals) for weights in the map.
  • Ceph: Part X (Manager Daemons) for what the balancer can fix.
  • Ceph: Part LXIII (Capacity Management) for alerting correctly.