<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Miscellaneous Ramblings &#187; linux</title>
	<atom:link href="http://onastick.wordpress.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://onastick.wordpress.com</link>
	<description>Hockey, Disc golf, devops and other assorting miscellany.</description>
	<lastBuildDate>Wed, 18 Jan 2012 17:39:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='onastick.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Miscellaneous Ramblings &#187; linux</title>
		<link>http://onastick.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://onastick.wordpress.com/osd.xml" title="Miscellaneous Ramblings" />
	<atom:link rel='hub' href='http://onastick.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Running a puppetmaster in ec2</title>
		<link>http://onastick.wordpress.com/2011/11/30/running-a-puppetmaster-in-ec2/</link>
		<comments>http://onastick.wordpress.com/2011/11/30/running-a-puppetmaster-in-ec2/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 22:34:26 +0000</pubDate>
		<dc:creator>stick</dc:creator>
				<category><![CDATA[Sysadminery]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://onastick.wordpress.com/?p=317</guid>
		<description><![CDATA[I struggled with this for a few days before figuring it out, so I&#8217;ll post it here in hopes it saves someone a few minutes.  When you install puppet and start the puppetmaster (webrick or rack-enabled) it generates a ssl cert for that machine and also generates a CA that you will use to sign [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onastick.wordpress.com&amp;blog=19419720&amp;post=317&amp;subd=onastick&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I struggled with this for a few days before figuring it out, so I&#8217;ll post it here in hopes it saves someone a few minutes.  When you install puppet and start the puppetmaster (webrick or rack-enabled) it generates a ssl cert for that machine and also generates a CA that you will use to sign all of your clients.</p>
<p>Recent versions of puppet do not add subjectAltNames to the server certificate when it&#8217;s generated by the puppetmaster process.  This means that if you do not use the same name as your masters hostname to connect to puppet you will get a lovely cert mismatch.  I posted a question on serverfault about this (<a title="Puppet in EC2 - Server Fault Question" href="http://serverfault.com/questions/332954/puppet-cert-mismatch-in-ec2/334129#334129" target="_blank">here</a>).  It looks like the common practice for EC2 in particular is to use a uuid as the certname for each puppet client.  This avoids name collisions and problems with hostnames changing everytime the instance is rebooted.  It&#8217;s a little harder to keep track of since they aren&#8217;t very easy to remember, so caveat emptor.</p>
<p><span id="more-317"></span></p>
<p>First get puppet installed.  I tend to use gems (even though I despise them) since they update much faster upstream than anything else.  <em>Do NOT run puppet or start the puppetmaster.</em></p>
<p>Generate a uuid or pick some string/name/moniker that&#8217;s going to be uniq and consistent.  (uuidgen to get a uuid)</p>
<p>Setup a basic puppet.conf, rpm installs will do this for you, gem installs you are on your own.<br />
<code><br />
[main]<br />
logdir = /var/log/puppet<br />
rundir = /var/run/puppet<br />
vardir = /var/lib/puppet<br />
ssldir = $vardir/ssl<br />
pluginsync = true<br />
server = puppet<br />
environment = production<br />
certname = ENTER_UUID_HERE<br />
dns_alt_names = puppet<br />
report = true<br />
</code><br />
You can also manually generate the cert with the following.<br />
<code>puppet cert generate --dns_alt_names puppet ENTER_UUID_HERE</code><br />
Your master cert will have the subjectAltNames field now, This is all addressed in <a href="http://projects.puppetlabs.com/issues/10739" target="_blank">http://projects.puppetlabs.com/issues/10739</a> and should be fixed in the next puppet release.</p>
<p>The concept of using the uuid for ec2 type instances is sound and will prevent ssl headaches in the future.</p>
<br />Filed under: <a href='http://onastick.wordpress.com/category/sysadminery/'>Sysadminery</a> Tagged: <a href='http://onastick.wordpress.com/tag/amazon/'>amazon</a>, <a href='http://onastick.wordpress.com/tag/aws/'>aws</a>, <a href='http://onastick.wordpress.com/tag/ec2/'>ec2</a>, <a href='http://onastick.wordpress.com/tag/linux/'>linux</a>, <a href='http://onastick.wordpress.com/tag/puppet/'>puppet</a>, <a href='http://onastick.wordpress.com/tag/ssl/'>ssl</a>, <a href='http://onastick.wordpress.com/tag/sysadmin/'>sysadmin</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onastick.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onastick.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onastick.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onastick.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onastick.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onastick.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onastick.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onastick.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onastick.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onastick.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onastick.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onastick.wordpress.com/317/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onastick.wordpress.com/317/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onastick.wordpress.com/317/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onastick.wordpress.com&amp;blog=19419720&amp;post=317&amp;subd=onastick&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onastick.wordpress.com/2011/11/30/running-a-puppetmaster-in-ec2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/10dcfb54c464136b8be684b80ddd3515?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">stickm13</media:title>
		</media:content>
	</item>
		<item>
		<title>Fighting with SAN</title>
		<link>http://onastick.wordpress.com/2008/12/23/fighting-with-san/</link>
		<comments>http://onastick.wordpress.com/2008/12/23/fighting-with-san/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 05:39:45 +0000</pubDate>
		<dc:creator>stick</dc:creator>
				<category><![CDATA[Sysadminery]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[netapp]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[rhel5]]></category>
		<category><![CDATA[san]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.miscellaneous.net/?p=171</guid>
		<description><![CDATA[We&#8217;ve been a big NAS shop for a number of years, actually well before I come on board.  We are starting to use SAN more and more nowadays.  We have a much more stable SAN fabric (the network side of fiber channel storage for those of you keeping score at home).  So I spend several [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onastick.wordpress.com&amp;blog=19419720&amp;post=171&amp;subd=onastick&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been a big NAS shop for a number of years, actually well before I come on board.  We are starting to use SAN more and more nowadays.  We have a much more stable SAN fabric (the network side of fiber channel storage for those of you keeping score at home).  So I spend several days before the break fighting with various SAN issues.  Most of them were my lack of particular experience with our SAN implementation as well as host level tools.  The pain of SAN comes largely from the host end.  Your SAN device (even in our case with NetAPP) is probably pretty good at doing it&#8217;s end and is well documented.  But on the linux side SAN is very vendor specific, which always leads to problems.  For example if you are using an EMC you have to get supported HBAs then in some cases run a custom kernel to support that HBA and then you probably end up needed vendor specific tools for handling things.  In my setup I don&#8217;t need a custom kernel, but we do have to support a small vendor package of tools.  NetApp is actually pretty good when it comes linux supoprt, they package RPMs in most cases and stay current with versions as far as support.</p>
<p><span id="more-171"></span>Several of the things I played with were adding a lun to a machine and getting it to show up without rebooting.  Translating docs gleaned from the web to my configuration was a bit tough at the beginning because we have a highly redundant fabric.  That meaning we have 2 HBAs in each host each with 2 fiber paths.  What this means is that when I get luns to show up I see them 4 times for each lun.  Apparently most people that write about their SAN experiences do it with a single path to their storage device through the fabric.   I also went through the rigamarole of removing a lun from a host (again without rebooting).  All in all it was pretty clean, a series of echo&#8217;s to the /sys subsystem, not nearly as ugly as adding and removing actual scsi devices.  It was also completely non-disruptive to other luns and overall performance.</p>
<p>There&#8217;s been quite a bit of debate among the other SAs at work about how we should handle luns at the host level.  Originally the thought was to add LVM on top of the LUN (which with multipath is kinda a bear) then create the filesystem on top of LVM.  The thought was originally that this would enable us to grow and shrink as needed and give us a similiar flexibility to the NFS volumes we are so used to dealing with.  Turns out shrinking is still iffy.  I&#8217;ve tried it twice now and had catestrophic failures both times.  The filer seems to handle it fine, but the host just flat out fails to see it as a valid filesystem once the lun gets smaller.</p>
<p>With multipath configured correctly what we see with an fdisk -l is 5 new &#8216;disks&#8217;.  sdX &#8211; sd{X+4} and dm-X.  So depending on how many existing scsi devices (including other luns) we have sde,f,g,h and dm-0 (assuing a, b, c already existing and no other san luns).  What&#8217;s a little confusing is that each of these devices is the same disk, you don&#8217;t want to use the sdX devices for anything (unless it&#8217;s a onetime operation) in case you lose a path.  So you do everything to the dm-X device created by multipath.  The other confusing thing is that while these are &#8216;disks&#8217; they also are not.  You can create partitions on them but you don&#8217;t really need to, so it kinda confuses your brain in what you are used to dealing with.</p>
<p>So the original plan with LVM was to create a partition consisting of the entire disk, add it as a PV, create a volume group, then a LV on the volume group of the whole size.  It struck several of us that this really was overkill.  Where LVM shines is when you have lots of descrete storage objects and you want to group them all together.  Logically this &#8216;thing&#8217; is a single lun where all the physical abstraction is already done (with about 4 levels of abstraction in the case of NetApp).  The other alternative, which I ended up doing for this particular implementation, was to just create a filesystem right on dm-0.  I didn&#8217;t create a partition, didn&#8217;t do LVM, just mkfs.ext3 /dev/dm-0.  Worked like a charm, no wasted space, very simple.</p>
<p>There is a gotcha though.  Multipath has the annoying habit of renaming the multi-disk device (dm-X) when the host reboots and it encounters additional luns.  So if you add a lun to a machine that already has one then reboot it&#8217;s possible, nigh on likely, that they will swap dm-1 and dm-0 to the opposite of what you expect.  This is pretty annoying from a mounting standpoint.  This is one potential winning point for LVM, since the LVM data is written to the disk itself you can have a consistent name which to use in fstab etc.  But all that overhead just for a consistent name?  Am I really getting anything else out of LVM in this scenerio?</p>
<p>Enter ext2/3 labels.  Most SAs I know don&#8217;t like labels because if you do things like label a disk &#8216;/&#8217; and try to put it in another machine for recover purposes, you probably won&#8217;t get the disk you expect (it&#8217;ll depend on bus order).  However labels give us a way to consistently name a dm device regardless of what multipath wants to call it.  This also lets me give meaningful symbolic names to SAN disks that may move hosts (oracle volumes is their current use, so there are 2, 1 for primary and 1 for standby).  So I use e2label /dev/dm-0 FOO to label my san disk.  Then in fstab I use LABEL=FOO. An interesting side effect is that df output shows the uuid of the disk rather than it&#8217;s multipath name, but other than that it seems to work.</p>
<p>Next I need so spend a bunch of time with a non-critical volume and figure out all the ins and outs of growing and (maybe) shrinking the fileystem.  All of the above work was done on a RHEL5 system (64bit), my feeling is that all bets are off when it comes to RHEL4 and LVM might be a very real hard requirement.  I also wonder if multipath is the right way to go.  Would it be possible to use LVM to create a fault tolerant storage device?</p>
<br />Posted in Sysadminery Tagged: linux, netapp, redhat, rhel5, san, sysadmin <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onastick.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onastick.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onastick.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onastick.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onastick.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onastick.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onastick.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onastick.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onastick.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onastick.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onastick.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onastick.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onastick.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onastick.wordpress.com/171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onastick.wordpress.com&amp;blog=19419720&amp;post=171&amp;subd=onastick&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onastick.wordpress.com/2008/12/23/fighting-with-san/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/10dcfb54c464136b8be684b80ddd3515?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">stickm13</media:title>
		</media:content>
	</item>
	</channel>
</rss>
