Download the Tom's Hardware App from the App Store
The reference for current tech news
Yes No

Reader's Voice: Building Your Own File Server

by

Perhaps you've decided to take the plunge and build your own personal file server. But why bother with dedicated storage hardware when the desktop hard drives in your PC already offer up to 2 TB of capacity? Personally, I built my own file server so that I would have a backup of my data separate from my working PC.

Another good reason to have a networked server is easier access to data from multiple machines. For example, if you have an MP3 collection and want to listen to it from a home theater PC (HTPC) in the living room, it is easier to have all of your music centralized and browse straight to it over the network.

A Cooler MAaster 4-in-3 module in the external bays of the case. This allows me to use four more hard drives than the case normally supports.

Of course, you can store any collection of files on a server without having to maintain multiple copies of your data on several systems. If the file server is configured to use RAID 5 or RAID 6, it will also be able to withstand a hard drive failure (or two) without data loss, unlike information stored on a desktop PC with a single hard disk.

The Why's Of NAS

There are many different types of file servers. The simplest is a basic external hard drive, which is cheap, fast, and flexible. As long as your data fits on a single disk, that’s perhaps the most economical route to backup your files.

External hard drive enclosures can offer many different interfaces. USB 2.0 is perhaps the most common. It isn't very fast (480 Mb/s), but virtually every computer has USB connectivity. Another popular interface is FireWire. There are two different FireWire speeds: 400 and 800 Mb/s. Most enclosures that support FireWire come equipped with the 400 Mb/s type. In practice, it is even faster than USB. But unfortunately, it’s less ubiquitous than USB. The newest (and fastest) external storage interface is eSATA. Running at 3 Gb/s, it matches the performance of internal SATA ports and is able to serve up more bandwidth than any single mechanical drive is able to saturate.

My old file server. It has a generic case with good airflow.

All of these interfaces, which attach directly to a single computer, are examples of direct-attached storage (DAS). DAS’ strengths are its simplicity, performance, and cost. On the other hand, when the host computer is off, you can’t access any of the files housed on a direct-attached drive. Another limitation stems from connecting directly to a host machine. Generally, only that host will have access to the stored data, and if you try to share the drive over a network, performance on that machine suffers as client systems hammer the DAS device.

The way around the shortcomings of DAS is by not attaching your external storage to a computer at all, but to a network instead via network-attached storage (NAS). As long as a NAS appliance is powered on, it can be accessed from any computer on the network. Chances are good that you’ll attach the device through a single Gigabit Ethernet connection, which should be fast enough for most folks. If it isn’t, you probably won’t be rolling your own file server, but buying a high-end unit with multiple gigabit links, lots of storage space, and support for teaming. 

File servers of the DAS and NAS variety often accommodate multiple hard drives. Some enclosures hold two disks and some hold more.  The box might support RAID 0 (striping, which can be faster than a single disk), RAID 1 (mirroring, which can protect you against a single disk failure), or RAID 5 (striping with parity, which can also protect you against a single disk failure). Some high-end boxes even support RAID 6, which is similar to RAID 5, but can tolerate two disks failing.

However, these RAID boxes have some limitations. They tend to be expensive. The Qnap TS-509 Pro cost $800 without storage, for example, but does support RAID 5 and 6. With that system, as with most ready-built storage boxes, you’re also forced to use the operating environment that is pre-installed, which might not be as flexible as the software you would prefer. Finally, while some retail NAS boxes can be expanded, most are limited to a single eSATA port or a couple of USB connectors.

So, let's see what we can do using conventional PC hardware to achieve the same NAS goal.

Share:
4
Comments
Read more
X
Submit

Comments
Read the comments on the forums
sub mesa 24/07/2009 15:38
Hide
-0+

Quote :Next are the various versions of BSD Linux: OpenBSD, FreeBSD, and others. They don't cost anything and are reasonably secure and reliable. The biggest limitation is they aren't as modern as Linux with respect to RAID support.

This is curious since BSD has the best performing RAID5 drivers i've seen so far. FreeBSD 8.0 also supports the latest ZFS version (13) just like OpenSolaris, and you don't have to use FUSE or any other userland-wrapper, since its a kernel implementation. The only thing i see BSD doesn't offer, is traditional RAID-6 support. But it does offer ZFS with RAID-Z2 which is comparable/superior to RAID-6.

So you loose RAID-6 support, but you gain alot because FreeBSD has a very sleek storage-framework known as GEOM. Its a framework that allows you to play lego with your disks. You can use GEOM modules like RAID0 or journaling and connect them to eachother in any combination you want. So you can have a chain that goes like: Disks -> RAID0+1 -> Encryption -> Journaling -> Filesystem. Checkout this wikipedia page for a list of available GEOM modules:
http://en.wikipedia.org/wiki/GEOM

So i would disagree in the statement that FreeBSD is lacking in terms of technology relevant to storage; its more the other way around. Linux is more universal and widespread, with alot of users and information found on the web, while BSD offers access to the latest technologies in part thanks to its license, which allows incorporation of Sun's Dtrace and ZFS technologies. Due to the GPL license GNU/Linux is using, these technologies may not be directly incorporated into the kernel, and a seperate kernel-userland interface has to be maintained so it runs outside the kernel, like the FUSE (Filesystem in USErspace) project did.

Its also awkward that FreeNAS is not mentioned. This is based on FreeBSD but has a simple web-gui that any Windows user should be comfortable with; a simple way to try something else than Windows. You can even use it in a VM solution like the free Virtualbox, to test its usefulness. FreeNAS 0.7 will also allow use of ZFS, albeit an older version (version 6). This does bring ZFS technology in very close reach of casual computer users without experience beyond Windows.

Also, a 64-bit CPU is pretty much required for ZFS as well as at least 2GB RAM but preferably 4GB+. Multicore is great if you want to use live compression/encryption. Note that Linux/BSD can do multiprocessing alot better than Windows so you'll want at least a dualcore. AMD cpu's do very well in NAS systems because of their low idle power consumption, low price, good multicore and FPU performance and the available chipsets are low-power and provide 6 full-speed SATA ports. AMD 740G/760G/780G and nVidia GeForce 8200/8300 chipsets are the ones to look for. The motherboards with these chipsets often come in Micro-ATX format, which still allows you two PCI-express ports (the x16 and one x1) for expansion with PCI-express SATA controllers.

petur 08/09/2009 13:45
Hide
-0+

Congrats: I can fit at least 4 of my NAS boxes into your one fileserver. Each of those NAS boxes has an 1.6GHz intel cpu and 1GB ram, an fits at least 4 drives.
Maybe that makes you understand why NAS boxes exist. Anybody can convert an old PC to a server, but it will always be a noisy big box.

sub mesa 29/09/2009 14:45
Hide
-0+

Personally i think you should not use too old components as they use too much power. Its better to buy a newer though low-cost system with energy saving components and have a very compact solution that is both silent and consuming very little power.

The Intel Atom is nice but the Intel chipsets are not, the ION platform is more viable, as it offers PCI-express; something Intel didn't want you to have because its afraid it might hurt their more profitable core2 cpu sales. Future generations of Atom will have PCIe though, and it will allow many additional SATA ports for your NAS at full speed.

Best offers

Newsletters


OK