Skip to main content
RunBook Academy

CephLXXXI · Proxmox IntegrationProxmox Integration

Failure domains for Proxmox workloads

Advanced⏱ ~18 mincephcrushtool

What you'll learn

  • Choose a failure domain appropriate to the topology
  • Configure CRUSH to match the physical layout
  • Verify placement survives the intended failures
  • Coordinate Ceph and Proxmox failure domains

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

The default failure domain is host, which protects against a host failure and nothing larger. A rack, a switch, or a power feed taking out three hosts at once is a different event.

Choosing the domain

TopologyAppropriate domainRequires
All nodes in one rackhostsize hosts
Nodes across racksracksize racks
Nodes across roomsroomsize rooms
Two sitesstretch modespecific configuration

The requirement is absolute: failure_domain=rack with size=3 needs three racks, and two racks means PGs cannot be placed.

ceph osd tree | grep -cE '^-.*rack'
ceph osd pool get pve-vms size

Configuring CRUSH to match

# declare the physical topology
ceph osd crush add-bucket rack1 rack
ceph osd crush add-bucket rack2 rack
ceph osd crush add-bucket rack3 rack
ceph osd crush move rack1 root=default
ceph osd crush move rack2 root=default
ceph osd crush move rack3 root=default

# place hosts in racks
ceph osd crush move pve-01 rack=rack1
ceph osd crush move pve-02 rack=rack2
ceph osd crush move pve-03 rack=rack3

# a rule using the rack domain
ceph osd crush rule create-replicated rack-rule default rack
ceph osd pool set pve-vms crush_rule rack-rule
ceph osd tree

The tree must reflect the actual physical layout — a host recorded in the wrong rack silently defeats the protection.

Verifying the placement

# does any PG have two copies in one rack?
ceph pg dump pgs --format json 2>/dev/null | python3 -c '
import sys, json, subprocess
tree = json.loads(subprocess.check_output(["ceph","osd","tree","--format","json"]))
nodes = {n["id"]: n for n in tree["nodes"]}
rack = {}
def walk(nid, r=None):
    n = nodes.get(nid, {})
    if n.get("type") == "rack": r = n["name"]
    if n.get("type") == "osd": rack[n["id"]] = r
    for c in n.get("children", []): walk(c, r)
for n in tree["nodes"]:
    if n["type"] == "root": walk(n["id"])
d = json.load(sys.stdin)
bad = 0
for pg in d.get("pg_stats", []):
    racks = [rack.get(o) for o in pg.get("acting", []) if o >= 0]
    if len(set(racks)) < len(racks): bad += 1
print("PGs with two copies in one rack:", bad)'
# or test a rule without applying it
crushtool -i /tmp/crush.bin --test --show-mappings --rule 1 --num-rep 3 | head

Coordinating with Proxmox

Proxmox HA groups should align with the Ceph failure domains:

# /etc/pve/ha/groups.cfg
group: rack-aware
        nodes pve-01:2,pve-02:1,pve-03:1
        restricted 0

If Ceph tolerates a rack failure but Proxmox restarts all the affected VMs onto one surviving rack, that rack becomes a bottleneck at the moment the cluster is already recovering.

ha-manager groupconfig
ha-manager status

Quiz

Knowledge check · 4 questions

  1. Q1. Three racks hold 10, 10, and 4 hosts, with a rack-level failure domain and size=3. What bounds the pool's usable capacity?

  2. Q2. CRUSH detects when a host has been physically moved to a different rack.

  3. Q3. Align failure domains after a rack expansion.

    A Proxmox and Ceph deployment has grown from one rack to three. All pools still use the default host failure domain. A rack-level power event is a recognised risk.

  4. Q4. Why must Proxmox HA groups align with Ceph failure domains?

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

Production discipline

Verify the CRUSH tree against the physical layout after every hardware move — CRUSH places by the map, and a host in the wrong rack silently defeats the protection. Balance host counts across failure domains; an uneven topology bounds pool capacity by the smallest domain.

Cross-course references

  • Kubernetes: topology spread constraints must match real zone boundaries
  • Linux: any redundancy scheme depends on the topology description being accurate