VMware Cloud Community

Unmap clarification


I need some confirmation/details on the UNMAP/reclaim feature in 5.5

- While running unmap we see high Read rates and low/zero write rates on the storage adapters. One would expect high write rates because the unmap command writes zeroes to storage?

- After unmap is finish it seems the host runs a rescan of vmfs volumes. Is this by design of the unmap command? I found this in the hostd.log very soon after completion of unmap:

2015-10-21T09:46:37.628Z [26BC1B70 verbose 'Hostsvc.FSVolumeProvider'] RefreshVMFSVolumes called

2015-10-21T09:46:37.629Z [26BC1B70 verbose 'Hostsvc.FSVolumeProvider'] RescanVmfs called

We suspect that rescan causes a glitch in performance graphs as shown here (snip of storage adapters, happens also on the other graphs) :


As the graph shows it doesn't happen after every unmap run and I have experimented with different block values when running the unmap command, but I can't find any consistency in it...

The commands have been run on a esxi host (5.5 up2) running on HP BL460 Gen9 against HP 3Par storage (VMFS 5) through FCoE

Any clarification on this is much appreciated!



Tags (2)
0 Kudos
1 Reply


Welcome to the community.

Prior to vSphere 5 and UNMAP when an operation occurred that deleted VM data from a VMFS volume, vSphere just looked up the inode on the VMFS file system and deleted the inode pointer which mapped to the blocks on disk. This shows the space as free on the file system but the disk blocks that were in use on the storage array are not touched and the array is not aware that they contain deleted data.

In vSphere 5 with UNMAP when those operations occur the process is more elaborate from a storage integration point of view, the inodes are still looked up like before, but instead of just removing the inode pointers a list of the logical block addresses (LBA) must be obtained.

The LBA list contains the locations of all the disk blocks on the storage array that the inode pointers map to. Once vSphere has the LBA list it can start sending SCSI UNMAP commands for each range of disk blocks to free up the space on the storage array. Once the array acknowledges the UNMAP, the process repeats as it loops through the whole range of LBA’s to UNMAP.

More details on this are available http://vsphere-land.com/news/all-about-the-unmap-command-in-vsphere.html

Don't Forget to mark it as helpful/Correct Answer if this answers your query.



0 Kudos