Jump to content

Recommended Posts

Posted

One of our file servers has the 60GB OS disk and also a 2TB disk for data, which only has 100GB in use. We are running low on space on the datastore, so I have created a 150GB disk and copied the data across from the 2TB disk. I have checked the data and its transferred fine, so the disk and its contents have been deleted and removed from the VM in vSphere. However, that 1.85TB of free space has not been reclaimed - infact we are now in a worse situation free space wise on the datastore.

 

So the server is storing the OS disk in SERVER/SERVER.vmdk and the data disk in SERVER/SERVER_1.vmdk. When browse the datastore, the file sizes of the vmdk's match those configured in the server's settings. I cannot figure out how to reclaim that space. From what I can tell, the LUN is thin-provisioned.

 

Any advice?

Posted (edited)

When you removed the 2TB Disk from the VM, did you tell it to "remove from the Virtual Machine and Delete Files from Disk" or just "remove from virtual machine" ?

 

If it was the first it will have gone from the LUN and be why you don't see it anymore, if you did the 2nd it will be floating around in the LUN still.

 

If you are looking at the datastore view and looking at "Capacity" its a cached view, you need to hit "refresh" on that box to get the latest size as it will be out of date.

 

A great tool to have for VMware is RVTools, @Domino introduced me to it and its great shows snapshots hanging around, media not ejected, orphaned files in LUNS etc so well worth getting and its free!

 

RVTools

 

That will help you find missing / orphaned files.

 

I'd also advise grabbing a full export from RVTools periodically as part of DR as its great for all those settings like MAC Addresses on the NICs for those fussy programs, structure of VMs etc.. Before we do any major changes to VMware we grab one just-in-case the brown and smelly hits the fan as another layer of backup so to speak over actual backups of the VCentre Database etc..

 

Actually just spotted you have a Thin Provisioned LUN (yuck!)

 

A Storage vMotion I believe clears that up do you have another LUN you can move it to?

 

https://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=2057513 This KB from VMware shows how to reclaim space on Thin luns via the CLI so maybe a bit of poking is going to have to be done.

 

Also found this blog for you - https://tinkertry.com/how-to-manually-free-up-vmfs-space-after-deleting-big-files-in-a-thin-provisioned-windows-vm with notes / guidance and a link to another tool that may help as well.

Edited by john
  • Thanks 3
Posted (edited)
Top of my head clone the vm and it should fix the file size.

Would a VM move be similar to a clone?

 

When you removed the 2TB Disk from the VM, did you tell it to "remove from the Virtual Machine and Delete Files from Disk" or just "remove from virtual machine" ?

 

If it was the first it will have gone from the LUN and be why you don't see it anymore, if you did the 2nd it will be floating around in the LUN still.

I selected the option 'Remove from the Virtual Machine and Delete Files from Disk'

 

If you are looking at the datastore view and looking at "Capacity" its a cached view, you need to hit "refresh" on that box to get the latest size as it will be out of date.

Tried that, but it still hasn't shown the reduction in size.

 

A great tool to have for VMware is RVTools, @Domino introduced me to it and its great shows snapshots hanging around, media not ejected, orphaned files in LUNS etc so well worth getting and its free!

 

RVTools

 

That will help you find missing / orphaned files.

 

I'd also advise grabbing a full export from RVTools periodically as part of DR as its great for all those settings like MAC Addresses on the NICs for those fussy programs, structure of VMs etc.. Before we do any major changes to VMware we grab one just-in-case the brown and smelly hits the fan as another layer of backup so to speak over actual backups of the VCentre Database etc..

Cheers, I'll get RVTools now.

 

Actually just spotted you have a Thin Provisioned LUN (yuck!)

 

A Storage vMotion I believe clears that up do you have another LUN you can move it to?

 

https://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=2057513 This KB from VMware shows how to reclaim space on Thin luns via the CLI so maybe a bit of poking is going to have to be done.

 

Also found this blog for you - https://tinkertry.com/how-to-manually-free-up-vmfs-space-after-deleting-big-files-in-a-thin-provisioned-windows-vm with notes / guidance and a link to another tool that may help as well.

The server's Virtual HDDs appear to be Thick Provisioned, including the one I deleted. However the LUN itself appears to be Thin Provisioned, though I can't see where to check this.

I've moved the VM to a slower LUN - the original LUN only showed a reduction in the VM's newer lower size (only reduced by ~200GB) and still isn't showing the reduction of the >1TB change. I'm in the process of moving it back to the faster LUN.

Edited by CHiLL
Posted
It sounds like it could be Orphaned snapshots - as John notes RVTools will tell you this in the vsnapshot tab, and also warn if any disks are possible 'zombies' in the vhealth tab.
Posted
It sounds like it could be Orphaned snapshots - as John notes RVTools will tell you this in the vsnapshot tab, and also warn if any disks are possible 'zombies' in the vhealth tab.

Unfortunately there are no snapshots. There is one 'Zombie', though that is for a different VM on a different LUN. :(

Posted
I had this issue with a dell San about 3 years ago in 5.0 the Lun was mapped in the san UI. The Lun was still mapped to an old physical box after removing the mapping it freed up the 2tb storage.
Posted
I had this issue with a dell San about 3 years ago in 5.0 the Lun was mapped in the san UI. The Lun was still mapped to an old physical box after removing the mapping it freed up the 2tb storage.

Hmm, OK. Our LUN is on an 18-month old HP SAN and no other SAN or devices have been using for storage. If I need to unmap/unmount the LUN, what effect will that have on our live servers that are stored on it? Will I then be able to re-map it without any issues?

Posted
you would have to migrate them off first mine was a 2tb data disk lun not a vm datastore. do you have vms hosted on this particular lun
Posted (edited)

Is this an HP 4000 series SAN (StoreVirtual/SANiq)? It's only going to support space reclamation on thin provisioned LUNs if it's SANiq 12.0 or above and everything is set correctly for space reclamation.

 

If it is that series and isn't upgraded to 12.0 then you can't get the space back once you've inflated a thin provisioned LUN. You have to create a new LUN or have another LUN with enough space. Migrate everything to the new/existing LUN with enough space. Delete the old LUN once empty. Now you have the space back!

Edited by jtotheb
Posted
Is this an HP 4000 series SAN (StoreVirtual/SANiq)? It's only going to support space reclamation on thin provisioned LUNs if it's SANiq 12.0 or above and everything is set correctly for space reclamation.

 

If it is that series and isn't upgraded to 12.0 then you can't get the space back once you've inflated a thin provisioned LUN. You have to create a new LUN or have another LUN with enough space. Migrate everything to the new/existing LUN with enough space. Delete the old LUN once empty. Now you have the space back!

It's a HP MSA 2040.

Posted
It's a HP MSA 2040.

 

OK, then it should just be a case of following the unmap guidance posted earlier. VMWare 6.5 with VMFS 6 can do auto-reclaim.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...