<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Find volumes with less than 3 LUNs in it... in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Find-volumes-with-less-than-3-LUNs-in-it/m-p/43908#M9027</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Haimsohn,&lt;/P&gt;&lt;P&gt;As always - a pleasure!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Soli.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Mar 2014 12:19:02 GMT</pubDate>
    <dc:creator>solal</dc:creator>
    <dc:date>2014-03-17T12:19:02Z</dc:date>
    <item>
      <title>Find volumes with less than 3 LUNs in it...</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Find-volumes-with-less-than-3-LUNs-in-it/m-p/43897#M9022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a pretty standard flow for creating VMFS datastore (with volume, lun....) there's a request from a customer that I'm struggling to get my head on and appreciate any thought:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- convention for LUNs in a volume is 3 LUNs in a volume.&lt;/P&gt;&lt;P&gt;- let's say naming convention is na_w2k8_X and current X is vol number 1&lt;/P&gt;&lt;P&gt;- if there are 3 LUNs already in that vol 1, then create a new volume numbered 2 with the same convention.&lt;/P&gt;&lt;P&gt;- if there are less than 3 in the first volume of that convention, then resize that volume and create the 3rd LUN in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, how do I do that search for that convention to search for number of LUNs in it to know if I should create a LUN in an existing volume matching the convention or create a new one.&lt;/P&gt;&lt;P&gt;of course, if there are 5 volume, vols 1-4 might be full, 5 might be with only 1 or 2... then i'll put new lun in 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Soli. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:41:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Find-volumes-with-less-than-3-LUNs-in-it/m-p/43897#M9022</guid>
      <dc:creator>solal</dc:creator>
      <dc:date>2025-06-05T05:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Find volumes with less than 3 LUNs in it...</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Find-volumes-with-less-than-3-LUNs-in-it/m-p/43901#M9024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, one of the secret caveats and the holy grail of WFA &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So here's one of the best kept and least known secrets of WFA:&lt;/P&gt;&lt;P&gt;You can actually extend SPECIFIC objects based on information returned in the filter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me explain:&lt;/P&gt;&lt;P&gt;Let's say you use finder F1 with the basic filter "Find Volume by key" to fill up variable Vol1 =&amp;gt; Vol1 will have regular volume fields&lt;/P&gt;&lt;P&gt;Let's assume a new filter "Volume with lun count" that looks like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #1f497d; font-family: 'Courier New';"&gt;SELECT&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt; volume.name, array.ip &lt;STRONG&gt;AS&lt;/STRONG&gt; 'array.ip', count(lun.id) &lt;STRONG&gt;AS&lt;/STRONG&gt; lun_count&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #1f497d; font-family: 'Courier New';"&gt;FROM&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt; storage.volume &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #1f497d; font-family: 'Courier New';"&gt;JOIN&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt; storage.array &lt;STRONG&gt;ON&lt;/STRONG&gt; volume.array_id = array.id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #1f497d; font-family: 'Courier New';"&gt;LEFT&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt; &lt;STRONG&gt;JOIN&lt;/STRONG&gt; storage.lun &lt;STRONG&gt;ON&lt;/STRONG&gt; lun.volume_id = volume.id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #1f497d; font-family: 'Courier New';"&gt;GROUP&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt; &lt;STRONG&gt;BY&lt;/STRONG&gt; volume.id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG style="color: #1f497d; font-size: 11.0pt; font-family: 'Courier New';"&gt;HAVING&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt; lun_count &amp;lt; ${max_luns}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt;That query is simple one, running on ALL the volumes in the cache, listing them,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt;and counting for each the numbers of luns each holds (Here under a certain maximum).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt;Note that the list is not bound by anything else.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt;Now lets create finder F2 with 2 filters:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt;1) Volume by key &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt;2) Volume by lun count&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt;The first filter returns a single result and the second a whole list.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt;Combined they would return a single volume object BUT with a twist:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt;An additional field holding the number of luns inside.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt;So if that variable is called Vol2 you can (and will) reference Vol2.lun_count&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: #1f497d;"&gt;and have the current number of luns in it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Do note that only variables filled by this new finder F2 will have that extra half-hidden field!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that was clear enough and gave you an idea how to proceed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Yaron Haimsohn&lt;/P&gt;&lt;P&gt;OnCloud Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 10:46:51 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Find-volumes-with-less-than-3-LUNs-in-it/m-p/43901#M9024</guid>
      <dc:creator>yaronh</dc:creator>
      <dc:date>2014-03-17T10:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Find volumes with less than 3 LUNs in it...</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Find-volumes-with-less-than-3-LUNs-in-it/m-p/43908#M9027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Haimsohn,&lt;/P&gt;&lt;P&gt;As always - a pleasure!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Soli.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 12:19:02 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Find-volumes-with-less-than-3-LUNs-in-it/m-p/43908#M9027</guid>
      <dc:creator>solal</dc:creator>
      <dc:date>2014-03-17T12:19:02Z</dc:date>
    </item>
  </channel>
</rss>

