How to fix vSphere and vCenter datastore reverting to old size
Symptoms:
- You increased the size of a datastore in the past, but now when you open vCenter, you see the old (smaller) size displayed. There may be low disk space warnings.
- Web client for vCenter 6.5 and vSphere 6.5 and probably vCenter 6.0 and vSphere 6.0
- If you refresh the datastore information, the correct size displays and the warnings go away temporarily.
- The problem re-occurs.
Root Cause
According to the VMWare forums, this is caused by having different ESXi versions on the hosts in the datacenter. Such as one host has Update 1 and another host has Update 3. The recommended fix is to simply update all ESXi to the same version.
What happens if you can’t?
In my case, I needed to use a custom HP image for some servers, and I’m not going to take down the other hosts to install that custom image. So I kept trying things and found a good workaround.
Workaround
For EACH host in the datacenter that had a connection to the faulty storage, I performed these steps:
- Navigate to Hosts & Clusters tab
- Select first host
Boris Büttner
July 4, 2018 @ 2:47 am
Thank you very much we had the same issue even though all ESX hosts had the same patchlevel. All the time one datastore was reverting to the original size. Your workaround fixed it.
Jeff
July 13, 2018 @ 3:23 pm
Thanks! This worked for us, as well! We were running the same version of ESX across all hosts and kept having a handful of datastores revert to their original size…even after upgrading all ESX hosts. After performing the workaround as described, the issue is fixed! I’m glad it was simple.
Tom Borcher
October 19, 2018 @ 10:01 am
Thank you! We had this problem with one of our datastores too. And like the other commenters, all hosts in the datacenter were running the same version of ESXi (in our case it was 6.5U1g – 7967591). Rescanning all hosts worked. FYI, you can just select the cluster (if the hosts are in a cluster) and kick off a scan of all the hosts rather than scanning them one at a time. Thanks again!
Lucas Vieira
December 4, 2018 @ 1:42 am
Thxxx!!! Worked for me, i wasted some hours to discovery this shit.
VNA Admin
January 8, 2019 @ 4:47 pm
That did the trick, thank you!
vikram ma
July 10, 2019 @ 10:02 pm
thank you.. issue fixed permanently
Kevin
August 30, 2019 @ 11:12 am
I do a lot of datastore expansions and run into this issue ALL the time… Thank you Amira for the solution!
How about a PowerCLI script to automate this? On my last expansion I ran this script after the LUN expansion and again after the datastore expansion. Worked for me!
import-module “VMware.VimAutomation.Core”
connect-viserver
Get-Datacenter | Get-VMHost | Get-VMHostStorage -Refresh
Get-Datacenter | Get-VMHost | Get-VMHostStorage -RescanAllHba
Get-Datacenter | Get-VMHost | Get-VMHostStorage -RescanVmfs
sleep 10
Get-Datacenter | Get-VMHost | Get-VMHostStorage -Refresh
Get-Datacenter | Get-VMHost | Get-VMHostStorage -RescanAllHba
Get-Datacenter | Get-VMHost | Get-VMHostStorage -RescanVmfs
Oliver Saße
January 8, 2021 @ 6:56 am
Thank you very much. We had the same issue. All the time the datastore was reverting to the original size, but your workaround fixed it.