Skip to main content
ONTAP tools for VMware vSphere 10.2

Clean up volumes

Contributors netapp-jani

After deleting ONTAP tools for VMware vSphere deployment, you should clean up the FlexVolumes created during the deployment. If you have used a dedicated ONTAP cluster for deployments, you should clean up the FlexVolumes as the deployment creates lot of FlexVolumes which are unused resulting in lowered performance.

Use the following guidelines to clean up the FlexVolumes post removal of ONTAP tools for VMware vSphere deployment.

Steps
  1. From the primary node VM of ONTAP tools for VMware vSphere, run the following command to identify the type of deployment.

    cat /opt/netapp/meta/ansible_vars.yaml | grep -i protocol

    If it is an iSCSI deployment, then you need to delete igroups as well.

  2. Fetch the list of FlexVolumes created in ONTAP during the deployment using the following command.

    kubectl describe persistentvolumes | grep internalName | awk -F'=' '{print $2}'

  3. Delete VMs from vCenter Server, see Remove VMs or VM Templates from vCenter Server or from the Datastore

  4. Delete volumes from ONTAP system manager, see Delete a FlexVol volume. Give the exact name of the FlexVolume in the cli command to delete the volume.

  5. In case of iSCSI deployment, delete SAN igroups from ONTAP, see View and manage SAN initiators and igroups.

    In HA deployment, four igroups are created and in non-HA deployment two igroups are created. Run the following command to find the first igroup name:

    kubectl -n trident get tbc trident-backend -o yaml| grep igroupName: | awk -F':' '{print $2}'

    The other igroup names start with the hostname of the VM.