<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://www.markround.com/feeds/atom.xml" rel="self" title="Mark's blog" type="application/atom+xml" />
    <link href="http://www.markround.com/"                        rel="alternate"    title="Mark's blog" type="text/html" />
    <link href="http://www.markround.com/rss.php?version=2.0"     rel="alternate"    title="Mark's blog" type="application/rss+xml" />
    <title type="html">Mark's blog</title>
    <subtitle type="html">Solaris, Linux, BSD and other techie things...</subtitle>
    <icon>http://www.markround.com/templates/default/img/s9y_banner_small.png</icon>
    <id>http://www.markround.com/</id>
    <updated>2010-08-17T13:52:55Z</updated>
    <generator uri="http://www.s9y.org/" version="1.5.1">Serendipity 1.5.1 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://www.markround.com/archives/61-Xenserver-snapshot-and-template-based-backup-script.html" rel="alternate" title="Xenserver snapshot and template based backup script" />
        <author>
            <name>Mark Round</name>
                    </author>
    
        <published>2010-08-17T13:24:14Z</published>
        <updated>2010-08-17T13:52:55Z</updated>
        <wfw:comment>http://www.markround.com/wfwcomment.php?cid=61</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.markround.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=61</wfw:commentRss>
    
            <category scheme="http://www.markround.com/categories/3-Sysadmin" label="Sysadmin" term="Sysadmin" />
    
        <id>http://www.markround.com/archives/61-guid.html</id>
        <title type="html">Xenserver snapshot and template based backup script</title>
        <content type="xhtml" xml:base="http://www.markround.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                We have recently started using <a title="Citrix Xenserver" href="http://www.citrix.com/English/ps2/products/product.asp?contentID=683148">Citrix Xenserver</a> in production at work (fantastic product, I must do a write-up soon!) and needed a simple backup solution. Our VMs run from an iSCSI SAN and are backed up daily through various methods - e.g. <a title="Bacula backup system" href="http://www.bacula.org/en/">Bacula</a> for the Unix/Linux systems. However, we wanted the ability to quickly roll back to a previous VM snapshot, and get up and running quickly if our SAN failed for whatever reason. Our solution was to create a large shared NFS storage repository, and periodically snapshot VMs and copy the templates over to this SR. Doing this means that if the SAN fails, we can create a new VM quickly from this NFS store (using the Xenserver's local disks, or even the NFS SR itself as storage). Once up and running, we can bring VMs back up to date by restoring the latest backup to them. <br /><br />In order to automate this, I wrote a quick script which I thought may prove useful to someone else, so decided to post it here : <a title="Xenserver snapshot and template backup script" href="http://www.markround.com/static/snapback.sh">snapback.sh</a>.<br /><br />It is very simple, and although it may serve well as your only backup solution, it's really intended as an image-level compliment to your primary file-system based backup system such as Bacula, Amanda, Netbackup etc. It also has not had much testing, and I fully appreciate the scripting is pretty rudimentary and could do with some optimisation - there's no error checking, for instance. I kept it pretty verbose on purpose though, so you can get a good idea of exactly what it's doing at each step; it may be better to think of this as a template you can base your own scripts off!<br /> 
<h2>Overview</h2>The script creates a snapshot of a running VM on a configurable schedule, and then creates a template from this snapshot. It will copy all these backup templates over to a configurable storage repository, and then clean up any old backups according to a specified retention policy. These backups are full backups, so if you have a 10GB VM and keep 7 previous copies you will need a total of 80GB disk space on your backup VM. Non-running VMs, and those not configured (as detailed below) will be skipped.<br /> 
<h2>Installation and usage</h2>First, copy the script to your Xenserver pool master, and make it executable. A good location for this is /usr/local/bin/snapback.sh.<br /><br />Next, create a cron entry for the script - to make it run daily just after 1AM, you'd create /etc/cron.d/backup with the following contents :<br /> 
<pre>2 1 * * * root /usr/local/bin/snapback.sh &gt; /var/log/snapback.log 2&gt;&amp;1</pre> 
<p>This will also record a log of it's actions to /var/log/snapback.log. You now need to edit the script and change the <strong>DEST_SR</strong> variable to the UUID of your backup storage repository. You can find this value by clicking on the SR in Xencenter; the UUID will be displayed as a value like &quot;2c01dc26-f525-70d6-dedf-00baaec76645&quot;.<br /><br />Lastly, you need to configure your backup and retention policy for your VMs. In Xencenter, right click your VM, and select &quot;Properties&quot;. Click on &quot;Custom Fields&quot;, and then &quot;Edit Custom Fields&quot;. You should add two text fields :<br /></p> 
<ul> 
<li><strong>backup</strong> : Can be one of &quot;daily&quot;, &quot;weekly&quot;, or &quot;monthly&quot;. If it is set to weekly, it will be default run on a Sunday, and if it set to monthly, it will run on the first Sunday of the month. This day can be changed at the top of the script - see the <strong>WEEKLY_ON</strong> and <strong>MONTHLY_ON</strong> variables.</li> 
<li><strong>retain</strong> : How many previous backups (in addition to the currently running backup) to keep. So, setting this to a value of &quot;2&quot; would mean that after a backup has run, you would end up with 3 backups in total.</li> 
</ul> 
<p> </p> 
<div style="width: 321px;" class="serendipity_imageComment_center"> 
<div class="serendipity_imageComment_img"><!-- s9ymdb:76 --><img width="321" height="289" alt="Adding a custom field" title="Adding a custom field" src="http://www.markround.com/uploads/uploads/newfield.png" class="serendipity_image_center" /></div> 
<div class="serendipity_imageComment_txt">Adding a custom field</div> 
</div> 
<p>The script will look for these fields when it is run, and will skip any VM that doesn't have them set. You can also see them in the Xencenter summary and properties for the VM :  </p> 
<p> </p> 
<div style="width: 220px;" class="serendipity_imageComment_center"> 
<div class="serendipity_imageComment_img"><a href="http://www.markround.com/uploads/uploads/summary.png" title="VM summary showing the custom fields" class="serendipity_image_link"><!-- s9ymdb:78 --><img width="220" height="105" alt="VM summary showing the custom fields" title="VM summary showing the custom fields" src="http://www.markround.com/uploads/uploads/summary.serendipityThumb.png" class="serendipity_image_center" /></a></div> 
<div class="serendipity_imageComment_txt">VM summary showing the custom fields</div> 
</div> 
<p> </p> 
<p> </p> 
<p>You can now either run the script manually, or wait until the cron job kicks off. It will produce a detailed log to the console (or log file if run through cron), and when it's finished, you'll see your template backup VMs listed in Xencenter, similar to this :</p> 
<p> </p> 
<div style="width: 187px;" class="serendipity_imageComment_center"> 
<div class="serendipity_imageComment_img"><!-- s9ymdb:77 --><img width="187" height="37" alt="Backups listed in Xencenter" title="Backups listed in Xencenter" src="http://www.markround.com/uploads/uploads/backups.png" class="serendipity_image_center" /></div> 
<div class="serendipity_imageComment_txt">Backups listed in Xencenter</div> 
</div><br />If you find that this clutters up the Xencenter view a little, you can always hide them (View-&gt;Server View-&gt;Custom Templates). To restore a VM from a backup, just right click, and choose &quot;New template from backup&quot;. Anyway, I hope this helps someone else!<br /><br /> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.markround.com/archives/48-Linux,-Solaris-and-FreeBSD-iostat-monitoring-with-Cacti.html" rel="alternate" title="Linux, Solaris and FreeBSD iostat monitoring with Cacti" />
        <author>
            <name>Mark Round</name>
                    </author>
    
        <published>2008-10-15T10:02:31Z</published>
        <updated>2010-08-17T09:46:49Z</updated>
        <wfw:comment>http://www.markround.com/wfwcomment.php?cid=48</wfw:comment>
    
        <slash:comments>59</slash:comments>
        <wfw:commentRss>http://www.markround.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=48</wfw:commentRss>
    
            <category scheme="http://www.markround.com/categories/3-Sysadmin" label="Sysadmin" term="Sysadmin" />
    
        <id>http://www.markround.com/archives/48-guid.html</id>
        <title type="html">Linux, Solaris and FreeBSD iostat monitoring with Cacti</title>
        <content type="xhtml" xml:base="http://www.markround.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I've been looking for ages for a tool to parse the output from &quot;iostat&quot; on Linux, and graph it in <a href="http://www.cacti.net" title="Cacti monitoring tool">Cacti</a>. I found a few scripts and templates that did some of what I was looking for (disk I/O etc.), but nothing that gave me the full set of statistics such as queue length, utilisation, service time etc. I finally got round to writing my own set of templates and a data gathering script to provide this information, and it seems to work very well. So that others can benefit, I've posted the package archive and a brief description over on the <a href="http://forums.cacti.net/viewtopic.php?t=29426" title="iostat cacti templates">Cacti forums</a> (click <a href="http://www.markround.com/archives/48-Linux-iostat-monitoring-with-Cacti.html#extended">Continue Reading</a> for a download link to an updated version - the one on the Cacti forums has a bug so that it won't work with all versions of sysstat). Below are a couple of sample graphs to give you an idea of what it can do - there's also a few more samples posted in the Cacti forums thread :<!-- s9ymdb:49 --></p> 
<div class="serendipity_imageComment_center" style="width: 595px;"> 
<div class="serendipity_imageComment_img"><!-- s9ymdb:49 --><img width="595" height="245" src="http://www.markround.com/uploads/bytes_sec.png" class="serendipity_image_center" /></div> 
<div class="serendipity_imageComment_txt">Displaying iostat's kB/s data source.</div> 
</div> 
<div class="serendipity_imageComment_center" style="width: 595px;"> 
<div class="serendipity_imageComment_img"><!-- s9ymdb:50 --><img width="595" height="233" src="http://www.markround.com/uploads/times.png" class="serendipity_image_center" /></div> 
<div class="serendipity_imageComment_txt">Timing information from iostat (average wait and service time)</div> 
</div> 
<p> </p> 
<p>Installation is a simple matter of creating a cron job to gather iostat data, extending your snmpd.conf to call the included iostat.pl script, and then importing the templates. Full instructions are included in the README within the archive (click the <a href="http://www.markround.com/archives/48-Linux-iostat-monitoring-with-Cacti.html#extended" title="Linux iostat monitoring with Cacti - README">Continue Reading</a> link to see them), but if you have any comments, suggestions or problems please let me know! </p> 
<p> </p> 
<p> </p> <br /><a href="http://www.markround.com/archives/48-Linux,-Solaris-and-FreeBSD-iostat-monitoring-with-Cacti.html#extended">Continue reading "Linux, Solaris and FreeBSD iostat monitoring with Cacti"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.markround.com/archives/60-The-setting-sun.html" rel="alternate" title="The setting sun" />
        <author>
            <name>Mark Round</name>
                    </author>
    
        <published>2010-07-16T07:54:58Z</published>
        <updated>2010-08-17T09:33:01Z</updated>
        <wfw:comment>http://www.markround.com/wfwcomment.php?cid=60</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.markround.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=60</wfw:commentRss>
    
            <category scheme="http://www.markround.com/categories/3-Sysadmin" label="Sysadmin" term="Sysadmin" />
    
        <id>http://www.markround.com/archives/60-guid.html</id>
        <title type="html">The setting sun</title>
        <content type="xhtml" xml:base="http://www.markround.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
Well, that's that, then. Solaris as we knew it is pretty much dead. I've suspected for a while now that Oracle's intentions regarding Solaris were not what the community, or us &quot;old-school&quot; Solaris sysadmins wanted or had hoped for.  </p> 
<p>In the last few months, Oracle have completely alienated and 
scared off the community around OpenSolaris, killed any lines of 
communication by clamping down on employee blogs and have ignored open 
letters from highly influential and important community members begging 
for <em>any</em> kind of information. Theyve forbidden Sun/Oracle employees 
from heading up the Solaris user groups and booted the meetings out of 
their buildings; turned Solaris 10 into a 90-day trial, and pushed back 
the 2010.x release of OpenSolaris with no word as to its planned 
release date, or even if it is being continued as a product. And now, in a final act of desperation, the OGB has essentially threatened to &quot;<a href="http://ptribble.blogspot.com/2010/07/moving-opensolaris-forward.html">shoot itself in the head</a>&quot;. </p> 
<div class="commentBody"> 
<div id="comment_body_32901998"> 
<p>Even ignoring the OpenSolaris project, It's not at all rosy in &quot;real&quot; Solaris land, either. Requests for information and clarification are going unanswered, and I know 
of several managers who have had hardware quotes and support tickets 
ignored - there's a near total blackout of information from Oracle. People are fleeing Solaris in droves, and migrating to anything they can: Linux, FreeBSD (Dtrace and ZFS), AIX - hell, even HP-UX looks like a safer bet at the moment. And I never thought I'd find myself saying that!<br /></p> 
<p>It certainly appears that Oracle
 are doing a superb job of killing Solaris. But why would they do this, having paid all that money for Sun and announcing that they will increase
 spending on Solaris development ?&#160; <br /></p> 
<p>Well,  <a href="http://developers.slashdot.org/comments.pl?sid=1719254&amp;cid=32903400" title="Oracle engineer confirms plans for Solaris">this
 post</a> on Slashdot (allegedly from a Sun/Oracle employee) confirms my
 suspicions as to why they may be doing this. Oracle just really doesn't care about Solaris as a general 
purpose data centre OS any more. There's just no money in it, and although I 
personally find it tragic it does make sense. It's probably also why they're killing all 
their OEM deals - why help a competitor sell hardware, when all you'll see from it is a possible support contract for the OS ? Oracle's overall aim is to have 
Solaris relegated to the role of running as the bottom layer in an 
Oracle &quot;database machine&quot;, Java appserver bundle or inside a &quot;<a href="http://blogs.sun.com/bmc/entry/fishworks_now_it_can_be">Fishworks</a>&quot; storage appliance.</p> 
<p>It excels at 
these tasks, and it would obviously fit into Oracle's stated goal of 
being a one stop shop, where if you want to run Oracle, they'll sell you
 the bundle - hardware, storage, OS and software. If they no longer want Solaris to be a dominant general purpose OS, then their approach 
makes sense. They don't need a &quot;community&quot; around the product, they 
don't need open source developers porting applications to it, and they 
certainly don't need the overhead of running and managing a community 
portal any more. Unless you are running (and paying for) Oracle applications on Solaris, you're probably more of an annoyance to them at the moment and I get the very strong idea that they'd rather you just quietly went elsewhere. </p> 
<p>I just wish that if this was their plan, they'd make some sort of statement about it; rather than ignoring the Solaris community in the hopes that they'll eventually get frustrated and leave without Oracle having to spell it out for them. I think the way they are going about it 
reprehensible and it's a tragic end for such a historic and innovative 
OS. Sadly though, Larry is all about the bottom line and the old, altruistic Sun approach 
just wasn't bringing in the big bucks. As the Slashdot poster said : &quot;Profit is king here.  Anything else is overhead, and overhead eats into 
Larry's yacht fund.&quot;</p>
<p><strong>Edit:</strong> Now it's official : <a href="http://www.theregister.co.uk/2010/08/13/opensolaris_is_dead/" title="OpenSolaris is dead">http://www.theregister.co.uk/2010/08/13/opensolaris_is_dead/ </a><br /></p> 
</div> 
</div> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.markround.com/archives/59-Leaving-the-iPhone-for-the-Palm-Pre.html" rel="alternate" title="Leaving the iPhone for the Palm Pre" />
        <author>
            <name>Mark Round</name>
                    </author>
    
        <published>2010-03-12T09:59:44Z</published>
        <updated>2010-03-12T10:18:01Z</updated>
        <wfw:comment>http://www.markround.com/wfwcomment.php?cid=59</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.markround.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=59</wfw:commentRss>
    
    
        <id>http://www.markround.com/archives/59-guid.html</id>
        <title type="html">Leaving the iPhone for the Palm Pre</title>
        <content type="xhtml" xml:base="http://www.markround.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <!-- s9ymdb:75 --><img width="130" height="220" class="serendipity_image_left" src="http://www.markround.com/uploads/pre.serendipityThumb.png" />While I've been a long-time Apple user and fan of their hardware, I have to say that I've become a little disillusioned of late. Mostly, this has been down to the iPhone: While it's undeniably been a game-changer and raised everyone's expectations of what a mobile phone could do, there's just been an uncomfortable, claustrophobic feel around the whole thing. From the start, there were <a href="http://arstechnica.com/apple/news/2008/07/iphone-nda-doing-more-harm-than-good.ars" title="iPhone NDAs">ridiculous NDAs</a> preventing developers from even discussing programming the device; an insane culture of overbearing <a href="http://www.cracked.com/article_18377_5-reasons-you-should-be-scared-apple.html">secrecy</a> and <a href="http://www.cracked.com/article_18377_5-reasons-you-should-be-scared-apple_p2.html">control</a>; not to mention Apple <a href="http://arstechnica.com/apple/news/2009/11/respected-developers-fleeing-from-app-store-platform.ars">pulling applications</a> from the app store or rejecting them <a href="http://techcrunch.com/2009/04/20/apple-rejects-another-app-for-using-an-icon-that-looks-like-an-iphone/">seemingly on a whim</a>, censoring content and being generally <a href="http://carpeaqua.com/2009/07/28/where-do-i-sign-up/">hacker-unfriendly</a>.<br /><br />The final straw however was the news that they are <a href="http://daringfireball.net/2010/03/this_apple_htc_patent_thing">suing HTC</a> over patent violation. Software patents are a <a href="http://www.nosoftwarepatents.com/en/m/intro/index.html">terrible thing</a> for this industry, and it appears that instead of competing on their own merits, Apple has chosen to resort to being a patent troll - unsurprising perhaps, given their <a href="http://jonathanischwartz.wordpress.com/2010/03/09/good-artists-copy-great-artists-steal/">past behaviour</a>. <br /><br />All this neatly coincided with my contract with O2 coming up for renewal, so I could get a new phone. I'd done some research and had narrowed down my iPhone alternatives to just 2 options - Palm Pre, or some Android-powered device. Android would have required me to leave O2, so that really just left the Palm Pre (and Windows Mobile or a Blackberry were right out). All the reviews I'd read were pretty good for the Pre but I wanted to try WebOS out first. Fortunately, this was easy as the <a href="http://developer.palm.com/index.php?option=com_content&amp;view=article&amp;layout=page&amp;id=1788">Palm SDK</a> includes an emulator. This got me hooked - not only is the emulator based on VirtualBox (which is massively cool), but all the tools such as &quot;WebOS Doctor&quot; are available for Windows, MacOS AND Linux. I even installed it with no problems on the latest Ubuntu Lucid Alpha.<br /><br />Playing with WebOS blew me away.&#160; I won't go into too much detail, as all the review sites have <a href="http://www.precentral.net/palm-pre-review">covered the WebOS experience</a> in far greater depth. I should point out though that since most of the reviews were written, there have been numerous software updates which have brought a great deal of <a href="http://kb.palm.com/wps/portal/kb/na/pre/p100eww/sprint/solutions/article/50607_en.html#1401">new features and improvements</a> - the last 1.4 update for instance added <a href="http://blog.palm.com/palm/2010/02/whats-new-in-palm-webos-14.html">video recording</a> support!&#160; I will however simply say this : It actually makes the iPhone feel clunky in comparison. The multitasking card system combined with the finger gestures is amazingly fluid and intuitive. Little touches throughout such as the notification system, &quot;synergy&quot; contacts system and email handling put this streets ahead of the iPhone.<br /><br />I was also pleased to see that there is a thriving &quot;homebrew&quot; <a href="http://preware.org/#/index/">community</a> producing some awesome applications, games and patches to modify the behaviour of the Pre. Case in point - by default, the calendar application doesn't open in month view by default, nor does it show all-day appointments in that view. A few quick patches later, and I had customised it to my liking. These patches cover a huge range of tweaks, even including an <a href="http://www.webos-internals.org/wiki/On_Screen_Keyboard">on-screen keyboard</a>.<br /><br />The open Linux-based nature of this phone makes it a real hackers playground, yet despite all that geekiness it actually works brilliantly as a phone and communications device. I have all my contacts, Facebook friends, home IMAP mail, work Exchange mail (which works with EAS and remote wipe) and Google calendar syncing flawlessly. As an experiment, after the initial (short) learning curve, I swapped my SIM back out and into my old iPhone. I lasted a few hours before I'd gone back to the Pre in sheer frustration.<br /><br />Not everything is quite so rosy, though. I have to say that the hardware build quality is a bit of a let-down. While it feels amazing in your hand (there's something about the form factor, dimensions and curves that make it feel comfortable) it does feel a bit.... flimsy. Replacing the back with the awesome <a href="http://www.palminfocenter.com/news/9819/palm-touchstone-kit-review/">Touchstone kit</a> helps a great deal, as does adding a case and screen protector. <br /><br />There's also the continued doom-and-gloom from the Tech pundits casting a cloud over Palm's future; but with news of a full App Market <a href="http://www.palm.com/uk/en/emails/pre/ea/user/index.html">coming at the end of this month</a> to UK users; an <a href="http://www.precentral.net/facebook-webos-updated-video-and-gallery">updated Facebook application</a>; the <a href="http://www.precentral.net/palm-releases-webos-pdk-beta">PDK</a> and <a href="http://www.precentral.net/adobe-declares-only-armv7-android-devices-getting-flash-101-pre-good-pixi-not-so-much">Flash</a> coming; and even <a href="http://www.precentral.net/qt-app-platform-and-running-palm-pre">QT</a> being ported I'd say things are looking up.<br /><br />Bye bye, Apple... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.markround.com/archives/58-Centreon-review.html" rel="alternate" title="Centreon review" />
        <author>
            <name>Mark Round</name>
                    </author>
    
        <published>2010-02-05T14:59:13Z</published>
        <updated>2010-03-10T15:56:54Z</updated>
        <wfw:comment>http://www.markround.com/wfwcomment.php?cid=58</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://www.markround.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=58</wfw:commentRss>
    
            <category scheme="http://www.markround.com/categories/3-Sysadmin" label="Sysadmin" term="Sysadmin" />
    
        <id>http://www.markround.com/archives/58-guid.html</id>
        <title type="html">Centreon review</title>
        <content type="xhtml" xml:base="http://www.markround.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                One of my favourite interview questions I used to ask candidates was a variation of &quot;Desert Island Discs&quot; : Imagine you are going off to be a sysadmin on a desert island, with no internet access, and further imagine that the previous sysadmin was a total fascist with a minimalist install policy. We're talking a bare-bones &quot;classic&quot; Solaris installation, or a minimal Debian system here. You've got SSH installed, but not much else. Before you hop on the boat, however, you are given a couple of hours high-speed internet access and a USB stick. You can take up to 5 tools with you to this desert island: What do you pick ?<br /><br />It was always an interesting question to ask, because it gave you an insight into the kind of sysadmin tasks someone had been doing before, and it also served as a nice, relaxed &quot;ice breaker&quot; type question. For my money, aside from some tools like rsync and screen which I couldn't live without, a decent monitoring package would have to be top of my priorities. There are a bunch out there: some of them free; some of them commercial, but the one that would make it on to my USB stick would have to be <a title="Nagios homepage" href="http://www.nagios.org/">Nagios</a>. <br /><br />It's open source, extremely well documented and widely implemented, and there are a ton of useful add-ons and plugins available for it. The only draw backs I can find with it are it's ugly web interface, the complexity involved in setting up a new system for monitoring, and the disjoint between availability and performance monitoring. If you have money to throw at a problem, then software like <a href="http://www.uptimesoftware.com/">Uptime</a> or <a href="http://www.hyperic.com/">Hyperic</a> neatly deal with all of these issues, but they can be quite pricey if you have a large number of systems to manage and a tight budget.<br /><br />So, you can imagine my excitement when I first discovered <a href="http://www.centreon.com/">Centreon</a>. It's essentially a monitoring platform that uses Nagios at it's core. You could think of it as a fancy frontend to &quot;stock&quot; Nagios, but it's so much more than that: besides the attractive interface, it also bridges the gap between availability and performance monitoring, and makes Nagios administration a snap. Due to the reliance on Nagios though, I'd go so far as to say that before you experiment with Centreon, you really should have set up &quot;stock&quot; Nagios, and be familiar with the plugin architecture, <a title="NRPE documentation" href="http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf">NRPE</a> and how alerts / escalations are managed. Ideally, you should have a stock Nagios installation you can use to duplicate on Centreon/Nagios.<br /><br /><br /> <br /><a href="http://www.markround.com/archives/58-Centreon-review.html#extended">Continue reading "Centreon review"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.markround.com/archives/18-Rude-installers.html" rel="alternate" title="Rude installers" />
        <author>
            <name>Mark Round</name>
                    </author>
    
        <published>2006-02-15T13:12:53Z</published>
        <updated>2010-01-22T11:29:23Z</updated>
        <wfw:comment>http://www.markround.com/wfwcomment.php?cid=18</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://www.markround.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=18</wfw:commentRss>
    
            <category scheme="http://www.markround.com/categories/3-Sysadmin" label="Sysadmin" term="Sysadmin" />
    
        <id>http://www.markround.com/archives/18-guid.html</id>
        <title type="html">Rude installers</title>
        <content type="xhtml" xml:base="http://www.markround.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
Warning: Rant ahead.

I spent the best part of yesterday fighting to get a commercial bugtracking solution installed. It will remain nameless for now - although if you know the market, it shouldn't be too hard to guess which one it is. The installation routine in question is without doubt one of the rudest I've ever encountered, stopping just short of the current number one spot held by Cisco's VPN install on Mac OS X, due to the latters' spectacular star turn of defecating all over your /opt directory.

</p> 
<p>Firstly, it's a PHP product (although it actually started life as an ASP product on Windows - a quick peek at the source code reveals it has been run through an asp-to-php converter in order to provide a rough-n-ready Unix solution. Ugh!). It blows away your current PEAR install, and then tries to download four additional packages. Strike one - I don't particularly take too kindly to software changing parts of my filesystem without a warning, particularly when it could just ask you to upgrade yourself. 

It also doesn't take into account any webservers which may not have a direct path to the outside world - if you're locking things down, blocking processes from initiating outbound connections to the internet is a very good way of foiling many script-kiddy attacks. </p> 
<p>After I allowed it to talk to the outside world, it mysteriously failed halfway through and didn't manage to download those additional modules. 

I then tried to download those modules manually and install them myself, only to run into another little present the installer had left for me - as a nice treat, it also renames your &quot;pear&quot; command to &quot;pear_old&quot; before it quits, which quite obviously leads to various things breaking all over the shop.  Strike two - hey guys, if your installer is going to crap all over my system, it better clean up after itself and leave things in the state it found them. I have no idea why it chose to do this, but after I renamed the command back things seemed to work fine. 

</p> 
<p>At least, until I go to the next part of the install. It wants some truly brain-damaged settings configured in php.ini and my.cnf.  50Mb post_max_size ? 600 seconds max_input_time ? Sure, no problem! What's the big deal with DoS attacks, anyway ? Suspiciously, it also wants MySQL to accept maximum packets of 50Mb. Again, this makes me feel uneasy, not just because there is no way on Earth it should normally be set that high; I've got the impression that the software  is going to store file attachments in a database, which just makes me start foaming at the mouth just thinking about it. 

So, any thoughts I had about running this on a shared server went right out the window. Strike three - I'm going to have to try and isolate it's bad design decisions as much as possible from the rest of the applications on the server - including bunging it, a separate PHP install and MySQL server into it's own little ghetto.
</p> 
<p>
But then fun doesn't stop there! It also includes a shared library extension that must be loaded into PHP. One problem - it's been linked against libraries that aren't even part of the stock Solaris install. Yup :

</p> 
<blockquote>
warning: ldd: stupid_library.so : is not executable
<br />        libstdc++.so.2.10.0 =&gt;   (file not found)
        <br />libm.so.1 =&gt;     /usr/lib/libm.so.1
        <br />libc.so.1 =&gt;     /usr/lib/libc.so.1
        <br />libdl.so.1 =&gt;    /usr/lib/libdl.so.1
        <br />/usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1
</blockquote> 
<p>

Oh, JOY. After hunting this down, it seems as if it was linked against libstdc++ library in the SFWgcmn package, which is part of the <strong>optional</strong> freeware CD for Solaris. I downloaded this, installed it and tried again. No joy. The stupid, brain-dead library hadn't been compiled properly with <a href="http://docs.sun.com/app/docs/doc/817-1984/6mhm7pl1o?a=view">correct -L and -R flags passed to the linker</a> - it had no idea how to find this library. I've run out of strikes now - by this point, I'd reached the descision that this installer needed to be dragged out round the back of the barn and shot in the head. 

</p> 
<p>I then had to implement a LD_LIBRARY_PATH wrapper around my whole Apache process, and anything else that needed to run with this extension. This is is <a href="http://www.visi.com/%7Ebarr/ldpath.html">A Bad Idea(tm)</a>, but the alternative of dinking with <a href="http://docs.sun.com/app/docs/doc/816-5165/6mbb0m9dp?a=view">CRLE</a>, and thereby polluting the rest of my system with /opt/sfw/lib seemed far worse.

So after all that, was it worth it ? Well, it's a little difficult to say, given how dog-slow the product is. This is on a server that is running around 90-97% idle for most of the time, but for some reason pages take a good 4-5 seconds to load in a web browser. When they say you need a PHP opcode cache, they aren't joking. This also isn't without it's problems, as the available PHP opcode caches out there are either seemingly abandoned, forks that are starting over from scratch,  commercial and wildly expensive, or just crash a lot on Solaris. Actually, pretty much all of them do that last one - but that's a rant for another day. Installing <a href="http://pecl.php.net/package/APC">APC</a> helps a lot, but is still a little unstable.

Time will tell if this has been worth all the pain, but first impressions and all that...</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.markround.com/archives/57-Cacti-iostat-scripts-now-support-FreeBSD.html" rel="alternate" title="Cacti iostat scripts now support FreeBSD" />
        <author>
            <name>Mark Round</name>
                    </author>
    
        <published>2009-11-18T18:57:36Z</published>
        <updated>2009-11-18T19:04:56Z</updated>
        <wfw:comment>http://www.markround.com/wfwcomment.php?cid=57</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.markround.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=57</wfw:commentRss>
    
            <category scheme="http://www.markround.com/categories/3-Sysadmin" label="Sysadmin" term="Sysadmin" />
    
        <id>http://www.markround.com/archives/57-guid.html</id>
        <title type="html">Cacti iostat scripts now support FreeBSD</title>
        <content type="xhtml" xml:base="http://www.markround.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Thanks to the awesome work of Boogie Shafer, there is now a FreeBSD port of my <a title="Linux, FreeBSD and Solaris iostat scripts and templates for Cacti" href="http://www.markround.com/archives/48-Linux,-Solaris-and-FreeBSD-iostat-monitoring-with-Cacti.html">iostat scripts and templates for Cacti</a>. I have included the modified tarball that was sent to me, this is inside the archive as &quot;cacti-iostat-1.x-boogie_freebsd_linux_changes.tar.gz&quot;. </p> 
<p>FreeBSD users should unpack this archive and follow the instructions inside. I have not had time to go through and merge these changes into one unified distribution yet, but as people were asking for the FreeBSD port, here it is! The next release of these scripts should see the FreeBSD scripts and templates etc. merged in, much the same as the Solaris modifications by Marwan Shaher and Eric Schoeller.</p> 
<p>Follow the link to the <a title="Linux, Solaris and FreeBSD iostat templates for Cacti" href="http://www.markround.com/archives/48-Linux,-Solaris-and-FreeBSD-iostat-monitoring-with-Cacti.html">original post</a> to find the download link.<br /> </p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.markround.com/archives/56-Dell-MD3000i.html" rel="alternate" title="Dell MD3000i" />
        <author>
            <name>Mark Round</name>
                    </author>
    
        <published>2009-09-14T11:08:59Z</published>
        <updated>2009-10-22T09:07:22Z</updated>
        <wfw:comment>http://www.markround.com/wfwcomment.php?cid=56</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.markround.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=56</wfw:commentRss>
    
            <category scheme="http://www.markround.com/categories/3-Sysadmin" label="Sysadmin" term="Sysadmin" />
    
        <id>http://www.markround.com/archives/56-guid.html</id>
        <title type="html">Dell MD3000i</title>
        <content type="xhtml" xml:base="http://www.markround.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I've just got a new array to play with at work for a small Xen
virtualisation setup. It's the Dell MD3000i, which I've seen a few posts about before but though I'd chime in with my experiences. It is a budget array, but I have to say for
the price it's not a bad bit of kit.<br /> <br />
We've got it configured with dual controllers, 8x300Gb and 7x146GB 15k
SAS drives. Throughput is around GigE wire speed - 110MB/s for both
reads and writes. I'm also seeing a respectable IOPS figure depending
on workloads: During an iozone run, I could see it sustaining around
1.5k IOPS.<br /> <br />
True, the management features fall a little short when compared to the usual Sun and
HP storage kit I'm used to, but it does the job. My main gripes are :<br /> 
<ul> 
<li>No built in graphing (seriously, Dell - WTF?), but you can do it from the CLI - see <a title="MD3000i performance monitoring" href="http://www.delltechcenter.com/page/MD3000i+Performance+Monitoring">here</a>.<br /> </li> 
<li>Can't resize or change the I/O profile of a virtual disk once
it's setup. This is a real pain, so make sure you set things up correctly
the first time! You can however change the RAID level of a disk group
once it's been created.<br /> </li> 
<li>You need a Windows or RHEL box to run the administration GUI
on - I'm sure you can probably hack a way to get the CLI running under
Debian, but I haven't tried. You're probably straight out of luck if you want to run it
on anything else like Solaris.  </li> 
<li>Can't mix SAS and SATA in the same enclosure. The controllers
do support SATA as well as SAS, although SATA drives don't show up as
options in the Dell pricing configuration thingy. Our account manager
advised us that although technically you can mix SAS and SATA in the
same enclosure, they'd experienced a higher than average number of disk
failures in that configuration, due to the vibration patterns created
by disks spinning at different rates (15K SAS and 7.2K SATA). If you
need to mix the two types, your only real option is to attach a MD1000
array to the back (you can add up to two of these) and have each
chassis filled with just one type of drive.<br /> </li> 
</ul>  
The hardware failover works nicely - the array is active/passive for
each virtual disk, as both controllers are typically active, each
handling separate virtual disks for load-balancing purposes. When a
controller fails, the remaining &quot;good&quot; controller takes over the
virtual disks or disk groups from the failed controller. Failback is
pretty transparent - the GUI guides you through the steps, but I found
that simply inserting a replacement HD/Controller/etc. just did the job
automagically.<br /> <br />
Multipath support under RHEL/CentOS with multipath-tools (dm-multipath) works fine with some tweaking - it
uses the RDAC modules which lead to some oddness on CentOS 5.3. What
tends to happen is that the first time device mapper picks up the
paths, RDAC doesn't get a chance to initialise things properly
(scsi_dh_rdac module isn't loaded) so you end up with all sorts of SCSI
errors showing up in your logs. After flushing your paths (multipath
-F) and restarting multipathd, things are OK. This is <a href="https://bugzilla.redhat.com/show_bug.cgi?id=487293" title="MD3000i in RHEL 5.4">apparently fixed
in RHEL 5.4</a>, so should make it's way out to CentOS from there. I'm unsure what the status is on other distros, though.<br /> <br />
My multipath.conf contains the following :<br /> 
<div class="bbc-block code"> 
<pre>devices {
        device {
                vendor "DELL"
                product "MD3000i"
                product_blacklist "Universal Xport"
                path_grouping_policy group_by_prio
                getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
                path_checker rdac
                prio_callout "/sbin/mpath_prio_rdac /dev/%n"
                hardware_handler "1 rdac"
                failback immediate
        }
}
</pre> 
</div>And with everything working, multipath -ll shows :<br /> 
<div class="bbc-block code"> 
<pre>360026b90002ab6f40000056a4aa9e87b dm-12 DELL,MD3000i
[size=409G][features=0][hwhandler=1 rdac][rw]
_ round-robin 0 [prio=200][active]
 _ 21:0:0:1  sdi 8:128 [active][ready]
 _ 22:0:0:1  sdj 8:144 [active][ready]
_ round-robin 0 [prio=0][enabled]
 _ 20:0:0:1  sdg 8:96  [active][ghost]
 _ 23:0:0:1  sdh 8:112 [active][ghost] 
</pre> 
</div> 
<p><strong>Update:</strong> It looks like the admin tool and SMcli are just shell
script wrappers that run Java apps. I tried a quick'n'dirty hack of installing
everything under RHEL, tarring up /opt/dell and /var/opt/SM and then
transferring them over to a Debian Lenny host. All I had to change was
the #!/bin/sh to #!/bin/bash at the top of the SMcli and SMclient
wrappers, and they seem to work. I haven't put them through any serious
testing though...</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.markround.com/archives/55-Building-a-redundant-iSCSI-and-NFS-cluster-with-Debian-Part-5.html" rel="alternate" title="Building a redundant iSCSI and NFS cluster with Debian - Part 5" />
        <author>
            <name>Mark Round</name>
                    </author>
    
        <published>2009-06-24T10:47:56Z</published>
        <updated>2009-06-25T15:32:38Z</updated>
        <wfw:comment>http://www.markround.com/wfwcomment.php?cid=55</wfw:comment>
    
        <slash:comments>8</slash:comments>
        <wfw:commentRss>http://www.markround.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=55</wfw:commentRss>
    
            <category scheme="http://www.markround.com/categories/3-Sysadmin" label="Sysadmin" term="Sysadmin" />
    
        <id>http://www.markround.com/archives/55-guid.html</id>
        <title type="html">Building a redundant iSCSI and NFS cluster with Debian - Part 5</title>
        <content type="xhtml" xml:base="http://www.markround.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                This is part 5 of a series on building a redundant iSCSI and NFS SAN with Debian.<br /> 
<p>Part 1 - <a title="Overview, network layout and DRBD installation on Debian" href="http://www.markround.com/archives/44-Building-a-redundant-iSCSI-and-NFS-cluster-with-Debian-Part-1.html">Overview, network layout and DRBD installation</a><br />Part 2 - <a title="DRBD and LVM on a Debian cluster" href="http://www.markround.com/archives/45-Building-a-redundant-iSCSI-and-NFS-cluster-with-Debian-Part-2.html">DRBD and LVM</a><br />Part 3 - <a title="Heartbeat and automated failover" href="http://www.markround.com/archives/49-Building-a-redundant-iSCSI-and-NFS-cluster-with-Debian-Part-3.html">Heartbeat and automated failover</a><br />Part 4 - <a title="iSCSI and IP failover" href="http://www.markround.com/archives/50-Building-a-redundant-iSCSI-and-NFS-cluster-with-Debian-Part-4.html">iSCSI and IP failover</a><br />Part 5 - <a title="Multipathing and client configuration" href="http://www.markround.com/archives/55-Building-a-redundant-iSCSI-and-NFS-cluster-with-Debian-Part-5.html">Multipathing and client configuration</a><br />Part 6 - Anything left over!</p> 
<p>In this part of the series, we'll configure an iSCSI client (&quot;initiator&quot;), connect it to the storage servers and set up multipathing. Note : Since Debian Lenny has been released since this series of articles started, that's the version we'll use for the client.<br /><br />If you refer back to <a href="http://www.markround.com/archives/44-Building-a-redundant-iSCSI-and-NFS-cluster-with-Debian-Part-1.html">part one</a> to refresh your memory of the network layout, you can see that the storage client (&quot;badger&quot; in that diagram) should have 3 network interfaces :</p> 
<ul> 
<li>eth0 : 172.16.7.x for the management interface, this is what you'll use to SSH into it. </li> 
</ul> 
<p>And two storage interfaces. As the storage servers (&quot;targets&quot;) are using 192.168.x.1 and 2, I've given this client the following addresses :<br /></p> 
<ul> 
<li>eth1: 192.168.1.10 </li> 
<li>eth2: 192.168.2.10 </li> 
</ul> 
<p>Starting at .10 on each range keeps things clear - I've found it can help to have a policy of servers being in a range of, say, 1 to 10, and clients being above this. Before we continue, make sure that these interfaces are configured, and you can ping the storage server over both interfaces, e.g. try pinging 192.168.1.1 and 192.168.2.1.<br /><br />Assuming the underlying networking is configured and working, the first thing we need to do is install open-iscsi (which is the &quot;initiator&quot; - the iSCSI client). This is done by a simple :</p> 
<pre># aptitude install open-iscsi</pre> 
<p>You should see the package get installed, and the service started :<br /><br /></p> 
<pre>Setting up open-iscsi (2.0.870~rc3-0.4) ...
Starting iSCSI initiator service: iscsid.
Setting up iSCSI targets:
iscsiadm: No records found!</pre> 
<p>At this point, we have all we need to start setting up some connections.&#160; </p> <br /><a href="http://www.markround.com/archives/55-Building-a-redundant-iSCSI-and-NFS-cluster-with-Debian-Part-5.html#extended">Continue reading "Building a redundant iSCSI and NFS cluster with Debian - Part 5"</a>
            </div>
        </content>
        
    </entry>

</feed>