Datastore Provisioned Space vs Free Space

Last week I was asked by a customer which datastore would be the best location for a new virtual machine. They asked because while all of their datastores were showing plenty of free space they remembered that I had mentioned that some of them were very over provisioned. They admitted that they didn’t fully understand what over provisioned meant… after all there was free space on the datastore… so what was the problem ?

The goal of this article is to explain the possible risks that you take by over provisioning your datastores without regularly monitoring the free space. When you click on one of your physical servers and then look over to the right you will see a box that looks like the first picture. This is a little misleading because it only shows the total size of the datastore, as well as the amount of actual free space that is available.

The other piece that we need to monitor is the amount of provisioned space. Provisioned space is something that comes into play when you thin provision your virtual machines. Basically you start out using no space, and then as a virtual machine starts to use space, VMware will start to grow that virtual machine on the datastore as needed. The benefit of thin provisioning is that you can assign a VM a hard drive that is larger then you might actually need, without tying up that space and making it unavailable to other virtual machines. The downside is that if you over provision a datastore and then all of your virtual machines decide they need to grow you could run that datastore out of space. When this happens writes fail to that datastore and your virtual machines running on that datastore will lock up, or otherwise fail.

So how do you know if you are over provisioned ?

Up at the top of your vSphere client you can click “Home” and then find the “Datastores” icon. Then you simply click the datastore you want to check and look to the right. It shows you the amount of free space (space that hasn’t been used by a VM when it has grown), and also the amount of “provisioned” space. Ideally your provisioned number will be less then the total size of the datastore.

Don’t worry if your Provisioned Space number is a little bit larger then the Capacity number, your VM’s aren’t going to crash and burn as long as the Free Space number isn’t close to zero. I guess the best way to think about it is like your check book… you can write as many checks as you want… and if you add up all the checks you write out … think of that number s your “provisioned space” number. Now think of your “Free Space” number as the real balance of your check book. So if one of two checks that you wrote out clear your account… the “Free space” number will come down… but as long as it isn’t zero your ok (as long as more checks don’t clear). So this is where Storage vMotion comes in… before your Free space gets to zero.. you can Storage vMotion a VM over to another datastore… this will increase the amount of free space on the datastore you moved it from (just like depositing more money into your checking).

All in all its just a balancing act, as the whole point of thin provisioning is to be able to over provision the amount of storage you have, but just remember to monitor free space and make sure you don’t get so far over provisioned that you back yourself into a corner.

Share This Post

12 Responses to "Datastore Provisioned Space vs Free Space"

  1. This is how I thought it worked to until I noticed that the “Provisioned Space” in the DS summary capacity section gave me one ammount yet totaling up the “Provisioned Space” in the datastore view in the “Virtual Machines” tab gave a completely different ammount on our thin provisioned datastores. In our case, the 1.46 TB capacity DS reported 1.42 TB Provisioned Space in the DS summary tabs capacity box and totaling up the individual “Provisioned Space” numbers form the Datastores Virtual Machines tab (xxx.xx GB of xxx.xx GB) yieled a much larger number 2.6 TB. Looking at the VMs individually and noting their provisiond space (using “Edit Settings”) confirmed the larger 2.6 TB number. What gives?

  2. check to make sure that all of the VM’s that were being reportes as “On datastore X” actually are on datastore X…. i say this because if you have an ISO share or something on datastore X and a VM has one of those ISO’s mounted … it will show that VM as being “on” datastore X…. i guess the proper way to say it is that it shows that VM as dependant on datastore X … that could be the difference in the numbers.

  3. No, that’s not it, all the vmdk’s for a particular VM are contained within it’s folder on the datastore. There are not any ISO’s mounted. The issue is in the inconsistancy in the math between what the “Provisioned Space” reported on the Datastore views Summary tab Capacity box and what sum you get by adding the “Provisioned Space” of all the VMs listed in the Datastore View Virtual Machine tab – or by totaling up the hard disk sizes of individual VMs in the datastore using the “Edit Settings”. I guess my point is – don’t trust the Datastore views Summary tabs Provisioned Space figure, or PowerCLI scripts that calculate it by Capacity minus FreeSpace plus Uncommitted.

  4. Justin,

    Where does the Datastore summary extract/calculate the “Provisioned Space” from? I’m working in capacity planning and we extract some datastore information from the Vcenter database to publish some views on our internal website – I can’t seem to find any fields that we’d be able to use to generate this figure. In the vpx_datastore table, it only contains “capacity” and “free_space”.

  5. I believe that the way it is calculated it by finding all the VMDK’s on that LUN and then adding up the maximum size they could grow to. So you probably wont be able to just grab a value from a table. I would look into a powershell script of some type. You might not get it to do all the work, but I know ive seen scripts that will dump all that information to a CSV and then u could use excel to do it ? … not really automated though

  6. Hi Justin,

    Thanks for the clear explanation with a good analogy example on datastore Provisioned Space vs Free Space.

    More power!

    Regards,

    Junix

  7. The property to consider is a property of the vm, not the datastore.
    “ProvisionedSpaceGB”
    This will tell us the total provisioned space on the datastore. We can then compare this to the total disk size and see if we have provisioned more capacity than the available storage.

    The powerCLI command to show the total provisioned space on a datastore is:

    Get-VM | Measure -Property ProvisionedSpaceGB –Sum

    This is a different value that obtained from the Get-datastore command.

  8. Great article. Just what I was looking for to explain how to look for the Provisioned Size of the Datastore. Now if you could write about how this relates to thin lun usage on the block storage side, that would be great. From vsphere side, I have a lun datastore that is 2 TB capacity, Provisioned size is 2.38 TB, 71 GB free space. But looking at the same lun from the VNX side, I see its Capacity is 2048 GB, Consumed capacity is 1354 GB, which means free space is 694 GB on the lun. Note that the lun is thin provisioned on the VNX and I have VMs on this datastore that are thin provisioned and thick provisioned as well.

  9. A problem I encountered was when snapshots were enabled. The server itself had ~90% free space internally, but the snapshots caused the VMDKs to be unable to expand and locked my server. Apparently taking a single snaphost keeps spawning VMDKs until space runs out.

Leave a Reply