Ideas for a Home Grown Network Attached Storage?
Ken asks: "It seems that consumer level
1TB+ NAS boxes
are all the rage
right now. Being a digital packrat, with several computers/entertainment devices on my home network, I am becoming more interested in getting one of these for my home. Unwilling to dish out 1K or more up front, and possessing a little of the DIY spirit, I would like to build my own NAS and am interested in hardware/software ideas. While the small form factor PC cases are attractive, my NAS will dwell in the basement so I am thinking of a cheap/roomy ATX case with lots of power. I think that integrated gigabit Ethernet capabilities and PCI-Express on the motherboard are a must, as well as Serial ATA HDDs, but what processor/RAM? How strong does a computer really need to be to
serve files? What about the OS? Win2K3 server edition? WinXP Pro? Linux?"
"I have been using Red Hat and then Fedora Core since it came out but only in a workstation role, and I have little experience with other flavors. What file system should I use for maximum compatibility? I will need it to work with Windows, Linux and several UPnP devices. I am planning on starting out with two or three HDDs in a RAID 5 config. and I would like to be able to add more HDDs as space is needed without any major changes. Thanks for any ideas."
If you think you can beat a device like the Buffalo TeraStation go for it, you will be rich! It was shown at CES, and goes on sale next month in the USA for $999. Gigabit Ethernet, 4 250GB hard drives (RAID 0, 1 or 5 support), 4 USB ports to attach additional external storage devices, built in print server for sharing a USB printer, blah blah blah. I'm going to buy 2 of them!
Urge to post... fading... fading... RISING!... fading... fading... gone.
At work, we just got a slew of Aopen XCCube machines (they were out of the white ones, so I got black), and I have to say, they're quite potent. Onboard gig-E, onboard SATA, DVD drive, and room for several HDs internally (and more if you get a stack of firewire enclosures and slap in some 300-500GB drives).
The machines are fast enough to do anything a fileserver would need (and then some) they're quiet, as they use Duron chips for low heat/power, and they look good enough to put on your desk or whever you want them (if you're so inclined).
Considering that the cost of these machines was $699 CDN ($570 US) for a full small package, I'm imprsesed. You could probably do better building one one your own with a large case, but for a place where space is an issue (or where you don't need THAT much HD space or don't want to build one), it's an interesting machine.
Buy everything piecemeal. I just priced out a 900Gb NAS for $800, shipping included. Slap it all together, put your favorite Linux distro on it, and run Samba.
You won't be able to beat the price of the real thing by much, though: big hard drives are still expensive, and so are RAID cards (if you go that route).
Another one bites the dust
My current fileserver is an aging 600MHz P3, with 4 PCI slots, each occupied by a raid card. I've decked it out with 250GB disks, 4 on each card, 2 on the mobo, and 2 100GB disks on the mobo for swap,boot,and root. I've got onboard 100Mb ethernet, no graphics card, no sound. I've installed gentoo with a stripped down kernel, running samba, and it all works beautifully.
It's a fairly large box, in a full size ATX case, and the disks are also stored in a rack which I built and bolted onto the side of the case, as I ran out of space. Each partition is 1TB, using raid-0 (linear), as I don't care about redundancy too much. Power is supplied by a 450W supply, and cooling by a stack of old 6" server fans. Also, it lives in an outside closet, which helps to keep it cool.
In all, the setup has been relatively cheap, all the hardware is from eBay, and I've yet to have a problem.
I'm also running a bootp server off it, and am netbooting two media stations from it!
You don't. Take a bunch of disks, turn them into RAID5 array. Make a logical volume (LVM on Linux) and add the RAID-array to it. Create a growable device on the LVM and format with a standard gowable FS.
When you get new disks simply create a new RAID5 array and add that to the logical volume and add to your current and grow the FS on it.
You don't want everything on one big RAID0, I lost 200G of data that way. I can say I'll never do that mistake again.
hdparm in linux.
Wow, a front page article on Slashdot that amounts to, "gee, how do I build a server?" Spiffed up a bit with trendy, techie-sounding words, but cripes. This is FP news-worthy?
That said... if all you're doing is file serving, a tiny machine by modern standards is fine. 64 megs of ram in a P3/400 would make a very solid home server. If you want to use software RAID, though, it's a good idea to go faster... you'd want at least 1ghz for that, maybe 2, depending on how much traffic you were sending to the box and how patient/impatient you are.
Since it's going in your basement and you have no worries about size or noise levels, get a big whompin' case with lots of 5.25" slots. Cremax makes some nice enclosures that will let you put 5 3.5" drives into 3 5.25" bays, with good fans for cooling. They have multiple variants. I'm using the SCSI flavor, but you can get them in SATA too (and IDE, I think, but I'm less sure about that.)
I have an older 3ware 8500 RAID card, and it's dismally slow at RAID 5, even though it's supposedly 'optimized' for it. I don't know if the newer SATA versions are better, but while they are well-supported in Linux, and, being hardware RAID, are a total no-brainer from an admin perspective, my generation of cards was horribly, horribly slow. I get at least four times the performance using Software RAID on an Athlon 1900+.
This is how my network server looks:
Big case;
400W PC Power and Cooling power supply;
ASUS A7V333 motherboard;
Athlon 1900+, I think just 266mhz FSB (not sure);
1 gig of RAM (nice for caching, not at all necessary to have this much);
Ancient video card, Matrox Milllenium 2, I think;
3com 3c509 network card;
ICP Vortex 32-bit RAID controller, bought used. The first one I got was dead... had to replace it. I got it pretty cheap, intending it for another project that fell through, and so I ended up using it at home instead. I think it was about $100, but I'm not sure now. These boards KICK ASS. Great linux support, VERY fast. Awesome hardware.
6 18-gig 10KRPM SCSI drives; machine boots from this array, and Debian is installed here;
2 Cremax 5-in-3 SCSI enclosures;
1 3ware 8500+, in JBOD mode (software RAID is WAY faster);
4 80 gig IDE drives (small, but I set this part of the system up a long time ago)
The SCSI array is damn fast, an excellent spot for interactive, disk-intensive things like IMAP or big compiles, while the slower IDE array is ideal for filesharing.
You should be able to set up a similar system for, oh, $1500? And keep in mind... this is HUGE overkill for a home network, it would be a solid backbone for a company up to about 50 people... though it might need more drive space, and I'd probably want redundant power supplies in a really central machine. You could run mail, internal DNS, DHCP, a squid proxy, internal webserver, and Samba for that many people without it even working that hard.
File sharing is fundamentally a tremendously simple thing, and it just hardly takes anything at all to do a perfectly fine job. Once upon a time this was akin to rocket science, but at this point, even a garbage $200 PC from Walmart would probably be an okay fileserver.
Again: the specs on the machine above are wild overkill... swatting a fly with a sledgehammer. But if you want to spend that much money, or you have most of the parts laying around the house anyway, it'll do a damn good job.
Well, the LBD mailing list archive might be a good place to start, since I specifically mentioned it.
Patch 1
Patch 2
Says Tony:
"Here is an "example" patch to fix some of the LBD issues with various
filesystems (ext3, xfs, reiserfs, afs). Unfortunately it looks like
there are many more LBD problems with the filesystems that I didn't fix,
so I am just calling this an "example" patch that shows some of what
needs to be done, but doesn't fix everything."
He later mentions the only XFS fix is in some debugging code, and it appears to be the cleanest of them.
I've had enough abrasive sigs. Kittens are cute and fuzzy.
A few comments about this
-Get the best-value processor that you can find. You won't need the fastest thing out there, but it's better to have a little more "oomph" than you need. If you end up using an encrypted filesystem at some point, you'll want enough power to decript and keep the network "fed"
-Have a plan for adding a second network interface. Maybe you don't need it now, but once the DIY bug bites, you may find yourself wanting to use the machine as your NAT box or as a wireless access point or something like that.
-Think about noise and power use. Yeah, those WD Raptors are fast, but they're really loud, too, particularly if you buy a pile of them. You might want to think about acoustic material for the inside of the case -- your local car customizing shop can hook you up. You'll also want an "overkill" power supply for the case so that you don't have problems when you add more drives later.
-Think about heat and airflow. At this time of the year, it's easy to ignore (Dear Australia: yes, I know it's summer there now), but during the summer, stuffing the fileserver into the closet might not be such a good idea.
-Consider underclocking. If you do buy a better processor than you need, bump the speed down for now. Less power, less heat, less noise.
-Get a BIOS or hardware-level RAID mirror for your "root" disk. You can use software RAID for the data disks, but you want to be absolutely certain that you can recover the disk with information about the software RAID. The RAID does no good if you don't know how to access it.
-If you use Linux, LVM will become your new best friend.
-Consider buying hard drives that are carried by your nearest Best Buy/CompUSA/other computer store. You don't actually have to buy the initial batch from there, but if a drive in the RAID set goes bad, you'll want to replace it ASAP. It's nice if you can do that tonight rather than "in a few days".
--