VMware Cloud Community
robarros26
Contributor
Contributor

reclaim space RAW virtual machine

hello

I have a netapp fas2240 storage and have a virtual machine with windows server 2012 that has a LUN on RAW

I wonder how do I reclaim space this unit

thank you

Reply
0 Kudos
1 Reply
mister_potato_h
Enthusiast
Enthusiast

Hi Robarros

By default Windows 2012 and 2012 R2 issue TRIM and SCSI_UNMAP commands as and when files are deleted to reclaim any space which is freed up at the NTFS layer,  these actions also occur when files or indeed blocks are moved by such things as the scheduled Defrag which runs by default at 3am so by default this keeps your virtual hard disk tidy. To recover the space your virtual hard disk attached to the VM would be required to be Thin,  if it is currently thick or eager thick you can change this to Thin by performing a svMotion and selecting to change its disk format.

pastedImage_1.png

Also your NetApp volume \ LUN is required to be Thin, and if you are using a file system that NetApp is aware of such as NFS for your datastore then you just need to ensure the NetApp NFS for VAAI plugin is installed.  However if you are using block storage FC or iSCSI,  which NetApp is not natively aware as these formatted with VMFS so this alone however does not free the SAN blocks,  so once you have ensured that your VMDK is thin,  to recover the space you also need to ensure your VMFS volume can issue UNMAP to release the blocks and this feature was only introduced within vSphere 5.0 however in vSphere 5.0 U1 this was moved to being a manually instantiated action by use of vmkfstools -y command.

I wrote a while ago this blog post about the whole process of space recovery which you might find useful

SAN Workload Offload | darrylcauldwell.com

You may think it odd that by default ESXi 5 U1 made the recovery of these blocks a manual task,  I am not too sure but,  the interesting phenomena of the way that Windows 2012 runs Defrag out of the box at 3am which issues Unmap \ TRIM commands is that if you have a lot of these you can cause a broadcast storm to your storage array,  albeit in 2012 R2 Microsoft made TRIM \ UnMap more efficient this type of task is I assume what VMware was wanting to avoid.  More details can be found in this blog post.

http://darrylcauldwell.com/windows-server-2012-san-performance/

Hopefully with this you can recover all your free space and keep your storage nice and clean and efficient.

Cheers

Darryl

Reply
0 Kudos