Alternative to ESXi Thin VHD
-
Hello,
I by default use ESXi thin VHD when creating new images, it provides me with good amount of flexibility. I can monitor how it will grow and I can easily over provision and not worry much about things, and I can change it later or expand it, and when I export I only take the used parts and not the whole allocated amount for example I would give 500 GB but when exporting get 20 GB export.
However the main disadvantage is for example we created a backup and it pushed 10 GB file and then I delete it, the image would get increased 10 GB all of its life (unless you have feature on the storage called UNMAP) and there is no way to reclaim that space expect you do long process of wipe free space + punch zeros. The same for KVM as well.
But I wonder what do you guys use and do you face this issue when dealing with thin disks, and what other types of disks where this issue is no longer occurring.
Thanks and looking forward to hear your answers.
-
You didn't mention the type of storage you are using (local, NAS, SAN, distributed, etc.), but are you using VMFS6? This is a pretty good read about automatic unmap - https://blog.purestorage.com/monitoring-automatic-vmfs-6-unmap-in-esxi/.
-
Using ESXi 6.5 Update 1 + Local Storage, and my storage does not support UNMAP
-
@emad-r said in Alternative to ESXi Thin VHD:
Using ESXi 6.5 Update 1 + Local Storage, and my storage does not support UNMAP
That's the back end unmap (That you don't need as your backend can't be thin anyways because it's local). You can still SCSI UNMAP from a guest OS to the VMDK.
-
huh!
You mean running this query command from within an guest linux VM ? and does it needs to have open-vm-tools or vmware tools to be installed right ?
And I did ran this command via SSH on the ESXi host itself.
-
@emad-r said in Alternative to ESXi Thin VHD:
huh!
You mean running this query command from within an guest linux VM ? and does it needs to have open-vm-tools or vmware tools to be installed right ?
And I did ran this command via SSH on the ESXi host itself.
On the ESXi host itself.
-
@storageninja said in Alternative to ESXi Thin VHD:
@emad-r said in Alternative to ESXi Thin VHD:
Using ESXi 6.5 Update 1 + Local Storage, and my storage does not support UNMAP
That's the back end unmap (That you don't need as your backend can't be thin anyways because it's local). You can still SCSI UNMAP from a guest OS to the VMDK.
Hi,
I am still researching this, are you suggesting that i run command from linux vm with the below:
vmtoolsd --cmd
or
vmware-guestd --cmd ?And what will be the entire command
-
@scottalanmiller said in Alternative to ESXi Thin VHD:
@emad-r said in Alternative to ESXi Thin VHD:
huh!
You mean running this query command from within an guest linux VM ? and does it needs to have open-vm-tools or vmware tools to be installed right ?
And I did ran this command via SSH on the ESXi host itself.
On the ESXi host itself.
No in guest you can shrink a VMDK with the right stuff set.
Going from memory if you want to shrink a VMDK there are a few requirements.1.VM hardware version.
2. flags to be set
3. Guest OS supports it (2012R2, and modern RHEL do)
4. Guest OS reclaim triggered or setup (Discard flag required to mount EXT4 for instance)
5. Go read Cody or Cormac's blog on this...Wait a few months and Jason and I should hopefully write a doc on this (it's on my agenda).
-
Thanks so much, I will read in the mean time those blogs:
https://www.codyhosterman.com/
https://blogs.vmware.com/vsphere/author/cormac_hogan