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
-
Log into the
cephadm shell.
For example,
[root@host01 ~]# cephadm shell
-
Get the host details.
For example,
[ceph: root@host01 /]# ceph orch host ls
-
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.
-
Check the status of OSD removal.
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.
-
Check if all the daemons are removed from the storage cluster.
For example,
[ceph: root@host01 /]# ceph orch ps host02
-
Remove the host from the orchestrator and the CRUSH map.
Use the --rm-crush-entry flag to remove the host from both the orchestrator and the CRUSH map in a single operation. This ensures the host is completely removed from the cluster and does not appear in the ceph osd tree output.
ceph orch host rm HOSTNAME --rm-crush-entry
For example,
[ceph: root@host01 /]# ceph orch host rm host02 --rm-crush-entry
Removed host 'host02'
Alternative method: If you have already removed the host without the --rm-crush-entry flag, you can manually remove the host from the CRUSH map.
ceph osd crush remove HOSTNAME
For example,
[ceph: root@host01 /]# ceph osd crush remove host02
removed item id -5 name 'host02' from crush map
-
Verify that the host has been removed from both the orchestrator and the CRUSH map.
-
Check that the host is not listed in the orchestrator.
For example,
[ceph: root@host01 /]# ceph orch host ls
-
Verify that the host does not appear in the OSD tree.
For example,
[ceph: root@host01 /]# ceph osd tree
The host should not appear in either output.