Author Archives: Alex Forbes

Ubuntu Home Server 14.04 – A DIY NAS

It’s been more than 4 years since I wrote about home servers, but my Ubuntu Home Server article was, for a while, the most popular post on this blog. Since moving to the UK though, I’ve taken a more appliance-based approach to my home network. For the last few years I’ve been using a Boxee Box for media playback, and a 4-bay Netgear ReadyNAS duo NV2+ for storage, mainly to keep the bulk of my possessions to a minimum.

The appliance approach does have advantages. It is power efficient, easy to setup, and very low maintenance. But after getting an internet connection with decent upload speed, I wanted to run CrashPlan on the NAS without having to have another PC running. I managed to get it running by following directions I found here.

There’s just one problem:

3.3 months to upload 350GB is a little too long

3.3 months to upload 350GB is a little too long

Performance is abysmal, and I’ve only selected the most important data – my photos. I’m limited not by my internet connection, but by the NAS’s anaemic CPU and lack of ram (just 256Mb). Furthermore, it’s always had very slow read and write speeds – generally around 2Mb/sec, and loading a large directory via its Samba shares can take a while.

So I started to look for a replacement. My requirements:

  • Minimum 2GB ram
  • Strong CPU, preferably x86
  • 4+ drive bays
  • Linux based OS
  • Root access to said OS

The best pre-built option I could find which meets those requirements is the Thecus N5550, but at £383 it is a long way from cheap. And it barely meets the specs; an Atom CPU is strong for a NAS but not by modern x86 standards.

While the customised software shipped with a NAS does offer some conveniences, it also gets in the way of using newer Linux features such as BTFS RAID 5/6 (which is currently not considered stable but should be within the next 12 months). You’re also reliant on the vendor for distribution upgrades, and the priority is going to be shiny features which consumers will appreciate, not keeping the foundation OS up to date. The ReadyNAS NV2+ is currently running Debian Squeeze, and will be until the day support ends.

At this point I realised that a pre-made NAS with the level of power and flexibility I wanted doesn’t exist at a realistic price point. And with the end of Boxee support its days as a useful device are numbered, so a HTPC could be on the cards as well. It’s time to build my own server again.

Continue reading

They used to call this /.’d

Maybe these days it’s “hackernews’d”.

Some kind person posted a link to this article, which resulted in an email alert from Linode about outgoing traffic at midnight this evening.

This blog runs on a single wee Linode instance, but fortunately it’s over-engineered for its usual traffic volume, and served by nginx, php-fpm and the WordPress totalcache plugin.

It seemed to weather the storm really comfortably with load hovering around 0.2.

Network Graph

Wordpress Graph

Dear @Adobe and @Oracle, please stop offering crapware with every Java and Flash Player update. It gets old quick.

Unticking a box might seem like a small thing, but consider the following:

  • The number of Flash Player and Java updates are frequent due to security issues and staying up to date is very important.
  • Updating Java or the Flash Player is anything but a frictionless process as it is. For Flash, upon clicking the update prompt I am taken to a download page, where I must untick the box for whatever crapware is on offer, click download, open downloads, launch the download, close web browsers (and possibly other applications), click retry, finish. Java is a little better, but not much.
  • Many people have multiple devices to update which magnifies the annoyance factor.

We are not in the 90s any more. Apple, Microsoft and Google have all managed to make updates a 1 touch process (or less), and this is the expectation of your users.

So stop being precious about distribution, but in the very least, stop abusing the update process as a marketing opportunity. It is irresponsible and annoying to millions of people every day.

Sony Xperia Z3 Compact Review

z3c-1

Flagship smart-phones have been getting progressively larger. My first high-end Android device was a Samsung/Google Nexus S, which was comparable to an iPhone 3GS in dimensions. By modern standards it is chunky, yet it remains a good tradeoff between screen size, pocketability, and handling.

The two phones I’ve owned since the Nexus S have had progressively larger screens – I went to a Galaxy SII, and then a Galaxy SIII. But I never wanted a larger device than the Nexus S, just a faster one.

Continue reading

Google commits privacy seppuku at BT’s request

Update – Since this was posted, Max Allan and Damion Yates have investigated further and found that BT are intercepting DNS queries and replying with doctored DNS results, which I didn’t notice when originally researching this article. The title is therefore not entirely accurate, and BT are most probably doing this without any special treatment from Google, but the point that Google is facilitating this (by performing http redirects) stands. Please keep this in mind as you read :)

–Alex 25/11/2014

As I’m currently in temporary accommodation I have found myself without a permanent internet connection. 3G service in the area is pretty spotty, so I bit the bullet and ended up purchasing a single month BT Wifi pass, effectively piggy-backing a neighbours connection. I’m guessing they see very little of the £39 I paid.

It is well-known that BT has filtering in place, supposedly for the protection of children, as required by the UK government. I don’t agree with this policy, but accept that many do.

However when it starts to affect privacy, I feel that BT’s meddling of my internet connection has gone too far.

Case in point, when using Google on BT Wifi I happened to notice a new message on the side:

SSL search is off

This network has turned off SSL search, so you cannot see personalised results.

The security features of SSL search are not available. Content filtering may be in place.

Learn More | Dismiss

After digging into it, I’ve found that statement to be demonstrably false. In actual fact what it should say is; “We have disabled SSL search on behalf of your network provider.”

To which I say, thank you for giving me another reason to use duckduckgo.

Continue reading

Safely running bulk operations on Redis with lua scripts

This article was also posted on the Gumtree devteam blog

If there was one golden rule when working with redis in production, it would be

“Don’t use KEYS”

The reason for this is that it blocks the redis event loop until it completes, i.e. while it’s busy scanning its entire keyspace, it can’t serve any other clients.

Recently, we had a situation where code was storing keys in redis without setting an expiry time, with the result that our keyspace started to grow:
Continue reading

Host switch

This blog has just moved from a Rackspace Cloud host to Linode, which offers a lot more specification for the pound (quadruple the ram for one).

At the same time I’ve migrated from CentOS + Apache to an nginx + php-fpm setup, which is not exactly easy for WordPress, but it feels good to be in the modern era!

Let me know if you notice any problems :)

RMT tube strike – whose side would you take?

Tube strikes are unfortunately a fairly regular fact of life in London, and so far I’ve been unaware of the reasons the RMT (National Union of Rail, Maritime and Transport workers) feels strike action is necessary. So with the recent announcement of more strikes, I decided to educate myself this time around so I could either support the RMT and accept the inconvenience, happier in the knowledge that it’s for a good cause, or support TFL and just be angry.

Unfortunately, I’m just angry.

Continue reading