Posts Tagged ‘NAS’

Hidden World of Linux: Follow up Part 1 – NAS

April 10, 2008 4 comments

Since my previous post on the hidden uses of Linux attracted so much attention, I thought I would do a brief follow up adding a bit more to my conclusion in which I discussed the main drawback to all these great Linux distributions – power consumption. At some point I am going to buy a power meter and test a variety of old computers I have around the house to see how much power they draw, but for now I just want to give some illustrated examples of low power hardware that can be bought which are ideal for some of the uses described in my prior post.

This is the first of two follow up posts. This way I can go into detail about each specific section. In this post I will be discussing NAS (Network Attached Storage) and will follow up shortly with a post on Firewalls later.

Realistically retail NAS devices fall into two categories, ones with a single harddrive and ones with multiple harddrives.

Single hard drive setups

There are a large variety of single harddrive NAS systems available at fairly reasonable prices and, unless you need a specific feature that a Linux/BSD distribution like FreeNAS provides, it will likely be better to purchase a separate NAS drive. This way you do not need to worry about installation / upgrading potentially buggy software and the power requirement will be in the tens of Watts.

For the sake of argument, let us consider three hardware examples for building (or reusing an old computer for) a single drive NAS. The first is by far the cheapest – reusing your old PC. All that is really required is a new harddrive to replace the small one the PC would originally have been shipped with.

At an average price of £35 for a 250Gb SATA drive (slightly less for an IDE version,) simply reusing an old PC is by far the cheapest option, however there are a number of things to watch out for. Old computers used to have limitations as to the maximum hard drive capacity the BIOS on the motherboard would be able to address. Back in the days of single GB hard drives, a then theoretical limit of 137Gb must have seemed as far off as 32Gb RAM for desktops does today. Fast forward back to today; whilst modern systems are very happily addressing far more than 137Gb thanks to logical block (LBA) 48bit addressing, chances are you will want at least around 160Gb space for your NAS meaning this could be a problem for some of the really old hardware. The reason for this so called “ATA Interface Limit” issue (which is by no means the first in computing – check out this great article) is a mathematical limitation in the way in which harddrives used to be accessed at a very low level using discrete geometry (cylinder, head and sector numbers.) BIOS patches are available although these are few and far between.

Worn power supplies are also a potential hazard, check before deploying a system for 12/24 hour use that the power supply cooling fan is in good condition and that there are no overheating issues caused by an old or clogged cooling system in the rest of the hardware. Please do not open up a power supply – such an action could be dangerous if you do not know what you are doing. When in doubt, replace it – it will be cheaper in the long run than if you end up setting fire to your house or destroying your data through a power spike induced head crash. In summary, this option is by far the cheapest of the three, but there can be some problems along the way.

The second option I explored, would be to buy a complete, custom tailored PC system for use as a headless NAS. I went to one of the eshops I frequently purchase from and quickly, virtually built a low powered, cheap PC that would be suitable for such a purchase. Surprisingly, it turns out that building your own NAS box is a lot less expensive than I would have thought with my NAS PC costing a total of £108 (Full specification and links in appendix at the end of this post) inclusive of the £35 250Gb harddrive used in the previous example. This compares very favourably with the (currently) cheapest single HDD NAS box available from the same eshop which is £77. With your own PC, you get the advantage of customising the services your NAS provides giving you greater control coupled with expandability down the road, an option unavailable when buying a retail NAS. The downside to this is the increased power consumption. To mitigate this, I picked recent components which have power saving features like AMD’s Cool and Quiet as well as the special, low power consumption versions rather than going for a generation (or two) old technology which was roughly the same price anyway.

The final ‘self-built’ NAS hardware option I wanted to explore is building a NAS with ultralow power embedded components frequently used in routers / modems and in actual NAS systems. It is possible to buy a limited selection of embedded motherboards, some even with low power processors like the VIA C7 or AMD Geode. VIA C7 processor boards seem to be a lot cheaper, and I selected a board which had everything minus RAM, the HDD (hard disk) and a power supply. Unfortunately, due to the limited production scales of some of these ITX boards (you pay a premium for the miniaturisation) the cost of building such a low power device was higher than I anticipated. The total price for a small, very low power embedded NAS build was £143 (full specification in appendix at the end of post) also inclusive of 250 Gb hard disk drive.

As you can see, the cheapest option, (predictably) would be to reuse old hardware assuming it is only two or three generations old. In all three PC specifications, I have kept the harddrive size and cost the same in order to allow for a greater comparison, but I find it hard to recommend either self build option even given the extra flexibility that such a computer would yield running a BSD distribution like FreeNAS. Also, although FreeNAS is a fairly mature product, there is no guarantee that it will work flawlessly with the hardware you have (I had some ACPI issues with my test machine) which would render potential effort useless. If you have an old PC and hard drives lying around then you have nothing to loose by trying FreeNAS, I would even encourage it, otherwise I must stick to my original comment – if you are only want a NAS for casual backup on a single drive, buy an off the shelf product.

Multiple hard drive setups

If on the other hand you want more than a single HDD, this is where things start to get interesting, there are very few (reasonably) priced multi disk NAS systems on the market. The key exception is a piece of hardware I alluded to in my previous post which I would like to talk briefly now about. (I am sure other options exist, but this is the only reasonably priced one currently available in the UK market.)

The enclosure I found which would allow two drives to be used is made by Nanopoint and is model ‘Icy Box IB-NAS4220-B.’ It has an interesting feature set, supporting 2 SATA harddrives with Samba, NFS, FTP, RAID 1 & 0 as well as a USB to act as a print server. Unfortunately it is twice the price here in the UK than in the US but it seems to be one of the very few NAS enclosures that allows for RAID 1 across two harddrives. This was important as I am after a system that has built in redundancy – if one hard disk failed – another automatically had a copy of all the files. (Although the theory behind RAID is somewhat flawed – more on this another time.) I am seriously tempted to buy one of these and if I do I will write a full review with how it compares to FreeNAS at a later stage. UPDATE: I have found another similar device by Netgear (SC101 SAN/NAS device) although it only supports IDE drives, the other features seem roughly the same.

This is the point where FreeNAS starts to really distinguish itself from some of the commercial offerings. The reason is simple, anything more than one or two hard drives is seen as either SOHO (Small Office / Home Office) or Corporate grade and has an appropriate price tag and feature set. FreeNAS can, and will scale beautifully with a number of hard drives (even performing fault tolerant RAID 5 as well as the more popular RAID 1) although at the moment, it does not support clustering or failovers. This is relatively trivial as we are getting now into the realms of enterprise grade computing.

Due to the relatively simple firmware required to get these devices working (even with a variety of services) it will likely be cheaper over the course of a year to skip distributions like FreeNAS or OpenFiler and instead opt for a NAS drive enclosure, unless you specifically need some of the features FreeNAS offers or you are using several hard disks.

Related Idea : Virtualisation

Thumos made an interesting point in one of my posts about using a server running multiple virtual environments which each role (e.g. firewall, NAS / SAN, MythTV etc) all running on one PC. The downside of this would be, as he noted, dramatically increased hardware requirements and to be honest, I am not confident such a system would be able to handle all those roles effectively but I am not an expert on Virtualisation. Windows Server 2008 can do some pretty amazing things in this respect with their hypervisor based virtualisation system.

Related Idea: Windows Home Server

Although strictly speaking Windows Home Server is a completely different program (and incompatible with freedom (or F/OSS) software philosophies) it deserves a mention given the subject of this post. Built on a modified Windows Server 2003 r2 core, Windows Home Server adds automated backup as well as some impressive disk management tools. Perhaps the most striking to me was the absence of RAID as we classically see it. RAID has become ubiquitous for redundant, performance or server/enterprise grade storage solutions mostly because the only practical alternative is confined to high end data centers. Ask an IT expert or geek the various modes to connect multiple hard disks and invariably you will get a discussion involving RAID 0,1,5 (or mixed modes like 0+1, 5+0, 5+1, 6, 8 etc) and JBOD spanning with likely no mention of DFS or FRS. These are Microsoft technologies developed “in-house” by their Advanced Technologies Lab (ATL).

To understand DFS and its routes, I had to take a brief crash course in enterprise level computing as the technology was not initially developed for use in Windows Home Server finding its routes a few years before, however the similarly between DFS and the storage technology in WHS is very similar as Paul Thurrott notes in an early preview of WHS. Infact, DFS started life a as a way to transparently link various SMB (Samba) Shares in a way in which there would be greater flexibility, transparency and reliability in corporate environments with multiple data centers. DFS generally can be used in one of two ‘modes’, the first being locally administered (without an Active Directory) and the second being domain based roots which by their design provides redundancy and is the most commonly used. There is an excellent demo of this technology on the Microsoft website.

The key to software implementation of data redundancy in Windows Home Server is found in the transparent way storage shares are presented to the end user, not through a network mapped drive letter or a (classic) network share. Infact, WHS automatically shadow copies data in such a way that a copy of it exists on more than one hardware device protecting against failure. This is completely different from RAID 0 which directly mirrors the contents of an entire drive (byte for byte) onto another one to provide redundancy. In the event of a hard disk failure (or capacity upgrade) the RAID array must be taken offline and rebuilt with a replacement disk. Furthermore, because the data is mirrored from one hard drive to another, the maximum size of the mirrored array is constrained to the smallest drive in the array. Windows Home Server supports hot swapping of disks, meaning that if a hard disk fails there (likely) is no data loss nor interruption in service. If an extra drive is added (e.g. via USB) or an existing drive is hotswapped it expands the overall space available to encompass the new storage and automatically (shadow) copies the data on it’s existing drive(s) to (re)create redundancy.

The hardware requirements are significantly higher than just running FreeNAS, a minimum of a 1Ghz processor and 512Mb of RAM are required before the installation will continue making it twice (or 3/4 times) more resource hungry than F/OSS equivalents. The ability to access your data remotely (through Windows Live integration) is interesting as it acts like a RAS dynDNS service, but it means trusting a third party for your authentication. A properly configured local network with secure FTP or Samba services would provide exactly the same (if less flashy) functionality with the advantage of giving you complete control over who, what and where your network can be accessed from.


There are features that FreeNAS provides which ‘off-the-shelf’ NAS enclosures will not and for this it is an extremely good piece of software. For multiple harddrives and / or multiple users all requiring different services, I would recommend FreeNAS everytime possibly even with some of the ITX hardware (coupled with a PCI RAID card) suggested above, however for someone wishing to make a single HDD into a NAS for occational home use it is unlikely to be a smart choice.

Appendix : Example hardware costs

Please note, these are example prices correct at time of research, please do not go and take this as a recommendation of a system specification, it is for illustration only.

First example : Equipment already in your home.

Existing hardware eliminates a lot of initial outlay.

Harddrive: £35 (Seagate 250Gb SATA HDD) – Although I am not a fan of Seagate, there are better drives available.

Total Cost: £35

Second example: Building a very basic / cheap PC

Processor: £19 (AMD Low Power (45 W) AM2 Sempron)

Motherboard: £27 (MSI Motherboard)

RAM: £7 (512Mb Extra Value PC2-5400 RAM)

Harddrive: £35 (Seagate 250Gb SATA HDD) – Although I am not a fan of Seagate, there are better drives available.

Power Supply: £10 (Budget 350Watt) – Although I would STRONGLY recommend never buying a budget PSU.

Case: £10 (Budget ATX case)

Total Cost: £108

Third example: Building a low power ‘ITX’ form factor PC

Motherboard & Processor: £50 (Via iDOT) – Very cheap low power board

RAM: £7 (512Mb Extra Value PC2-5400 RAM)

Harddrive: £35 (Seagate 250Gb SATA HDD) – Although I am not a fan of Seagate, there are better drives available.

Case & Power Supply: £42 (Simple small case)

Total Cost: £143


The hidden world of Linux

April 5, 2008 7 comments

There are many great FOSS projects that utilise old PC hardware and give it a new lease of life. The best is desktop computing with various Linux distribution flavours like Mint, PCLinux, Ubuntu and countless others. In fact it is my considered belief that the best hardware to run Linux on is infact (almost) any machine that is at least 12 months old. It is possible, of course, to select components based on the degree (and maturity) of the specific support under Linux but this has two major drawbacks.

The first is the most frustrating; some categories of hardware have poor levels of Linux support. For example, most LAN cards are now supported natively but that is certainly not the case for wireless (wifi) equipment, particularly for some Broadcom and Atheros chipsets. Graphics cards are another great example of hardware that you have to be careful with. The best, bleeding edge graphics cards will likely not be fully supported under Linux due to the low frequency of binary driver updates from the manufacturers.

The second relates to notebooks / laptops. Whilst with PCs it is fairly easy to pick components which have good Linux support, laptops generally have proprietary or non F/OSS friendly chipsets which require tweaks or work arounds to get working. The issue is, the vast majority of the F/OSS / Linux userbase require the help of others in order to help them with the tweaks and work-arounds. Most people are not comfortable (or proficient) tweaking / compiling kernels as well as ACPI modules (or any one of the number of different patches required.)

Where Linux absolutely excels in my opinion is in embedded systems. By this I mean very low power devices or old computers which can be used headlessly for a variety of applications. Most people do not even realise they are running Linux at home in their router / modem, Freeview / Satellite settop boxes, Print / Media servers / MP3 players etc etc, the list goes on. Due to the GPL license requiring companies to release the source code of the software the produce, a few projects sprung up e.g. OpenWRT / WRT54G (followed by other organically grown projects) to modify such components. The philosophy behind these projects varied, but the common reason was normally to remove limitations and to improve / extend functionality.

Not only do such projects look to modify embedded Linux devices, but some great projects have sprung up to utilise old PCs every household seems to accumulate in order to fulfil a number of key uses. For example, comprehensive firewall distributions like IPCop or Smoothwall or NAS distributions like FreeNAS (although this is based on BSD.) These are not dirty hacked operating systems either but very mature, streamlined, low memory footprint distributions which run headlessly. Being totally administered through a web browser makes these distributions feel extremely professional and polished (even if the archaic hardware they are running on doesn’t) this being coupled by the extraordinary amount of options present really makes these projects an extraordinary example of the flexibility of Linux/BSD.

IPCop / Smoothwall / Monowall

I had played around with smoothwall before when I became interested in hardware firewalls, but after some tweaking I decided not to run it. Recently I was intrigued enough by IPCop (which started life as a fork of Smoothwall) to give it a go. I was immediately impressed by the degree of customisation and the number of configuration options which make a low powered computer suitable for use on a home network right the way upto a small/medium office network. The best way I can demonstrate IPCop is by reproducing an illustration from their Documentation describing a typical setup scenario.

Being able to completely separate the Green (protected local computers and servers) Orange (Promiscuous servers open to incoming connections from the internet) and Blue (Wifi / Wireless networks) allows for some incredible flexibility. There is a downside which I will discuss later.


I have been hunting recently for an inexpensive, two disk Network Attached Storage (NAS) system. I have found that such a thing does not exist (at least in the UK Market) and whilst there are plenty one disk NAS systems, they have limited options and security but above all, being one disk systems would not be able to support RAID. There are a few types of RAID systems (which I won’t go into) but I will explain why I wanted a NAS with RAID. The RAID in question is referred to as RAID 1 (Mirroring) – what this means, is that any data one harddrive is automatically copied bit for bit to the second harddrive. Whilst this is not how the actually system works, it means that one harddrive can fail (unlikely) and the data will still be intact. When talking about pictures of friends and family as well as critical documents, I do not like to risk storing it on a single harddrive – I had one fail on me a little while back which cost me almost a year of pictures and data. The few solutions available on the market would cost around £220 for a dual SATA NAS enclosure and two good quality harddisk drives. (How I decided on these and what to look for in a Harddrive is beyond the scope of this post.)

On that basis, I considered the cost to me of setting up a software RAID using an old computer. Provided you have an old computer with at least 96Mb of RAM the only expense is the harddrives which scales based on the amount of protected storage you wish to have (e.g. 80Gb – 1Tb.) It is important to note however, that since two harddrives are being used to store the same data, you will only have the formatted capacity of one harddrive not two. Once installed and up and running, FreeNAS silently provides free and fast access to your data whilst allowing a huge amount of flexibility with regards to how that data is served. Not only does it natively support SAMBA (or SMB/CFS used by Windows), NFS (Unix implementation) as well as FTP and others. The FTP interface is so advanced you can explicitly specify which files / folders are shared and what permissions users have. This allows you to access, add / change and remove files remotely allowing you free access from wherever you are in the world. The cost of reusing and old system coupled with the cost of two IDE harddisks is a lot less than a NAS enclosure I taked about in the previous paragraph.

The Others

Home Automation (X10), media centers (Freevo/Geexbox and MythTV) and PBX telephone systems (Asterix) are great examples of other mature projects using linux. I will not discuss these in this post.

The Caveat : Power consumption

With more and more emphasis on global warming, I am getting more and more conscientious about my personal power consumption. Normally I would not be too concerned, but given the number of systems I run (sometimes for 12+ hours a day each) I am less than willing to introduce boxes which would be on for 24 hours. Whilst there are a variety of options in the distributions mentioned above to auto shutdown at prespecified times, it negates their usefulness if I have to remember to switch them on. What if, for example I am away for a few days and want to access my data or have my Media center (running MediaPortal) record something – since I shut all my equiptment down every night (I used to run it through the night running Folding at Home) I would physically have to switch it all on every morning. This obviously is not something I would be able to do remotely.

Whilst power consumption has dropped recently with the low power Core 2 Duo processors (originally based on a low power laptop processor design from Israel – Pentium M) and power saving built into hardware like AMD’s PowerNow!, do not forget that the majority of the hardware running will not have these power saving features. It will instead be based on very obsolete fabrication (fabrication scale decreases over time allowing for better power consumption and higher clock frequencies) scales which are extremely inefficient by todays standards.

Projects that modify firmware of existing low power systems (like the WRT54g router) are of course exempt from this as they draw only a few tens of Watts per hour compared to the few hundred normal PCs use even when idle. It is a shame that such systems (or equivalent running Via C7 or AMD Geode processors) are not cheap to build as they would provide all the computing horse-power required at a fraction of the power requirement.

So, I hope this has enlightened you to some of the amazing things one can do with an old system and Linux/BSD, just be aware that although there may not be high equipment costs, over a few months the running costs will start to add up. Unless you are running an archaic system (Circa 1995) you should consider building (or buying a antique on ebay) a low power system.

UPDATE: Due to the amount of attention this post has recieved, I am in the process of writing two follow up posts going into further detail on some of the points raised here. Bookmark me or subscribe and check back later 🙂

%d bloggers like this: