Chapter 6. Removing OSDs using the OpenShift Data Foundation CLI tool
6.1. Removing object storage devices using the OpenShift Data Foundation CLI tool Copy linkLink copied to clipboard!
You can use the OpenShift Data Foundation command line interface (CLI) tool to automate the process of object storage device (OSD) removal. This helps to avoid the possible data loss while removing OSDs.
Prerequisites
- Download the OpenShift Data Foundation command line interface (CLI) tool. With the Data Foundation CLI tool, you can effectively manage and troubleshoot your Data Foundation environment from a terminal. You can find a compatible version and download the CLI tool from the customer portal.
Procedure
Identify the OSD that needs to be removed. The OSD that needs removal is in
CrashLoopBackOfforErrorstate.oc get -n openshift-storage pods -l app=rook-ceph-osd -o wide
$ oc get -n openshift-storage pods -l app=rook-ceph-osd -o wideCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
rook-ceph-osd-0-6d77d6c7c6-m8xj6 0/1 CrashLoopBackOff 0 24h 10.129.0.16 compute-2 <none> <none>
rook-ceph-osd-0-6d77d6c7c6-m8xj6 0/1 CrashLoopBackOff 0 24h 10.129.0.16 compute-2 <none> <none>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command to remove OSD
0:odf purge-osd 0
$ odf purge-osd 0Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
[Optional] If removal of the OSD affects placement group (PG) status, enter
yes-force-destroy-osd. -
Verify that the last line of the command output contains
cephosd: completed removal of OSD 0. Verify the corresponding deployment is removed:
oc get deployment rook-ceph-osd-0
$ oc get deployment rook-ceph-osd-0Copy to Clipboard Copied! Toggle word wrap Toggle overflow