Esxcli Storage Vmfs Unmap
However issuing unmap is still disabled by default and space reclamation can be done manually by running the esxcli storage vmfs unmap command.
Esxcli storage vmfs unmap. Esxcli storage vmfs unmap volume label volume label volume uuid volume uuid reclaim unit number. This is a great feature and very handy for those of you using thin provisioning on your datastores hosted on storage that supports vaai. The command takes these options. In esxi 5 5 vmkfstools y is deprecated and is replaced by the esxcli storage vmfs unmap command.
Unmap null datastorename null before you run this command make sure that you are connected to a vcenter server using the connect viserver command. When you use the command keep in mind that it might send many unmap requests at a time. About the esxcli storage vmfs unmap command to return unused blocks back to the vmfs data storage you need the main command. Vmfs5 and earlier file systems do not unmap free space automatically but you can use the esxcli storage vmfs unmap command to reclaim space manually.
Esxcli vmfs storage reclamation with unmap command typically when you provision your datastores for vmware you will thin provision them. This action can lock some of the resources during the operation. Using the set powercliconfiguration we are disabling the timeout as the reclamation operation can go on for hours depending on how much space can be reclaimed from the thin provisioned lun from the array. L volume label volume label the label of the vmfs volume to unmap.
U for disk view f for fields. Esxcli storage vmfs unmap volume label volume label volume uuid volume uuid reclaim unit number. So let s say you bring three vmfs5 datastores up to near capacity but then you free up 30 on each datastore. The next thing is is your host s enabled to participate in automatic unmap.
They will issue it to the dead space and dead space only. This is a mandatory argument. Esxi iscsi storage vmware vsphere add comments feb 072017 with vsphere 6 5 came vmfs 6 and with vmfs 6 came the auto unmap feature. The way automatic unmap works is that all esxi 6 5 hosts that see the vmfs 6 datastore participate in the unmap process.