Reclaim Storage Capacity Which Uses Thin Provisioning on the VMware Side

Reclaim Storage Capacity Which Uses Thin Provisioning on the VMware Side
Reclaim Storage Capacity Which Uses Thin Provisioning on the VMware Side

Reclaim Storage Capacity Which Uses Thin Provisioning on the VMware Side - This tutorial is designed to perform preventive actions on the VMware storage side or Datastore in the VMware environment, which contains virtual machines utilizing thin provisioning on their disk side. 

Virtual machines using thin provisioning, when data is deleted from the shared storage side, typically do not reflect a change in their usable capacity. 

This discrepancy can make the shared storage appear unchanged in space, even though data housekeeping has been performed. Therefore, an action plan is required to Reclaim capacity on the VMware environment side.

Why Do We Need to Reclaim Storage Capacity

Broadly speaking, the preventive steps to take in such a situation are as follows before adding capacity from the Datastore or shared storage side.

  1. Delete old virtual machine snapshots.
  2. Regularly reclaim capacity when deleting virtual machines that use thin provisioning disks.
  3. Reserve memory for each virtual machine according to its memory requirements. (This action plan is necessary if the Datastore capacity exceeds its default threshold to prevent VMs from reserving swap VMDK disks in the datastore.)

Steps to Reclaim Capacity

1. Enable the SSH service on the target ESXi server. The steps are as follows:

  • Log in to the vCenter management or directly to the ESXi management via a web browser.
  • Select the "Configure" menu.
  • Choose "SSH" and click the "Start" button.

2. Log in to the ESXi server using Putty or any software for accessing the server via SSH.

3. Execute the following command:

To view the list of datastore on your ESXi Server, you can execute the command below.

# esxcfg-scsidevs -m

Meanwhile, the command below is used to check whether this datastore supports unmap.

# esxcli storage core device vaai status get -d naa.xxxxxxx
Steps to Reclaim Capacity
Steps to Reclaim Capacity

After confirming that the checks are in order, you can proceed to reclaim storage capacity using the following steps.

# esxcli storage vmfs unmap -l [name of datastore label]

Example:

[root@kiis-esxi01:~] esxcli storage vmfs unmap -l PRD_MSA_datastore

[name of datastore label] -> filled in with the name of the datastore to be reclaimed.

During the capacity reclaim process, the Putty session may appear inactive. In parallel, cross-check from the SAN Storage management side to confirm whether there is a change in usable capacity during the reclamation process.

4. Once completed, you will observe an increase in usable storage capacity on the SAN Storage side. This reclamation is intended to release data that is still reserved by VMs using thin provisioning, even though the data itself has been deleted.

Closing statement

Yup, that's my experience when Reclaim Storage Capacity Which Uses Thin Provisioning on the VMware Side. I hope my experience can serve as a reference for you if you encounter the same issue.

Maybe that's all I can share with you guys. Hopefully, this article will be helpful.

Thank you.

Bangkit Ade Saputra
Bangkit Ade Saputra At the end of the day, my job involves people. we're complicated, we're always changing, we have millions of things going on in our lives, and changing jobs is always a big decision.

Post a Comment for "Reclaim Storage Capacity Which Uses Thin Provisioning on the VMware Side"