It's important to monitor the vSAN cluster to ensure it doesn't become too full. There are Health Service alerts in place to help keep track of capacity utilization. Please see: vSAN Health Service - Capacity utilization - Disk space and vSAN Health Service - Physical Disk Health - Disk Capacity for more information.
If a vSAN datastore becomes too full, it can cause issues such as resyncs being stuck and certain management tasks to timeout and get stuck.
Other symptoms can include:
VMs are hanging and reporting storage space issues despite adequate free space on the vSAN datastore.
The errors may include 'There is no more space for virtual disk <vm_name>.vmdk. You might be able to continue this session by freeing disk space on the relevant volume, and clicking Retry. Click Cancel to terminate this session.' and Error: The operation cannot be allowed at the current time because the virtual machine has a question pending: msg.hbacommon.outofspace:There is no more space for virtual disk;. You might be able to continue this session by freeing disk space on the relevant volume, and clicking Retry. from vsphere UI.
Objects/VM creation fails on vSAN Datastore.
Thin provisioned VMs cannot extend their vmdk's due to lack of space.
vSAN needs space for operations, called slack space, and it is recommended to not exceed 80% utilization on a vSAN datastore. If it becomes full, there are a few methods one can use to clear space to perform necessary management tasks.
Hosts can fail to go into Maintenance Mode when using either "Ensure Accessibility" or "Full Data Migration".
Restoring VM data from backup is stuck and not progressing.
VMware vSAN (vSAN OSA All Versions).
A VM freeze or hang can occur when one or more individual physical disks within the vSAN cluster reach a 'disk full' situation.
Because vSAN distributes virtual machine components across specific physical drives based on storage policies, localized capacity exhaustion on a single disk will block I/O operations for any associated objects. This results in an operational failure even if the aggregate vSAN Datastore still reports available free space.
Example :
Connect to one of the vSAN nodes and run the below command to check the vSAN disk utlization of all vSAN nodes.
cmmds-tool find -t HOSTNAME -f json | egrep "uuid|hostname" | sed -e 's/\"content\"://g' | awk '{print $2}' | sed -e 's/[\",\},\,]//g' | xargs -n 2 | while read hostuuid hostname; do echo -e "\n\nHost Name: $hostname::: Host UUID: $hostuuid\n Disk Name\t\t| Disk UUID\t\t| Disk Usage | Disk Capacity | Usage Percentage" ; cmmds-tool find -f python -t DISK -o $hostuuid | grep uuid | cut -c 13-48 | while read diskuuid;do cmmds-tool find -f json -t DISK -o $hostuuid -u $diskuuid| egrep "uuid|content" | sed -e 's/\"content\":|\\"uuid\"://g' | sed -e 's/[\",\},\]//g' | awk '{printf $0}' | sed -e 's/},/\n/g'| awk '{print $37 " " $5 " " $45}'| while read disknaa diskcap maxcomp; do diskcapused=$(cmmds-tool find -f json -t DISK_STATUS -u $diskuuid | grep content |sed -e 's/[\",\},\]//g' | awk '{print $3}'); diskperc=$(echo "$diskcapused $diskcap" | awk '{print $1/$2*100}'); if [ "$maxcomp" != 0 ]; then echo -en " $disknaa\t| $diskuuid\t| $diskcapused\t | $diskcap\t | $diskperc%\n"; fi;done;done;done;
Host Name: Test.com::: Host UUID: 5d85cedf-####-####-559b-############ Disk Name | Disk UUID | Disk Usage | Disk Capacity | Usage Percentage naa.###########ef:2 | 52836663-####-####-####-############ | 1045918363156 | 1800350466048 | 58.0953% naa.###########2f:2 | 52cf6a04-####-####-####-############ | 1188948323860 | 1800350466048 | 66.0398% naa.###########6f:2 | 52be73be-####-####-####-############ | 779064159764 | 1800350466048 | 43.2729% naa.###########5d:2 | 52438c06-####-####-####-############ | 1206224662036 | 1800350466048 | 66.9994% naa.###########0b:2 | 525d3b7a-####-####-####-############ | 1111445974548 | 1800350466048 | 61.735% naa.###########07:2 | 526a28ac-####-####-####-############ | 976691375636 | 1800350466048 | 54.2501% naa.###########43:2 | 52d3cf65-####-####-####-############ | 1800343629332 | 1800350466048 | 99.9996% naa.###########fb:2 | 52444581-####-####-####-############ | 1461741661716 | 1800350466048 | 81.1921%
Add Capacity to the datastore by adding more capacity disks or adding additional nodes to the cluster with disk groups.
Verify and clear the unnecessary data post verification and confirmed it is not required.
Power-off non-critical virtual machine. This would free up the vswp consumed capacity and would free up space depend upon consumption.
This can also be used for certain VMs that have fault tolerance built into their application by nature, such as having primary and secondary VMs where one takes over if the other fails.
Refer: How vSAN handles Policy Changes between RAID1 Mirroring and RAID 5/6 Storage Policies.Verify storage policy in use, in rare cases some objects previously migrated to vSAN datastore may have Storage Rule 'proportionalCapacity = 100' (thick) incorrectly assigned.
To identify such objects user should run the following commands:
cmmds-tool find -f python | grep 'proportionalCapacity\\\": 100' -B9 | grep uuid | cut -d "\"" -f4 >> /tmp/uuidlist.txt
(Note: this command creates a file in /tmp/uuidlist.txt with all the objects with 'proportionalCapacity = 100' rule.)
for i in $(cat /tmp/uuidlist.txt); do echo "*********************";echo; /usr/lib/vmware/osfs/bin/objtool getAttr -u $i |grep -i -E '^UUID|Object path'; echo; done
(Note: this command outputs 'UUID <-> path' pairs based on previously created /tmp/uuidlist.txt file)
Based on the friendly names ('Object path') in the output user could determine list of good candidates (UUID) for conversion to thin, once completed (Re)apply Storage Policy in the UI by assigning Storage Policy with same characteristics object(s) already has (Failures to Tolerate, etc.) and with 'proportionalCapacity' rule set to '0'.
Note: Options 3 and 4 requires some free space in the vSAN datastore these options won't work for a full datastore.
vSAN Free Capacity recommendations: Understanding reserved capacity concepts in vSAN.