Convert Thick-Provisioned VMs to Thin on vSAN and Reclaim Storage

In this post, I’ll explain how easy and non-distrustfully it is to convert Thick disks to Thin on vSAN. Firstly you should understand that objects on vSAN are all thinly provisioned by default and there is no real concept of Thick disks. Instead, vSAN has the concept of Space Reservation, defined by the Storage-Policy ruleset Object Space Reservation. OSR is the method of reserving a percentage of storage as a safeguard and behaves similar to Lazy-Zeroed Thick Provisioned disks.

There are several ways to discover if you have Thick provisioned disks in your vSAN environment, however, the simplest way is to perform a vSAN online health check, which is very neat, it will not only detect if there are Thick-Provisioned disks, it will list all the VMs along with their thick disks.


This health alarm is flagged because vSAN has detected thick-provisioned VMs even though the applied vSAN storage policy has object space reservation set to 0 (Thin-provisioned). It is recommended to reclaim the underlying storage from ‘Thick’ to ‘Thin’ which will improve storage utilization. Click on the Ask VMware button for details about the root cause and remediation steps.


In my Home Lab, I have two VMs with Thick-Provisioned disks. To convert the disk type and reclaim storage capacity, we need to force Object Space Reservation rule to 0%. Despite the attached storage policy has already been configured with OSR=0 the only method to force OSR=0 and convert the disk to Thin is to reapply a different storage policy, this method triggers vSAN to reapply the OSR ruleset.



Step 1

Clone the storage policy that is applied to the Thick disk with a different name keeping all the exact rulesets, while insuring OSR is set to “Thin Provisioning“. In my example below, I’m cloning the vSAN Default Storage Policy to vSAN Default Storage Policy_Clone.



Step 2

Apply the cloned storage policy to the VM, notice in the edit policy wizard when selecting the new policy it will display the decrease in storage consumption. After applying the storage policy, the disk that was once Thick will now be converted to Thin.



Step 3

The last step is to reapply the original storage policy using the same steps you performed in step 2, after about 5 – 10 minutes the storage usage shown on the VM will be updated to reflect actual vSAN Raw usage.



You should also notice Datastore Used Storage Reservation will decrease.



Conclusion

If VMware can implement a feature to reapply a storage policy and force all the rulesets without the need to replace the policy that would be cool. Thanks for reading, and, I hope you found this informative, feel free to comment below and follow me on Twitter @nmangraviti 🙂

Leave a Reply