2.3. Replacing storage nodes on IBM Power infrastructure


For OpenShift Data Foundation, you can perform node replacement proactively for an operational node, and reactively for a failed node, for the deployments related to IBM Power.

2.3.1. Replacing an operational or failed storage node on IBM Power

Prerequisites

  • Ensure that the replacement nodes are configured with the similar infrastructure and resources to the node that you replace.
  • You must be logged into the OpenShift Container Platform cluster.

Procedure

  1. Identify the node, and get the labels on the node that you need to replace:

    $ oc get nodes --show-labels | grep <node_name>
    <node_name>
    Specify the name of node that you need to replace.
  2. Identify the mon (if any), and Object Storage Device (OSD) pods that are running in the node that you need to replace:

    $ oc get pods -n openshift-storage -o wide | grep -i <node_name>
  3. Scale down the deployments of the pods identified in the previous step:

    For example:

    $ oc scale deployment rook-ceph-mon-a --replicas=0 -n openshift-storage
    $ oc scale deployment rook-ceph-osd-1 --replicas=0 -n openshift-storage
    $ oc scale deployment --selector=app=rook-ceph-crashcollector,node_name=<node_name> --replicas=0 -n openshift-storage
  4. Mark the node as unschedulable:

    $ oc adm cordon <node_name>
  5. Remove the pods which are in Terminating state:

    $ oc get pods -A -o wide | grep -i <node_name> |  awk '{if ($4 == "Terminating") system ("oc -n " $1 " delete pods " $2  " --grace-period=0 " " --force ")}'
  6. Drain the node:

    $ oc adm drain <node_name> --force --delete-emptydir-data=true --ignore-daemonsets
  7. Delete the node:

    $ oc delete node <node_name>
  8. Get a new IBM Power machine with the required infrastructure. See Installing a cluster on IBM Power.
  9. Create a new OpenShift Container Platform node using the new IBM Power machine.
  10. Check for the Certificate Signing Requests (CSRs) related to OpenShift Container Platform that are in Pending state:

    $ oc get csr
  11. Approve all the required OpenShift Container Platform CSRs for the new node:

    $ oc adm certificate approve <certificate_name>
    <certificate_name>
    Specify the name of the CSR.
  12. Click Compute Nodes in the OpenShift Web Console. Confirm that the new node is in Ready state.
  13. Apply the OpenShift Data Foundation label to the new node using any one of the following:

    From the user interface
    1. For the new node, click Action Menu (⋮) Edit Labels.
    2. Add cluster.ocs.openshift.io/openshift-storage, and click Save.
    From the command-line interface
    1. Apply the OpenShift Data Foundation label to the new node:
    $ oc label node <new_node_name> cluster.ocs.openshift.io/openshift-storage=''
    <new_node_name>
    Specify the name of the new node.
  14. Identify the namespace where OpenShift local storage operator is installed, and assign it to the local_storage_project variable:

    $ local_storage_project=$(oc get csv --all-namespaces | awk '{print $1}' | grep local)

    For example:

    $ local_storage_project=$(oc get csv --all-namespaces | awk '{print $1}' | grep local)
    echo $local_storage_project

    Example output:

    openshift-local-storage
  15. Add a newly added worker node to the localVolume.

    1. Determine the localVolume you need to edit:

      # oc get -n $local_storage_project localvolume

      Example output:

      NAME           AGE
      localblock    25h
    2. Update the localVolume definition to include the new node, and remove the failed node:

      # oc edit -n $local_storage_project localvolume localblock

      Example output:

      [...]
          nodeSelector:
          nodeSelectorTerms:
            - matchExpressions:
                - key: kubernetes.io/hostname
                  operator: In
                  values:
                  #- worker-0
                  - worker-1
                  - worker-2
                  - worker-3
      [...]

      Remember to save before exiting the editor.

      In the this example, worker-0 is removed and worker-3 is the new node.

  16. Verify that the new localblock Persistent Volume (PV) is available:

    $ oc get pv | grep localblock

    Example output:

    NAME              CAPACITY   ACCESSMODES RECLAIMPOLICY STATUS     CLAIM             STORAGECLASS                 AGE
    local-pv-3e8964d3    500Gi    RWO         Delete       Bound      ocs-deviceset-localblock-2-data-0-mdbg9  localblock     25h
    local-pv-414755e0    500Gi    RWO         Delete       Bound      ocs-deviceset-localblock-1-data-0-4cslf  localblock     25h
    local-pv-b481410    500Gi     RWO        Delete       Available                                            localblock     3m24s
    local-pv-5c9b8982    500Gi    RWO         Delete       Bound      ocs-deviceset-localblock-0-data-0-g2mmc  localblock     25h
  17. Navigate to the openshift-storage project:

    $ oc project openshift-storage
  18. Remove the failed OSD from the cluster. You can specify multiple failed OSDs if required.

    1. Identify the Persistent Volume Claim (PVC):

      $ osd_id_to_remove=1
      $ oc get -n openshift-storage -o yaml deployment rook-ceph-osd-${<osd_id_to_remove>} | grep ceph.rook.io/pvc

      where, <osd_id_to_remove> is the integer in the pod name immediately after the rook-ceph-osd prefix.

      In this example, the deployment name is rook-ceph-osd-1.

      Example output:

      ceph.rook.io/pvc: ocs-deviceset-localblock-0-data-0-g2mmc
          ceph.rook.io/pvc: ocs-deviceset-localblock-0-data-0-g2mmc
    2. Remove the failed OSD from the cluster. You can specify multiple failed OSDs if required:

      $ oc process -n openshift-storage ocs-osd-removal \
      -p FAILED_OSD_IDS=<failed_osd_id> | oc create -f -
      <failed_osd_id>

      Is the integer in the pod name immediately after the rook-ceph-osd prefix. You can add comma separated OSD IDs in the command to remove more than one OSD, for example, FAILED_OSD_IDS=0,1,2.

      The FORCE_OSD_REMOVAL value must be changed to true in clusters that only have three OSDs, or clusters with insufficient space to restore all three replicas of the data after the OSD is removed.

      주의

      This step results in the OSD being completely removed from the cluster. Ensure that the correct value of osd_id_to_remove is provided.

  19. Verify that the OSD was removed successfully by checking the status of the ocs-osd-removal-job pod.

    A status of Completed confirms that the OSD removal job has succeeded.

    # oc get pod -l job-name=ocs-osd-removal-job -n openshift-storage
  20. Ensure that the OSD removal is completed.

    $ oc logs -l job-name=ocs-osd-removal-job -n openshift-storage --tail=-1 | egrep -i 'completed removal'

    Example output:

    2022-05-10 06:50:04.501511 I | cephosd: completed removal of OSD 0
    중요

    If the ocs-osd-removal-job fails, and the pod is not in the expected Completed state, check the pod logs for further debugging.

    For example:

    # oc logs -l job-name=ocs-osd-removal-job -n openshift-storage --tail=-1
  21. Delete the PV associated with the failed node.

    1. Identify the PV associated with the PVC:

      # oc get pv -L kubernetes.io/hostname | grep localblock | grep Released

      Example output:

      local-pv-5c9b8982  500Gi  RWO  Delete  Released  openshift-storage/ocs-deviceset-localblock-0-data-0-g2mmc  localblock  24h  worker-0

      The PVC name must be identical to the name that is obtained while removing the failed OSD from the cluster.

    2. If there is a PV in Released state, delete it:

      # oc delete pv <persistent_volume>

      For example:

      # oc delete pv local-pv-5c9b8982

      Example output:

      persistentvolume "local-pv-5c9b8982" deleted
  22. Identify the crashcollector pod deployment:

    $ oc get deployment --selector=app=rook-ceph-crashcollector,node_name=<failed_node_name> -n openshift-storage

    If there is an existing crashcollector pod deployment, delete it:

    $ oc delete deployment --selector=app=rook-ceph-crashcollector,node_name=<failed_node_name> -n openshift-storage
  23. Delete the ocs-osd-removal-job:

    # oc delete -n openshift-storage job ocs-osd-removal-job

    Example output:

    job.batch "ocs-osd-removal-job" deleted

Verification steps

  1. Verify that the new node is present in the output:

    $ oc get nodes --show-labels | grep cluster.ocs.openshift.io/openshift-storage= |cut -d' ' -f1
  2. Click Workloads Pods. Confirm that at least the following pods on the new node are in Running state:

    • csi-cephfsplugin-*
    • csi-rbdplugin-*
  3. Verify that all other required OpenShift Data Foundation pods are in Running state.

    Ensure that the new incremental mon is created and is in the Running state:

    $ oc get pod -n openshift-storage | grep mon

    Example output:

    rook-ceph-mon-b-74f6dc9dd6-4llzq                                   1/1     Running     0          6h14m
    rook-ceph-mon-c-74948755c-h7wtx                                    1/1     Running     0          4h24m
    rook-ceph-mon-d-598f69869b-4bv49                                   1/1     Running     0          162m

    The OSD and monitor pod might take several minutes to get to the Running state.

  4. Verify that the new OSD pods are running on the replacement node:

    $ oc get pods -o wide -n openshift-storage| egrep -i <new_node_name> | egrep osd
  5. Optional: If cluster-wide encryption is enabled on the cluster, verify that the new OSD devices are encrypted.

    For each of the new nodes identified in the previous step, do the following:

    1. Create a debug pod and open a chroot environment for the one or more selected hosts:

      $ oc debug node/<node_name>
      $ chroot /host
    2. Display the list of available block devices:

      $ lsblk

      Check for the crypt keyword beside the one or more ocs-deviceset names.

  6. If the verification steps fail, contact Red Hat Support.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동