Removing hosts

Remove Ceph cluster hosts with the Ceph Orchestrators.

Before you begin

Before you begin, make sure that you have the following prerequisites in place:
  • A running IBM Storage Ceph cluster.
  • Root-level access to all the nodes.
  • Hosts are added to the storage cluster.
  • All the services are deployed.
  • Cephadm is deployed on the nodes where the services have to be removed.

About this task

All daemons are removed with the drain option which adds the _no_schedule label to ensure that you cannot deploy any daemons or a cluster till the operation is complete.
Important: If you are removing the bootstrap host, be sure to copy the admin keyring and the configuration file to another host in the storage cluster before you remove the host.
For more information, see the following operations information:

Procedure

  1. Log into the Cephadm shell.
    cephadm shell
    For example,
    [root@host01 ~]# cephadm shell
  2. Get the host details.
    ceph orch host ls
    For example,
    [ceph: root@host01 /]# ceph orch host ls
  3. Drain all the daemons from the host.
    ceph orch host drain HOSTNAME
    Note: The ceph orch host drain command supports the --zap-osd-devices flag. When you set this flag, Cephadm zaps the devices of the OSDs it removes during the drain process.
    For example,
    [ceph: root@host01 /]# ceph orch host drain host02
    The _no_schedule label is automatically applied to the host which blocks deployment.
  4. Check the status of OSD removal.
    ceph orch osd rm status
    For example,
    [ceph: root@host01 /]# ceph orch osd rm status
    When no placement groups (PGs) remain on the OSD, the OSD is decommissioned and removed from the storage cluster.
  5. Check if all the daemons are removed from the storage cluster.
    ceph orch ps HOSTNAME
    For example,
    [ceph: root@host01 /]# ceph orch ps host02
  6. Remove the host.
    ceph orch host rm HOSTNAME
    For example,
    [ceph: root@host01 /]# ceph orch host rm host02
  7. Optional. If you also want to remove the corresponding CRUSH map bucket entry, use the --rm-crush-entry flag.
    ceph orch host rm HOSTNAME --rm-crush-entry
    For example,
    [ceph: root@host01 /]# ceph orch host rm host02 --rm-crush-entry
    Note: Using --rm-crush-entry ensures that the host’s CRUSH bucket is cleaned up automatically, preventing leftover topology entries in the CRUSH map.