<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Mark's blog - Sysadmin</title>
    <link>http://www.markround.com/</link>
    <description>Solaris, Linux, BSD and other techie things...</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.1 - http://www.s9y.org/</generator>
    <pubDate>Mon, 06 Sep 2010 11:58:04 GMT</pubDate>

    <image>
        <url>http://www.markround.com/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Mark's blog - Sysadmin - Solaris, Linux, BSD and other techie things...</title>
        <link>http://www.markround.com/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Xenserver snapshot and template based backup script</title>
    <link>http://www.markround.com/archives/61-Xenserver-snapshot-and-template-based-backup-script.html</link>
            <category>Sysadmin</category>
    
    <comments>http://www.markround.com/archives/61-Xenserver-snapshot-and-template-based-backup-script.html#comments</comments>
    <wfw:comment>http://www.markround.com/wfwcomment.php?cid=61</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.markround.com/rss.php?version=2.0&amp;type=comments&amp;cid=61</wfw:commentRss>
    

    <author>nospam@example.com (Mark Round)</author>
    <content:encoded>
    We have recently started using &lt;a href=&quot;http://www.citrix.com/English/ps2/products/product.asp?contentID=683148&quot; title=&quot;Citrix Xenserver&quot;&gt;Citrix Xenserver&lt;/a&gt; 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. &lt;a href=&quot;http://www.bacula.org/en/&quot; title=&quot;Bacula backup system&quot;&gt;Bacula&lt;/a&gt; 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&#039;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. &lt;br /&gt;&lt;br /&gt;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 : &lt;a href=&quot;http://www.markround.com/static/snapback.sh&quot; title=&quot;Xenserver snapshot and template backup script&quot;&gt;snapback.sh&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It is very simple, and although it may serve well as your only backup solution, it&#039;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&#039;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&#039;s doing at each step; it may be better to think of this as a template you can base your own scripts off!&lt;br /&gt; 
&lt;h2&gt;Overview&lt;/h2&gt;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.&lt;br /&gt; 
&lt;h2&gt;Installation and usage&lt;/h2&gt;First, copy the script to your Xenserver pool master, and make it executable. A good location for this is /usr/local/bin/snapback.sh.&lt;br /&gt;&lt;br /&gt;Next, create a cron entry for the script - to make it run daily just after 1AM, you&#039;d create /etc/cron.d/backup with the following contents :&lt;br /&gt; 
&lt;pre&gt;2 1 * * * root /usr/local/bin/snapback.sh &amp;gt; /var/log/snapback.log 2&amp;gt;&amp;amp;1&lt;/pre&gt; 
&lt;p&gt;This will also record a log of it&#039;s actions to /var/log/snapback.log. You now need to edit the script and change the &lt;strong&gt;DEST_SR&lt;/strong&gt; 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 &amp;quot;2c01dc26-f525-70d6-dedf-00baaec76645&amp;quot;.&lt;br /&gt;&lt;br /&gt;Lastly, you need to configure your backup and retention policy for your VMs. In Xencenter, right click your VM, and select &amp;quot;Properties&amp;quot;. Click on &amp;quot;Custom Fields&amp;quot;, and then &amp;quot;Edit Custom Fields&amp;quot;. You should add two text fields :&lt;br /&gt;&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;&lt;strong&gt;backup&lt;/strong&gt; : Can be one of &amp;quot;daily&amp;quot;, &amp;quot;weekly&amp;quot;, or &amp;quot;monthly&amp;quot;. If it is set to weekly, it will by 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 &lt;strong&gt;WEEKLY_ON&lt;/strong&gt; and &lt;strong&gt;MONTHLY_ON&lt;/strong&gt; variables.&lt;/li&gt; 
&lt;li&gt;&lt;strong&gt;retain&lt;/strong&gt; : How many previous backups (in addition to the currently running backup) to keep. So, setting this to a value of &amp;quot;2&amp;quot; would mean that after a backup has run, you would end up with 3 backups in total.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt; &lt;/p&gt; 
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 321px;&quot;&gt; 
&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;!-- s9ymdb:76 --&gt;&lt;img width=&quot;321&quot; height=&quot;289&quot; class=&quot;serendipity_image_center&quot; src=&quot;http://www.markround.com/uploads/uploads/newfield.png&quot; title=&quot;Adding a custom field&quot; alt=&quot;Adding a custom field&quot; /&gt;&lt;/div&gt; 
&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Adding a custom field&lt;/div&gt; 
&lt;/div&gt; 
&lt;p&gt;The script will look for these fields when it is run, and will skip any VM that doesn&#039;t have them set. You can also see them in the Xencenter summary and properties for the VM :  &lt;/p&gt; 
&lt;p&gt; &lt;/p&gt; 
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 220px;&quot;&gt; 
&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&quot;serendipity_image_link&quot; title=&quot;VM summary showing the custom fields&quot; href=&quot;http://www.markround.com/uploads/uploads/summary.png&quot;&gt;&lt;!-- s9ymdb:78 --&gt;&lt;img width=&quot;220&quot; height=&quot;105&quot; class=&quot;serendipity_image_center&quot; src=&quot;http://www.markround.com/uploads/uploads/summary.serendipityThumb.png&quot; title=&quot;VM summary showing the custom fields&quot; alt=&quot;VM summary showing the custom fields&quot; /&gt;&lt;/a&gt;&lt;/div&gt; 
&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;VM summary showing the custom fields&lt;/div&gt; 
&lt;/div&gt; 
&lt;p&gt; &lt;/p&gt; 
&lt;p&gt; &lt;/p&gt; 
&lt;p&gt;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&#039;s finished, you&#039;ll see your template backup VMs listed in Xencenter, similar to this :&lt;/p&gt; 
&lt;p&gt; &lt;/p&gt; 
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 187px;&quot;&gt; 
&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;!-- s9ymdb:77 --&gt;&lt;img width=&quot;187&quot; height=&quot;37&quot; class=&quot;serendipity_image_center&quot; src=&quot;http://www.markround.com/uploads/uploads/backups.png&quot; title=&quot;Backups listed in Xencenter&quot; alt=&quot;Backups listed in Xencenter&quot; /&gt;&lt;/div&gt; 
&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Backups listed in Xencenter&lt;/div&gt; 
&lt;/div&gt;&lt;br /&gt;If you find that this clutters up the Xencenter view a little, you can always hide them (View-&amp;gt;Server View-&amp;gt;Custom Templates). To restore a VM from a backup, just right click, and choose &amp;quot;New template from backup&amp;quot;. Anyway, I hope this helps someone else!&lt;br /&gt;&lt;br /&gt; 
    </content:encoded>

    <pubDate>Tue, 17 Aug 2010 14:24:14 +0100</pubDate>
    <guid isPermaLink="false">http://www.markround.com/archives/61-guid.html</guid>
    
</item>
<item>
    <title>Linux, Solaris and FreeBSD iostat monitoring with Cacti</title>
    <link>http://www.markround.com/archives/48-Linux,-Solaris-and-FreeBSD-iostat-monitoring-with-Cacti.html</link>
            <category>Sysadmin</category>
    
    <comments>http://www.markround.com/archives/48-Linux,-Solaris-and-FreeBSD-iostat-monitoring-with-Cacti.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=48</wfw:commentRss>
    

    <author>nospam@example.com (Mark Round)</author>
    <content:encoded>
    &lt;p&gt;I&#039;ve been looking for ages for a tool to parse the output from &amp;quot;iostat&amp;quot; on Linux, and graph it in &lt;a href=&quot;http://www.cacti.net&quot; title=&quot;Cacti monitoring tool&quot;&gt;Cacti&lt;/a&gt;. 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&#039;ve posted the package archive and a brief description over on the &lt;a href=&quot;http://forums.cacti.net/viewtopic.php?t=29426&quot; title=&quot;iostat cacti templates&quot;&gt;Cacti forums&lt;/a&gt; (click &lt;a href=&quot;http://www.markround.com/archives/48-Linux-iostat-monitoring-with-Cacti.html#extended&quot;&gt;Continue Reading&lt;/a&gt; for a download link to an updated version - the one on the Cacti forums has a bug so that it won&#039;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&#039;s also a few more samples posted in the Cacti forums thread :&lt;!-- s9ymdb:49 --&gt;&lt;/p&gt; 
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 595px;&quot;&gt; 
&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;!-- s9ymdb:49 --&gt;&lt;img width=&quot;595&quot; height=&quot;245&quot; src=&quot;http://www.markround.com/uploads/bytes_sec.png&quot; class=&quot;serendipity_image_center&quot; /&gt;&lt;/div&gt; 
&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Displaying iostat&#039;s kB/s data source.&lt;/div&gt; 
&lt;/div&gt; 
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 595px;&quot;&gt; 
&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;!-- s9ymdb:50 --&gt;&lt;img width=&quot;595&quot; height=&quot;233&quot; src=&quot;http://www.markround.com/uploads/times.png&quot; class=&quot;serendipity_image_center&quot; /&gt;&lt;/div&gt; 
&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Timing information from iostat (average wait and service time)&lt;/div&gt; 
&lt;/div&gt; 
&lt;p&gt; &lt;/p&gt; 
&lt;p&gt;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 &lt;a href=&quot;http://www.markround.com/archives/48-Linux-iostat-monitoring-with-Cacti.html#extended&quot; title=&quot;Linux iostat monitoring with Cacti - README&quot;&gt;Continue Reading&lt;/a&gt; link to see them), but if you have any comments, suggestions or problems please let me know! &lt;/p&gt; 
&lt;p&gt; &lt;/p&gt; 
&lt;p&gt; &lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.markround.com/archives/48-Linux,-Solaris-and-FreeBSD-iostat-monitoring-with-Cacti.html#extended&quot;&gt;Continue reading &quot;Linux, Solaris and FreeBSD iostat monitoring with Cacti&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 15 Oct 2008 11:02:31 +0100</pubDate>
    <guid isPermaLink="false">http://www.markround.com/archives/48-guid.html</guid>
    
</item>
<item>
    <title>The setting sun</title>
    <link>http://www.markround.com/archives/60-The-setting-sun.html</link>
            <category>Sysadmin</category>
    
    <comments>http://www.markround.com/archives/60-The-setting-sun.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=60</wfw:commentRss>
    

    <author>nospam@example.com (Mark Round)</author>
    <content:encoded>
    &lt;p&gt;
Well, that&#039;s that, then. Solaris as we knew it is pretty much dead. I&#039;ve suspected for a while now that Oracle&#039;s intentions regarding Solaris were not what the community, or us &amp;quot;old-school&amp;quot; Solaris sysadmins wanted or had hoped for.  &lt;/p&gt; 
&lt;p&gt;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 &lt;em&gt;any&lt;/em&gt; 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 &amp;quot;&lt;a href=&quot;http://ptribble.blogspot.com/2010/07/moving-opensolaris-forward.html&quot;&gt;shoot itself in the head&lt;/a&gt;&amp;quot;. &lt;/p&gt; 
&lt;div class=&quot;commentBody&quot;&gt; 
&lt;div id=&quot;comment_body_32901998&quot;&gt; 
&lt;p&gt;Even ignoring the OpenSolaris project, It&#039;s not at all rosy in &amp;quot;real&amp;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&#039;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&#039;d find myself saying that!&lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;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 ?&amp;#160; &lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;Well,  &lt;a href=&quot;http://developers.slashdot.org/comments.pl?sid=1719254&amp;amp;cid=32903400&quot; title=&quot;Oracle engineer confirms plans for Solaris&quot;&gt;this
 post&lt;/a&gt; on Slashdot (allegedly from a Sun/Oracle employee) confirms my
 suspicions as to why they may be doing this. Oracle just really doesn&#039;t care about Solaris as a general 
purpose data centre OS any more. There&#039;s just no money in it, and although I 
personally find it tragic it does make sense. It&#039;s probably also why they&#039;re killing all 
their OEM deals - why help a competitor sell hardware, when all you&#039;ll see from it is a possible support contract for the OS ? Oracle&#039;s overall aim is to have 
Solaris relegated to the role of running as the bottom layer in an 
Oracle &amp;quot;database machine&amp;quot;, Java appserver bundle or inside a &amp;quot;&lt;a href=&quot;http://blogs.sun.com/bmc/entry/fishworks_now_it_can_be&quot;&gt;Fishworks&lt;/a&gt;&amp;quot; storage appliance.&lt;/p&gt; 
&lt;p&gt;It excels at 
these tasks, and it would obviously fit into Oracle&#039;s stated goal of 
being a one stop shop, where if you want to run Oracle, they&#039;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&#039;t need a &amp;quot;community&amp;quot; around the product, they 
don&#039;t need open source developers porting applications to it, and they 
certainly don&#039;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&#039;re probably more of an annoyance to them at the moment and I get the very strong idea that they&#039;d rather you just quietly went elsewhere. &lt;/p&gt; 
&lt;p&gt;I just wish that if this was their plan, they&#039;d make some sort of statement about it; rather than ignoring the Solaris community in the hopes that they&#039;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&#039;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&#039;t bringing in the big bucks. As the Slashdot poster said : &amp;quot;Profit is king here.  Anything else is overhead, and overhead eats into 
Larry&#039;s yacht fund.&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Now it&#039;s official : &lt;a href=&quot;http://www.theregister.co.uk/2010/08/13/opensolaris_is_dead/&quot; title=&quot;OpenSolaris is dead&quot;&gt;http://www.theregister.co.uk/2010/08/13/opensolaris_is_dead/ &lt;/a&gt;&lt;br /&gt;&lt;/p&gt; 
&lt;/div&gt; 
&lt;/div&gt; 
    </content:encoded>

    <pubDate>Fri, 16 Jul 2010 08:54:58 +0100</pubDate>
    <guid isPermaLink="false">http://www.markround.com/archives/60-guid.html</guid>
    
</item>
<item>
    <title>Centreon review</title>
    <link>http://www.markround.com/archives/58-Centreon-review.html</link>
            <category>Sysadmin</category>
    
    <comments>http://www.markround.com/archives/58-Centreon-review.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=58</wfw:commentRss>
    

    <author>nospam@example.com (Mark Round)</author>
    <content:encoded>
    One of my favourite interview questions I used to ask candidates was a variation of &amp;quot;Desert Island Discs&amp;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&#039;re talking a bare-bones &amp;quot;classic&amp;quot; Solaris installation, or a minimal Debian system here. You&#039;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 ?&lt;br /&gt;&lt;br /&gt;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 &amp;quot;ice breaker&amp;quot; type question. For my money, aside from some tools like rsync and screen which I couldn&#039;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 &lt;a title=&quot;Nagios homepage&quot; href=&quot;http://www.nagios.org/&quot;&gt;Nagios&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;It&#039;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&#039;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 &lt;a href=&quot;http://www.uptimesoftware.com/&quot;&gt;Uptime&lt;/a&gt; or &lt;a href=&quot;http://www.hyperic.com/&quot;&gt;Hyperic&lt;/a&gt; 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.&lt;br /&gt;&lt;br /&gt;So, you can imagine my excitement when I first discovered &lt;a href=&quot;http://www.centreon.com/&quot;&gt;Centreon&lt;/a&gt;. It&#039;s essentially a monitoring platform that uses Nagios at it&#039;s core. You could think of it as a fancy frontend to &amp;quot;stock&amp;quot; Nagios, but it&#039;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&#039;d go so far as to say that before you experiment with Centreon, you really should have set up &amp;quot;stock&amp;quot; Nagios, and be familiar with the plugin architecture, &lt;a title=&quot;NRPE documentation&quot; href=&quot;http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf&quot;&gt;NRPE&lt;/a&gt; and how alerts / escalations are managed. Ideally, you should have a stock Nagios installation you can use to duplicate on Centreon/Nagios.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;a href=&quot;http://www.markround.com/archives/58-Centreon-review.html#extended&quot;&gt;Continue reading &quot;Centreon review&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 05 Feb 2010 14:59:13 +0000</pubDate>
    <guid isPermaLink="false">http://www.markround.com/archives/58-guid.html</guid>
    
</item>

</channel>
</rss>