Skip to main content
RunBook Academy

CephXCII · Removing Storage NodesRemoving Storage Nodes

Evacuating a node

Advanced⏱ ~17 mincephcephadm

What you'll learn

  • Distinguish the evacuation methods
  • Choose the appropriate one
  • Execute an evacuation
  • Control its pace

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

There are two ways to drain a node and they differ in what happens if the process is interrupted.

The two methods

# method 1: mark the OSDs out
for id in $(ceph osd ls-tree ceph-07); do ceph osd out "$id"; done

# method 2: reduce the CRUSH weight
for id in $(ceph osd ls-tree ceph-07); do ceph osd crush reweight osd.$id 0; done
osd outCRUSH reweight to 0
Changesthe OSD’s in statethe OSD’s CRUSH weight
PG placementremapped awayrecomputed without it
If interruptedceph osd in restores instantlyreweighting back restores
Movementone passone pass
Effect on the bucket weightnonereduces the host’s total
Reversibilityimmediateimmediate
# the orchestrator's method, which handles the sequence
ceph orch host drain ceph-07
ceph orch osd rm status

ceph orch host drain marks the OSDs out and removes them once drained, which is the intended path for a permanent removal.

Which to use

IntentMethod
Permanent removalceph orch host drain
Temporary evacuation, node returningceph osd out, then ceph osd in
Gradual drain to limit impactCRUSH reweight in steps
Removing individual OSDsceph orch osd rm
# a gradual drain
for w in 0.75 0.5 0.25 0; do
  for id in $(ceph osd ls-tree ceph-07); do
    ceph osd crush reweight osd.$id $(echo "16.0 * $w" | bc)
  done
  while ! ceph health | grep -q HEALTH_OK; do sleep 60; done
done

Stepping the weight down means each step’s movement is bounded and the cluster reaches health between them.

Executing an evacuation

# verify readiness
ceph -s
ceph osd df | sort -k17 -rn | head -3
ceph osd df tree | grep -A15 ceph-07
The remaining OSDs must be able to hold this node's data
without any of them passing backfillfull.
# start
ceph orch host drain ceph-07

# monitor
ceph orch osd rm status
watch -n 60 'ceph -s | grep -E "misplaced|health"'

Controlling the pace

ceph config set osd osd_max_backfills 2
ceph config set osd osd_mclock_profile high_client_ops
# pause if needed
ceph osd set norebalance
# and resume
ceph osd unset norebalance

An evacuation is a backfill like any other and responds to the same throttles.

Quiz

Knowledge check · 4 questions

  1. Q1. What does stepping a CRUSH reweight down in stages achieve?

  2. Q2. An evacuation can be started without checking whether the remaining OSDs can hold the data.

  3. Q3. Evacuate a node for permanent removal.

    A node with twelve OSDs holding 18 TB is being decommissioned. The cluster is at 74% average utilisation.

  4. Q4. What distinguishes `ceph osd out` from a CRUSH reweight to zero?

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

Production discipline

Verify the remaining OSDs can absorb the node’s contents below backfillfull before starting an evacuation — a stalled drain leaves the cluster in a worse state than not having started. Use ceph orch host drain for permanent removal and a stepped CRUSH reweight where each step’s movement must be bounded.

Cross-course references

  • Kubernetes: draining a node requires the remaining ones to have capacity
  • Linux: removing an array member requires the survivors to hold its data