vSAN backend storage usage may not decrease even after large amounts of data are deleted from within a Guest OS. Despite enabling Guest UNMAP/TRIM and successfully running manual trim commands (e.g., defrag E: /L), the vSAN capacity remains high, showing a significant discrepancy between the reported data and the physical vSAN object usage.
C:\Windows\system32>defrag E: /LMicrosoft Drive OptimizerCopyright (c) 2013 Microsoft Corp.
Invoking retrim on New Volume (E:)...
The operation completed successfully.
Post Defragmentation Report:
Volume Information: Volume size = 22.36 TB Free space = 9.28 TB
Retrim: Total space trimmed = 9.22 TB
Example esxtop output showing stalled reclamation (0.01 MB/s):
GID VMNAME VDEVNAME NVDISK CMDS/s READS/s WRITES/s MBREAD/s MBWRTN/s LAT/rd LAT/wr SC UMP/s FL UMP/s UMP/s SC UMP MBS/s FL UMP MBS/s20#####09 VirtualMachine - 2 12.97 0.38 12.59 0.01 0.07 0.256 0.636 0.38 0.00 0.38 0.01 0.00
The issue may stem from a configuration gap where the VM-level advanced parameter disk.scsiUnmapAllowed is missing or set to False, preventing UNMAP commands from reaching the vSAN layer - combined with alignment mismatches, vSAN reclaims space in chunks of 4MB. If the guest OS filesystem (for example, NTFS with 8KB clusters) is highly fragmented, it can’t provide a full 4MB block of unused space to the storage layer. Even a small amount of active data such as a single 8KB cluster within a 4MB range prevents vSAN from reclaiming that space, resulting in the entire 4MB block remaining allocated.
Configuration of E: drive: "Bytes Per Cluster."C:\Windows\system32>fsutil fsinfo ntfsinfo E:NTFS Volume Serial Number : 0x802############NTFS Version : 3.1LFS Version : 2.0Number Sectors : 0x0000000b2########Total Clusters : 0x0000000b2######Free Clusters : 0x000000004a##########Total Reserved : 0x0000000000######Bytes Per Sector : 512Bytes Per Physical Sector : 512Bytes Per Cluster : 8192 < -- 8 KBBytes Per FileRecord Segment : 1024Clusters Per FileRecord Segment : 0Mft Valid Data Length : 0x00000007##########Mft Start Lcn : 0x0000000000#########Mft2 Start Lcn : 0x00000003##########Mft Zone Start : 0x0000000############Mft Zone End : 0x00000###########Max Device Trim Extent Count : 64Max Device Trim Byte Count : 0xffffffffMax Volume Trim Extent Count : 62Max Volume Trim Byte Count : 0x40000000
To resolve this issue, the communication path must be enabled and the data must be consolidated to meet vSAN's 4MB alignment requirement.
Verify Guest OS Settings Procedure to Enable TRIM/UNMAP to reclaim space on vSAN datastore.
Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\FileSystem" -Name DisableDeleteNotification
Monitor Physical Reclamation: