Skip to main content
ONTAP tools for VMware vSphere 10

Delete datastores in ONTAP tools

Contributors netapp-jani jani

Use this task to delete NFS, VMFS, or vVols datastores by using ONTAP tools in vCenter Server. Deletion behavior and cleanup options differ by datastore type.

Deletion behavior for NFS and VMFS datastores
  • You cannot delete a datastore that is used by virtual machines.

  • For protected host clusters, additional protection constraints apply.

Deletion behavior for vVols datastores

For vVols datastores, the following actions are performed:

  • The vVol container is unmounted.

  • If the igroup is not in use, its initiators are removed from the igroup.

  • The vVol container is deleted.

  • Flex volumes are left on the storage array.

For vVols datastores, you can delete the datastore only if no vVols are present on the selected datastore.

Before you begin
  • Verify that the datastore is not in use by virtual machines.

  • Check whether the datastore belongs to a protected host cluster.

  • Decide whether to delete backing volumes on the ONTAP cluster during datastore deletion.

Table 1. Quick reference: datastore delete behavior
Datastore type Can you delete it? Primary blocking condition ONTAP cleanup option

NFS

Yes

The datastore is in use by virtual machines.

You can select Delete volumes on ONTAP cluster when applicable.

VMFS

Yes

The datastore is in use by virtual machines, or host cluster protection constraints apply.

You can select Delete volumes on ONTAP cluster. For protected host clusters on ONTAP storage, deleting the volume from ONTAP is not supported.

vVols

Yes, conditionally

One or more vVols are present on the datastore.

You can select the option to remove volumes from ONTAP, except on ASA r2 where deleting backing volumes from ONTAP is not supported from this workflow.

Steps
  1. Log in to the vSphere Client.

  2. Right-click on a host system, a host cluster, or a data center and select NetApp ONTAP tools > Delete datastore.

    Note You cannot delete a datastore used by virtual machines. Move virtual machines to another datastore before deleting.
    Note If the datastore is part of a protected host cluster, review protection constraints before deleting.
    1. For an NFS or VMFS datastore, a dialog box appears with a list of VMs using the datastore.

    2. If no virtual machines are associated with a VMFS datastore, you see a confirmation dialog. If host cluster protection is enabled and an Automated Failover Duplex (AFD) relationship exists, you can clean up secondary storage elements.

    3. For protected VMFS datastores on ASA r2 storage systems, remove protection before deleting. Beginning with ONTAP 9.17.1 and ONTAP tools for VMware vSphere 10.5, you can delete a protected datastore.

      For last-datastore deletion with Automated Failover Duplex (AFD), ONTAP tools displays this message: The datastore is protected. The protection will be removed before deletion.

      If you delete the last protected datastore in a protection group, ONTAP tools shows a message that deleting the last datastore results in an unprotected datastore.

    4. For vVols datastores, you can delete the datastore only if there are no vVols present. The Delete datastore dialog box includes an option to remove volumes from the ONTAP cluster.

    5. For vVols datastores on ASA r2 storage systems, you cannot delete the backing volumes from ONTAP using the Delete datastore option.

  3. To delete the backing volumes on ONTAP storage, select Delete volumes on ONTAP cluster.

    Note For VMFS datastores on ONTAP storage that are part of a protected host cluster, you cannot delete the volume from the ONTAP cluster.

When you delete an NFS, VMFS, or vVols datastore, parent igroups remain on the ONTAP system. Child igroups that are not mapped to any LUNs are deleted automatically. ONTAP tools performs a daily cleanup to remove unmapped default parent igroups. Delete the custom parent igroups manually in ONTAP. ONTAP tools cannot reuse stale parent igroups.