Steps to uninstall Global Data Platform by using
command line interface.
Procedure
- Do the following steps to delete the IBM Storage Fusion storage CRs.
- 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 {}
- 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 {}
- 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
- Run the following command to verify all the
ScaleCluster
CRs are
deleted from IBM Storage Fusion namespace.
oc -n ${FUSION_NS} get ScaleCluster
- 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 {}
- 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 {}
- Do the following steps to delete IBM Storage Scale container native resources.
- 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
- Run the following command to delete the IBM Storage Scale container native cluster:
oc delete cluster.scale.spectrum.ibm.com ibm-spectrum-scale
- 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
- 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;"
- 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-
- Do the following steps on the remote IBM Storage Scale cluster, to delete access
permission:
- Do the following steps to disable Global Data Platform.
- 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}}}'
- Run the following command to delete ScaleManager CR:
oc -n ${FUSION_NS} delete scalemanager scalemanager
- 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