Using Small Magnetic Disks for vSAN Might Result in VM Failures

Using Small Magnetic Disks for vSAN Might Result in VM Failures


Small Disks and vSAN. What to Do About it?

If you have small hard drives (smaller than 255 gb), and you use them for vSAN capacity drives, you might be affected by KB2080503.

When the physical magnetic disks used for vSAN are smaller than 255 GB, virtual machines that run on vSAN datastores might experience disk space issues.

You see entry similar to: 

There is no more space for virtual disk XX. You might be able to continue this session by freeing disk space on the relevant volume and clicking retry.

Note: When vSAN stores virtual machine objects, it creates components whose default size does not exceed 255 GB. However, when you use magnetic disks that are smaller than 255 GB, these storage components might end up to be larger than actual underlying magnetic disks. As a result, virtual machines associated with these storage components experience unpredictable behavior and might fail.

There is a good explanation of this in Cormac Hogan's blog article VSAN.ClomMaxComponentSizeGB Explained.

How to avoid this issue?

To avoid this issue adjust advanced configuration option VSAN.ClomMaxComponentSizeGB on each host in your vSAN cluster to 80% of smallest disk size. For example, if size smallest disk in disk group is 200 GB set it to 160GB:

PowerCLI script for collecting values from ClomMaxComponentSizeGB parameter on all hosts in a vSAN cluster:

Get-Cluster "vSAN-allFlash" | %{Get-VMHost -Location $_ | %{ $_.Name + " " + (Get-AdvancedSetting $_ -Name "VSAN.ClomMaxComponentSizeGB").Value }}

And also, for adjusting the value to 160 GB (adjust accordingly)

Get-Cluster "vSAN-allFlash" | %{Get-VMHost -Location $_ | %{ Get-AdvancedSetting $_ -Name "VSAN.ClomMaxComponentSizeGB" | Set-AdvancedSetting -Value 160 -Confirm:$false }}

But that would help only for new VMs created on the vSAN storage. What to do with existing VMs?

In that case you can clone your existing policy and add Object space reservation, which would reserve 100% of space for your existing VMs, and apply it to VMs and each of their virtual disks

PowerCLI script for policy creation:

$defaultPolicy = Get-SpbmStoragePolicy -Name "Virtual SAN Default Storage Policy"
$rules = $defaultPolicy.AnyOfRuleSets.AllOfRules
$newrules = $rules | ?{$_.Capability.Name -ne "VSAN.proportionalCapacity"}
$newrules += New-SpbmRule -Capability (Get-SpbmCapability -Name "VSAN.proportionalCapacity" ) -Value 100
New-SpbmStoragePolicy -Name default_and_object_space -RuleSet (New-SpbmRuleSet $newrules)

And applying it on VMs with sum of their disk sizes bigger than 200 gb:

$sp = Get-SpbmStoragePolicy -Name "default_and_object_space"
$cluster = Get-Cluster "vSAN-allFlash"
Get-VM -Location $cluster | %{
        $disks = get-harddisk $_
        $disks | %{
                $disks_sum += $_.CapacityKB/1024/1024
        if($disks_sum -gt 200) {
                Set-SpbmEntityConfiguration $vm -StoragePolicy $sp
                $disks | %{
                        Set-SpbmEntityConfiguration $_ -StoragePolicy $sp

Runecast Analyzer automatically checks your vSphere, vSAN and NSX-v configuration settings and allows you to know about this and many more potential issues in your vSphere environment

You can download the free trial here.


Constantin Ivanov

Head of R&D

July 18, 2018

See how many KBs are applicable in your environment