Home Cinema Choice logo

How you can build a media NAS for next to nothing...or even less

Martin Pipe's picture

If you have an old PC sitting around it’s surprisingly easy to create a NAS (Network Attached Storage) repository for your media. In this article, I’ll tell you how you can make one for next to nothing...or even less.

If you think NAS boxes are more IT than AV, then it’s time to think again. Blu-ray players, games consoles and digital set-top boxes are more often than not 'network-enabled' for access to content stored on a home network. The worlds of IT and consumer electronics are merging.

In the current issue of Home Cinema Choice (issue 174, on sale now) I take a detailed look at the various (free and pay) media playing and serving software options available. A dedicated NAS is the perfect partner for these.

The cheap alternative

The NAS was originally envisaged as a device for for 'backing up' computer data in an office. More recently, commercial NAS boxes come with a media server, for home use. This allows multimedia files held on the NAS to be accessed via compatible AV receivers and networked media players. Typically, you would copy sound and vision files from your PC to shared folders on the NAS. The PC containing the original files can then be shut down, unless it’s needed specifically for some other task. Interoperability is good, thanks to uPnP (universal plug and play) and  DLNA (Digital Living Network Alliance) compliance. These standards ensure that all your devices can all see each other. However, while there’s no shortage of commercial  NAS boxes available, they're still hardly cheap.

There is an alternative - a cheap and reliable DiY option that will allow you to try out the NAS concept for yourself before committing yourself to a larger purchase - and it involves the use of a spare PC, that residue of an upgrade you felt necessary when it could no longer play the latest games or run the latest Windows at better than a snail's pace.
Don't have such a PC? Well, they're cheap enough today. Computer shops sell machines that were left with them after their original owners upgraded. Other options are eBay (buy from a local vendor and arrange to collect), Freecycle, the workplace or that old standby the car boot sale. And that's where I acquired an eminently suitable machine.

For the purposes of this project, I spent a mere £20 on a six year-old Evesham 2.8GHz Pentium 4 (i.e. single-core) with 512MB of RAM (pictured above). Such a machine is ideal, although my home-built NAS will run on something as lowly as a 800MHz Athlon equipped with 256MB. Naturally, the machine should have Ethernet - ideally 100Mbps - whether on the motherboard or a plug-in card. Wi-Fi is just too slow for NAS applications. My £20 bargain lacked a hard drive - thanks to some technically-illiterate TV reporting in the past, many will remove this item from the machines they're selling because they're scared of others getting hold of their data.

Drive issues
Older PCs use the PATA/IDE interface standard, as opposed to the SATA that's employed by modern machines. Drives with the older interface are still available, but tend to be far more expensive than their modern equivalents (which, to add salt into the wound, have much bigger capacities!).

You can buy SATA interface cards (and PATA-SATA converters) for older PCs, but that complicates matters and in any case we're trying to do this on a shoestring budget! Computer shops may resell hard drives that have been checked and completely 'wiped' (none of the aforementioned TV reporters bothered to check on such a possibility). Freecycle may also find you a friendly computer-literate soul with a drive they're willing to give you for nothing. Until recently, PVRs like TiVo and Sky+ use the PATA standard - might you have a drive left over from an upgrade?

Having said that, I recommend trying to source a drive of at least 80GB in capacity if you're to do anything useful with your NAS - commercial models start at 500GB. In any case, if a drive was used in a PVR for any length of time it will probably be 'thrashed'. A final point relates to the maximum size of HDD that the PC can 'recognise'. Owing to limitations in their motherboard BIOS software, machines older than six years will not recognise all of the capacity of larger drives (by 'larger', we mean 80GB+ here!). Some motherboards can be 'reflashed' with new BIOSes that can deal with bigger drives. A search on the Internet will help.
That's a lot of hassle, though; the more recent the PC, then, the better - not least because faster machines will deliver better performance. Note that you can fit multiple HDDs into a PC for larger overall capacity. The downside is of course increased power consumption, so stick with as few drives as possible.

Another possibility is to press an obsolete notebook PC into service. These are much more energy-efficient than desktop machines, and if there's a mains failure you can safely shut down the machine on battery power. However, notebooks of useful speed and HDD capacity tend to sell for £150 or more. If you already have such a machine, no problem. If you don't, then your budget is already into low-end NAS territory.

Software options

OK - that's the hardware. What of the software that magically transforms your PC into a NAS? I investigated several types. Most were IT-orientated and made no provision for media applications. Others were chargeable; at this point I should also mention Microsoft's Windows Home Server - although not a NAS per se, it can run on hardware that is surprisingly modest by Windows standards. You can order a free 120-day trial from Microsoft's website.
One free NAS package that we came across - Amahi - seemed to press all the right buttons. However, Amahi is tied in exclusively with a version ('distro') of the Linux operating system known as Fedora.

The latter proved to be a real pain in the backside to install. Fedora is available in a 'live-install' version that will run from CD-ROM - the disc 'image'-like Amahi application that runs on it, is a free download. The idea is that if you like it, you can then install it to the machine's HDD.

However, running a full operating system from CD-ROM is very slow and despite a verified CD burn we experienced nothing but errors when trying to install it. Even the full DVD image, which installs Fedora on your PC, failed to install properly. Another option is running the install from a USB memory device, but few older PCs (especially those with Phoenix BIOSes) allow you to boot from USB. And so after spending far too much time unsuccessfully trying to install Fedora/Amahi on no fewer than three different PCs I reluctantly gave up. A pity, because Fedora has a reputation as one of the better Linux 'distros' - which suggests that some have been luckier in their attempts to get it going.

Choosing FreeNAS
In the end, I came across an ideal software NAS solution - FreeNAS. Completely-free, this compact NAS (70MB or so) is based around FreeBSD (a Linux-like operating system) and can boot off a USB memory device or CD-ROM. In other words, you can run it on a Windows PC without disturbing the operating system (having said that, the developer advises against using Windows disk formats like FAT and NTFS for networked storage).

For this test, I booted it from a CD-ROM (the image file containing the software is available from the developer's website) and used the memory device to store the system settings. It worked straight away with an old PC based around a Chaintech motherboard, Celeron processor and 256MB of RAM - all of the necessary device drivers seemed to be included.

FreeNAS provides many useful features. As with commercial NAS boxes, a built-in webserver allows you to remotely administer it from a PC on your network - just enter the IP address that it can automatically derive via DHCP.

It also has an in-built software implementation of RAID - a system that holds your data across multiple disks, with redundancy to ensure that data isn't lost if one fails - plus disk-management tools. With the latter, you can define disk partitions and format them, if it's a new drive or you're not bothered about losing the data on an existing one. If you're doing this, you're recommended by the software to use the native FreeBSD/UFS format. Multiple drives are supported for big stores or RAID applications. So too is encryption.

There's a BitTorrent client, plus a UPnP media server with support for DLNA and proprietary media players (e.g, PS3, Helios. XBox 360, Zyxel and D-Link). ITunes is also supported, as is dynamic DNS for remote access. Setup is intimidating to start off with, especially if your experience of IT is minimal; however, the knowledge you'll acquire will be useful. You have to define which disks you want to share. This involves 'adding' them with a disk-management tool, formatting them if necessary and then setting up 'mount points'. These effectively tell the underlying Linux operating system to 'mount' one or more of the available disks.

To get media onto the system, you'll need FreeNAS' integrated FTP (File Transfer Protocol) server - which needs to be turned on (services/FTP). There are plenty of free FTP clients for various operating systems - it may run on a PC, but FreeNAS is not exclusively tied to Windows thanks to its Web-based configuration and administration. Log into FreeNAS (using the IP address that has been assigned to it). Go to /mnt to access the storage, and create directories - I set up a 'media' directory, in which were placed audio, video and photo directories.

To these, you can upload the files (organising the media into further directories as required). Then it's a case of turning on the onboard UPnP server (services/UPnP) and adding the media folders. You'll also need to specify a directory for the media database file. An interesting facility is 'transcoding', which is useful if the player you've specified in the uPnP media server setup is incompatible with certain codecs or file types. However, you'll need a faster PC to take full advantage of this. In all, FreeNAS worked well. I tried it with a ShowCenter 250; it appeared on this player's list of servers alongside a dedicated NAS (Buffalo Linkstation) and PCs running Windows Media Connect. Media stored on the drives could be quickly selected - just as fast as the Linkstation - without streaming glitches.

Garage band
If you have a spare PC at your disposal and have taken the trouble to install a home network, why not give this project a try? Installing a home network, by the way, is no longer the hassle it once was. If you have broadband, it's fast becoming essential - not least because several PCs (and other devices) around the home can share the same connection. Many ISPs provide the necessary hardware - a modem/router - to subscribers free of charge. These products provide several Ethernet ports - one of which should be reserved for your NAS, whether a self-built or commercial one - and Wi-fi for modern notebook PCs, handheld devices and some media players. You should always use wired networking for media players that will be streaming high-bandwidth content (e.g., MPEG-2 or hi-def video). If you want to go the whole hog, run an Ethernet cable to your garage or shed (especially if insulation provides a degree of protection against temperature extremes). You can play media while you service your car - and even store your PC NAS there!

FreeBSD (a Linux-like operating system)

FreeBSD is not a Linux like operating system! FreeBSD is one real UNIX (BSD-UNIX) system.

NAS

Whoa

I'm going to my shed right now!! Brilliant article - time to resurrect the old beast from time before time and its a very PC (pun intended) way to recycle old computer junk. I'm on it!!!

File sharing with media player eaiser?

What would be the advantages and differences of using something like FreeNAS instead of using media player 11 with file sharing enabled?

I run a three-box system: My

I run a three-box system:

My file server is based around a single core AMD Sempron. I currently run XP on it but I'm looking at a rebuild to make it easier to use. I've got the TVersity server installed for if I ever need to stream to my PS3. It's as straightforward as a server can get - just a bunch of SATA drives in a single core PC with 1Gb of RAM.

I built an XBMC machine in an Antec MicroFusion Remote case with LCD screen and installed XBMC for Linux (using the Live CD as a base). If you use an nVidia 8-series GPU (which are built-in to a number of cheap matx boards now) you can use the VDPAU instruction set built-in to the latest nVidia drivers - I can play 1080p MKV with less than 5% CPU usage, so the system stays almost silent. The only problem with XBMC currently is lack of Blu-Ray support, but I have the PS3 for that.

Third box is an Acer Aspire Revo attached (literally) to the back of my bedroom TV. 160Gb HDD, connected to the server and playing the same 720p/1080p video as the lounge machine since the Acer also has a modern nVidia GPU.

In the 5th para under the

In the 5th para under the heading of Choosing FreeNAS, "These effectively tell the underlying Linux operating system to" should be "underlying FreeBSD operating system to" and it's better if you say that FreeBSD is a UNIX like operating system.

NAS? just use XP and the excellent Popcorn Hour

I have the following set-up that works:

1. Main PC running W7
2. 2nd PC set-up as a server using XP
3. Popcorn hour with YAMJ to watch my 1080p Bluray MKV files
4. PS3 streamer software to push to the PS3 the MKV files to another room
5. 2 Xbox360's accessing the media streamer from the W7 PC

Money and Power

the two reasons why freeNAS is better. Costs nothing and requires much less than windows to run. I bought an old dell off a guy for $50 and am running my NAS off a 170w ps., with 512mb of RDRAM. He had 40g and 160g drives already installed, I had another 20g and 40g, combined them with the ZFS option, and had no issues so far. Sure you could use Windows, but not for $50.

  • In the latest Home Cinema Choice:HCC 186 cover
    Panasonic's biggest and best 3D TV on world exclusive review! PLUS LG's passive 3D TV reviewed! Fabulous Platinum 5.1 speakers from Monitor Audio! Amp Wars as Sony and Pioneer fight for the upgrade market... a roundup of compact subwoofers for every room... and plenty more!
    Love home cinema? Then get HCC #186, out now!