Build your own home media server
One benefit of digital media distribution is that you can store all of your music, movies, TV shows, and videos as data on hard drives rather than as stacks on shelves. But with higher-quality files and larger collections, that can still add up to a lot of storage.
Finding the right storage solution for your needs can be tricky, as you try to balance performance with expandability. Throw in the need for backup and network-wide access and things can get quite complicated. I was very surprised then, to discover Lime Technology’s unRAID, a DIY storage system that provides a very powerful, flexible storage option at a very low price.
The need for storage
As a photographer and videographer, I produce a lot of storage-intensive media, and so need a fair amount of space. For music playback, I stream from iTunes to an AirPort Express attached to my stereo, and for video playback, I have a Mac mini attached to a TV, running Plex. So, I want a storage system that can also serve as a centralized media server. Finally, I need to keep all of this data backed up, as well as have a place for general backup of my various computers. I also want to be able to access the storage from any machine on my network and, ideally, access it when I’m away from home. I travel a lot, and when on the road, I invariably get a request from a client for some file that I don’t have with me.
Until now, I’ve been managing my storage needs through a combination of internal hard drives inside my desktop computer, and external USB hard drives on my desk. The problem with this approach is that a desktop computer only has so many bays, and every time you add another external drive you need another USB or FireWire port (or a hub), another electrical outlet, and another place to stack the drive. Finally, for every drive you add, you need a counterpart for backup, and all of these drives have to be plugged into a computer of some kind.
To suit my needs, I decided to build my own unRAID-based network-attached storage server—basically a stand-alone mini-tower computer that has a bunch of hard drives inside it. It sits on my network, and can be accessed from any other machine. I already had a bunch of hard drives, so it was a very cost-effective way to go.
Building an unRAID
To get started, you need a case, a motherboard, a power supply, and a lot of hard drives. Luckily, Lime recommends specific hardware—while you can try to use any motherboard or processor, choosing something from the list of recommended components will greatly improve your chances of getting a working system. The Lime forums are also full of recommendations from users who have built their own systems.
Building a system from scratch involves ordering the requisite parts, bolting them all to the inside of the case, attaching the appropriate cable connections, installing the unRAID OS and software on a flash drive, and then testing the results. I bought my parts from Newegg, for a total of $470, including tax and shipping. I bought the $69 Plus version of the unRAID software.
Note that the unRAID does not require much in the way of processing power, so you don’t need the fanciest motherboard, and speediest processor. In fact, you might want to consider underclocking your system—setting the processor to run at a lower speed. A slower machine will use less power and stay cooler, which means it won’t require a lot of noisy fans. For a media server, a quiet machine can be very important.
In addition to screwdriver proficiency, you’ll need some basic computer skills. If you don’t know what an IP address is, and how to determine the address of your computer, then you might have some extra steps to learn while assembling the unRAID. Building a machine from scratch is a great way to expand your skill set and understanding, though, so just budget some extra time. You might find it very interesting.
An unRAID contains data drives, and an additional drive called a parity drive. This is the drive that holds the backup data for all the other drives. The parity drive must be at least as big as your largest data drive, so you might want to purchase a big drive specifically for parity. Though my largest data drive is 1TB, I ordered a 2TB drive for an additional $120 to serve as my parity drive. This will allow me to add any drive up to 2TB, at any time in the future. No matter how many drives I add, as long as each is 2TB or smaller (the current max size for a desktop hard drive) I’ll be able to restore data if any individual hard drive fails (other than the parity drive, that is).
When you build the machine, it’s a good idea to label the physical drives themselves—Parity Drive, Data Drive 1, Data Drive 2, and so on. Attach the Parity drive to the first SATA port on the motherboard, and then the data drives to the other ports, in order. This will make it easier to keep track of which drive is which.
Installing the Software
You boot an UnRAID system off of a flash drive, which also runs the software. By booting off of a flash drive, rather than a hard drive, an extra bay is freed for storage. The OS itself is a stripped-down version of Linux, and the OS and unRAID software will fit on a drive as small as 128 megabytes.
The Basic version of the software, with support for up to three drives and with limited options, is free. For $69 you get the Plus version, with support for six drives, and $119 lets you install up to 20 drives. The software is tied to your flash drive, so you have to provide its specific GUID before downloading (all the info you need is on Lime’s registration key page).
Once the machine is built, you’ll need to prepare the flash drive, a simple process wherein you format the drive, and then install the unRAID package. After you boot the machine, you’re ready to start configuring the software. Configuration is fairly simple, you just need to tell the system which drive is for parity, and which drives are your data drives. It will need to do a little formatting and prep, but once it’s done, you most likely won’t need to do any more maintenance or management until you’re ready to add another drive.
After the initial setup—which may require you to connect a display in order to figure out the IP address—all future configuration is done via a Web browser (or, if you prefer, Terminal). I run my unRAID “headless” meaning I don’t keep a monitor on it. The unRAID’s Web interface is very easy, and provides all of the features you need for normal maintenance.
The unRAID software is also extensible, and there are a lot of nice add-ons. Some are easier to install than others, but as examples of what you can do, I’ve added Avahi, a plug-in that makes the unRAID appear in my Finder sidebar, just as any other Bonjour-aware server does. I’ve also added sleep capability—after half an hour of no use, the machine sleeps, which means its processor, drives, and fans shut down completely.
The unRAID offers a lot of great features. First, like a RAID (Redundant Array of Inexpensive/Independent Disks) it combines multiple drives into a single volume. And, like several RAID formats, it has built-in redundancy. By incorporating a dedicated parity disk, anything you copy to the unRAID can be restored should a single drive fail.
Unlike many RAID configurations, though, you don’t have to expand the unRAID with pairs of drives. You can add another drive, of any size, to the array at any time. So, if you run out of storage, all you have to do is add another drive to the system, and that drive’s space will automatically be added to the total pool of storage. In this way, the unRAID is like a Data Robotics’ Drobo. But while the Drobo comes in a $399, 4-bay Drobo ( ) configuration—which you can expand to eight drives by adding a $199 DroboShare ( ) and a second Drobo—or a $799, 5-bay Drobo S configuration, the unRAID can be expanded to hold up to 20 drives.
Like the Drobo (and unlike most RAID configurations) if a drive in the unRAID fails, you can take it out and replace it with a new drive. The unRAID system will automatically fill the new drive with the contents of the old drive. Thanks to this redundancy, the unRAID system can survive a failure of a single drive. What’s also nice is that the data is not “striped” in any way—each drive simply has directories of files, so even if multiple drives fail, you can still retrieve your data from the surviving drives. Also like the Drobo, you can add functionality that you might want (Data Robotics calls them DroboApps).
Finally, the unRAID system is extremely affordable. I had to buy a case, power supply, motherboard, and CPU, but I already had several drives. I simply took the drives out of all of my external enclosures, and some of the extra drives out of my tower, and put them in the unRAID box.
So, with the unRAID, I have a single device that, using current drive technology, can be expanded up to 38 terabytes, and allows for expansion one drive at a time, without losing any data, and without having to rebuild the entire system. All of that data is backed up, and the system can survive a single drive crash with no loss of data. Also, unlike a mirrored RAID 1 setup, half my storage is not used for backup. If I put in 10TB worth of data drives, then I have 10TB worth of usable storage (the same can’t be said for a Drobo). The box is attached to my network, so I can access it from anywhere, on any machine (the Drobo requires a separate DroboShare to work over a network). It shows up on my Mac like any other Bonjour device, sleeps when I don’t need it, and is speedy enough to serve HD movies wirelessly to my Mac mini.
Using the unRAID
With the unRAID configured and running, you can get to it from any computer on your network. If you’ve configured your unRAID with Avahi, then it will simply show up in your Finder sidebars, just like any other server. Otherwise, you can choose Go -> Connect To Server and enter SMB://unRAID IP address to access the server.
You can access individual drives on the machine, or specify Shares, which are single logical volumes that span multiple drives. For example, I have an Images share. When I mount it on any machine on my network, I see a single volume with all of my images on it. The images themselves are actually spread across all of the drives of the unRAID. The unRAID software takes care of deciding which drive to write to, and does so with the goal of minimizing the number of drives that are running at any given time. This helps keep the machine more energy efficient, quieter, and cooler. If you want a specific file on a specific drive (maybe because that drive is faster than the others) then you can simply mount a particular drive. Any files that you place on specific drives will still appear in the relevant shares. The unRAID software also lets you specify which drives you want to use for a share, so you could, for example, tell it to keep HD movies on your faster drives, and music files on slower drives.
As you write a file to the drive, the unRAID automatically calculates the relevant backup data and writes it to the parity drive. This process slows down writing a little bit, but if you have a gigabit network, then the unRAID is still plenty fast. I’ve found it speedy enough to work with large Photoshop documents, and I can stream large HD files from the unRAID to my media server over 802.11g, without any stuttering or stalling. As with any network drive, you can also use the unRAID for Time Machine backups, though you’ll need to make a simple modification to one Time Machine preference.
If you need to move a bunch of data onto the unRAID, you can temporarily turn off the parity drive. This will speed up your writes, and you can always turn the drive back on later, and initiate a backup sync.
The sleep plug-in that I installed also includes a wake-on-LAN capability. As long as your unRAID’s motherboard supports wake-on-LAN (sometimes referred to as S3) then you can wake up the unRAID from another machine on the network. This means you can stick the unRAID tower in a closet, and still activate it whenever you need. By using an open source router with a wake-on-LAN feature, I can wake the unRAID from anywhere in the world. dd-wrt is open source router firmware that you can flash onto a number of different wireless routers. In addition to extensive customization and management, dd-wrt provides a wake-on-LAN feature.
Best of all, when the server fills up, all I have to do is go buy another internal drive (right now, you can buy a 2TB SATA drive for less than $200) put it in the unRAID tower, and tell the software that the drive is there. That drive will immediately be added to my available space, and I can merrily go along copying media to the server.
The unRAID takes a little more work to get set up than an out-of-the-box solution, but it offers advantages that other systems lack, the least of all being lower price. If you’ve been hurting for disk space, and don’t mind getting a little technical, then the unRAID is a great option.