<?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>The ongoing struggle</title>
	<atom:link href="http://strugglers.net/~andy/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://strugglers.net/~andy/blog</link>
	<description>I'll get there one day.</description>
	<lastBuildDate>Sat, 23 Jan 2010 03:43:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OpenLDAP and md5crypt</title>
		<link>http://strugglers.net/~andy/blog/2010/01/23/openldap-and-md5crypt/</link>
		<comments>http://strugglers.net/~andy/blog/2010/01/23/openldap-and-md5crypt/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 03:43:14 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://strugglers.net/~andy/blog/?p=463</guid>
		<description><![CDATA[I&#8217;ve got some machines which authenticate their local users against OpenLDAP, and I wanted to reset some passwords from a Perl script.
First I tried just calling modify from Net::LDAP.  That worked but just set the new password as plain text.  My passwords appear to be &#8220;md5crypt&#8221;, and normally look like this:

{CRYPT}$1$fywXcrPC$Uakrx8POGBf1WM9l6mkG6/

I could come [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got some machines which authenticate their local users against <a href="http://www.openldap.org/">OpenLDAP</a>, and I wanted to reset some passwords from a Perl script.</p>
<p>First I tried just calling <tt>modify</tt> from <tt><a href="http://search.cpan.org/~gbarr/perl-ldap-0.39/lib/Net/LDAP.pod">Net::LDAP</a></tt>.  That worked but just set the new password as plain text.  My passwords appear to be &#8220;md5crypt&#8221;, and normally look like this:</p>
<pre class="code">
{CRYPT}$1$fywXcrPC$Uakrx8POGBf1WM9l6mkG6/
</pre>
<p>I could come up with some code to create the correct hash on the machine where I was running the Perl script, but I really wanted the <abbr title="Lightweight Directory Access Protocol">LDAP</abbr> server to do it for me, for consistency.</p>
<p>A little bit of searching revealed <tt><a href="http://search.cpan.org/~gbarr/perl-ldap-0.39/lib/Net/LDAP/Extension/SetPassword.pm">Net::LDAP::Extension::SetPassword</a></tt>, so I gave that a go.  Well, that was progress, but it set <abbr title="Message-Digest 5"><a href="http://en.wikipedia.org/wiki/MD5">MD5</a></abbr> passwords.  They look like this:</p>
<pre class="code">
{MD5}13dmpYRmooMYt50wdZBpSQ==
</pre>
<p>Why did it just decide to use MD5?  <a href="http://www.openldap.org/faq/index.cgi?file=906">The answer&#8217;s in the OpenLDAP FAQ</a>.  <tt>password-hash</tt> was indeed set to <tt>{md5}</tt> on the server.</p>
<p>Right, OK, so set <tt>password-hash</tt> to <tt>{md5crypt}</tt> then?  No!  It does not accept that value.  It <em>does</em> accept <tt>{crypt}</tt>, but that ends up like:</p>
<pre class="code">
{CRYPT}Q.nfbCdTMBuGU
</pre>
<p>It seems to have the right hash type (<tt>{CRYPT}</tt>) but it&#8217;s much shorter.  It&#8217;s the <abbr title="Portable Operating System Interface for Unix"><a href="http://en.wikipedia.org/wiki/POSIX">POSIX</a></abbr> <tt><a href="http://en.wikipedia.org/wiki/Crypt_(Unix)#Library_Function">crypt(3)</a></tt> based on <abbr title="Data Encryption Standard"><a href="http://en.wikipedia.org/wiki/Data_Encryption_Standard">DES</a></abbr>.  Not quite what I wanted.</p>
<p>The eventual answer was <a href="http://www.openldap.org/lists/openldap-software/200207/msg00213.html">found in the archives of the openldap-software mailing list</a> from almost 8 years ago!  So once <b>slapd.conf</b> contained:</p>
<pre class="code">
password-hash  {CRYPT}
password-crypt-salt-format "$1$%.8s"
</pre>
<p>the correct password hash was generated.</p>
<p>How did I know about the &#8220;<tt>.8</tt>&#8221; bit?  In an md5crypt hash, the characters between the <tt>$1$</tt> and the next <tt>$</tt> are the salt, and there&#8217;s 8 of them, so that&#8217;s why <tt>.8s</tt>.</p>
]]></content:encoded>
			<wfw:commentRss>http://strugglers.net/~andy/blog/2010/01/23/openldap-and-md5crypt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux software RAID hot swap disk replacement</title>
		<link>http://strugglers.net/~andy/blog/2010/01/17/linux-software-raid-hot-swap-disk-replacement/</link>
		<comments>http://strugglers.net/~andy/blog/2010/01/17/linux-software-raid-hot-swap-disk-replacement/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 12:06:04 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://strugglers.net/~andy/blog/?p=455</guid>
		<description><![CDATA[One of BitFolk&#8217;s servers in the US has had first one and then two dead disks for quite some time.  It has a 4 disk software RAID-10, so by pure luck it was still running.  Obviously as soon as a disk breaks you really should replace it, preferably with a hot spare.  [...]]]></description>
			<content:encoded><![CDATA[<p>One of <a href="http://bitfolk.com/">BitFolk&#8217;s</a> servers in the US has had first one and then two dead disks for quite some time.  It has a 4 disk software <abbr title="Redundant Array of Inexpensive/Independent Disks">RAID</abbr>-10, so by pure luck it was still running.  Obviously as soon as a disk breaks you really should replace it, preferably with a hot spare.  I was very lucky that the second disk failure wasn&#8217;t from the same half of the RAID-10 (resulting in downtime and restore from backup).  There&#8217;s no customer data or customer-facing services on this machine though, so I let it slide for far too long.</p>
<p>Yesterday morning <a href="http://cernio.com/Members/graham">Graham</a> was visiting the datacenter and kindly agreed to replace the disks for me.  As it happens I don&#8217;t have that much experience of software RAID since the production machines I&#8217;ve worked on tend to have hardware RAID and the home ones tend not to be hot swap.  It didn&#8217;t go entirely smoothly, but I think it was my fault.</p>
<p>The server chassis doesn&#8217;t support drive identification (e.g. by turning a light on) so I had to generate some disk activity so that Graham could see which drive lights weren&#8217;t blinking.  It was easy enough for him to spot that slots 0 and 1 were still blinking away with slots 2 and 3 dead.  I checked <b>/proc/mdstat</b> to ensure that those disks weren&#8217;t still present in any of the arrays.  If they had been then I would have done:</p>
<pre class="code">
$ sudo mdadm --fail /dev/mdX /dev/sdbX
</pre>
<p>to remove each one.</p>
<p>They weren&#8217;t present, so I gave Graham the go-ahead to pull the hot swap drive trays out.</p>
<p>At first the server didn&#8217;t notice anything.  I thought this was bad as I would like it to notice!  This was confirmed to be bad when all disk IO blocked and the load went through the roof.</p>
<p>I think what I had forgotten to do was to remove the devices from the SCSI subsystem as <a href="http://www.anchor.com.au/hosting/support/Linux_Software_RAID_Repair">described in this article</a>.  So for me, it would have been something like:</p>
<pre class="code">
$ for disk in sd{a,b,c,d}; do echo -n "$disk: "; ls -d /sys/block/$disk/device/scsi_device*; done
sda: /sys/block/sda/device/scsi_device:0:0:0:0
sdb: /sys/block/sdb/device/scsi_device:0:0:1:0
sdc: /sys/block/sdc/device/scsi_device:1:0:0:0
sdd: /sys/block/sdd/device/scsi_device:1:0:1:0
</pre>
<p>From <b>/proc/mdstat</b> I knew it was <b>sdb</b> and <b>sdd</b> that were broken.  I think I should have done:</p>
<pre class="code">
$ sudo sh -c 'echo "scsi remove-single-device" 0 0 1 0 > /proc/scsi/scsi'
$ sudo sh -c 'echo "scsi remove-single-device" 1 0 1 0 > /proc/scsi/scsi'
</pre>
<p>Anyway, at the time what I had was a largely unresponsive server.  I used <a href="http://en.wikipedia.org/wiki/Magic_sysrq">Magic Sysrq</a> to sync, mount filesystems read-only and then reboot.  In <a href="http://cernio.com/">Cernio&#8217;s</a> console this would normally be &#8220;<strong>~b</strong>&#8221; to send a break, but Xen uses &#8220;<strong>ctrl-o</strong>&#8220;.  So that was <strong>ctrl-o s</strong> to sync, <strong>ctrl-o u</strong> to remount read-only and then <strong>ctrl-o b</strong> to reboot the system.</p>
<p>Graham had by then taken the dead disks out of the caddies and replaced with new, re-inserted them and powered the server back on.</p>
<p>Happily it did come back up fine, I then had to set about adding the new disks to the arrays.</p>
<p>I&#8217;d already been forewarned that the new disks had 488397168 sectors whereas the existing ones had 490234752 &#8212; both described as 250GB of course!  A difference of some 890MiB, despite them both being from the same manufacturer, from the same range even.  I didn&#8217;t bother adding a swap partition on the two new disks which made them just about big enough for everything else.</p>
<pre class="code">
$ sudo mdadm --add /dev/md1 /dev/sdb1
mdadm: Cannot open /dev/sdb1: Device or resource busy
</pre>
<p>Oh dear!</p>
<p>After lengthy googling, <a href="http://m0dlx.com/blog/mdadm___dm_multipath___Device_or_resource_busy.html">this article</a> gave me a clue.</p>
<pre class="code">
$ sudo mulitpath -l
SATA_WDC_WD2500SD-01WD-WCAL72844661dm-1 ATA,WDC WD2500SD-01K
[size=233G][features=0][hwhandler=0]
\_ round-robin 0 [prio=0][active]
 \_ 1:0:1:0 sdd 8:48  [active][undef]
SATA_WDC_WD2500SD-01WD-WCAL72802716dm-0 ATA,WDC WD2500SD-01K
[size=233G][features=0][hwhandler=0]
\_ round-robin 0 [prio=0][active]
 \_ 0:0:1:0 sdb 8:16  [active][undef]
</pre>
<p>There&#8217;s my disks!</p>
<p>Stopping <b>multipath</b> daemon didn&#8217;t help.  Running <b>multipath -F</b> did help.</p>
<p>The usual</p>
<pre class="code">
$ sudo mdadm --add /dev/md1 /dev/sdb1
$ sudo mdadm --add /dev/md1 /dev/sdd1
$ sudo mdadm --add /dev/md3 /dev/sdb3
$ sudo mdadm --add /dev/md3 /dev/sdd3
$ sudo mdadm --add /dev/md5 /dev/sdb5
$ sudo mdadm --add /dev/md5 /dev/sdd5
</pre>
<p>worked fine after that.</p>
<p>I hope that was useful to someone.  I&#8217;ll be practising it some more on some spare hardware here to see if the fiddling with <b>/proc/scsi/scsi</b> really does work.</p>
<p><strong>Update</strong>:</p>
<p><a href="http://m0dlx.com/blog/">Dominic</a> (author of the linked article about dm-multipath) says:</p>
<blockquote><p>
I think there&#8217;s also a &#8220;remove&#8221; or &#8220;delete&#8221; file you can echo to in the /sys device directory, bit more friendly than talking to /proc/scsi/scsi.
</p></blockquote>
<p>and provides this snippet for <b>multipath.conf</b> which should disable multipath:</p>
<pre class="code">
# Blacklist all devices by default. Remove this to enable multipathing
# on the default devices.
blacklist {
        devnode "*"
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://strugglers.net/~andy/blog/2010/01/17/linux-software-raid-hot-swap-disk-replacement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>THING!</title>
		<link>http://strugglers.net/~andy/blog/2010/01/05/thing/</link>
		<comments>http://strugglers.net/~andy/blog/2010/01/05/thing/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 00:12:50 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://strugglers.net/~andy/blog/?p=447</guid>
		<description><![CDATA[I always find it adorable when Jenny talks to me in her sleep, especially when my responses obviously provoke a reaction without waking her up.
Out of nowhere just now:

Her: Erm. Erm. If you&#8217;ve separated all the wood stuff how are you going to separate the rest?
Me: What wood stuff?
Her: From my bit.
(voice manages to convey [...]]]></description>
			<content:encoded><![CDATA[<p>I always find it adorable when Jenny talks to me in her sleep, especially when my responses obviously provoke a reaction without waking her up.</p>
<p>Out of nowhere just now:</p>
<blockquote><p>
Her: Erm. Erm. If you&#8217;ve separated all the wood stuff how are you going to separate the rest?</p>
<p>Me: What wood stuff?</p>
<p>Her: From my bit.</p>
<p><em>(voice manages to convey mild irritation at my lack of understanding)</em></p>
<p>Me: Your bit of what?</p>
<p>Her: <strong>Thing!</strong></p>
<p><em>(Sleep-Jenny clearly losing patience)</em></p>
<p>Me: Okay then.  We&#8217;ll work it out.</p>
<p>Her: <strong>Good.</strong></p>
<p><em>(the world has been set to rights)</em>
</p></blockquote>
<p>In the morning I shall endeavour to find out what her bit is and what apart from wood needs to be separated from it.</p>
]]></content:encoded>
			<wfw:commentRss>http://strugglers.net/~andy/blog/2010/01/05/thing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Feltham Airparcs leisure centre FAIL</title>
		<link>http://strugglers.net/~andy/blog/2010/01/04/feltham-airparcs-leisure-centre-fail/</link>
		<comments>http://strugglers.net/~andy/blog/2010/01/04/feltham-airparcs-leisure-centre-fail/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 17:50:01 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[FAIL]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://strugglers.net/~andy/blog/?p=432</guid>
		<description><![CDATA[Feltham Airparcs leisure centre has for the last 2 weeks &#8212; and ongoing &#8212; closed at 4pm, instead of 10pm, because the emergency lighting doesn&#8217;t work.
The actual lighting works fine, it&#8217;s just that if the lighting did fail then there&#8217;d be no emergency lights directing the shallow end of the gene pool to safety.
So the [...]]]></description>
			<content:encoded><![CDATA[<p>Feltham Airparcs leisure centre has for the last 2 weeks &#8212; and ongoing &#8212; closed at 4pm, instead of 10pm, because the emergency lighting doesn&#8217;t work.</p>
<p>The actual lighting works fine, it&#8217;s just that if the lighting <em>did</em> fail then there&#8217;d be no emergency lights directing the shallow end of the gene pool to safety.</p>
<p>So the staff close the place up as soon as it starts to get a bit dusky out.</p>
]]></content:encoded>
			<wfw:commentRss>http://strugglers.net/~andy/blog/2010/01/04/feltham-airparcs-leisure-centre-fail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Those Google Chrome Ads</title>
		<link>http://strugglers.net/~andy/blog/2009/12/27/those-google-chrome-ads/</link>
		<comments>http://strugglers.net/~andy/blog/2009/12/27/those-google-chrome-ads/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 07:31:29 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://strugglers.net/~andy/blog/?p=421</guid>
		<description><![CDATA[Yesterday I happened to be waiting on a tube platform with a non-technical person, and we were opposite one of those new Google Chrome ads, as pictured here.

I&#8217;ve seen a few people comment that they didn&#8217;t think that a non-technical person would understand what they were all about, so I took the opportunity to ask [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I happened to be waiting on a tube platform with a non-technical person, and we were opposite one of those new <a href="http://www.google.co.uk/chrome">Google Chrome</a> ads, as pictured here.</p>
<p><a href="http://gallery.strugglers.net/v/Andy/Misc/p1030018.jpg.html"><img src="http://gallery.strugglers.net/d/19053-2/p1030018.jpg" width="150" height="113" class="balignright" /></a></p>
<p>I&#8217;ve seen a few people comment that they didn&#8217;t think that a non-technical person would understand what they were all about, so I took the opportunity to ask my friend about it.</p>
<p>&#8220;See that ad over there?  What do you think it&#8217;s for?&#8221;</p>
<p>&#8220;It looks like it&#8217;s for a search thing.  A new kind of web search thing.  That&#8217;s a big list of related things to what they searched for&#8221;</p>
<p>&#8220;What do you think Google Chrome is then?&#8221;</p>
<p>&#8220;Well it says on it, a new browser.  That&#8217;s what you use to search isn&#8217;t it?&#8221;</p>
<p>&#8220;What other browsers are there then?&#8221;</p>
<p>&#8220;Well there&#8217;s the Yahoo! one, and then there&#8217;s the Google one.&#8221;</p>
<p>So to the extent that she even noticed the ad, she assumed it was just something to do with Google&#8217;s search engine, because of the search implications and prior meaning of the brand &#8220;Google&#8221;.</p>
<p>I don&#8217;t think this proves anything, but it was interesting hearing another point of view.</p>
]]></content:encoded>
			<wfw:commentRss>http://strugglers.net/~andy/blog/2009/12/27/those-google-chrome-ads/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Business proposition</title>
		<link>http://strugglers.net/~andy/blog/2009/12/22/business-proposition/</link>
		<comments>http://strugglers.net/~andy/blog/2009/12/22/business-proposition/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 13:16:45 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Crazy ideas]]></category>

		<guid isPermaLink="false">http://strugglers.net/~andy/blog/?p=416</guid>
		<description><![CDATA[I&#8217;m wondering if you could take all the &#8220;fun&#8221; manual jobs like smashing things with hammers, and contract them out to normally-desk-bound people, who do it for minimum wage (for the task at hand).  So then you have a large work force who individually only do the manual work for a small part of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m wondering if you could take all the &#8220;fun&#8221; manual jobs like smashing things with hammers, and contract them out to normally-desk-bound people, who do it for minimum wage (for the task at hand).  So then you have a large work force who individually only do the manual work for a small part of their time each (e.g. one day a week/month), maintaining their usual career the rest of the time.</p>
<p>What other kinds of manual labour do people enjoy?  It&#8217;s pretty much just smashing things up for me I think.</p>
]]></content:encoded>
			<wfw:commentRss>http://strugglers.net/~andy/blog/2009/12/22/business-proposition/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The dark side of Dubai; the dark side of us</title>
		<link>http://strugglers.net/~andy/blog/2009/12/01/the-dark-side-of-dubai-the-dark-side-of-us/</link>
		<comments>http://strugglers.net/~andy/blog/2009/12/01/the-dark-side-of-dubai-the-dark-side-of-us/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 03:22:05 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://strugglers.net/~andy/blog/?p=405</guid>
		<description><![CDATA[I saw a link to this article about Dubai on Twitter today.  Like zts, I found it an extremely disturbing read, stopping at many points to read out loud to anyone who would listen.  I recommend that you read it too.
After having read through it, I suppose my first thought is to wonder [...]]]></description>
			<content:encoded><![CDATA[<p>I saw a link to <a href="http://www.independent.co.uk/opinion/commentators/johann-hari/the-dark-side-of-dubai-1664368.html">this article about Dubai</a> <a href="http://twitter.com/zts/status/6213040073">on Twitter today</a>.  Like zts, I found it an extremely disturbing read, stopping at many points to read out loud to anyone who would listen.  I recommend that you read it too.</p>
<p>After having read through it, I suppose my first thought is to wonder why anyone who knows that this sort of thing goes on would ever go there.  Why any rich person from a democratic country would move there to set up home.  Why any Western sporting personalities or pop stars would put their name to Dubai resorts and hotels, to stadiums and their gigs.  <a href="http://www.starpulse.com/news/index.php/2009/02/13/coldplay_s_2_million_dubai_show">Coldplay, Bon Jovi, Justin Timberlake, Shakira, Christina Aguilera and Elton John</a> aren&#8217;t really acts you associate with slavery, after all.</p>
<p>The urge to take the moral high ground and denounce the practice is strong, and rightly so.  Something nags at me though about how much of our society must be built on injustice.  The clothes and food we buy when we&#8217;re being economical, how much of it comes from oppressed workers?  Do we just turn a blind eye all the time?</p>
<p>The people interviewed by Johann Hari in the article either avoid the subject or say they force themselves not to think about it, so a lot of them too are just turning a blind eye.  I like to think that if I knew some product was the result of sweat shop labour (let alone slavery) then I would avoid it, but am I kidding myself?</p>
<p>When we could afford it we shopped at Waitrose/Ocado not just because it tasted better but because it&#8217;s got to be ethically superior, right?  But as soon as we needed to live on a tighter budget this went out of the window and these days we mostly shop at Asda.  Most of the bad publicity for supermarkets in the UK seems to be <a href="http://www.belfasttelegraph.co.uk/business/business-news/vince-cable-big-firms-are-screwing-small-suppliers-14276103.html">reserved</a> <a href="http://www.guardian.co.uk/business/2009/jul/03/tesco-migrant-workers-protest">for</a> <a href="http://www.telegraph.co.uk/news/uknews/2094404/Hugh-Fearnley-Whittingstall-crys-fowl-over-Tescos-chicken-vote.html">Tesco</a> but Asda is even cheaper and I can&#8217;t really believe their practices are that much better.  They have whole cooked chickens for £4, for goodness sake.  I could stop shopping there but then that would be less money to spend on other things which would reduce the quality of my life, so this makes me a massive selfish hypocrite.</p>
<p>Of course none of this is comparable to the blatantly fucked Dubai society; if Asda were taking passports off of Filipino girls and forcing them to sell cheap goods for 19 hours a day for no money then certainly I&#8217;d consider paying more than 5p per 100ml of Pepsi Max at a competing supermarket.</p>
<p>It&#8217;s a bit of a coincidence that we&#8217;re hearing all this about Dubai now though, just as they enter the news for <a href="http://www.guardian.co.uk/business/2009/nov/30/billions-wiped-market-dubai-crisis">allowing their state bank to default massively</a>.  This stuff has been going on for years, right?  The millions of slaves used to build that place.  I confess I never really thought about it before.  The worst I&#8217;d previously heard was about <a href="http://news.bbc.co.uk/1/hi/uk/7234786.stm">their insane laws on drugs</a> which could get you locked up for minuscule traces on the outside of your shoes, or for stuff you bought over the counter in the airport.</p>
<p>We all turned a blind eye for years.</p>
<p>If you read this far and for some reason want to comment then it would be great if your comment was not solely based on what you do to consume more ethically than everyone else on the Internet.</p>
]]></content:encoded>
			<wfw:commentRss>http://strugglers.net/~andy/blog/2009/12/01/the-dark-side-of-dubai-the-dark-side-of-us/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My root file system doesn&#8217;t show up in &#8220;df&#8221; anymore!</title>
		<link>http://strugglers.net/~andy/blog/2009/11/26/my-root-file-system-doesnt-show-up-in-df-anymore/</link>
		<comments>http://strugglers.net/~andy/blog/2009/11/26/my-root-file-system-doesnt-show-up-in-df-anymore/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 03:20:22 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://strugglers.net/~andy/blog/?p=400</guid>
		<description><![CDATA[Earlier tonight I had a strange bug report from a customer.  Ever since I&#8217;d moved his VPS from one host to another, he&#8217;d stopped being able to see how much disk space he had free.
At first I thought it was simply because when I had moved his VPS I had taken the opportunity to [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier tonight I had a strange bug report from a <a href="http://bitfolk.com/">customer.</a>  Ever since I&#8217;d moved his VPS from one host to another, he&#8217;d stopped being able to see how much disk space he had free.</p>
<p>At first I thought it was simply because when I had moved his <abbr title="Virtual Private Server">VPS</abbr> I had taken the opportunity to reconfigure it to the new way I was setting them up, which meant that his root file system would be mounted from <tt>/dev/xvda</tt> instead of <tt>/dev/xvda1</tt> (or <tt>/dev/sda1</tt>).  That would have accounted for it if his monitoring tool had been doing it by device name, but it turned out that it was more fundamental than that &#8212; neither <strong>mount</strong> nor <strong>df</strong> were showing his root file system at all!</p>
<p>This was highly confusing at first.  <tt>/proc/mounts</tt> looked correct and anyway how does a machine boot if it doesn&#8217;t know where its root file system is?</p>
<p>The answer to that question was a bit of a clue really: the boot loader tells the kernel what device the root file system is on, and in this case it was doing it by <abbr title="Universally Unique Identifier">UUID</abbr>.  The UUID in the boot loader configuration was not the same as the UUID listed in <tt>/etc/fstab</tt>.  I had forgotten to update the customer&#8217;s <tt>/etc/fstab</tt>. <img src='http://strugglers.net/~andy/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>The machine was able to boot because the boot loader was correctly configured, but then after it had already mounted the root file system it was trying to mount everything in <tt>/etc/fstab</tt> and failing on a line for a UUID that wasn&#8217;t present.  That line then never made it to <tt>/etc/mtab</tt> which is what <strong>mount</strong> and <strong>df</strong> are reading from.</p>
<p>After correcting the <tt>/etc/fstab</tt>, it is fixable without a reboot by just mounting / again over the top of the existing one.  Or you could probably just edit <tt>/etc/mtab</tt>.</p>
]]></content:encoded>
			<wfw:commentRss>http://strugglers.net/~andy/blog/2009/11/26/my-root-file-system-doesnt-show-up-in-df-anymore/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Recently updated gnutls then found you can&#8217;t connect to LDAP?</title>
		<link>http://strugglers.net/~andy/blog/2009/11/21/recently-updated-gnutls-then-found-you-cant-connect-to-ldap/</link>
		<comments>http://strugglers.net/~andy/blog/2009/11/21/recently-updated-gnutls-then-found-you-cant-connect-to-ldap/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 01:16:24 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://strugglers.net/~andy/blog/?p=388</guid>
		<description><![CDATA[If you recently installed this update:

gnutls26 (2.4.2-6+lenny2) stable-security; urgency=high
  * Non-maintainer upload by the Security Team.
  * Fixed CVE-2009-2730: a vulnerability related to NUL bytes in
    X.509 certificate name fields. (Closes: #541439)
    GNUTLS-SA-2009-4

 -- Giuseppe Iuculano &#60;iuculano@debian.org&#62; Sun, 01 Nov 2009 21:29:06
+0100

and then found that your applications [...]]]></description>
			<content:encoded><![CDATA[<p>If you recently installed this update:</p>
<pre class="code">
gnutls26 (2.4.2-6+lenny2) stable-security; urgency=high
  * Non-maintainer upload by the Security Team.
  * Fixed CVE-2009-2730: a vulnerability related to NUL bytes in
    X.509 certificate name fields. (Closes: #541439)
    GNUTLS-SA-2009-4

 -- Giuseppe Iuculano &lt;iuculano@debian.org&gt; Sun, 01 Nov 2009 21:29:06
+0100
</pre>
<p>and then found that your applications began failing to connect to your LDAP server, you may want to check that your SSL certificate is valid.  Along with this update it seems that the default behaviour changed to being more strict.  In my case I was using self-signed SSL certificates without the CA being available.</p>
<p>You can disable the verification if you don&#8217;t want it by adding:</p>
<pre class="code">
TLS_REQCERT     never
</pre>
<p>in <tt>/etc/ldap/ldap.conf</tt> on each client machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://strugglers.net/~andy/blog/2009/11/21/recently-updated-gnutls-then-found-you-cant-connect-to-ldap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Bedfont Triangle</title>
		<link>http://strugglers.net/~andy/blog/2009/11/13/the-bedfont-triangle/</link>
		<comments>http://strugglers.net/~andy/blog/2009/11/13/the-bedfont-triangle/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 03:10:28 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://strugglers.net/~andy/blog/?p=385</guid>
		<description><![CDATA[Since moving in to this flat about 6 weeks ago, the following items have broken or started to behave oddly:

Humax PVR started displaying everything in a shade of pink when set to RGB output (like it always has been).
One of my LCD panels had its display totally corrupted with a strange tartan effect for about [...]]]></description>
			<content:encoded><![CDATA[<p>Since moving in to this flat about 6 weeks ago, the following items have broken or started to behave oddly:</p>
<ul>
<li>Humax PVR started displaying everything in a shade of pink when set to RGB output (like it always has been).</li>
<li>One of my LCD panels had its display totally corrupted with a strange tartan effect for about a day, and then went back to working perfectly again without me doing anything.</li>
<li>My hair clippers just stopped working, half way through using them.</li>
<li>My electric toothbrush wouldn&#8217;t turn off for a few minutes, then it stopped and won&#8217;t turn back on again now.</li>
<li>A brand new wall wart for a wifi access point died after 3 weeks.</li>
<li>One of the ports on my desktop switch is permanently lit up while nothing is plugged in.  When you plug something in the lights go out.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://strugglers.net/~andy/blog/2009/11/13/the-bedfont-triangle/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
