Auto-Space reclamation does not work in VMFS-6 DataStores
search cancel

Auto-Space reclamation does not work in VMFS-6 DataStores

book

Article ID: 323100

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • Datastores formatted with VMFS6 does not reclaim space automatically
  • Space-reclamation is enabled on datastore configuration
  • Back-end storage array also supports the auto-space reclamation

Environment

VMware vSphere ESXi 6.5
VMware vSphere ESXi 6.7
VMware vSphere ESXi 7.0
VMware vSphere ESXi 8.0

Cause

When VMFS is deleted, blocks are still mapped in the backing array. Upon re-creation into VMFS6, there's no efficient way for VMFS6 to know which blocks were earlier mapped by the VMFS volume. Therefore, VMFS6 will only unmap those blocks that are mapped (written) and then unmapped after creating VMFS6 volume.

Resolution

There are two options to prevent this.
 
Option 1
  1. Delete the data from the original VMFS datastore
  2. Manually unmap the datastore
  3. Delete the datastore
  4. Format the same lun as VMFS6 and create new datastore

Option 2

  1. Do not use the same LUN again for a new VMFS6 datastore.
  2. On a fresh LUN, as there is nothing mapped, VMFS6 auto-unmap is efficient in unmapping the blocks written and unmapped in VMFS6.

Workaround

  • If the new VMFS6 datastore has already been created on a previously used LUN, write data to the datastore by creating an eager zeroed thick vm disk or using dd utility to create a bogus file so that datastores usage reaches 100%. Then delete that disk/file and now auto-unmap will work as expected.

Additional Information