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.
If you're not worried about having it all in one big partition, do what I did. Get a big case that can hold lots of drives, and just keep adding in SATA or IDE expansion cards and drives. It's worked well so far.
If you do want it all on one big raid5 partition, good luck finding a way to add additional disks into it without rebuilding.
Samba.
"The world only exists in your eyes. You can make it as big or as small as you want." - F Scott Fitzgerald
.. If you're willing to fork out the kind of money to score you what I basically read as a pretty nifty desktop machine, you could just go off-the-peg and get a custom built 1 or 2RU NAS device (or a small box) for a similar kind of price, sans the hassle of building the thing and setting it up. Plug in and go....
?
Screw you all! I'm off to the pub
Common linux file systems (ext, reiser, etc) contains critical data-losing type bugs on file systems bigger than 2TB, except XFS. This was found to be the case in even the most recent 2.6 kernels.
Tony Battersby posted a patch to the LBD mailing list recently to address the ones he could find, but lacking a full audit, you probably shouldn't use any filesystem other than XFS.
Considering the gravity of these bugs, you might consider using XFS for everything, if the developers left these critical bugs in for so long, it makes you wonder about the general quality of the filesystems.
I've had enough abrasive sigs. Kittens are cute and fuzzy.
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.
I feel strange advocating a MS-originated protocol -- but the truth us, serving files via Samba on Linux is going to be the best-performing[1], most-compatible remote file system available.
As for hardware, for small servers I like Linux software RAID, but for a big multidisk farm, you can't beat 3Ware cards. They take nice cheap IDE drives and turn them into a SCSI RAID. Moderately expensive, but beautifully functional. Finally, I've been having good luck with Seagate and WD drives, and bad luck with Maxtors. Your mileage may vary.
[1] Samba beats the MS implementations of SMB/CIFS. No guarantees about Samba vs NFS, GFS, Coda, whatever.
I was thinking of using a mini and a single firewire disk for a somewhat similar project.
But, OS X has RAID capability, so you could use something like this:
just add some harddisks and a RAID controller to one of your existing computers? Saves adding YA device, and you probably already have a machine that's on 24/7 anyway.
Lemme get this straight. You asked Slashdot whether you should use Linux or Windows? Do you never read the comments around here?
;)
Oh, wait.
I suppose this is Slashdot. Nevermind.
That green slime had it coming.
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
So, I have been wondering about this myself, partic as I have a large number of almost big enough hard drives sitting around. An inexpensive alternative (with obvious performance hit) might be to use usb or firewire disk enclosures and add them en mass to whatever system you are using.
I realize that this is a bit different than your orig question, but it might be an interesting stop-gap solution, partic as the enclosures are about $25 each (without disk).
Backing it up. HD's have far outpaced backups in price/speed
1TB NAS? 400GB HD?
No problem. Want it backed up to ONE tape? Every day? Have fun.
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!
I would also like to build such a thing, but a box full of disks spinning 24/7 is likely to use a lot of power and give off a lot of heat. Are there any power saving solutions to this? It would be nice if there was some intelligent software that, when you try to play a movie off the disk, spin up only the disk that has the file, read a large chunk of it into memory, and spin the disk back down.
Is this doable?
You seem to know the issue(s) quite well, would you care to point out where to find out more? Specific bug numbers or URLs to specific documentation of the flaws would be nice.
hard disk storage is still accurately described by moore's law, so it dosen't make any sense to buy storage you need right now. if you need a terabyte now, then get whatever you need. if it is going to take a year to fill up a terabyte then start small and build up to a terabyte. when you get to a terabyte, you can take the money you saved and buy a 2 terabyte nas, backup the first one and have another terabyte to fill up.
i bought a 160 gig drive last year and for various tedious technical reasons the computer i put it in only recognized 120 gig. i went ahead and formatted it anyway figuring i would try to get at that final 40 gig when i needed it, only i haven't needed it yet, so i spent too much for that drive.
I want to build a fileserver, can you help me?
I want to delete my account but Slashdot doesn't allow it.
I did this a while back. (3+ years, so it's obviousely not 1TB).
My fileserver runs 24/7 and has been doing that for about 3 years (minus downtime for moving).
I use 4 40GB SCSI drives in RAID 5 configuration, using Linux software RAID.(Obviousely I would have used large IDE now, but these were the cheapest per GB at the time, and I already had the SCSI controller laying around)
This gives me about 136GB of useable space. PArtition is running ext3 as filesystem.
I have had one disk fail because of a bad solderjoint on the power connector. I had a spare disk put in and newer lost any data (just a bit of uptime), and the array could serve data while it was still rebuilding the new disk.
The CPU is a Pentium II 450 and it has 256MB of RAM. Is running on a Tyan dual mobo with builtin 10/100 and SCSI.
The server is running an older RedHar release with no GUI, upgraded to Kernel 2.6.8.1.
The RAID is shared on the network using Samba.
Read performance is decent, getting around 5-7MBytes/sec read speed which is pretty good on a 100Mbit link. Write speed is slower, around 3-5MB/s
For gigabit, the CPU should be at least a 1Ghz beast, and transfer speed to/from the disks are going to be the main bottleneck.
main(i){putchar(177663314>>6*(i-1)&63|!!(i<5)<<6)&&main(++i);}
Imagine this with a high-performance SATA raid controller [1] [2], in an enclosure barely bigger than the 4 hard drives alone.
Someone knows here to buy this motherboard? What about practical experience with this sort of configuration?
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.
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".
--
When we developed the PetaBox at The Archive, the idea was to use off-the-shelf PC hardware and maximize GB/buck, while keeping cooling and power costs low. It's worked out pretty well. See also my unofficial PetaBox web page.
It turns out that you really don't need much of a PC to serve files. We underclocked the cheap little Via C3 processors to 800MHz to reduce power and heat, and they still troop along nicely. SATA is not necessary, since you're going to be bottlenecked on the network connection anyway. We used 512MB of RAM per node, but only because our system runs a gaggle of perl scripts to provide a variety of services (file searches, XML-based metadata updates, etc). If you're just going to be running NFS or Samba, 256MB is probably plenty (unless you choose to run Gigabit over a mere 32-bit PCI bus, in which case 512MB or 1GB would be better, so that you're reading more from filesystem cache and pounding the hard drives over your overloaded bus less). Gigabit ethernet is a must (we used 100bT for the PetaBox, which is annoying at times, but the cheaper 100bT 48-port switches were instrumental in keeping the overall price of the system low). We stuck four hard drives in each case, mostly from previous bad experiences trying to work with eight-disk machines. I can't say too much about the disk failure rate statistics which incited us to switch to Hitachi Deskstars, but I will say that I'm glad our PetaBox is using Deskstars and I will only use Deskstars in my workstation at home.
If you really, really want to keep the gigabit pipe full while pounding on your disks, then a newer bus like PCI-Express is necessary. Otherwise, I'd be tempted to go with an older, cheaper (and imo, more reliable) Pentium-II or -III based PC. You can get solid, reliable, well-cooled and well-dustfiltered early model VA Linux servers with 500MHz Pentium-III's for $200 or less. I must stress the importance of buying a really solid, rigid case. Over time, normal computer cases get all bendy-wendy, turning every part into a moving part, including parts you don't want to have moving at all. Fans will start sticking, motherboard traces will start breaking, etc. Most of the rack-mountable cases are made of good thick solid steel panels, which makes them heavy as f**kall, but IMO that's a small price to pay for a system that will run forever.
For operating system, the most important thing is to get something you know how to run and maintain, or can get help running and maintaining. If you have geek friends who are willing to provide technical assistance, find out what they know best and use that. A well-known operating system will probably be of more use to you than a technically better, but less well understood, operating system.
Having said that, my personal preference is Slackware Linux, because I appreciate its philosophy of keeping things simple, and preferences for packages which are the most stable, as opposed to newest versions or lots of features. My second choice would be FreeBSD. Third would be the OS we decided to use at The Archive for the PetaBox nodes, Debian Linux. But if all you know is Windows, then go ahead and use Windows.
Regarding RAID, it's been my experience working at The Archive that RAID is often more trouble than it's worth, especially when it comes to data recovery. In theory, recovery is easy, you just replace a bad disk and it will rebuild the missing data, and you're good to go. In practice, though, you will often not notice that one of your disks are borked until two disks or borked (or however many it takes for your RAID system to stop working), and then you have a major pain in the ass on your hands. At least with one filesystem per disk, you can attempt to save the filesystem by dd'ing the entire raw partition contents onto a different physical drive of same make + model, skipping bad sectors, and then running fsck on the good drive. But if you have
I've used that on a few of my systems...
- Firewall for my wireless AP (via Matrox quad NIC)
- File server via samba
- Postgres
- Java development
- Personal email and shell stuff
- DHCP
- Caching DNS
For just a file server you can get away with a much slower machine.Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
Cheap USB based samba server. Just add usb drives and go:
d =135
http://estore.itmm.ca/product_info.php?products_i
I'm interested in a project that will be very similar to the original poster's. Ideally what I'd like to do is set up a nice RAID 5 array that can hum away in the closet, serving video and allowing me to rsync backups to it.
It'd also be nice if I could set the box up as a Myth back-end, then put a smaller, nicer, quieter Mac Mini as a myth back-end. And if the closet box could do some low-load web serving over cable, that'd be nice too.
But is this asking too much of one box? Will I have to get a hardware RAID controller and hardware MPEG encoder for it all to work? And what kind of power supply should I get for 5-7 7200 RPM disks?
I've been wondering where these products are. Like just about everyone else on /., I'd LOVE to get a 1TB server going with (virtually) no processor, a decent amount of RAM, and so on, BUT:
Why can't it be silent? I mean "drive noise + just about nothing" silent. The file serving can't use much more than a P2 for a family unit, so it strikes me that there should be a readily available fanless option.
If it's just running the file system + maybe a minor family intranet, I'd think you could run this off of a relatively modern PDA mainboard w/an IDE controller. This shouldn't be rocket science here.
Or is it, and I'm just missing something?
ceci n'est pas un sig.
- 128-bit filesystem (zettabyte?)
- Automagic volume management
- Rock-stable NFS implementation
Serving files on a home LAN is not really that heavy on the CPU, so anything that's on the supported Solaris x86 list should do, just make sure you stick enough RAM in it. Personally I'd go for something that doesn't consume megawatts of energy and is relatively quiet.We were also looking to build 1TB+, sata raid based nas server with a pcix gigabit eth card...
So far it seems its gonna be fedora core, on an ibm xseries 206 (real cheap in canada), with an adaptec sata raid card (8 or 16 connectors) and maxtor maxlineii drives (300gb). we'll get 5 drives first.. to make 1.2tb with raid5, and the onboard drive will just host the os in 80gb. we have a spare gigabit nic...
total price $2000 CDN or so..
the only downside for now is its only possible to put 4 additional drives in the 206, removing the floppy, and using the 5.25" bay somehow. if we can remove the cdrom drive, or use the little space in the bottom, we can put 2 more disks and we have it made.
it beats all other NAS servers' price/performance ratios by a wide margin and we'd know we dont have crap hardware....
oh one more downside. the 206's power supply is only rated at 250W.
"Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
Buy two $499 minis when they are released. Upgrade the size of the harddrives in both--they're already pics out that show how, this will satisfy your DIY urge. Have one rsync the the other daily with a cron job--I doubt that you'll be constantly writing critical information frequently enough that you require RAID. They are small, quiet, sleek, and beautiful. From what I've read, you can also buy video adapters for S-Video out to connect to your TV, so you can make them multi-task as: 1) media boxes, 2) NAS, 3) Airport express substitute, 4) AirTunes Express substitute. The cost will run you probably a little over $1200 (for two minis, mind you). For all the things you can do with them, they'll save you money with overlapping functions.
Linux at home
I guess it depends on your needs, but I found this to be an excellent solution in that its quiet, cheap, low power consumption, plus it acts as an itunes server. http://www.nslu2-linux.org/wiki/OpenSlug/HomePage
"I may disagree with what you have to say, but I shall defend, to the death, your right to say it." -Voltaire
My last effort in this area was a Dual Pentium 933 with 1GB RAM, and a 3Ware Escalade 6400 hardware RAID-5 (real RAID, it has a RISC on it) handling four IDE drives. My total cost three years ago was $500 for the server, $240 for the drives, and $300 for the 3ware controller. I installed Red Hat 7.2 at the time.
So why haven't I upgraded since then? I haven't needed to! It's still my fileserver, and has never had a problem. I have been especially happy with 3ware's linux software, and in their latest updates they have allowed rebuilding a RAID where there are known bad sectors, just so you can get SOMETHING back from a catastrophic crash.
you must be clueless, all it takes is Microsoft Active Disk, or LVM or Linux Software Raid or some hardware implementation. I mean really, its about an hours work no matter what u use.
For home use, I use:
Pentium 233
768mb ram
2 Promise adapters
2 60GB drives - RAID 1
2 120GB drives - RAID 1
100MB ethernet
el cheapo video card
300 watt power supply
1 big case
I care not about video - I haven't looked at the screen in months. It serves files reliably, cost little or nothing. I left space between each drive, added 2 extra case fans, and let it run. It has been rock solid reliable since day 1, which was about 6 years ago. Sexy? No. Effective? Yes.
-- "Never underestimate the power of human stupidity." - R.A.H.
I, like most around here, have probably been fighting with the same thing... right now I have a gentoo server with two 120s, and two 200s, both setup in raid-1 (so 320g total space) I'm not worried so much about performance, as ensuring reliable data.
My two 120s are both identical, but my two 200s are differing brands (yes it works, Software RAID, not hardware) It seems to me that, going with the same brand, while better for performance, means that if there is a manufacturing defect (these are home drives after all, not server SCSIs) that they could potentially blow at the same time. Or am I just a clueless luser for thinking that ? I remember at work when we had WD's in our Client machines, we had 60 go all within a 2 week span, im multiple offices.
Please, for the love of god, if you're not going to back your array up, MAKE SURE IT HAS SOME SORT OF REDUNDANCY! Merely striping the data is going to get you really pissed off when a disk fails. Note I said when, not if. I replace hard drives in our NetApps at work with frightening regularity. I no longer trust hard drives.
One solution that has worked for some people is to look for a large cheap pentium II server on eBay. You can usually get one for less than $200. 300 mhz is enough for casual file sharing if you put the maximum amount of ram in and put in a few IDE cards. Server 2k runs easily on these, but linux doesn't always because of propreitary hardware.
http://www.linksys.com/products/product.asp?grid=3 5&scid=43&prid=655
For some reason i can't find the price. But our company bought an older version, for $500
Regarding power efficient motherboards.
Ivan256 writes:
Ivan256 further writes:
MK40VN motherboards run about $39 from NewEgg.
Regarding RAID setups, I thought Gherald had some interesting comments.
rimu guy offered some cogent advice:
Don't forget to enable S.M.A.R.T. drive monitoring as suggested by k.ellsworth a
They're a bit power-hungry, but even the old ones are the best NAS boxes out there. Plug it in, turn it on, type a few lines of config, and Dave's your uncle.
> I feel strange advocating a MS-originated protocol
There are way too many Microsoft diehards now on slashdot. SMB was not created by Microsoft. It was created by IBM, and until recently most people refered to it as the OS/2 LAN Manager Protocol. Stop your Microsoft pimping. It's not welcome here.
$ 50 case
$100 motherboard with Gigabit ethernet
$100 1 GB of memory
$500 (4x250 MB HD @ $125 each)
$0 to $100 Linux with Samba package
------------
$750 to $850.