Optimising Storage with VMFS6 Automatic Space Reclamation

Efficient storage management is essential in virtualised environments when working with thin-provisioned storage arrays. With VMFS6, VMware introduced Automatic Space Reclamation, allowing ESXi hosts to reclaim unused storage space in the background asynchronously. This feature enables the unmap command to run automatically, releasing free storage space without requiring manual intervention. By processing unmap requests at a steady, configurable rate, Automatic Space Reclamation prevents sudden load spikes on the backing storage array. Freed regions are batched and unmapped together, ensuring that the process is efficient and does not impact the I/O performance of other workloads.

By configuring parameters such as the unmap rate, administrators can tailor Automatic Space Reclamation to their specific storage needs.

In this demonstration, we’ll observe how enabling this feature reclaims storage space after deleting a large file from a virtual machine, highlighting the simplicity and efficiency of managing VMFS6 datastores.

Scenario Overview

  1. Setup:
    • A Windows virtual machine resides on a VMFS6 datastore.
    • The VM has an E:\ Drive with a 13GB file on it.
    • Automatic Space Reclamation is disabled on the datastore.
  2. Objective:
    • Demonstrate how enabling Automatic Space Reclamation reclaims storage space after the file is deleted.
  3. Steps:
    • Review the datastore summary with Automatic Space Reclamation disabled.
    • Delete the 13GB file and empty the Recycle Bin.
    • Enable Automatic Space Reclamation and observe space reclamation.

Step 1: Initial State – Datastore Summary

To begin, navigate to the datastore summary page in the vSphere Client. This provides an overview of the datastore’s current configuration and usage before any changes are made.

The key details from the initial state are as follows:

  • File System: VMFS6.
  • Space Reclamation: Disabled (None: Deleted or unmapped blocks are not reclaimed).
  • Free Space: 142.6 GB (This reflects the available space on the datastore before reclaiming the deleted file).

At this point, I have a 13GB file that resides on the Windows VM’s E:\ Drive. The summary The data capacity and free space reflects the datastore space the VM is consuming.

Step 2: Delete the 13GB File

The next step involves deleting the 13GB file from the Windows virtual machine’s E:\ Drive. This action simulates reclaimable space that would otherwise remain allocated on the datastore until reclamation is triggered.

At this point, the file no longer exists within the virtual machine, but the space it occupies is still reserved on the VMFS6 datastore. Automatic Space Reclamation, when enabled, will address this by reclaiming the unused space.

Step 3: Enable Automatic Space Reclamation

With the file deleted from the virtual machine, the next step is to enable Automatic Space Reclamation on the VMFS6 datastore using the vSphere Client. This configuration allows ESXi to reclaim unused space in the background automatically.

  1. From the datastore summary page, click EDIT next to the Space Reclamation section.
  2. In the Space Reclamation Settings window:
    • Select Enable automatic space reclamation at fixed rate.
    • Specify the Reclamation rate (e.g., 100 MBps) using the drop-down menu.
  3. Click OK to save the changes.

Once this is configured, Automatic Space Reclamation will begin working in the background, reclaiming the unused space on the datastore.

Step 4: Verify Space Reclamation

And there you have it, successfully enabled, space reclamation is and immediately reclaimed 13GB of datastore capacity.

Conclusion

Automatic Space Reclamation in VMFS6 simplifies storage management by reclaiming unused space in thin-provisioned environments without manual intervention. As demonstrated, enabling this feature ensures your datastore remains optimised, efficient, and ready for future workloads.

I hope you found this informative! Feel free to leave a comment below if you have any questions or feedback.