<?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 Ramblings of a Hatter &#187; Linux</title>
	<atom:link href="http://www.joshual.me.uk/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joshual.me.uk</link>
	<description>Joshua Lock&#039;s Blog</description>
	<lastBuildDate>Wed, 01 Sep 2010 13:24:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>The Beaver bites (recovering from a failing hard disk)</title>
		<link>http://www.joshual.me.uk/2010/01/the-beaver-bites-recovering-from-a-failing-hard-disk/</link>
		<comments>http://www.joshual.me.uk/2010/01/the-beaver-bites-recovering-from-a-failing-hard-disk/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 14:08:25 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.joshual.me.uk/?p=224</guid>
		<description><![CDATA[Last week I had a hell of a time when the Kingston SSD in my laptop started failing, badly. Poky is well known as a destroyer of disks but it seems cheap SSD&#8217;s are even more susceptible to it&#8217;s toothy maw. At first it was just (extremely noticeable) performance degradation, but minutes after telling my [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I had a hell of a time when the Kingston SSD in my laptop started failing, badly. Poky is well known as a destroyer of disks but it seems cheap SSD&#8217;s are even more susceptible to it&#8217;s toothy maw.</p>
<p>At first it was just (extremely noticeable) performance degradation, but minutes after telling my manager about it and asking for a new disk it was starting to look more serious: directory listing (file manager, fancy filename completion in my editor and good old ls) was failing on my home directory.</p>
<p>I figured I had to get as much data off the drive as possible before I shut the machine off, rsync wouldn&#8217;t work as it needs to get directory listings. Fortunately <a href="http://www.atchoo.org">Roger</a> pointed me at <a href="http://www.gnu.org/software/ddrescue/ddrescue.html">ddrescue</a>, which enabled me to carve a partition on an external drive and copy do a direct clone of the failing drive. ddrescue works by following the British mantra of &#8220;Keep calm and carry on&#8221;, that is if ddrescue finds some data it can&#8217;t copy it gives up and moves on copying as much data as possible rather than exiting because corrupt/unrecoverable data was found.</p>
<p>I managed to recover most of my data with ddrescue and while it was going I had to set up another machine to use while I was waiting for the replacement disk. This gave me opportunity to try out a backup solution and various tactics to make my data easier to recover.</p>
<p>The biggest problem, email. Having all my mail filtering and account configuration trapped in Evolution meant that I rely on it more than I am comfortable with. Based on recommendations and usage in the office I decided to try <a href="http://software.complete.org/software/wiki/offlineimap/">offlineimap</a> and <a href="http://imapfilter.hellug.gr/">imapfilter</a>.</p>
<p>Offlineimap is a Python program that will download your mail and store it in the maildir format, meaning that you can use any of a range of mail programs to read your mail. Imapfilter is a Lua program that will connect to an Imap server and move mail around on the server. You write simple Lua scripts whereby you instantiate an Imap object then write bits of code to move messages around based on the mail headers:</p>
<blockquote><p>msgs = imapacc.INBOX:is_unseen() *<br />
imapacc.INBOX:contain_field(&#8220;X-mailing-list&#8221;, &#8220;linux-fsdevel@vger.kernel.org&#8221;)<br />
imapacc.INBOX:move_messages(imapacc[&#8216;INBOX/linux-fsdevel&#8217;], msgs)</p></blockquote>
<p>Brilliant! Now my email is stored in a Mail folder in my home directory and imapfilter connects to the mail servers directly and sorts my messages into appropriate mail boxes.</p>
<p>For backup Ross recommended <a href="http://www.nongnu.org/duplicity/">duplicity</a>, another Python program. This program uses <a href="http://sourceforge.net/projects/librsync">librsync</a> and <a href="http://www.gnupg.org/">GnuPG</a> to create GPG encrypted incremental backups.</p>
<p>After the first run duplicity will only backup what has changed, and all of your backups are stored in GPG encrypted tar archives. The first run didn&#8217;t take too long to backup my 20GB home directory and I expect future backups will be even swifter.</p>
<p>Now that I have my new disk installed and my data in a more recoverable format with a simple backup solution I thought I&#8217;d try and address the cause of the disk destruction.</p>
<p><strong>Blunting the teeth (trying to stop Poky so easily destroying disks)</strong></p>
<p>Poky, and OE, are known as destroyers of disks, for understandable reasons. Building an operating system means a lot of disk activity, to increase the lifespan of the disk it would be good to reduce the amount of disk activity.</p>
<p>Now I&#8217;m not expecting my new disk to fail as rapidly, it&#8217;s an old school platter-based drive, but as I do all of my development on a single disk machine (laptop) the simplest solution; to use a separate disk for builds, is impractical.</p>
<p>I decided to create a separate partition for Poky builds (simple thanks to LVM) and use a filesystem setup which would hopefully reduce the amount of writes.</p>
<p>I chose to use an Ext4 filesystem without a journal. With this set up I get the modern filesystem goodness (<span title="data is stored in a cluster of contiguous blocks rather than many individial blocks with only a single metadata structure for the extent rather than metadata for each block">extents</span> and <span title="delay allocation of blocks for as long as possible helping reduce fragmentation and potentially writes">delayed allocation should equate to less disk activity) and also fewer writes through not using a journal (as it&#8217;s a partition for temprorary build data, so I&#8217;ll not be upset if I lose any/all of it). I strongly considered Xfs and Btrfs, I decided against Xfs after reading about it&#8217;s slow directory creation and deletion (Poky does a lot of this) but will likely try Btrfs soon, though I&#8217;m more inclined to play around with that on a set up that can benefit from its snapshot support.<br />
</span></p>
<p>As far as I can tell you can&#8217;t disable journalling on an existing ext4 filesystem, you need to create the filesystem without a journal. Fortunately I was working with a new disk where I&#8217;d left plenty of unused space. I created a new logical volume to house the partition, then created an ext4 partition in that logical volume using the default filesystem features (from /etc/mke2fs.conf) only, with the journal option disabled.</p>
<blockquote><p>mkfs.ext4 /dev/mapper/vg_scimitar-lv_srv -L srv -O ^has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize</p></blockquote>
<p>Et voila, hopefully that will increase the longevity of the disk.</p>
<p>While losing several days of coding time to this was initially a little frustrating it was fun and productive to play around with storage, backup and mail solutions to make my working environment a little more pleasant and my data more secure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshual.me.uk/2010/01/the-beaver-bites-recovering-from-a-failing-hard-disk/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>All the toys!</title>
		<link>http://www.joshual.me.uk/2010/01/all-the-toys/</link>
		<comments>http://www.joshual.me.uk/2010/01/all-the-toys/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 10:28:52 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.joshual.me.uk/?p=214</guid>
		<description><![CDATA[I&#8217;ve acquired a bunch of new gadgets of late, I&#8217;m very excited about them all so I decided to promote them here. Reading A Sony PRS 600 E-Book reader was gifted to me this Christmas, and what a fantastic piece of kit it is. I&#8217;ve been enjoying several public domain texts from Feedbooks as well [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve acquired a bunch of new gadgets of late, I&#8217;m very excited about them all so I decided to promote them here.</p>
<p><strong>Reading</strong></p>
<p>A Sony PRS 600 E-Book reader was gifted to me this Christmas, and what a fantastic piece of kit it is.</p>
<p><a href="http://www.flickr.com/photos/31039727@N02/4287010645/"><img class="aligncenter" title="PRs-600 Touch" src="http://farm3.static.flickr.com/2803/4287010645_8d3930c631_m.jpg" alt="" width="240" height="180" /></a></p>
<p>I&#8217;ve been enjoying several public domain texts from <a href="http://www.feedbooks.com/">Feedbooks</a> as well as a bunch of geeky PDF&#8217;s.</p>
<p>The PDF handling is not as bad as I expected, at standard zoom it&#8217;s just about readable in good light although much more pleasant to read at M(edium) or L(arge) text size, despite the slightly weird line wrapping you end up with.<br />
Unfortunately tables and diagrams are completely destroyed when the text size is increased so I tend to set it back to S(mall|tandard) text size for those bits and sometimes use the Zoom function to make text more legible in low light.</p>
<p>The touch function is fun and sometimes even handy for turning pages and looking up words as well as highlighting and annotating the more academic reading materials.</p>
<p>I&#8217;ve been using <a href="http://calibre-ebook.com/">Calibre</a> to manage the device. While the UI is not to my taste (photo-realistic icons, busy interface, etc) the functionality is excellent and extremely stable. I should really donate some money to the project.</p>
<p><strong>Listening</strong></p>
<p><a href="http://www.flickr.com/photos/31039727@N02/4287010261/"><img class="aligncenter" title="Audio playa" src="http://farm3.static.flickr.com/2556/4287010261_d24ebb87bc_m.jpg" alt="" width="240" height="180" /></a></p>
<p>The iPod Shuffle just wasn&#8217;t cutting it as a portable audio player once I moved to London and had lengthy commutes to fill my ears on. I tried using my Android phone but the short battery life made this a chore, so I decided to pick up a new audio player.</p>
<p>I wanted something relatively cheap which had to have a screen (yes Apple, a screen!), a reasonable amount of storage (more than 2GB) and allow me to put music on it by simply copying files. For extra points it would play Ogg Vorbis and Flac audio.</p>
<p>The Sandisk Sansa Clip fits all of my requirements. With 8GB storage, support for all the formats I care about (and more) and a built in FM tuner it&#8217;s a steal at less than fifty notes. I&#8217;ve only had it a couple of days but battery life seems reasonable and it charges in a few hours over USB.</p>
<p><strong>Watching</strong></p>
<p><a href="http://www.flickr.com/photos/31039727@N02/4287009883/"><img class="aligncenter" title="Tele box" src="http://farm3.static.flickr.com/2733/4287009883_8ffbef617b_m.jpg" alt="" width="240" height="180" /></a></p>
<p>Long have I been meaning to build a PVR machine, and this Acer (Veriton N260G) computer was too cheap to pass up on.</p>
<p>Pair it with a Hauppage WinTV-NOVA-T DVB-T tuner and an install of MythTV and I have a low power PVR running with little cost or effort.</p>
<p>I&#8217;ve a few niggles to iron out on the software side but this seems like a more than capable machine at less than two tonne. I&#8217;ve not tried watching live TV while recording or trying to shove high def through it but both of these are on my agenda. For now it&#8217;s happily (and very quietly) humming away recording things for me.</p>
<p>MythTV is a bit of a pig though, if I was building a media PC without PVR functionality I&#8217;d be running Boxee or XBMC and would have had it running in less than an hour from no-OS to full system. Alas that was not the case with the MythTV set up&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshual.me.uk/2010/01/all-the-toys/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Self deprecating</title>
		<link>http://www.joshual.me.uk/2009/07/self-deprecating/</link>
		<comments>http://www.joshual.me.uk/2009/07/self-deprecating/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 13:11:09 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Moblin]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.joshual.me.uk/?p=165</guid>
		<description><![CDATA[Two weeks after it was given my talk on writing Connectivity UIs for ConnMan is already out of date. Crumbs! There have been over half a dozen ConnMan releases in the time since! Because of this I&#8217;ve decided that I&#8217;m going to keep a set of notes against ConnMan git for budding UI developers. These [...]]]></description>
			<content:encoded><![CDATA[<p>Two weeks after it was given my talk on writing Connectivity UIs for ConnMan is already out of date. Crumbs!<br />
There have been over half a dozen ConnMan releases in the time since!</p>
<p>Because of this I&#8217;ve decided that I&#8217;m going to keep a set of notes against ConnMan git for budding UI developers.</p>
<p>These notes will sit on this here website and be updated each time there&#8217;s a change in the ConnMan interfaces.<br />
Once the interfaces stabilise for ConnMan 1.0 I&#8217;ll write the information up nicely and post on the ConnMan website or some such.</p>
<p>See the first draft here: <a href="http://www.joshual.me.uk/writing-connectivity-uis-for-connman/">Writing connectivity UIs for ConnMan</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshual.me.uk/2009/07/self-deprecating/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GCDS wrap up</title>
		<link>http://www.joshual.me.uk/2009/07/gcds-wrap-up/</link>
		<comments>http://www.joshual.me.uk/2009/07/gcds-wrap-up/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 11:08:19 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Moblin]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.joshual.me.uk/?p=158</guid>
		<description><![CDATA[I&#8217;m back from my first Guadec and have had an awesome week. Hung out with a bunch of cool people, attended some great talks, absorbed the general atmosphere and got inspired to do some hacking. Guadec hacks: Started working on a ConnMan plugin to implement the shared connectivity namespace I proposed in my talk. This [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">I&#8217;m back from my first Guadec and have had an awesome week.</p>
<p>Hung out with a bunch of cool people, attended some great talks, absorbed the general atmosphere and got inspired to do some hacking.</p>
<p style="text-align: left;">Guadec hacks:</p>
<ul style="text-align: left;">
<li>Started working on a ConnMan plugin to implement the shared connectivity namespace I proposed in my talk. This needs some more work and may involve me getting more familiar with ConnMan internals so it&#8217;s not ready yet.</li>
<li>GUPnP context manager for ConnMan. GUpNP has NetworkManager and Unix back-ends for creating context manager objects so I sat down and hammered a ConnMan implementation too.I didn&#8217;t have enough network to pull all of the dependencies to build it so I&#8217;m going to do that in the office this week and have Ross look over and hopefully merge it before next week end.</li>
<li>Of course, I did some carrick and gconnman hacking and even more meta-hacking (discussing features and bugs with others and helping people get familiar with the code).</li>
</ul>
<p style="text-align: left;">While I was away Thomas made the Moblin Gtk theme rock even harder and I merged some of Jussi&#8217;s awesome visual enhancements to Carrick such that when I updated my netbook I got this piece of prettiness:</p>
<div class="mceTemp mceIEcenter" style="text-align: center;">
<dl id="attachment_157" class="wp-caption   aligncenter" style="width: 310px;">
<dt class="wp-caption-dt"><a href="http://www.joshual.me.uk/blog/wp-content/uploads/2009/07/carrick-looks-great.png" title="Click forr bigger shiny"><img class="size-medium wp-image-157" title="Carrick is looking really nice" src="http://www.joshual.me.uk/blog/wp-content/uploads/2009/07/carrick-looks-great-300x175.png" alt="The nuts!" width="300" height="175" /></a></dt>
<dd class="wp-caption-dd">The nuts!</dd>
</dl>
</div>
<p style="text-align: left;">The software I&#8217;ve been working on for the last few months is starting to look really quite nice and it&#8217;s even getting to a stage where it&#8217;s mostly usable. Great stuff!</p>
<p style="text-align: left;">Guadec has inspired me to work on a few more things which I hope to be blogging about soon. My current #1 home-time-hacking priority is gconnman; I want to add GObject introspection annotations and think I&#8217;ve worked out a way to make it slightly more efficient.</p>
<p style="text-align: left;">More on both these things soon as we all decided at Guadec that we need to blog more about the neat stuff we&#8217;re working on with Moblin. It truly is the nuts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshual.me.uk/2009/07/gcds-wrap-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acheivement unlocked: Public Speaking (10G)</title>
		<link>http://www.joshual.me.uk/2009/07/acheivement-unlocked-public-speaking-10g/</link>
		<comments>http://www.joshual.me.uk/2009/07/acheivement-unlocked-public-speaking-10g/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 15:17:50 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Moblin]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.joshual.me.uk/?p=152</guid>
		<description><![CDATA[I gave my GCDS talk this morning, I felt it went fairly well. I was particularly nervous, not just because the topic is fairly contentious right now, but also as it was the first time I&#8217;ve done any public speaking. Of course there where various questions about NetworkManager; &#8220;Why aren&#8217;t you using it&#8221;, &#8220;Why don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I gave my GCDS talk this morning, I felt it went fairly well. I was particularly nervous, not just because the topic is fairly contentious right now, but also as it was the first time I&#8217;ve done any public speaking.</p>
<p style="text-align: center;"><a title="Get the slides" href="http://www.joshual.me.uk/Talks/connman-gcds-09.pdf"><img class="aligncenter" title="Front matter - Writing connectivity UIs for ConnMan" src="http://farm3.static.flickr.com/2646/3690600692_8b02d99d75.jpg?v=0" alt="Front-matter" width="500" height="375" /></a></p>
<p>Of course there where various questions about NetworkManager; &#8220;Why aren&#8217;t you using it&#8221;, &#8220;Why don&#8217;t you switch to it now 0.7 is released&#8221;, etc. Questions I was entirely unable to answer, various hand waving, etc.</p>
<p>On the whole the talk was productive though, I proposed a shared D-Bus API for common connectivity queries and after the talk <a href="http://dar-k.blogspot.com/">Darren Kenny</a> of Sun Microsystems told me he was interested in implementing this for the OpenSolaris connectivity daemon <a href="http://opensolaris.org/os/project/nwam/">NWAM</a>. Win!<br />
I&#8217;ll be working on a ConnMan plugin and getting in touch with Darren soon.</p>
<p>I&#8217;ve boldly thrown up a <a href="talks">talks</a> page where you can get at my slides.</p>
<p>GCDS is really great so far. Saw a good talk by Will Thomson on &#8220;Profiling and Optimising D-Bus APIs&#8221;. His D-Bus profiling tool, <a href="http://willthompson.co.uk/bustle/">Bustle</a>, looks great and I&#8217;m going to share it with the ConnMan team.</p>
<p>Back to the talks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshual.me.uk/2009/07/acheivement-unlocked-public-speaking-10g/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
