Uninstalling Data Foundation

Use the following steps to uninstall Data Foundation by using command line interface.

Before you begin

If your installed version of Data Foundation is a provider and there exists hosted clusters, then delete the clusters before you proceed with the uninstallation. For the procedure to clean up, see Cleaning up of Hosted Control Plane cluster.

Procedure

  1. Run the following command and export IBM Storage Fusion namespace as an environmental variable.
    export FUSION_NS="<Storage Fusion namespace>"
    Important: Replace <Storage Fusion namespace> with your namespace.
  2. Run the following oc command and scale the IBM Storage Fusion storage deployment to 0 replica.
    oc scale deployment --replicas=0 isf-cns-operator-controller-manager -n "$FUSION_NS"
  3. Run the following commands and delete the IBM Storage Fusion Data Foundation CR.
    oc delete odfmanager odfmanager
    oc delete odfcluster odfcluster -n "$FUSION_NS"
  4. Remove monitoring stack from Data Foundation.
    The procedure is same as that of Red Hat® Data Foundation. For the procedure, see Removing monitoring stack Red Hat documentation.
  5. Run the following OC command to delete the internally used IBM Storage Fusion PVCs of isf-bkprstr-claim and logcollector.
    oc delete pvc isf-bkprstr-claim logcollector -n "$FUSION_NS"
  6. Uninstall steps for Data Foundation Service Consumer mode.
    Note: This step is used to uninstall Data Foundation client mode. If the current cluster has one or more Hosted Control Plane clusters, make sure to clean all the Hosted Control Plane clusters. Use the oc login to the different Hosted Control Plane clusters.
    1. Run the following command to delete the storageclassclaims:
      oc delete storageclassclaims --all
    2. Run the following command to delete the storageclient CR:
      oc delete storageclient storageclient -n openshift-storage-client
    3. Delete the finalizers from CSIAddonsNode:
      
      for name in $(oc get CSIAddonsNode -n openshift-storage-client -o name); 
      do oc patch $name -p '{"metadata":{"finalizers":null}}' -n openshift-storage-client --type=merge; 
      done
    4. Run the following command to delete the openshift-storage-client namespace:
      oc delete ns openshift-storage-client
  7. Uninstall the Data Foundation. For uninstallation steps, see https://access.redhat.com/articles/6525111.
  8. Delete the IBM Storage Fusion storageclass for its internal usage.
    oc delete sc ibm-spectrum-fusion-mgmt-sc
  9. Run the following OC command to delete the Fusion Data Foundation Service Instance CR.
    oc delete fusionserviceinstance odfmanager -n "$FUSION_NS"
  10. Run the following OC command to delete the Fusion Data Foundation Catalog Source.
    oc delete catalogsource isf-data-foundation-catalog -n openshift-marketplace
  11. Recreate the PVCs for isf-bkprstr-claim and logcollector.
    
    oc apply -f - <<EOF
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
        name: isf-bkprstr-claim
        namespace: ibm-spectrum-fusion-ns
    spec:
        accessModes:
             - ReadWriteMany
        resources:
            requests:
               storage: 25Gi
        storageClassName: ibm-spectrum-fusion-mgmt-sc
        volumeMode: Filesystem
    ---
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
        name: logcollector
        namespace: ibm-spectrum-fusion-ns
    spec:
        accessModes:
             - ReadWriteMany
        resources:
             requests:
                 storage: 25Gi
         storageClassName: ibm-spectrum-fusion-mgmt-sc
         volumeMode: Filesystem
    EOF
    
  12. Run the following OC command and scale the IBM Storage Fusion storage deployment to 1 replica.
    oc scale deployment --replicas=1 isf-cns-operator-controller-manager -n "$FUSION_NS"
  13. Run the following OC command and scale the isf-bkprstr deployment to 1 replica.
    oc scale deployment --replicas=1 isf-bkprstr-operator-controller-manager -n ibm-spectrum-fusion-ns
  14. Run the following OC command and scale the logcollector deployment to 2 replica.
    oc scale deployment --replicas=2 logcollector -n ibm-spectrum-fusion-ns