Hi
esxi 5.5. Thin Provision
I have delete a lot of guest os files.
VMDK file is still big.
I understand i need to run esxcli storage vmfs unmap command in order to unmap the deleted blocks.
What will happen then? the VMDK will be smaller, so the SAN (EMC) will also reclaim it's space?
What would happen if i won't run it? does the dead block will be re-used by the SAN ? Or should the LUN will consume more space?
Unused blocks are returned when you run unmap. This opens the unused space in storage. You can use the Unmap command at any time. There is no negative impact on the virtual machine.
The command is as follows.
esxcli storage vmfs unmap -l DATASTORE-NAME
Thanks.
I am curious to know what happens as default behavior if I don't use that one?
Will these blocks will be reuse by storage? or are they "dead" forever?
these blocks will be returned to the storage side, so they will be available again.
So, if they will be returned as default, why do i need to run unmap then?
No they aren't returned by default, that's what the unmap command does. When you run the unmap command your letting the array know you don't need to reserve that space anymore, and something else can use it.
Is that also relevant for deleting guest os files? for example, after massive SQL data deletes?
Because thin provision VMDK itself, by definition, doesn't reclaim it's space to vsphere.
So will unmap have any impact here?
After deleting the files in the operating system, you need to use the punchzero command to reduce the vmdk size.
VMKFSTOOLS –Punchzero | Shrink VMDK | VMware Virtualization Blog