{"id":3186,"date":"2014-06-16T23:47:00","date_gmt":"2014-06-16T15:47:00","guid":{"rendered":"http:\/\/rmohan.com\/?p=3186"},"modified":"2014-06-16T23:47:00","modified_gmt":"2014-06-16T15:47:00","slug":"vaai-primitive-unmap-and-space-reclaim","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=3186","title":{"rendered":"VAAI primitive UNMAP and Space Reclaim::"},"content":{"rendered":"<p>VAAI primitive UNMAP and Space Reclaim::<\/p>\n<p>VAAI UNMAP or space reclaim was introduced in vSphere 5.0 to allow the ESXi host to inform the storage array (VAAI TP Supported) that files (vmdk) or VMs had be moved or deleted from a Thin Provisioned VMFS datastore. This allows the array to reclaim the freed blocks.<\/p>\n<p>Recommended use of this primitive is in maintenance window, since running it on a datastore that is in-use by a VM can adversely affect I\/O for the VM. I\/O can take longer to complete, resulting in lower I\/O throughput and higher I\/O latency.<\/p>\n<p>The UNMAP performance is fully dependent on the storage array, how quickly or slowly it completes the process.<\/p>\n<p>However, there is no way of knowing how long an UNMAP operation will take to complete. It can be anywhere from few minutes to couple of hours depending on the size of the datastore, the amount of content that needs to be reclaimed and how well the storage array can handle the UNMAP operation.<\/p>\n<p>To run the command, you should change directory to the root of the VMFS volume that you wish to reclaim space from. The command is run as:<\/p>\n<p>&nbsp;<\/p>\n<p><strong>vmkfstools \u2013y &lt;% of free space to unmap&gt;<\/strong> <strong>Storage Array&#8217;s that support VAAI can be found from the\u00a0<a href=\"http:\/\/www.vmware.com\/support-search.html?cc=www&amp;client=VMware_Site_support_center&amp;site=VMware_Site_support_center&amp;cn=vmware&amp;num=20&amp;output=xml_no_dtd&amp;ie=UTF-8&amp;oe=UTF-8&amp;q=hcl#client=VMware_Site_support_center&amp;numgm=4&amp;getfields=*&amp;filter=0&amp;site=VMware_Site_support_center&amp;cc=en&amp;ie=UTF-8&amp;oe=UTF-8&amp;start=0&amp;num=20&amp;cid=&amp;tid=&amp;cn=vmware&amp;output=xml_no_dtd&amp;q=hcl\">VMware Hardware\u00a0Compatibility\u00a0List<\/a>.<\/strong> In\u00a0<strong>vSphere 5.5x<\/strong>\u00a0<em>esxcli<\/em>\u00a0command has been introduced instead of\u00a0<em>vmkfstools -y<\/em>\u00a0to do the space reclaim from the storage array. To check whether the VMFS datastore is supported for reclaim are not, run the following command using naa number of the vmfs datastore. ~ # esxcli storage core device vaai status get -d naa.5006016050912500f7d9a21b8794f321 \u00a0 \u00a0naa.5006016050912500f7d9a21b8794f321 \u00a0 \u00a0VAAI Plugin Name: VMW_VAAIP_RX \u00a0 \u00a0ATS Status: supported \u00a0 \u00a0Clone Status: supported \u00a0 \u00a0Zero Status: supported \u00a0 \u00a0Delete Status: supported \u00a0 &lt;&lt;&lt;&lt;\u00a0<strong>TP (You can do the Space Reclaim)<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>VAAI primitive UNMAP and Space Reclaim::<\/p>\n<p>VAAI UNMAP or space reclaim was introduced in vSphere 5.0 to allow the ESXi host to inform the storage array (VAAI TP Supported) that files (vmdk) or VMs had be moved or deleted from a Thin Provisioned VMFS datastore. This allows the array to reclaim the freed blocks.<\/p>\n<p>Recommended [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3186"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3186"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3186\/revisions"}],"predecessor-version":[{"id":3187,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3186\/revisions\/3187"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}