<?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>Sysadmin&#039;s Overlook</title>
	<atom:link href="http://sysadmin.jprice.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://sysadmin.jprice.org</link>
	<description>Just a sysadmin&#039;s random musings</description>
	<lastBuildDate>Mon, 16 Apr 2012 20:39:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>List fiber channel luns and controllers on a Mac</title>
		<link>http://sysadmin.jprice.org/2012/04/16/list-fiber-channel-luns-and-controllers-on-a-mac/</link>
		<comments>http://sysadmin.jprice.org/2012/04/16/list-fiber-channel-luns-and-controllers-on-a-mac/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 20:39:37 +0000</pubDate>
		<dc:creator>jprice</dc:creator>
				<category><![CDATA[Geeky musings]]></category>

		<guid isPermaLink="false">http://sysadmin.jprice.org/?p=97</guid>
		<description><![CDATA[Mac is pretty, and very GUI, but getting real data about what&#8217;s going on can be a PITA. Want to know how to list the luns and storage controllers that your Mac client can see? fibreconfig -l (and you can rescan with -r!).  Note the english spelling of fibre. &#8211;Jason]]></description>
			<content:encoded><![CDATA[<p>Mac is pretty, and very GUI, but getting real data about what&#8217;s going on can be a PITA.</p>
<p>Want to know how to list the luns and storage controllers that your Mac client can see?</p>
<p>fibreconfig -l</p>
<p>(and you can rescan with -r!).  Note the english spelling of fibre.</p>
<p>&#8211;Jason</p>
]]></content:encoded>
			<wfw:commentRss>http://sysadmin.jprice.org/2012/04/16/list-fiber-channel-luns-and-controllers-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When did I last run FSCK?</title>
		<link>http://sysadmin.jprice.org/2012/01/25/when-did-i-last-run-fsck/</link>
		<comments>http://sysadmin.jprice.org/2012/01/25/when-did-i-last-run-fsck/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 15:49:12 +0000</pubDate>
		<dc:creator>jprice</dc:creator>
				<category><![CDATA[Geeky musings]]></category>

		<guid isPermaLink="false">http://sysadmin.jprice.org/?p=95</guid>
		<description><![CDATA[aka &#8216;how long has it been since I ran fsck?&#8217; Answer: run &#8216;tune2fs -l &#60;device&#62;&#8217; and look at Mount count: 2 Maximum mount count: 36 Last checked: Tue Sep 6 23:12:36 2011 Check interval: 15552000 (6 months) Next check after: Sun Mar 4 23:12:36 2012 If the mount count = max mount count, you&#8217;re due [...]]]></description>
			<content:encoded><![CDATA[<p>aka &#8216;how long has it been since I ran fsck?&#8217;</p>
<p>Answer: run &#8216;tune2fs -l &lt;device&gt;&#8217; and look at</p>
<blockquote><p>Mount count: 2<br />
Maximum mount count: 36<br />
Last checked: Tue Sep 6 23:12:36 2011<br />
Check interval: 15552000 (6 months)<br />
Next check after: Sun Mar 4 23:12:36 2012</p></blockquote>
<p>If the mount count = max mount count, you&#8217;re due for an FSCK.  If you&#8217;re booting after the &#8216;Check interval&#8217;, (which is helpfully calculated for you on the &#8216;Next check after:&#8217; line), you&#8217;re due for an FSCK.</p>
<p>Knowing if your scheduled reboot will take several hours in order to run the FSCK?  Priceless.</p>
]]></content:encoded>
			<wfw:commentRss>http://sysadmin.jprice.org/2012/01/25/when-did-i-last-run-fsck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PIPA letter to Georgia Senators</title>
		<link>http://sysadmin.jprice.org/2012/01/19/pipa-letter-to-georgia-senators/</link>
		<comments>http://sysadmin.jprice.org/2012/01/19/pipa-letter-to-georgia-senators/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 23:06:17 +0000</pubDate>
		<dc:creator>jprice</dc:creator>
				<category><![CDATA[Geeky musings]]></category>

		<guid isPermaLink="false">http://sysadmin.jprice.org/?p=86</guid>
		<description><![CDATA[(Not directly Sysadmin related, but important none the less. Here are letters I&#8217;m sending to my Senators, both of whom are co-sponsors of the PIPA or Protect IP Act) Please use these as templates or replace &#60;NAME&#62; and &#60;ADDRESS&#62; with the appropriate values. ########################################################################### The Honorable Saxby Chambliss 416 Russell Senate Office Building United States [...]]]></description>
			<content:encoded><![CDATA[<p>(Not directly Sysadmin related, but important none the less.  Here are letters I&#8217;m sending to my Senators, both of whom are co-sponsors of the <a href="http://en.wikipedia.org/wiki/PROTECT_IP_Act">PIPA or Protect IP Act</a>)</p>
<p>Please use these as templates or replace &lt;NAME&gt; and &lt;ADDRESS&gt; with the appropriate values.</p>
<p>###########################################################################</p>
<p>The Honorable Saxby Chambliss<br />
416 Russell Senate Office Building<br />
United States Senate<br />
Washington DC 20510</p>
<p>Dear Senator:</p>
<p>My name is &lt;NAME&gt; and my address is &lt;ADDRESS&gt;.  I am writing you because I am deeply disappointed that you are not only supporting the Protect IP Act (aka PIPA, aka S.968), but are actually a co-sponsor of the proposed legislation.</p>
<p>As written, PIPA would destroy the progress of the Internet over the past 15 years. You well know how important that growth has been to the country as a whole, and Atlanta/Columbus/Savannah in particular.  The entire &#8216;Web 2.0&#8242; movement is founded on user generated content as well as enabling small entities (businesses and persons) to work together and build amazing things.  The provisions of PIPA would work to destroy this foundation by significantly decreasing due process for &#8216;take down&#8217; requests, while drastically increasing the &#8216;damage radius&#8217; of such requests (such as forcing Ad-networks, search engines, DNS servers, etc to &#8216;delist&#8217; entire sites for having a single bit of infringing content.)</p>
<p>No one denies that intellectual property piracy is a real problem. There are possible legal remedies to these challenges, however PIPA is a very dangerous solution to these problems.</p>
<p>Please retract your support and sponsorship of the PIPA (S.968) immediately.</p>
<p>Thank you,</p>
<p>&lt;NAME&gt;</p>
<p>###########################################################################</p>
<p>The Honorable Johnny Isakson<br />
131 Russell Senate Office Building<br />
United States Senate<br />
Washington DC 20510</p>
<p>Dear Senator:</p>
<p>My name is &lt;NAME&gt; and my address is &lt;ADDRESS&gt;.  I am writing you because I am deeply disappointed that you are not only supporting the Protect IP Act (aka PIPA, aka S.968), but are actually a co-sponsor of the proposed legislation.</p>
<p>As written, PIPA would destroy the progress of the Internet over the past 15 years. You well know how important that growth has been to the country as a whole, and Atlanta/Columbus/Savannah in particular.  The entire &#8216;Web 2.0&#8242; movement is founded on user generated content as well as enabling small entities (businesses and persons) to work together and build amazing things.  The provisions of PIPA would work to destroy this foundation by significantly decreasing due process for &#8216;take down&#8217; requests, while drastically increasing the &#8216;damage radius&#8217; of such requests (such as forcing Ad-networks, search engines, DNS servers, etc to &#8216;delist&#8217; entire sites for having a single bit of infringing content.)</p>
<p>No one denies that intellectual property piracy is a real problem. There are possible legal remedies to these challenges, however PIPA is a very dangerous solution to these problems.</p>
<p>Please retract your support and sponsorship of the PIPA (S.968) immediately.</p>
<p>Thank you,</p>
<p>&lt;NAME&gt;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://sysadmin.jprice.org/2012/01/19/pipa-letter-to-georgia-senators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NPIV and XEN under CentOS 5 does not work</title>
		<link>http://sysadmin.jprice.org/2011/12/29/npiv-and-xen-under-centos-5-does-not-work/</link>
		<comments>http://sysadmin.jprice.org/2011/12/29/npiv-and-xen-under-centos-5-does-not-work/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 19:04:55 +0000</pubDate>
		<dc:creator>jprice</dc:creator>
				<category><![CDATA[Geeky musings]]></category>

		<guid isPermaLink="false">http://sysadmin.jprice.org/?p=82</guid>
		<description><![CDATA[boo. (double boo for not posting anything in nearly 6 months) From what I can tell, Xen 3.0.3 (shipped with CentOS / RHEL 5) does NOT support NPIV for SAN attached storage. Looks like it works just fine with CentOS 6 though. The frustrating thing is that all the pieces are there for it to [...]]]></description>
			<content:encoded><![CDATA[<p>boo.</p>
<p>(double boo for not posting anything in nearly 6 months)</p>
<p>From what I can tell, Xen 3.0.3 (shipped with CentOS / RHEL 5) does NOT support NPIV for SAN attached storage.  Looks like it works just fine with CentOS 6 though.  The frustrating thing is that all the pieces are there for it to work&#8230; /sys/class/scsi_host/host?/vport_create and _destroy work as they should, you can zone storage to the new vports&#8230; you just can&#8217;t present the lun form:</p>
<p>npiv:<fabric_name>-<wwpn>-<wwnn>-<target-wwpn>-<lun></p>
<p>to the guest. </p>
<p>boo.  SysOps will upgrade the xen stuff next year at some point.</p>
]]></content:encoded>
			<wfw:commentRss>http://sysadmin.jprice.org/2011/12/29/npiv-and-xen-under-centos-5-does-not-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux multipath is making me tired (part 2)</title>
		<link>http://sysadmin.jprice.org/2011/07/13/linux-multipath-is-making-me-tired-part-2/</link>
		<comments>http://sysadmin.jprice.org/2011/07/13/linux-multipath-is-making-me-tired-part-2/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 14:11:04 +0000</pubDate>
		<dc:creator>jprice</dc:creator>
				<category><![CDATA[Geeky musings]]></category>

		<guid isPermaLink="false">http://sysadmin.jprice.org/?p=80</guid>
		<description><![CDATA[Follow up from an earlier post Turns out to be a known issue. hooray. http://oss.oracle.com/ol5/docs/RELEASE-NOTES-U6-en &#8211;Jason]]></description>
			<content:encoded><![CDATA[<p>Follow up from <a href="http://sysadmin.jprice.org/2011/05/25/linux-multipath-is-making-me-tired/">an earlier post</a></p>
<p>Turns out to be a known issue. hooray.</p>
<p>http://oss.oracle.com/ol5/docs/RELEASE-NOTES-U6-en</p>
<p>&#8211;Jason</p>
]]></content:encoded>
			<wfw:commentRss>http://sysadmin.jprice.org/2011/07/13/linux-multipath-is-making-me-tired-part-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If any of you run SSL sites&#8230;</title>
		<link>http://sysadmin.jprice.org/2011/06/06/if-any-of-you-run-ssl-sites/</link>
		<comments>http://sysadmin.jprice.org/2011/06/06/if-any-of-you-run-ssl-sites/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 21:03:40 +0000</pubDate>
		<dc:creator>jprice</dc:creator>
				<category><![CDATA[Geeky musings]]></category>

		<guid isPermaLink="false">http://sysadmin.jprice.org/?p=77</guid>
		<description><![CDATA[Use this tool to check the SSL config. You&#8217;ll be happy.]]></description>
			<content:encoded><![CDATA[<p>Use <a href="https://www.wormly.com/test_ssl">this tool to check the SSL config</a>.</p>
<p>You&#8217;ll be happy.</p>
]]></content:encoded>
			<wfw:commentRss>http://sysadmin.jprice.org/2011/06/06/if-any-of-you-run-ssl-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux multipath is making me tired.</title>
		<link>http://sysadmin.jprice.org/2011/05/25/linux-multipath-is-making-me-tired/</link>
		<comments>http://sysadmin.jprice.org/2011/05/25/linux-multipath-is-making-me-tired/#comments</comments>
		<pubDate>Wed, 25 May 2011 17:39:18 +0000</pubDate>
		<dc:creator>jprice</dc:creator>
				<category><![CDATA[Geeky musings]]></category>

		<guid isPermaLink="false">http://sysadmin.jprice.org/?p=75</guid>
		<description><![CDATA[So, I&#8217;ve got a multipath setup that claims to be working: # multipath -ll vrp (360060e8010053b90052fb06900000190) dm-8 HITACHI,DF600F size=70G features=&#8217;0&#8242; hwhandler=&#8217;0&#8242; wp=rw `-+- policy=&#8217;round-robin 0&#8242; prio=1 status=active &#124;- 6:0:0:0 sdc 8:32 active ready running `- 5:0:0:0 sdb 8:16 active ready running sweet right? Until you test it. For some reason, the above setup isn&#8217;t &#8217;round-robin&#8217;, [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;ve got a multipath setup that claims to be working:</p>
<p># multipath -ll<br />
vrp (360060e8010053b90052fb06900000190) dm-8 HITACHI,DF600F<br />
size=70G features=&#8217;0&#8242; hwhandler=&#8217;0&#8242; wp=rw<br />
`-+- policy=&#8217;round-robin 0&#8242; prio=1 status=active<br />
|- 6:0:0:0 sdc 8:32 active ready running<br />
`- 5:0:0:0 sdb 8:16 active ready running</p>
<p>sweet right?</p>
<p>Until you test it. For some reason, the above setup isn&#8217;t &#8217;round-robin&#8217;, it&#8217;s only using one path. If you kill the inactive link (unplug, port disable, whatever), it works fine. Reconnect, and it recovers. If you kill the active link, well, the world blows up on you (read-only file system, etc).</p>
<p>The above is with Oracle Enterprise Linux 5.6 (aka oracle unbreakable linux) and device-mapper-multipath-0.4.9-23.0.8.el5 (which is the latest supported version AFAICT). I&#8217;ll update or post again when/if I get this solved.</p>
<p>ETA: <a href="http://sysadmin.jprice.org/2011/07/13/linux-multipath-is-making-me-tired-part-2/">Turns out to be a known issue</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sysadmin.jprice.org/2011/05/25/linux-multipath-is-making-me-tired/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>lvresize is my friend</title>
		<link>http://sysadmin.jprice.org/2011/04/15/lvresize-is-my-friend/</link>
		<comments>http://sysadmin.jprice.org/2011/04/15/lvresize-is-my-friend/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 20:44:20 +0000</pubDate>
		<dc:creator>jprice</dc:creator>
				<category><![CDATA[Geeky musings]]></category>

		<guid isPermaLink="false">http://sysadmin.jprice.org/?p=72</guid>
		<description><![CDATA[Everyone is fearful of resizing volumes. Linux has made it pretty easy though, provided you&#8217;re using LVM (lvm2 that is), and ext3 filesystems.  Tested on Redhat 5.6 (aka Oracle Enterprise Linux aka CentOS).  One command which will grow or shrink both the volume and the file system. lvresize! Note: if you&#8217;re resizing down (shrinking), you&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone is fearful of resizing volumes.</p>
<p>Linux has made it pretty easy though, provided you&#8217;re using LVM (lvm2 that is), and ext3 filesystems.  Tested on Redhat 5.6 (aka Oracle Enterprise Linux aka CentOS).  One command which will grow or shrink both the volume and the file system.</p>
<p>lvresize!</p>
<p>Note: if you&#8217;re resizing down (shrinking), you&#8217;ll need to umount the shrinking volume first.  If it is mounted, it&#8217;ll ask you to do it for you.</p>
<p>Say you need to move 20GB from /home, to /var, and they&#8217;re in the same VG:</p>
<pre>umount /home
lvresize --resizefs -L -20G /dev/mapper/localdisks-home
lvresize --resizefs -L +20G /dev/mapper/localdisk-var
mount /home</pre>
<p>Done!  (though the shrink command will take a little bit of time to finish)</p>
]]></content:encoded>
			<wfw:commentRss>http://sysadmin.jprice.org/2011/04/15/lvresize-is-my-friend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tcpdump and error 1448</title>
		<link>http://sysadmin.jprice.org/2011/03/26/tcpdump-and-error-1448/</link>
		<comments>http://sysadmin.jprice.org/2011/03/26/tcpdump-and-error-1448/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 01:55:52 +0000</pubDate>
		<dc:creator>jprice</dc:creator>
				<category><![CDATA[Geeky musings]]></category>

		<guid isPermaLink="false">http://sysadmin.jprice.org/?p=69</guid>
		<description><![CDATA[If you use tcpdump, and see &#8216;reply ERR 1448&#8242;, you&#8217;re hitting a bug in tcpdump.  Use tshark instead. Tcpdump isn&#8217;t reassembling NFS packets correctly. FYI]]></description>
			<content:encoded><![CDATA[<p>If you use tcpdump, and see &#8216;reply ERR 1448&#8242;, you&#8217;re hitting a bug in tcpdump.  Use tshark instead.</p>
<p>Tcpdump isn&#8217;t reassembling NFS packets correctly.</p>
<p>FYI</p>
]]></content:encoded>
			<wfw:commentRss>http://sysadmin.jprice.org/2011/03/26/tcpdump-and-error-1448/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create Luns in an AMS2500 easily.</title>
		<link>http://sysadmin.jprice.org/2011/03/10/create-luns-in-an-ams2500-easily/</link>
		<comments>http://sysadmin.jprice.org/2011/03/10/create-luns-in-an-ams2500-easily/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 23:01:05 +0000</pubDate>
		<dc:creator>jprice</dc:creator>
				<category><![CDATA[Geeky musings]]></category>

		<guid isPermaLink="false">http://sysadmin.jprice.org/?p=64</guid>
		<description><![CDATA[If you&#8217;re like me, you&#8217;ve got an AMS2000 series (2100, 2300, 2500) array, and you&#8217;re using HDP pools, since they&#8217;re SO MUCH EASIER than regular RAID groups. If you&#8217;re also like me, you&#8217;re using SNM2[1] to manage this thing, and it is an amazingly slow GUI.  But SNM2 has a CLI! So that&#8217;s better, right? [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me, you&#8217;ve got an AMS2000 series (2100, 2300, 2500) array, and you&#8217;re using HDP pools, since they&#8217;re SO MUCH EASIER than regular RAID groups.</p>
<p>If you&#8217;re also like me, you&#8217;re using SNM2[1] to manage this thing, and it is an amazingly slow GUI.  But SNM2 has a CLI! So that&#8217;s better, right?  Sorta&#8230; you have to log in with each command you want to run&#8230;</p>
<p>So I&#8217;ve written a python script which creates LU[2] of specified size.  You can <a title="lu-maker.py" href="http://nampaz.com/lu-maker.py">download my lu-maker.py</a> here, or you can look at it below.</p>
<p>&#8211;Jason</p>
<p>[1] Storage Navigator Modular 2</p>
<p>[2] or LUNS (not presented to the hosts yet), or LDEV&#8217;s if you&#8217;re from USP land&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">&nbsp;
<span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">subprocess</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">time</span>
&nbsp;
unit = <span style="color: #483d8b;">'tc3ams2500'</span>
<span style="color: #dc143c;">user</span> = <span style="color: #483d8b;">'my_username_you_silly_boy'</span>
passwd = <span style="color: #483d8b;">'my_password_you_silly_boy'</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> usage<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> :
    <span style="color: #483d8b;">&quot;&quot;&quot;print usage information and exit&quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;USAGE:&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;%s -p &lt;pool#&gt; size1 [size2 ... sizeN] [-p &lt;pool#&gt; size1 ...] ...&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'a size can be either:'</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'&quot;100&quot; for 100gb or'</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'&quot;10x50&quot; for creating ten different 50gb luns'</span>
    <span style="color: #dc143c;">sys</span>.<span style="color: black;">exit</span><span style="color: black;">&#40;</span>-<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> whereis<span style="color: black;">&#40;</span>program<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;Validate if a program is in your $PATH variable&quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> path <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">environ</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'PATH'</span>, <span style="color: #483d8b;">''</span><span style="color: black;">&#41;</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">':'</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">exists</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>path, program<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">and</span> \
           <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">isdir</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>path, program<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
               <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>path, program<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">None</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> isint<span style="color: black;">&#40;</span>arg<span style="color: black;">&#41;</span> :
    <span style="color: #483d8b;">&quot;&quot;&quot;Validate if a string passed on the command line is an integer.&quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">try</span> :
        <span style="color: #008000;">int</span><span style="color: black;">&#40;</span>arg<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">ValueError</span> :
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">False</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">True</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> validsize<span style="color: black;">&#40;</span>arg<span style="color: black;">&#41;</span> :
    <span style="color: #483d8b;">&quot;&quot;&quot;validate if an argument is a valid size argument.
    Either it must be an integer (indicating a size of one lun)
    or it must be in the form #x# or &lt;number&gt;x&lt;number&gt; which indicates
    a count of luns to be created of a specific size. For example:
    10x50 would mean 10 luns of size 50gb should be created
    &quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> isint<span style="color: black;">&#40;</span>arg<span style="color: black;">&#41;</span> :
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">True</span>
    <span style="color: #ff7700;font-weight:bold;">elif</span> <span style="color: #483d8b;">'x'</span> <span style="color: #ff7700;font-weight:bold;">in</span> arg :
        <span style="color: #ff7700;font-weight:bold;">try</span> :
            count, size = arg.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'x'</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">except</span> :
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">False</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> isint<span style="color: black;">&#40;</span>count<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">and</span> isint<span style="color: black;">&#40;</span>size<span style="color: black;">&#41;</span> :
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">True</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">False</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> parsesize<span style="color: black;">&#40;</span>arg<span style="color: black;">&#41;</span> :
    <span style="color: #483d8b;">&quot;&quot;&quot;once a size specification is validated, it can be more easily parsed.
    Run as a generator to yeild the right number of sizes
    &quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> isint<span style="color: black;">&#40;</span>arg<span style="color: black;">&#41;</span> :
        <span style="color: #ff7700;font-weight:bold;">yield</span> arg
    <span style="color: #ff7700;font-weight:bold;">else</span> :
        count,size = arg.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'x'</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #008000;">int</span><span style="color: black;">&#40;</span>count<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> :
            <span style="color: #ff7700;font-weight:bold;">yield</span> size
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> runcmd<span style="color: black;">&#40;</span>cmdstr, dashy=<span style="color: #008000;">False</span><span style="color: black;">&#41;</span> :
    <span style="color: #483d8b;">&quot;&quot;&quot;run command abstracts away the subprocess module, and the vagarities
    of the SNM2 CLI.  Deals with the login prompt and the password prompt.
    if dashy is True, also respond the a third question with a 'y<span style="color: #000099; font-weight: bold;">\n</span>' to
    deal with 'are you sure' type prompts.
    &quot;&quot;&quot;</span>
    sleeptime = .2
    cmdlist = cmdstr.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> whereis<span style="color: black;">&#40;</span>cmdlist<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> == <span style="color: #008000;">None</span> :
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;%s is not found in $PATH&quot;</span> <span style="color: #66cc66;">%</span> cmdlist<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
        <span style="color: #dc143c;">sys</span>.<span style="color: black;">exit</span><span style="color: black;">&#40;</span>-<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
    p = <span style="color: #dc143c;">subprocess</span>.<span style="color: black;">Popen</span><span style="color: black;">&#40;</span> cmdlist,
                          stdin = <span style="color: #dc143c;">subprocess</span>.<span style="color: black;">PIPE</span>,
                          stdout = <span style="color: #dc143c;">subprocess</span>.<span style="color: black;">PIPE</span>,
                          stderr = <span style="color: #dc143c;">subprocess</span>.<span style="color: black;">PIPE</span> <span style="color: black;">&#41;</span>
    <span style="color: #dc143c;">time</span>.<span style="color: black;">sleep</span><span style="color: black;">&#40;</span>sleeptime<span style="color: black;">&#41;</span>
    p.<span style="color: black;">stdin</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">user</span> + <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: black;">&#41;</span>
    <span style="color: #dc143c;">time</span>.<span style="color: black;">sleep</span><span style="color: black;">&#40;</span>sleeptime<span style="color: black;">&#41;</span>
    p.<span style="color: black;">stdin</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span>passwd + <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> dashy :
        <span style="color: #dc143c;">time</span>.<span style="color: black;">sleep</span><span style="color: black;">&#40;</span>sleeptime<span style="color: black;">&#41;</span>
        p.<span style="color: black;">stdin</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'y<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: black;">&#41;</span>
    stdout, stderr = p.<span style="color: black;">communicate</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> stdout, stderr, p.<span style="color: black;">returncode</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> parselus<span style="color: black;">&#40;</span>output<span style="color: black;">&#41;</span> :
    <span style="color: #483d8b;">&quot;&quot;&quot;Takes the output of auluref, and finds any gaps in the list of LU's,
    and also gives the next free lu number.  First parse the output, then
    find the gaps, then add 1 to the top lu number in existance, and return
    the holelist, and the next free.
    &quot;&quot;&quot;</span>
    lulist = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
    holelist = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
    last = <span style="color: #ff4500;">0</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: black;">&#40;</span>line <span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> output.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">linesep</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> :
        uline = line.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        words = uline.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>words<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span> <span style="color: #ff7700;font-weight:bold;">and</span> isint<span style="color: black;">&#40;</span>words<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> :
            lu = <span style="color: #008000;">int</span><span style="color: black;">&#40;</span>words<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
            lulist.<span style="color: black;">append</span><span style="color: black;">&#40;</span>lu<span style="color: black;">&#41;</span>
    <span style="color: #808080; font-style: italic;">#find the gaps in lulist:</span>
    last = <span style="color: #ff4500;">0</span>
    holelist = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> lu <span style="color: #ff7700;font-weight:bold;">in</span> lulist :
        <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #008000;">True</span> :
            tlast = last
            last += <span style="color: #ff4500;">1</span>
            <span style="color: #ff7700;font-weight:bold;">if</span> tlast <span style="color: #66cc66;">&gt;</span>= lu :
                <span style="color: #ff7700;font-weight:bold;">break</span>
            holelist.<span style="color: black;">append</span><span style="color: black;">&#40;</span>tlast<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> holelist, lulist<span style="color: black;">&#91;</span>-<span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span> + <span style="color: #ff4500;">1</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> genlunumbers<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> :
    <span style="color: #483d8b;">&quot;&quot;&quot;Creates a generator to yield the next available lu number.  First
    tries to fill any holes, and then just adds to the top.  Uses auluref as
    a datasource.
    &quot;&quot;&quot;</span>
    cmdstr = <span style="color: #483d8b;">&quot;auluref -unit %s&quot;</span> <span style="color: #66cc66;">%</span> unit
    stdout, stderr, returncode = runcmd<span style="color: black;">&#40;</span>cmdstr<span style="color: black;">&#41;</span>
    holelist, next = parselus<span style="color: black;">&#40;</span>stdout<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">for</span> lu <span style="color: #ff7700;font-weight:bold;">in</span> holelist :
        <span style="color: #ff7700;font-weight:bold;">yield</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>lu<span style="color: black;">&#41;</span>
&nbsp;
    lu = next
    <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #008000;">True</span> :
        <span style="color: #ff7700;font-weight:bold;">yield</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>lu<span style="color: black;">&#41;</span>
        lu += <span style="color: #ff4500;">1</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> getpools<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> :
    <span style="color: #483d8b;">&quot;&quot;&quot;uses audppool to list the available DP pools.  Used to validate if the
    passed pool numbers are valid.  NOTE: The format of the audppool command
    is a little crazy.  Short version of what follows: if the first 10 chars
    of any line start with a number (if the 10 chars are run through .split(),
    it's a valid pool.
    &quot;&quot;&quot;</span>
    cmdstr = <span style="color: #483d8b;">&quot;audppool -unit %s -refer&quot;</span> <span style="color: #66cc66;">%</span> unit
    stdout, stderr, returncode = runcmd<span style="color: black;">&#40;</span>cmdstr<span style="color: black;">&#41;</span>
    poollist = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: black;">&#40;</span>line <span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> stdout.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">linesep</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> :
        uline = line<span style="color: black;">&#91;</span>:<span style="color: #ff4500;">10</span><span style="color: black;">&#93;</span>
        words = uline.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>words<span style="color: black;">&#41;</span> == <span style="color: #ff4500;">0</span> :
            <span style="color: #ff7700;font-weight:bold;">continue</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> isint<span style="color: black;">&#40;</span>words<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> :
            poollist.<span style="color: black;">append</span><span style="color: black;">&#40;</span>words<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> poollist
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> makelun<span style="color: black;">&#40;</span>pool, size, lu<span style="color: black;">&#41;</span> :
    <span style="color: #483d8b;">&quot;&quot;&quot;Actually makes a given lun in a specified pool, with a given size.
    &quot;&quot;&quot;</span>
    <span style="color: #808080; font-style: italic;">#auluadd -unit tc3ams2500 [ -lu lun ] -dppoolno pool -size size + 'g'</span>
    cmdstr = <span style="color: #483d8b;">&quot;auluadd -unit %s -lu %s -dppoolno %s -size %s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>unit,
                                                                lu,
                                                                pool,
                                                                size + <span style="color: #483d8b;">'g'</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;making LU number %s from pool %s of size %s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>lu, pool, size<span style="color: black;">&#41;</span>
    <span style="color: #808080; font-style: italic;">#stdout, stderr, returncode = runcmd(cmdstr, dashy=True)</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;NOTE: program currently nutered. Uncomment above line (and <span style="color: #000099; font-weight: bold;">\n</span>comment out this line) to activate.<span style="color: #000099; font-weight: bold;">\n</span> I would normally run this command: <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, cmdstr
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> :
    <span style="color: #483d8b;">&quot;&quot;&quot; Main: calls getpool, parses the command line arguments (in a way I'm
    not fully happy with).  The last three lines make the luns.
    &quot;&quot;&quot;</span>
    poollist = getpools<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    lunlist = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
    <span style="color: #808080; font-style: italic;">#parse cmdline, build list of pool,size pairs</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span> <span style="color: #66cc66;">!</span>= <span style="color: #483d8b;">'-p'</span> :
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'must specify -p &lt;pool number&gt; first'</span>
        usage<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> isint<span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">and</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span> <span style="color: #ff7700;font-weight:bold;">in</span> poollist :
        pool = <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>
    <span style="color: #ff7700;font-weight:bold;">else</span> :
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'pool number %s must be a valid pool number'</span> <span style="color: #66cc66;">%</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'valid pools are %s'</span> <span style="color: #66cc66;">%</span> poollist
        usage<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> validsize<span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">3</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> :
        <span style="color: #ff7700;font-weight:bold;">for</span> size <span style="color: #ff7700;font-weight:bold;">in</span> parsesize<span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">3</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> :
            lunlist.<span style="color: black;">append</span><span style="color: black;">&#40;</span> <span style="color: black;">&#40;</span>pool, size<span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">else</span> :
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'invalid size specification: %s'</span> <span style="color: #66cc66;">%</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">3</span><span style="color: black;">&#93;</span>
        usage<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    nextispool = <span style="color: #008000;">False</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> arg <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">4</span>:<span style="color: black;">&#93;</span> :
        <span style="color: #ff7700;font-weight:bold;">if</span> nextispool :
            <span style="color: #ff7700;font-weight:bold;">if</span> isint<span style="color: black;">&#40;</span>arg<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">and</span> arg <span style="color: #ff7700;font-weight:bold;">in</span> poollist :
                pool = arg
                nextispool = <span style="color: #008000;">False</span>
            <span style="color: #ff7700;font-weight:bold;">else</span> :
                <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'pool number %s must be a valid pool number'</span> <span style="color: #66cc66;">%</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>
                <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'valid pools are %s'</span> <span style="color: #66cc66;">%</span> poollist
                usage<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">elif</span> arg == <span style="color: #483d8b;">'-p'</span> :
            nextispool = <span style="color: #008000;">True</span>
        <span style="color: #ff7700;font-weight:bold;">elif</span> validsize<span style="color: black;">&#40;</span>arg<span style="color: black;">&#41;</span> :
            <span style="color: #ff7700;font-weight:bold;">for</span> size <span style="color: #ff7700;font-weight:bold;">in</span> parsesize<span style="color: black;">&#40;</span>arg<span style="color: black;">&#41;</span> :
                lunlist.<span style="color: black;">append</span><span style="color: black;">&#40;</span> <span style="color: black;">&#40;</span>pool,size<span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">else</span> :
            <span style="color: #483d8b;">'unknown error with arg %s'</span> <span style="color: #66cc66;">%</span> arg
            usage<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    lu = genlunumbers<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> pool,size <span style="color: #ff7700;font-weight:bold;">in</span> lunlist :
        makelun<span style="color: black;">&#40;</span>pool, size, lu.<span style="color: black;">next</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span> :
    main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://sysadmin.jprice.org/2011/03/10/create-luns-in-an-ams2500-easily/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

