Removing and Replacing Ceph OSDs: orch osd rm, rm, destroy and purge Explained
Ceph has five commands that sound like they remove an OSD:
ceph orch osd rmceph orch osd rm --replaceceph osd rmceph osd destroyceph osd purge
They do different things, and picking the wrong one can leave orphaned daemons, stale keys, an OSD ID you can’t reuse, or a second round of rebalancing.
TL;DR
| Goal | cephadm cluster | Classic cluster (packages + systemd) |
|---|---|---|
| Remove an OSD permanently | ceph orch osd rm <id> --zap |
ceph osd purge |
| Replace a disk, keep the ID | ceph orch osd rm <id> --replace --zap |
ceph osd destroy + ceph-volume lvm create --osd-id |
| Replace a disk without draining (degraded) | ceph orch daemon stop + ceph osd destroy --force + ceph orch daemon rm --force |
systemctl stop + ceph osd destroy --force + ceph-volume lvm create --osd-id |
On cephadm, always run ceph orch set-unmanaged <osd-spec> first, or the zapped disk is redeployed within seconds.