Tuesday, May 15, 2018

vSphere: ESXi Space Reclaim

In a thin provisioned Datastore before ESXi 6.5 in format VMFS 5, we need to reclaim unused storage blocks manually. To confirm that unmap/reclaim is supported, we need to run the following command from a SSH session to the host. 

 # esxcli storage core device vaai status get -d naa  

If the naa details show Delete Status: supportedthen we can proceed with unused space reclamation.

The following command executes the unmap procedure and needs to be run from each host mapped with the thin provisioned LUN.

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

The command can be run with the option of either volume label -l or volume UUID -u. The option of reclaim-unit is not necessary unless there is a need to change the default value of 200. It is advised to consult with storage provider while using a different reclaim-unit number.

 # esxcli storage vmfs unmap -l DatastoreLabel 

Or

 # esxcli storage vmfs unmap -u 90af8df1-709bc101-8ff9-a90154e32ddff24f

After running the above command from each host, the reclaim command needs to be run from the storage. Then the unused and reclaimed space will be shown and can be used.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.