VMFS Recovery™
Recover data from damaged or formatted VMFS disks or VMDK files
Recover data from damaged or formatted VMFS disks or VMDK files

About ESXcli storage VMFS UNMAP command

Here you will find out:

  • what is VMFS UNMAP function
  • how does it work
  • how DiskInternals can help you

Are you ready? Let's read!

About UNMAP and dead space reclamation

In the updated versions of VMware vSphere, namely versions 6.5 and 6.7, a long-forgotten feature called UNMAP appeared, which returns the virtual machine disk space to the disk array using VAAI. You can compare this function with TRIM command on Windows. In the old days, this excellent function required the execution of various complex and sometimes overwhelming commands that needed to be done manually (even in version 5). So now all this has become much easier: management of this feature is available from the GUI, and disk blocks are returned automatically.

The dead space reclamation happens not at one but smoothly so there shouldn't happen any issues with the performance. It should be noted that in the case of Snapshot and Storage vMotion the dead space reclamation doesn't perform in automatic mode on the array LUN.

VMware unmap: how it works in VMFS 5 and 6

When deleting information from a VM, the guest OS transmits a VMFS signal in which it gives notice of newly available free space, and then the signal is redirected to UNMAP. The UNMAP command quickly frees up space in the VMFS data storage, and then the blocks of space are also freed up along the chain.

In VMFS 6.7, all this is done without your participation, which can definitely be considered a breakthrough. In VMFS 5, there is a VMware SCSI UNMAP function, but it is not particularly convenient since almost all commands need to be entered independently. For experienced administrators, this is certainly not a problem, but amateurs may not fully understand what to do.

VMware vSAN and unmap

There is good news: VMware vSAN 6.7 U1 introduces support for automatic space reclamation with SCSI UNMAP support. Here it is also possible to quickly and automatically release and return blocks to storage without entering any commands. VMware vSAN does not require a multiple layers of reclamation, as many are used to because it does not use LUN or VMFS.

About the ESXcli storage VMFS unmap command

To return unused blocks back to the VMFS data storage, you need the main command:

esxcli storage vmfs unmap --volume-label=volume_label|--volume-uuid=volume_uuid --reclaim-unit=number

Note the components of this command:

  1. 1. -l|--volume-label=volume_label - if this is displayed, the next argument (2) is not worth using.
  1. 2. -u|--volume-uuid=volume_uuid - in the same way, if applied, the argument above (1) should not be used.
  1. 3. -n|--reclaim-unit=number - if you don’t specify a specific number, the number will be automatically 200. This number is almost always suitable, but some arrays may have different values.

In case of failure of the UNMAP operation, a temporary file may still exist somewhere in the root of the repository, but if the UNMAP command is successfully completed again, this file will be deleted.

How to perform VMFS Recovery

DiskInternals VMFS Recovery recovers all data (of any type and volume) that can technically be restored in the event of any logical damage to virtual disks. The application provides absolutely every client with 100% free preview of found files and does not oblige you to immediately pay for recovery. A license allows you to export files at a convenient time for you, with possible technical support if necessary. All virtual disks are easily mounted on local drives for easier access to them. You can also return VMDK files stored on disks formatted by the VMware ESX/ESXi server.

DiskInternals VMFS Recovery makes the life of VM and array owners better and easier, so you should have this tool on your desktop!

Good luck, and patience!

Related articles

FREE DOWNLOADVer 4.12, WinBUY NOWFrom $699

Please rate this article.
53 reviews