Homebrew NAS, v2.0

Almost 3 years ago, I built myself a homebrew 10TB NAS for what I considered to be quite a reasonable price for such a compact, flexible system.

Having felt some envy towards to Pim van Pelt and the NAS setup he built himself in December, I realised that my setup was rapidly approaching it’s third anniversary. Even though it’s not full, it is showing it’s age, as well as having a few quirks (like no working serial port to console in on), not to mention a flakey BIOS which has occasional issues booting, etc. It had also become my workhorse box of choice in the house, even though it was a lowly 1.5GHz Intel Atom CPU. But my setup had an eSATA connector, so I started to think about extending it with a disk enclosure.

Then, at the beginning of February, I tried to flash the BIOS to get off the no longer supported OEM branded BIOS (which I thought was just a custom splash screen), only to run into BIOS checksum errors, followed by new and novel booting problems. Ultimately, the system was no longer booting and I was dead in the water.

Some failed attempts at debugging the problem turned into researching components for a replacement system, which arrived a week later. After a few false starts due to attempts of being thrifty, reusing disks and USB keys that I had lying around as the system disk, I now have an awesome new Intel H67 MicroATX based setup, with a 3.6GHz quad core Intel IvyBridge CPU, 16GB 32GB of RAM (and space for another 16GB when I get around to expanding it even more) and a Sharkoon 5 bay eSATA enclosure. While one of the requirements of v1.0 was a neat form factor, physical space is no longer an issues so the main requirement is modular design, allowing for expansion (aka eSATA expansion modules) and a PCI or PCIe slot to provide a serial COM port for my homebrew console server setup.

A few weeks on and things are almost back to normal, in no small part due to ZFS’ ability to be imported from one system to the next. All the usual services I was running before we’re fairly easy to setup gain. The one thorn in my side is the Squeezebox server, whose port in FreeBSD is stale and unloved, resulting in dependency hell on a recent system. Despite being EOLed by Logitech, I’ve started playing around, trying to create a port the newest release of the recently renamed Logitech Media Server since it supports SQLite instead of MySQL (MySQL schema problems being the problems I ran into) and the community developed replacement is still vapourware.

I still need to get around to running benchmarks on the eSATA setup (which I’ve deferred until I install a 64GB SSD I’ve picked up as the long term system disk) and tuning ZFS to the system to the system settings. I’m still mildly in awe of the CPU bump. The v1.0 system used to take 4 hours to do a fairly predictable ffmpeg based transcoding job, which was long and intensive enough that I’d schedule them to run overnight. The v2.0 system with it’s 8 effective (HyperThreading enabled) cores, the same workload take a mere 14 minutes! And I still can’t find a way to get the system to draw more than 49W.

I <3 living in the future.

DIY Low Power Serial Console Servers, on a Shoestring Budget

I try to keep my home computer setup minimal, low power and out of sight. There is no dedicated computer space, everything is either portable, resides in the media centre and/or runs headless by default. It’s is great for keeping the house neat, but a pain when something goes wrong and I need to debug it in place.

For years, I had kept a USB serial cable ready to go beside the Soekris router, in case I needed to get in the console. But hauling the floating monitor up to the attic whenever the NAS had an issue became an inconvenience. So I came up with an idea from my professional life, console servers.

But there were two problems, what cheap, low power device to use, and how to get a serial port on the NAS? Turns out the second question was easily addressed when I noticed the COM connector in the main board in the NAS. I just needed to add a DB9 connector, or so I thought. Despite trying a variety of settings and speeds, I could never quite get the output at the correct speed and settings, which is a solvable problem, with enough time. I was prepared to live without serial support into the BIOS.

For the low power devices themselves, I considered SheevaPlugs, GuruPlugs etc but always held off since I didn’t want to have to spend over €100 (plus shipping) for each device. So I kept hauling the monitor around, up until last year when the Raspberry Pi was released. The 1 unit per order slowed me down for a few months, but I managed to amass 3 of them (2 console servers, and 1 toy) by the end of 2012. I got a handful of 16GB, recognizably branded SD cards from Amazon and I was making progress. I also needed cases for them, since the Soekris is in a cat accessible places, and I’m sure a cat would be curious about a circuit board at some point. So I got 3x of the elegantly designed AdaFruit cases from a UK reseller^Wcutter, which did the job very nicely indeed.

The result?

3 Raspberry Pis, in cases

I now have a Raspbian (eventually I’ll swap it out for FreeBSD after some testing) console server on my Soekris, which has already been invaluable flashing it’s BIOS and getting in via the console via SSH. I have another Raspberry Pi in the attic, ready for action once I solve the serial port issues on the NAS (which is in progress, but worthy of it’s own post). I’m even toying with a 3G modem on the Raspberry Pi on the Soekris as a complete out of band solution to fixing my home internet when I’m not there. Once I get that working, I’ll declare my home network over engineered. 🙂

Installing FreeBSD 9.0 amd64 on a Soekris net6501 (the long way)…

I figured I should document this here, since it really does belong somewhere on the internet.

I’ve been using Soekris systems as my home route/firewall/misc Unix box for about 5 years now and I’m quite a fan. I’ve slowly been coming to the realisation that my trusty old net5501-70 is going to become more and more of a bottleneck for me, I decided to jump to the new shiny, a net6501-70

It seems there is a known issue with FreeBSD 9.0 amd64 and the net6501, the GENERIC kernel fails to boot since an optional driver is required. So the options seem to be either install FreeBSD 9.0 in 32 bit, or do something a little creative to install 64 bit mode. In the end, I did both.

Originally, I tried in vain to replace the GENERIC kernel on the memstick installer with a custom compiled kernel, which didn’t work out so well. Next I tried to build a custom memstick image on one of my other FreeBSD amd64 systems, using the make scripts provided within /usr/src/release/. It seemed to be going well, but it was taking a number of days, which seemed way too long to build a 700MB iso image, so I gave up on that. I came very close to simply installing a freshly built world and custom kernel, but ran into issues I now know are FreeBSD boot loader stage issues (they’re just very poorly documented).

In the end, I installed FreeBSD 9.0 i386 on the net6501-70, and then using i366->amd64 migration steps, I did a side step over to amd64 (ignoring the parts about broken ports since I hadn’t installed anything from ports). I now have a freshly installed amd64 system I can continue to setup, it just took me a number of weeks to get here.

At least it wasn’t entirely wasted, I’ve learnt a lot more about FreeBSD boot stages and symptoms debugging problems. I’ve also learnt to use gpart, which is so much more intuitive to use than bsdlabel

Posted from Dublin, County Dublin, Ireland.

Going Dvorak

I’ve never quite been a touch typist.

Sure, I learnt to type from tutorial programs like Mavis Beacon, but for some reason I’ve never used my little (aka pinky) fingers, just my 6 fingers and two thumbs so I never considered myself an actual touch typist. I’ve also always used UK keyboard layouts and much prefer it to the US layout. The reversal of @ and " never really bothered me as much as the shape of the return key. Since adopting Unix/Linux, I’ve also added the positions of | and ~ to my frustrations with the US layout. I never really gave any of this much thought since I was able to use pretty much any keyboard in front of me and never had any issues with RSI. At least that is, until recently…

In the last few months I’ve noticed more and more wrist pain, sometimes during the working day, but more so late at night or really early in the morning to the point that it sometimes wakes me up these days.

Since work is caring and considerate about these sort of things, they have occupational therapists around to do ergonomic assessments. So in the last few months, I’ve had a few assessments resulting in adjustments to my desk and chair layout and tried to take “micro pauses” every 10 minutes but nothing seems to make any significant difference. I even swapped out my trusty UK Apple keyboard for a Microsoft Natural 4000, which I found frustrating as hell, mainly because I am using a PC keyboard on a Mac which just feels weird (even after I swapped the modifier keys in software), too many keys are just in the wrong places physically, not to mention getting used to the curve in the keyboard.

I briefly tried a friend’s Kenisis Advantage out of curiosity, but I gave up 40 minutes later (considerably short of the 1 – 12 month learning curve it comes with) since I’m not a touch typist and it just felt weird having to stop and think about what I need to don’t my little fingers. I’m currently waiting on an order for a Mac layout GoldTouch V2 to try, but it will force me to use a US physical layout.

Researching various ergonomic keyboard manufacturers has left me with the distinct impression that UK layout Mac users such as myself are such an edge case that I won’t really be fully happy with any ergonomic keyboard. *sigh*

So the only thing left for me to do is to hack my brain. No, not literally, but I am going to have to remap my muscle memory to where everything is on a keyboard.

Since I’m going to go through this process to adapt to a US physical layout anyway, I might as well take the plunge and go Dvorak while I’m at it. Sure, it gives me a little more geek credit too, but it does sound like it may help reduce the wrist pain.

My largest concerns with going Dvorak are login prompts (and unlocking a screensaver) and using vim. For the login/password issue, I know I can always change the keyboard settings just at login prompt in OS X, so that should be enough of a crutch to get me started. Vim is a little harder, but I only really use a small subset of vim keyboard commands after the obvious ones (I kept getting distracted whenever I ran vimtutor). Conveniently, I found a handy little page of a qwerty vim user adopting Dvorak who documented her adventure. The page stood out to me since the domain name looks quite familiar. In fact, I know that very Dvorak evangelist!

So far, I’ve complete the initial preparation steps, like printed Dvorak & Programmer’s Dvorak layouts and stuck them to my monitor & configured OS X to have both input types easily available. Following this conversion advice I’m going to try Master Key for a while at a time while I get acquainted wit the layout before switching to it by default.

I’m slightly concerned by the initial hit in productivity, but I’m more concerned with the RSI in the long run, not to mention the impact of the current status quo is already having on my productivity, so now is as good a time as any really. Here goes nothing…

Posted from Ireland.

New Webserver

Having spent 4 years on the same web server, I’ve started migrating my various websites onto a new box, well a VPS actually.

This I just a test post to make sure that WordPress is working, since I exported the data & imported it into a fresh install of WordPress 3.2, in an attempt to ditch the majority of the cruft hat had built up from upgrades and host migrations over the last few years. So far, so good.

Posted from .

Long Live The Tablet

I’m a computer nerd, I don’t deny this fact. People who know me don’t dispute this fact either.

Given how heavily I use my laptop & 3G modem commuting and how frequently I’m on a plane, I figured I could find a tablet useful. Since I’m not a foaming at the mouth sort of Apple fanboy (I usually wait until after 2nd or 3rd generation apple hardware is released), and I have personal and professional interests in Android, I researched both the iPad 2 and the Xoom.

Spec for spec, I found them comparable. Sure, neither have HD screens, but I have a HD A/V setup at home for that sort of media experience. The Xoom has expandable memory, which gets expensive when you bulking it up to 64GB. The Xoom has an LTE upgrade, which is very nice, but I don’t expect an LTE network in Ireland in the next 2 – 3 years. In the end, I realised the decision was down to the apps available. The iPad is slightly longer established, hence the better ecosystem of apps.

4 weeks ago, my iPad finally arrived, and it took a lot less time than that for me to become a convert. Sure, I don’t have the freedom of Android, but I’m happy with the better polished apps found in Apple’s app store.

I have specific use cases I wanted a tablet for:

Digital newspaper
These days, I mainly keep on top of current affairs through Twitter for breaking news and Google Reader for general interest stuff. I also have a subscription to the paper edition of Wired, but the delivery delays and mounting backlogs are becoming annoying. I intend to convert to the iPad edition of Wired and maybe even pick up a few more periodicals, if they also have iPad editions.
Media viewer
I’m a big multimedia consumer. I watch TV episodes to distract myself when commuting and I have a lot of DVD box sets I’ll watch over and over. I’ve used my laptop for this over the years, but it’s becoming more and more awkward to whip out my laptop and watch something while standing on a crowded train. Sure, having to sync content via iTunes is annoying, but I expect that to change over time. In the meantime, I’m more than happy with my combination of a media player and a network streaming app (for accessing my NAS when I’m at home). It turns out the Xoom doesn’t have any dedicated h.264 decoding hardware, so I’m definitely happy with the iPad 2 here.
Portable Internet Thingie
This is pretty self explanatory. I’m a computer geek. I use GMail and other web apps a lot. I also have a robust To Do list system, so it’s nice having a better way to maintain it other than fighting with the small screen on my iPhone.

What I didn’t expect:

Aperture photo organising
I expected to keep using my laptop for sorting and organising my digital photos in Aperture. Turns out, there is an iPad app which will bidirectionally sync Aperture projects to the iPad, so you can add metadata to your photos and then sync them back. Handy!
Semi decent SSH access
I got an SSH app, but dismissed it pretty quickly since the on screen keyboard is klunky and slow to type on. Turns out, it’s handy for quick one line things, like restarting that un-babysat daemon on my colo box, as I’m on a train, while Nagios is going crazy paging me about it.
The lack of a native Facebook app
There are a few third party apps, but the thought of paying for one just feels dirty. I used to only use it occasionally, since I have a lost of friends between Google Buzz and Twitter. For weeks later & I’m not missing Facebook at all. I don’t expect to deactivate my account anytime soon though, it’s still a handy, all else fails address book.

All in all, I’m glad I waited a year before getting a tablet. I’m an early adopter, but I’m not a bleeding edge early adopter.

Posted from Greystones, County Wicklow, Ireland.

Homebrew NAS Box

Last June, I built myself a homebrew NAS box. Every so often people ask me about it, so I might as well document what I did once and for all.

For a few years, I was storing media and backing up my photos onto a single disk in a USB caddy. There are a few problems with this approach, if like me you’re a sysadmin (no redundancy, no SMART monitoring, limited capacity, etc) so I started thinking about getting a NAS.

I looked at the Thecus and QNAP models and found the higher end ones had some of the features I was looking for. But I’m a FreeBSD user and I wanted to start trying ZFS, so firmware hackability was one of the most important features I was looking for. None of the models I was looking at were very hackable. So now, I was in homebrew territory, which concerned me since I didn’t want a full sized system with a stack of disks in it.

Then on the recommendation from Colm Buckley, I ended up looking into Tranquil PC, who make the BBS2, a dual core 1.66GHz Intel Atom CPU, up to 4GB RAM system in the form factor of a NAS. I ended up getting one with 4GB RAM and filling it with 5x Western Digital 2TB disks.

Since I wanted to use the drive bays purely for storage, I was originally running the system off a 16GB CF card connected via USB, while I sorted out an IDE Disk On Module. But after opening my BBS2 up, I couldn’t find an IDE slot for the Disk On Module to go into, so I resorted back to the USB storage solution, but using a new 16GB SanDisk Cruzer USB key as the system disk.

The result? I have a 10TB NAS which takes ~40W of electricity to run (I should really confirm that with my power meter), runs FreeBSD 8.x, stores everything in ZFS and can interface with pretty much anything I want, from my Mac Mini powered Multimedia Setup, to my new Squeezebox Touch. It speaks NFS, SMB and AFP, so pretty much any client can talk to it, and it didn’t take anything more than a standard FreeBSD install to set it up. In the (somewhat) distant future, when I manage to use most of the free space I may end up getting the SQA-EX to add another 5 disks to the system.

DIY Multimedia Centre

While I’m not a die hard A/V nerd, I’m a fan of watching movies and a number of TV shows. Hence why I have a reasonably large, eclectic collection of DVDs. It was only a matter time before I would build myself a multimedia centre at home, but I’m being careful to keep it modular so I can adapt it to new technologies as they appear. Alas, I built it in stages, with a flat screen TV coming near the end. The following is an account of my current setup, in order of acquisition of each component.

When I was buying a DVD player a few years ago, I was careful to make sure it was future-proof. I’m very glad I chose to get a Pioneer DVD player, primarily because it is one of the higher end DVD players which can do 1080p upscaling quite well, and it’s relatively easy to make region-free with some IR codes and a laptop or a palm pilot.

Next came a computer; a 2007 vintage Intel Core 2 Duo Mac Mini to be precise. It does a fairly good job of driving the TV at 1080p, but with the help of a Toslink+DVI–>HDMI convertor. By and large, we run Boxee (a fork of XBMC, but with a more remote friendly UI in my opinion) and Apple’s Front Row on the Mac mini, as front ends to the media collection. I have grand plans to proxy specific traffic via the US so I can take advantage of Boxee’s additional features like Hulu, etc outside the US), but I perpetually keep meaning to find the time to do so.

The keystone of the system was my flat screen TV, bought mid 2009. After ~2 years of research and much anticipation, I finally decided upon the Panasonic 42" TX-P42V10 Neo-PDP Plasma TV. Why Plasma over LCD or LED? Plasma defaults to black unlike LCD, so it’s better for movies over gaming. As for LED, it was too new (ie unproven) and relatively expensive. Panasonic’s Neo-PDP was ultimately alluring since it lacks many of the legacy burn-in problems plasma has been plagues with over the years, not to mention being ultra thin (the TX-P42V10 is 50mm thick!) and low power* (power consumption is ~300W when on , <5W in standby). If that wasn’t enough, the TX-P42V10 has an ethernet port (it’s awesome being able to ping my TV to double check if it’s left on!), so it can talk to YouTube, flickr, etc. I also find it entertaining that deep within the TV menu the “system license” option prints the GNU License onscreen.

The glue that keeps everything together is a single remote control, the Logitech Harmony 885 controls everything (even Mac OSX on the Mac Mini via Remote Buddy) flawlessly.

In time to come, I fully expect to swap out the Mac Mini + DVI–>HDMI convertor to the 2010 Mac Mini with native HDMI output, as well as a Logitech Sqeezebox system to stop requiring the TV to be on to just to play music, as well as having a proper surround sound speaker set, once I find a wireless or semi-wireless surround sound set to adapt to my partially wired living room setup.

All in all, this media nerd is very happy. 🙂

* I’m a power conscious nerd who loves numbers, but that’s worthy of another (planned) blog post at a later date.

Reviving This Blog

I’ve been neglecting this blog for far too long.

I stopped posting to it for a number of reasons, primarily a lack of time along with a lack of interesting topics. The emergence of Twitter also played a part, since I find short updates much more convenient, plus Twitter’s API means I have a multitude of clients to use (I’ve never actually managed to get WordPress’ XMLRPC API working here) making posting much more convenient.

But I’ve got a number of thoughts these days too long for Twitter, so it’s time to review this blog and actually continue to use it.