ESXi

 View Only
Expand all | Collapse all

Datastore Not Freeing Up Space After Deleting VM

  • 1.  Datastore Not Freeing Up Space After Deleting VM

    Posted Oct 13, 2017 03:54 AM

    I have a VMFS 6 datastore on ESXi 6.5 that is 9.1 TB in size. I had a large VMDK that I was using to store files that was about 9.0 TB and I transferred the files elsewhere and then removed that VM. When browsing the file directory of the datastore it shows two other VMs that I still have in there that are about 35 GB each in size which is good, but the datastore overall says there is only about 30 GB free when it should say there is about 8 TB free.

    Is there a manual process that needs to be run that will tell the datastore that files were deleted and there is free space now?



  • 2.  RE: Datastore Not Freeing Up Space After Deleting VM

    Posted Oct 13, 2017 04:22 AM

    have you run though the infomation contained in the following documentation link?

    Configure Space Reclamation for a VMFS6 Datastore



  • 3.  RE: Datastore Not Freeing Up Space After Deleting VM

    Posted Oct 13, 2017 05:23 AM

    By default the settings were set to "low" space reclamation priority and "1 MB" granularity so I didn't have to change anything. I checked again and it is still currently set as that.

    I find it odd that when I delete the entire VM and its files off the datastore, it doesn't free up space like you would expect if you were to delete files off your personal computer. It's not like I'm trying to shrink a VM, I'm completely removing it.



  • 4.  RE: Datastore Not Freeing Up Space After Deleting VM

    Posted Oct 13, 2017 06:50 AM

    I had read it somewhere that it will take sometime to release as on vmfs6 its automatic , let me check that VMware doc.



  • 5.  RE: Datastore Not Freeing Up Space After Deleting VM

    Posted Oct 13, 2017 02:13 PM

    I guess you write about free space on VMFS rather than free space on storage.

    If so info about space reclamation is usless here, because it's about freeing disk space on storage.

    Can you try to rescan and refresh information on each host connected to datastore?



  • 6.  RE: Datastore Not Freeing Up Space After Deleting VM

    Posted Oct 14, 2017 01:20 AM

    TomHowarthplanetshootsFinikiez

    As you can see by the two images below, the datastore is showing 9.07 TB used out of 9.09 TB. It's been that way for days now. The two VM's that are left on that datastore are both off right now and each only take up about 30 GB each.

    vm_pic_1 — Postimage.org

    vm_pic_2 — Postimage.org

    I have clicked the refresh button multiple times as well and upon going to datastore -> configure -> capacity settings I have clicked refresh there too. Should the capacity information be shown as it is in the below screenshot and text that I copied it from?

    Capacity

       Total Capacity: 9.09 TB

       Provided Space: 9.08 TB

       Free Space: 30.10 GB

    vm_pic_3 — Postimage.org



  • 7.  RE: Datastore Not Freeing Up Space After Deleting VM

    Posted Oct 16, 2017 10:50 AM

    Can you do cluster-wide rescan. So select a whole cluster to do a rescan

    Perform Storage Rescan

    Also if you connect directly to ESXi host with Host Embeded client. Does it show correct or incorrect free space?



  • 8.  RE: Datastore Not Freeing Up Space After Deleting VM
    Best Answer

    Posted Oct 17, 2017 02:48 AM

    Hello,

    Upon going into the ESXi host itself it did show the current information and it was only vCenter that was showing incorrectly.

    I then had the idea to check to see what build I was on and if there were any updates and sure enough I was on the GA build so I updated vCenter to 6.5.0-5973321 and the issue seems to be resolved.

    Thanks for the help all!



  • 9.  RE: Datastore Not Freeing Up Space After Deleting VM

    Posted Dec 22, 2018 06:52 AM

    AFAIK the "shrink" function is not available via GUI in WS 15.

    For ubuntu virtual machine, Run this command and it takes about an hour (with SSD hard disk) and it needs root permission.

    vmware-toolbox-cmd disk shrinkonly

    for this command, you must first install vmware-tools package.

    and it will work and the storage start freeing up during running of that commands.



  • 10.  RE: Datastore Not Freeing Up Space After Deleting VM

    Posted Dec 23, 2018 07:52 PM

    @ Sajad
    The solution I gave you for Workstation does not apply to VMs running in vSphere. !!!