UNMAP helps Virtual Volumes (vVols) in managing storage in virtualized environments.
The UNMAP command is a SCSI standard used to inform the storage array that certain blocks of data are no longer in use and can be released back into the storage pool. When a guest OS running on a Data-vVol deletes files or deallocates space, it can issue an UNMAP command to reclaim that space on the underlying storage, the ESXi host then detects support for UNMAP based on the Protocol Endpoint (PE) LUN to which the vVol is bound and reclaims the deleted data blocks which improves storage efficiency on the array.
VMware ESXi
1. Does Virtual Volumes support UNMAP ?
Yes, Virtual Volumes supports UNMAP on SCSI back end storage including iSCSI & FC. But, UNMAP is not supported on NFS vVols.
2. Are there any commands to check if a vVol datastore supports UNMAP ?
No
3. Which versions of ESXi support UNMAP ?
ESXi 6.5, 6.7, 7.0, 8.0 & higher release support UNMAP on vVols
4. What type of Virtual Volumes will UNMAP work on ? Data-vVol, Config-vVol, Swap-vVol, Snapshot-vVol or Other-vVols ?
The guest OS triggers UNMAP and is connected to the Data-vVols, so UNMAP only works on Data-vVols.
5. What changes were made to the UNMAP feature in 6.5, 6.7, 7.0 & 8.0 ?
No changes were done in 6.5, 6.7, 7.0 for UNMAP feature. But, changes were made to UNMAP features in ESXi 8.0.
In 8.0 U2, UNMAP support was added for Config-vVols (manual).
In 8.0 U3, UNMAP support was added for NVMe vVols and and auto-UNMAP support was added for SCSI Config-vVols.
6. Is UNMAP supported on NVMe-backed vSphere Virtual Volumes and Config-vVol ?
Yes, NVMe-backed Virtual Volumes support only automatic space reclamation. Config-vVol supports both automatic and manual unmap. Here's more information from the release notes.
Support for space reclamation requests from guest operating systems on NVMe-backed vSphere Virtual Volumes datastores and Config-vVol:
ESXi 8.0 Update 3 adds support for automatic space reclamation requests from guest operating systems on NVMe-backed vSphere Virtual Volumes datastores. ESXi 8.0 Update 3 also adds support for both command line-based and automatic unmap for vSphere Virtual Volumes objects of type Config-vVol, formatted with VMFS-6.
ESXCLI support for SCSI UNMAP operations for vSphere Virtual Volumes:
Starting with vSphere 8.0 Update 2, you can use command line, ESXCLI, for SCSI UNMAP operations for vSphere Virtual Volumes.
Reclaim Space on the vSphere Virtual Volumes Datastores
7. What is the impact of running UNMAP on a Virtual Volume datastore in production ?
No, there is no impact as the UNMAP process happens asynchronously in the background.
8. Are there any caveats associated with UNMAP and Virtual Volumes that we should know of ?
None. UNMAP will work fine if the backend storage array supports it. Also, refer to these KBs here.
Some Storage Arrays does not support Automatic Guest Unmap using VVOLs (virtual volumes) (345236)
Auto UNMAPs stop working for VMFS/VVOL datastores created out of NVMe devices after upgrading ESXi to 8.x (385101)
9. Which Guest Operating Systems support UNMAP with vVols ? Windows/Linux or are there any limitations with the versions of Windows and Linux distros.
Both Linux and Windows support UNMAP.
10. When a Guest OS initiates an UNMAP operation on one of its disks residing on a vVol datastore, what path or layers does it go thru ?
From the Guest OS, UNMAP travels through vSCSI/devFS/vVol/PSA/driver on ESXi host.