Uninstalling Global Data Platform

Steps to uninstall Global Data Platform by using command line interface.

Before you begin

  • Run the following commands to define namespace environmental variables:
    export FUSION_NS=<Storage Fusion namespace>
    export SCALE_NS=ibm-spectrum-scale
    Important: Replace <Storage Fusion namespace> with your namespace.
  • Make sure that the applications accessing the storage filesystem through IBM Storage Scale Container Storage Interface Driver, must be stopped before continuing.
  • Do the following steps to remove all the applications:
    1. Stop all the applications that are accessing storage through the IBM Storage Scale Container Storage Interface Driver.
    2. Delete all the Persistent Volume Claims (PVCs) and Persistent Volumes (PVs) provisioned by IBM Storage Scale Container Storage Interface Driver.

Procedure

  1. Do the following steps to delete the IBM Storage Fusion storage CRs.
    1. Run the following commands to delete encryption settings, if you have:
      
      oc -n ${FUSION_NS} get EncryptionClient | grep -v NAME | awk '{print $1}' | xargs -I{} oc -n ${FUSION_NS} delete EncryptionClient {}
      oc -n ${FUSION_NS} get EncryptionServer | grep -v NAME | awk '{print $1}' | xargs -I{} oc -n ${FUSION_NS} delete EncryptionServer {}
    2. Run the following command to delete all the filesystems:
      oc -n ${FUSION_NS} get ScaleCluster | grep -v NAME | awk '{print $1}' | xargs -I{} oc -n ${FUSION_NS} delete ScaleCluster {}
    3. Run the following commands to verify all EncryptionServer and EncryptionClient CRs are deleted from IBM Storage Fusion namespace:
      oc -n ${FUSION_NS} get EncryptionServer
      oc -n ${FUSION_NS} get EncryptionClient
    4. Run the following command to verify all the ScaleCluster CRs are deleted from IBM Storage Fusion namespace.
      oc -n ${FUSION_NS} get ScaleCluster
    5. Run the following commands to delete the sample PV templates:
      oc get pv -o name | grep 'ibm-spectrum-scale-fs-.*-template' | xargs -I{} oc delete {}
    6. Run the following command to delete the VolumeSnapshot class:
      oc get volumesnapshotclass | grep spectrumscale.csi.ibm.com | awk '{print $1}' | xargs -I{} oc delete volumesnapshotclass {}
  2. Do the following steps to delete IBM Storage Scale container native resources.
    1. Run the following command and record the scale cluster name:
      oc -n ${SCALE_NS} get daemon -o yaml | grep clusterName: | awk -F " " '{print $2}'
      Sample scale cluster name:
      ibm-storage-fusion-xx.xxx.example.com
    2. Run the following command to delete the IBM Storage Scale container native cluster:
      oc delete cluster.scale.spectrum.ibm.com ibm-spectrum-scale
    3. Run the following commands to delete the sample Storage class, PVC, and PV:
      oc -n ${SCALE_NS} get pvc -o name | grep pmcollector | xargs -I{} oc -n ${SCALE_NS} delete {}
      oc delete sc -lapp.kubernetes.io/instance=ibm-spectrum-scale,app.kubernetes.io/name=pmcollector
      oc delete pv -lapp.kubernetes.io/instance=ibm-spectrum-scale,app.kubernetes.io/name=pmcollector
    4. Do the following steps to delete IBM Storage Scale container native directories on each worker nodes:
      • Run the following command to list the nodes that have the node-role.kubernetes.io/worker= label.
        oc get nodes -l 'node-role.kubernetes.io/worker=' -o jsonpath="{range .items[*]}{.metadata.name}{'\n'}"
      • For each of the worker nodes listed, enter the following command to create a debug pod that removes the kernel modules and the host path volume mounted directories used by IBM Storage Scale container native:
        oc debug node/<openshift_node> -T -- chroot /host sh -c "rm -rf /var/mmfs; rm -rf /var/adm/ras; rmmod tracedev mmfs26 mmfslinux;"
      • Ensure that none of the artifacts are left by entering the following validation command:
        oc debug node/<openshift_node> -T -- chroot /host sh -c "ls /var/mmfs; ls /var/adm/ras; rmmod tracedev mmfs26 mmfslinux;"
    5. Run the following commands to delete the node labels created by IBM Storage Scale container native operator:
      oc label node --all scale.spectrum.ibm.com/role-
      oc label node --all scale.spectrum.ibm.com/designation-
      oc label node --all scale-

  3. Do the following steps on the remote IBM Storage Scale cluster, to delete access permission:
    Note: If your storage cluster is on AWS ROSA, skip this section and revoke the filesystem access from the storage cluster. For the procedure to revoke, see Revoke filesystem access from the storage cluster.
    • Run the following command to query the name of the containerized client cluster:
      mmauth show all | grep <scale_cluster_name>
      Replace the <scale_cluster_name> with the actual storage cluster name obtained in step 2.a.
    • Run the following command to remove the client cluster authorization:
      mmauth delete ibm-storage-fusion-xx.xxx.example.com
  4. Do the following steps to disable Global Data Platform.
    1. Run the following command to disable IBM Storage Fusion Global Data Platform service:
      oc -n ${FUSION_NS} patch spectrumfusion/spectrumfusion --type=merge --patch='{"spec":{"GlobalDataPlatform":{"Enable":false}}}'
    2. Run the following command to delete ScaleManager CR:
      oc -n ${FUSION_NS} delete scalemanager scalemanager
    3. Run the following command to uninstall the IBM Storage Scale container native operator, Kubernetes objects, namespaces, and more:
      oc delete -f https://raw.githubusercontent.com/IBM/ibm-spectrum-scale-container-native/v5.2.0.x/generated/scale/install.yaml --ignore-not-found=true