<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>extend Archives - LucD notes</title>
	<atom:link href="https://www.lucd.info/category/vsphere/datastore/extend/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lucd.info/category/vsphere/datastore/extend/</link>
	<description>My PowerShell ramblings</description>
	<lastBuildDate>Sat, 30 Jul 2016 06:14:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://www.lucd.info/wp-content/uploads/2018/12/cropped-120px-Tibetan_Dharmacakra-32x32.png</url>
	<title>extend Archives - LucD notes</title>
	<link>https://www.lucd.info/category/vsphere/datastore/extend/</link>
	<width>32</width>
	<height>32</height>
</image> 
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/><atom:link rel="hub" href="https://websubhub.com/hub"/>	<item>
		<title>VMFS Datastores &#8211; Expand and Extend</title>
		<link>https://www.lucd.info/2016/07/29/vmfs-datastores-expand-and-extend/</link>
					<comments>https://www.lucd.info/2016/07/29/vmfs-datastores-expand-and-extend/#comments</comments>
		
		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Fri, 29 Jul 2016 13:30:52 +0000</pubDate>
				<category><![CDATA[datastore]]></category>
		<category><![CDATA[expand]]></category>
		<category><![CDATA[extend]]></category>
		<category><![CDATA[LUN]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Expand]]></category>
		<category><![CDATA[Extend]]></category>
		<category><![CDATA[Increase]]></category>
		<category><![CDATA[VMFS]]></category>
		<guid isPermaLink="false">http://www.lucd.info/?p=5347</guid>

					<description><![CDATA[We all know, and love, PowerCLI&#8216;s New-Datastore and Set-Datastore cmdlets to create and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>We all know, and love, <a href="https://communities.vmware.com/community/vmtn/automationtools/powercli" target="_blank">PowerCLI</a>&#8216;s <a href="https://www.vmware.com/support/developer/PowerCLI/PowerCLI63R1/html/New-Datastore.html" target="_blank">New-Datastore</a> and <a href="https://www.vmware.com/support/developer/PowerCLI/PowerCLI63R1/html/Set-Datastore.html" target="_blank">Set-Datastore</a> cmdlets to create and manipulate <strong>VMFS datastores</strong>. But when we look at the functionality available through the Web Client, there is one interesting feature for manipulating VMFS datastores that is missing from the <a href="https://communities.vmware.com/community/vmtn/automationtools/powercli" target="_blank">PowerCLI</a> cmdlets. The <strong>Increase</strong> button, which allows us to <strong>Expand</strong> or <strong>Extend</strong> an existing VMFS datastore<sup>*</sup>.</p>
<p style="padding-left: 30px;"><a href="https://www.lucd.info/2016/07/29/vmfs-datastores-expand-and-extend/ds-increase/" rel="attachment wp-att-5348"><img decoding="async" class="alignnone wp-image-5348 size-medium" src="https://lucd.info/wp-content/uploads/2016/07/DS-Increase-300x148.jpg" alt="DS-Increase" width="300" height="148" srcset="https://www.lucd.info/wp-content/uploads/2016/07/DS-Increase-300x148.jpg 300w, https://www.lucd.info/wp-content/uploads/2016/07/DS-Increase-768x378.jpg 768w, https://www.lucd.info/wp-content/uploads/2016/07/DS-Increase.jpg 840w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Recently there were a couple of threads on this subject in the <a href="https://communities.vmware.com/community/vmtn/automationtools/powercli/content?filterID=contentstatus[published]~objecttype~objecttype[thread]" target="_blank">VMTN PowerCLI Community</a>, so I decided to streamline my quick-and-dirty scripts into something more presentable, and create a <strong>PowerShell module</strong> to bundle the functions. I present the <strong>VMFSIncrease</strong> module!<br />
The VMFSIncrease module will also be my first contribution to the <a href="https://github.com/vmware/PowerCLI-Example-Scripts" target="_blank">PowerCLI Community Repository</a>! More on that further on in this post.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>* <sub>The expand and extend functions for a VMFS datastore depend on the availability of free space on the VMFS datastore extents and/or the availability of free LUNs</sub></p>
<p><span id="more-5347"></span></p>
<h2>The Increase button</h2>
<p>The Increase button in fact offers two different methods to increase the size of a datastore. The definitions of two methods according to the</p>
<ul>
<li><strong>Expand</strong>: increases the capacity of an existing VMFS datastore by expanding (increasing the size of) an <strong>existing extent</strong> of the datastore</li>
<li><strong>Extend</strong>: Increases the capacity of an existing VMFS datastore by adding <strong>new extents</strong> to the datastore</li>
</ul>
<p>Perhaps the following schematic makes it a bit more clear.</p>
<p style="padding-left: 30px;"><a href="https://www.lucd.info/2016/07/29/vmfs-datastores-expand-and-extend/vmfs-2/" rel="attachment wp-att-5358"><img decoding="async" class="alignnone wp-image-5358 size-medium" src="https://lucd.info/wp-content/uploads/2016/07/vmfs-2-300x104.png" alt="vmfs-2" width="300" height="104" srcset="https://www.lucd.info/wp-content/uploads/2016/07/vmfs-2-300x104.png 300w, https://www.lucd.info/wp-content/uploads/2016/07/vmfs-2.png 679w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>The schematic shows a VMFS datastore with one extent, on LUN A. If we want to increase the Used capacity, we can do an Expand, on the same extent (LUN A). Or we can do an Extend on a new LUN, in this case LUN B.In the case of the Extend, the VMFS datastore will now have two extents, LUN A and LUN B.</p>
<p>Note that for the Expand and the Extent you do not need to use all of the free space. The following is perfectly possible.</p>
<p style="padding-left: 30px;"><a href="https://www.lucd.info/2016/07/29/vmfs-datastores-expand-and-extend/vmfs-1/" rel="attachment wp-att-5356"><img decoding="async" class="alignnone wp-image-5356 size-medium" src="https://lucd.info/wp-content/uploads/2016/07/vmfs-1-300x109.png" alt="vmfs-1" width="300" height="109" srcset="https://www.lucd.info/wp-content/uploads/2016/07/vmfs-1-300x109.png 300w, https://www.lucd.info/wp-content/uploads/2016/07/vmfs-1.png 690w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>The Increase button presents the user with a series of candidate LUNs. The Expand and Extend candidate LUNs are intermixed in that list. The underlying API method makes sure that the LUNs are not already used by another <strong>datastore</strong> or by a <strong>RDM</strong> disk.</p>
<h2>The Module</h2>
<p>The module is available in my GitHub <a href="https://github.com/lucdekens/VMFSIncrease" target="_blank">VMFSIncrease</a> repository.</p>
<h2>Sample runs</h2>
<h3>Reporting</h3>
<p>The Get-VmfsDatastoreInfo displays basic information about the extents and the partitions that make up the datastore.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">Get-VmfsDatastoreInfo -Datastore TestDS</pre><p></p>
<p>This produces something like this</p>
<p style="padding-left: 30px;"><a href="https://www.lucd.info/2016/07/29/vmfs-datastores-expand-and-extend/vmfs-3/" rel="attachment wp-att-5362"><img loading="lazy" decoding="async" class="alignnone wp-image-5362 size-medium" src="https://lucd.info/wp-content/uploads/2016/07/vmfs-3-217x300.png" alt="vmfs-3" width="217" height="300" srcset="https://www.lucd.info/wp-content/uploads/2016/07/vmfs-3-217x300.png 217w, https://www.lucd.info/wp-content/uploads/2016/07/vmfs-3.png 478w" sizes="auto, (max-width: 217px) 100vw, 217px" /></a></p>
<p>The Datastore lives on one extent, and on that extent there are three partitions. The partition marked with (2) is the part where the VMFS Datastore lives. Part (3) is the free space, and part (1) is for alignment.</p>
<p>To check how we can increase the capacity of the Datastore, we can run</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">Get-VmfsDatastoreIncrease -Datastore TestDS</pre><p></p>
<p>This returns something like this</p>
<p><a href="https://www.lucd.info/2016/07/29/vmfs-datastores-expand-and-extend/vmfs-4/" rel="attachment wp-att-5363"><img loading="lazy" decoding="async" class="alignnone wp-image-5363 size-medium" src="https://lucd.info/wp-content/uploads/2016/07/vmfs-4-300x166.png" alt="vmfs-4" width="300" height="166" srcset="https://www.lucd.info/wp-content/uploads/2016/07/vmfs-4-300x166.png 300w, https://www.lucd.info/wp-content/uploads/2016/07/vmfs-4.png 446w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The returned information shows that there are two options to increase the capacity of the Datastore. In (1) we see that we can Expand the extent by 80GB. In (2) we see that we can Extend the capacity by 100GB by adding a new extent to the Datastore.</p>
<h3>Expand</h3>
<p>The Help page for the New-VmfsDatastoreIncrease function already contains several examples on how to use the function. But to give you an idea what is possible, just a few examples.</p>
<p>We have the possibility to add up to 80GB. If we don&#8217;t specify a size, all the free space on the extent is used.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">New-VmfsDatastoreIncrease -Datastore 'TestDS' -Expand</pre><p></p>
<p>If we do specify how much we want to increase the capacity, only that specific amount of space from the free space will be taken.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">New-VmfsDatastoreIncrease -Datastore 'TestDS' -Expand -IncreaseSizeGB 25</pre><p></p>
<p>If we have a Datastore that spans more than one extent, we can, through the Canonicalname parameter, indicate on which extent the increase shall be taken.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">New-VmfsDatastoreIncrease -Datastore 'TestDS' -Expand -IncreaseSizeGB 15 -CanonicalName 'naa.60050123017775af1800000000000011'</pre><p></p>
<h3>Extend</h3>
<p>As we explained in the beginning of the post, with the Extend switch we indicate that we want to increase the capacity on a new extent. Again we can take the full extent.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">New-VmfsDatastoreIncrease -Datastore 'TestDS' -Extend -CanonicalName 'naa.60050123017775af1800000000000012'</pre><p></p>
<p>Interesting to note, if you don&#8217;t specify a LUN, through the Canonicalname parameter, the function will order the available LUNs alphanumerically on their Canonicalname, and take the first one. So the following is perfectly possible, provided of course there are free LUNs available.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">New-VmfsDatastoreIncrease -Datastore 'TestDS' -Extend</pre><p></p>
<p>And, as with the Expand option, you do not need to use all of the available space with the Extend option. You can control how much space is taken through the IncreaseSizeGB parameter.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">New-VmfsDatastoreIncrease -Datastore 'TestDS' -Extend -IncreaseSizeGB 50 -CanonicalName 'naa.60050123017775af1800000000000012'</pre><p></p>
<p>The option is also available without specifying a LUN. The function uses the same logic as was mentioned before, it will order the available LUNs alphanumerically on their Canonicalname, and take the first one.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">New-VmfsDatastoreIncrease -Datastore 'TestDS' -Extend -IncreaseSizeGB 35</pre><p></p>
<h2>PowerCLI Community Repository</h2>
<p>Since a couple of days the long awaited <a href="https://github.com/vmware/PowerCLI-Example-Scripts" target="_blank">PowerCLI Community Repository</a> is live! More info can be found in the <a href="https://blogs.vmware.com/PowerCLI/2016/07/updating-vmware-powercli-community-repository.html" target="_blank">Updating the VMware PowerCLI Community Repository!</a> post over on the PowerCLI Blog.</p>
<p>If you have any scripts, functions, modules&#8230; that might be useful for the community, please submit them there.</p>
<p>The VMFSIncrease module will be available on the <a href="https://github.com/vmware/PowerCLI-Example-Scripts" target="_blank">PowerCLI Community Repository</a> shortly.</p>
<p>&nbsp;</p>
<p>Enjoy, and share!</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.lucd.info/2016/07/29/vmfs-datastores-expand-and-extend/feed/</wfw:commentRss>
			<slash:comments>14</slash:comments>
		
		
			</item>
	</channel>
</rss>
