Using thin-provisioned volumes is a great way to optimize resources in a virtual environment. This can be applied at both the hypervisor level as well as the storage area network level. When utilizing both a VMware and EqualLogic (EQL) volume, in cases where both volumes are thin-provisioned, the size of the EqualLogic does not always match what is displayed in VMware.
VMware shows that 367.48GB of free space is available.
EqualLogic shows that 232.15GB of free space is available.
One of the more tedious ways to fix the volume sizes is to migrate all virtual machines to a newly-created datastore. For several terabytes of space, this is an arduous process and incredibly time consuming. As of EqualLogic 6.X.X and up, space can now be resynced by running a few simple commands.
For VMware/vCenter 5.5, the commands differ slightly from 5.1. They are displayed in this article: EqualLogic and VMware: Reclaim Unused Disk Space for EQL Volume
Enable SSH on a VMware Host
The first step will be to enable SSH on a host that has access to the datastores.
Click on Security Profile:
Find SSH in the menu and start the process:
Reclaiming Space on the EqualLogic Volume
Before you begin, it is highly recommended that you run the UNMAP command during off-peak hours. Reclaiming unused storage blocks is I/O-intensive and may cause your environment to go in a degraded state depending on the storage system.
Note: You must be on firmware version 6.0.1 or higher to be able to reclaim disk space.
Once SSH has been enabled, connect to the host using SSH. Putty is a great free resource to use: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Run the command:
Next, browse the directory and identify the volume that needs to be cleared.
Run the command:
In this case, I have identified that I want to clean up Vol-04 (this is case sensitive). So, I issued command:
Although I have successfully navigated to /vmfs/volumes/Vol-04, VMware will navigate me to the ID for the datastore. Copy this ID. In the example below, it will be a very long of string characters. My example starts with 51ed3b46.
Our syntax to clean up the volume will be:
esxcli storage vmfs unmap --volume-label=volume_label|--volume-uuid=volume_uuid --reclaim-unit=number
For the actual command, I use:
esxcli storage vmfs unmap -u 51ed3b46-XXXXXXX-XXXX-XXXXXXXXXXXX
Note: You will need to replace 51ed3b46-XXXXXXX-XXXX-XXXXXXXXXXXX with the ID that you copied)
By default, the reclaim number is going to be 200MB per VMware KB article 2057513.
If Group Manager was open while the free space reclaim command was executed, Group Manager will auto-refresh after space starts to clear up on the volume. In the example below, it took a few minutes to reclaim the space.
Please note that the SCSI UNMAP is not supported in versions below ESXi 5.5 and vCenter 5.5. Visit the following article to reclaim space for versions below 5.5: “EqualLogic and VMware: Reclaim Unused Disk Space for EQL Volume.”
About Thin Provisioning of Equallogic and VMware vSphere: http://en.community.dell.com/support-forums/storage/f/3775/p/19411388/19966452.aspx. Accessed April 28, 2014.
Using esxcli in vSphere 5.5 to Reclaim VMFS Deleted Blocks on Thin-Provisioned LUNs: http://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=2057513. July 31, 2014.