Chapter 12. Replacing storage nodes You can choose one of the following procedures to replace storage nodes: Section 12.1, "Replacing operational nodes on Red Hat OpenStack Platform installer-provisioned infrastructure" Section 12.2, "Replacing failed nodes on Red Hat OpenStack Platform installer-provisioned infrastructure" 12.1. Replacing operational nodes on Red Hat OpenStack Platform installer-provisioned infrastructure Use this procedure to replace an operational node on Red Hat OpenStack Platform installer-provisioned infrastructure (IPI). Procedure Log in to OpenShift Web Console and click Compute Nodes . Identify the node that needs to be replaced. Take a note of its Machine Name . Mark the node as unschedulable using the following command: Drain the node using the following command: Important This activity may take at least 5-10 minutes or more. Ceph errors generated during this period are temporary and are automatically resolved when the new node is labeled and functional. Click Compute Machines . Search for the required machine. Besides the required machine, click the Action menu (...) Delete Machine . Click Delete to confirm the machine deletion. A new machine is automatically created. Wait for new machine to start and transition into Running state. Important This activity may take at least 5-10 minutes or more. Click Compute Nodes , confirm if the new node is in Ready state. Apply the OpenShift Container Storage label to the new node using any one of the following: From User interface For the new node, click Action Menu (...) Edit Labels Add cluster.ocs.openshift.io/openshift-storage and click Save . From Command line interface Execute the following command to apply the OpenShift Container Storage label to the new node: Verification steps Execute the following command and verify that the new node is present in the output: Click Workloads Pods , confirm that at least the following pods on the new node are in Running state: csi-cephfsplugin-* csi-rbdplugin-* Verify that all other required OpenShift Container Storage pods are in Running state. Verify that new OSD pods are running on the replacement node. (Optional) If data encryption is enabled on the cluster, verify that the new OSD devices are encrypted. For each of the new nodes identified in step, do the following: Create a debug pod and open a chroot environment for the selected host(s). Run "lsblk" and check for the "crypt" keyword beside the ocs-deviceset name(s) If verification steps fail, contact Red Hat Support . 12.2. Replacing failed nodes on Red Hat OpenStack Platform installer-provisioned infrastructure Perform this procedure to replace a failed node which is not operational on Red Hat OpenStack Platform installer-provisioned infrastructure (IPI) for OpenShift Container Storage. Procedure Log in to OpenShift Web Console and click Compute Nodes . Identify the faulty node and click on its Machine Name . Click Actions Edit Annotations , and click Add More . Add machine.openshift.io/exclude-node-draining and click Save . Click Actions Delete Machine , and click Delete . A new machine is automatically created, wait for new machine to start. Important This activity may take at least 5-10 minutes or more. Ceph errors generated during this period are temporary and are automatically resolved when the new node is labeled and functional. Click Compute Nodes , confirm if the new node is in Ready state. Apply the OpenShift Container Storage label to the new node using any one of the following: From User interface For the new node, click Action Menu (...) Edit Labels Add cluster.ocs.openshift.io/openshift-storage and click Save . From Command line interface Execute the following command to apply the OpenShift Container Storage label to the new node: [Optional]: If the failed Red Hat OpenStack Platform instance is not removed automatically, terminate the instance from Red Hat OpenStack Platform console. Verification steps Execute the following command and verify that the new node is present in the output: Click Workloads Pods , confirm that at least the following pods on the new node are in Running state: csi-cephfsplugin-* csi-rbdplugin-* Verify that all other required OpenShift Container Storage pods are in Running state. Verify that new OSD pods are running on the replacement node. (Optional) If data encryption is enabled on the cluster, verify that the new OSD devices are encrypted. For each of the new nodes identified in step, do the following: Create a debug pod and open a chroot environment for the selected host(s). Run "lsblk" and check for the "crypt" keyword beside the ocs-deviceset name(s) If verification steps fail, contact Red Hat Support .

Commands:
oc adm cordon <node_name>
oc adm drain <node_name> --force --delete-local-data --ignore-daemonsets
oc label node <new_node_name> cluster.ocs.openshift.io/openshift-storage=""
oc get nodes --show-labels | grep cluster.ocs.openshift.io/openshift-storage= |cut -d' ' -f1
oc get pods -o wide -n openshift-storage| egrep -i new-node-name | egrep osd
oc debug node/<node name> chroot /host
lsblk
oc label node <new_node_name> cluster.ocs.openshift.io/openshift-storage=""
oc get nodes --show-labels | grep cluster.ocs.openshift.io/openshift-storage= |cut -d' ' -f1
oc get pods -o wide -n openshift-storage| egrep -i new-node-name | egrep osd
oc debug node/<node name> chroot /host
lsblk