Slashdot Mirror


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."

23 of 105 comments (clear)

  1. Why? by CommanderData · · Score: 3, Informative

    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.
    1. Re:Why? by log0n · · Score: 4, Interesting

      Some of us have the DIY spirit...

      Seriously, why buy something when you could 1) build it (probably cheaper) yourself and 2) learn more from building it? Most DIY projects have a habit of benefiting you at some point in the future in ways that you can't predict when you start them.

      Either you - not you personally, the rhetorical you - 1) don't have the time, which is acceptable, or 2) you don't have the knowledge, which you should be trying to gain, or 3) you are lazy, which is really quite sad.

      There's more to life than just spending money on a problem. There's actually figuring out the solution to the problem.

      $.02

  2. My solution by keiferb · · Score: 2, Interesting

    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.

    1. Re:My solution by Hast · · Score: 4, Informative

      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.

  3. See: by virid · · Score: 2, Interesting

    Samba.

    --
    "The world only exists in your eyes. You can make it as big or as small as you want." - F Scott Fitzgerald
  4. Be aware by GigsVT · · Score: 5, Interesting

    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.
  5. Samba has the best performance. by -dsr- · · Score: 2, Interesting

    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.

    1. Re:Samba has the best performance. by JabberWokky · · Score: 2, Insightful
      Why would I use Samba? I don't have a single Windows machine, nor do any of my roommates.

      When building your own, you're looking at unique specs. If you were buying something for a corporate environment I would highly recommend getting something with Samba, even if you don't use any Windows at the moment (for when the marketing consultant with a laptop needs to upload the large video file or whatever).

      But for home use? "Look at your needs" is better than "here's the best".

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
  6. Mac Mini + Firewire Enclosure by MaxQuordlepleen · · Score: 4, Interesting

    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:

  7. I want to build a 2.8TB storage array by Yeechang+Lee · · Score: 4, Interesting
    I'm very interested in this subject, and recently began a Usenet thread on the topic with this post:

    BACKGROUND:
    Inspired by http://www.finnie.org/terabyte/, a few months ago I started a thread to discuss the idea of building my own 1.5TB storage array using software RAID50 to hold video files.

    The main hitch keeping me from going ahead was that I had trouble finding eight 250GB drives at the price I wanted. Clearly, I wasn't thinking big enough; just before Christmas, I lucked out and bought nine Seagate *400GB* drives at $230 each (plus a $30 rebate on the first one) from CompUSA. I now have 3.6TB of raw storage sitting in a shipping carton in my apartment. Even with RAID 5 and keeping a drive as a spare, I'll have 400GB*8-400GB=2.8TB of space.

    PURPOSE:
    Video files (episodes of TV shows I already watch and enjoy, plus rips of TV shows on DVD sets I own). I'd like to build a MythTV system too, but the storage array comes first. No games.

    PRIORITIES, in order:
    * Stability. I'm very much in favor of build-right-and-leave-it-be as opposed to constant hardware tinkering.
    * Minize heat/noise. I have a studio apartment.
    * Price. I've already spent a fortune on the drives; I don't want to spend more on the rest than I need to.
    * Performance. Not that I'm against a fast machine, but I know that a storage server doesn't need the latest-and-greatest in terms of horsepower.

    PARTS:
    Advice is always appreciated. All prices are from ZipZoomFly.com unless otherwise specified.

    * Case: Antec SX1040BII, $92. I almost went with an Antec PlusView1000AMG ($72), but decided that a) the SX1040BII's 430W power supply might be enough for my purposes and b) if it isn't, a quality Antec supply for $20 that I can use someplace else is hard to pass up.
    * Motherboard: Gigabyte GA-7N400 Pro2 Rev 2, $98. I'm building a system with *massive* amounts of PCI traffic, and I'm hoping a Nvidia-chipset board will prove more stable than the hordes of Via-based models out there.
    * CPU: AMD Mobile Athlon XP 2400+, $89 at Newegg. The 2200+ is $10 cheaper but they're both rated at 35W. If there's a sub-35W processor that supports a 266-MHz FSB I'd like to hear about it.
    * CPU heat sink: I'm lost here. I've had a good experience with a Thermalright SLK-800 I installed three years ago, but current Thermalright heat sinks all seem to specify Athlon 2500+ and up. What gives?
    * CPU fan: A leftover Vantec 80mm fan. Loud but effective.
    * Memory: One 512MB DDR PC3200 DIMM. $80 at Crucial. My leftover 256MB PC133 168-pin DIMMs aren't going to work with the motherboard, right?
    * Power supply: Thermaltake PurePower 560W, $102. In case the Antec 430W supply mentioned above proves insufficient.
    * Drives: Eight Seagate Barracuda 7200.8 400GB ATA drives plus one cold spare, $230 each at CompUSA without rebate; currently $230 each after $70 rebate. Lite-On DVD+-RW drive, $60-100. Leftover Maxtor 13GB ATA drive for booting.
    * ATA controller: Two Highpoint RocketRAID 454, $87 each at Newegg. Unlike Ryan Finnie I am *not* planning on doing hardware RAID features; rather, I'm simply looking for high-quality ATA controller cards. If anyone can recommend high-quality non-RAID controller cards with four channels (or more) on each, I'd like to hear about it. For that matter, if four two-channel ATA controller cards are doable with my motherboard setup, I'd like to hear about that too.

    So, what do y'all think?
  8. Wait, wait, wait... by Xaroth · · Score: 3, Funny

    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. ;)

  9. One word: by saintp · · Score: 2, Informative
    Newegg

    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).

  10. Old hardware will do by madaxe42 · · Score: 2, Informative

    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!

  11. Power saving? by shooz · · Score: 2, Interesting

    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?

    1. Re:Power saving? by snower1313 · · Score: 2, Informative

      hdparm in linux.

  12. Re:There's only one problem with storage by tchuladdiass · · Score: 2, Interesting

    When you're dealing with that much storage, you really need to catagorize your files into what needs to be backed up and what doesn't. In this type of application (if it was me), most of the storage is likely to be filled with dvd rips & mythtv recordings, or backups from your main system(s). So you would want to backup a list of what you have, but you can always recover from original media (in the case of dvd rips, or off of re-runs for tv shows). Also, on a storage server you're more likely to have data loss from physical driver failure (hence the raid 1 or 5), Since you won't be playing with the system that much once it's set up, you remove a lot of risk factors that you'd have on a desktop system (accidental file deletion, filesystem corruption, ...)

  13. GMS P502 “Spider” + PCI-X + RAID5 by forged · · Score: 2, Interesting
    The P502 "Spider" motherboard from GMS features a 800 MHz PowerPC processor, 2x onboard GigE LAN, optional PCI-X expansion bus, 256MB ECC memory, 16MB onboard flash, runs Linux, consumes 10W of power and measures about the size of a regular pack of cigarettes.

    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?

  14. geeze... by Malor · · Score: 2, Informative

    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.

  15. Re:Do you know the bug references? by GigsVT · · Score: 3, Informative

    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.
  16. more than you need by beegle · · Score: 4, Informative

    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".

    --
    --
  17. Take a look at the PetaBox by TTK+Ciar · · Score: 4, Interesting

    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

    1. Re:Take a look at the PetaBox by TTK+Ciar · · Score: 2, Interesting

      Interesting comments regarding RAID. They seem to defy common sense, but common sense is not always correct.

      Yeah, though I'm not necessarily correct, either. There are plenty of smart IT professionals who disagree with with The Archive's conclusions regarding RAID. It may just be a contextual thing -- our data storage clusters are friggin' huge, and we only have three sysadmins, two of whom work part-time. A smaller system with more manpower and better discipline about following good procedures may fare better with RAID than we have.

      Just out of curiosity, why did you end up going with your third choice for OS (Debian) rather than your first or second choices?

      What I listed were my personal choices. At my own company (which only has two employees, one of them me) we use Slackware, and I periodically make sure all our software will "just work" on FreeBSD and Solaris, just in case we need to switch. But the PetaBox program at The Archive is/was very much a group effort. What I said about "go with what you know, go with what your supporting friends know" applies to business use as well. Joerg, our chief sysadmin, knows and likes Debian a lot, and had already put in a good chunk of effort on his own time tweaking a Debian box to play nicely in The Archive's larger framework. Our other sysadmins liked Debian okay, and at least knew a little more about it than Slackware (which is very old-school BSDish in ways). Brewster and Jon, two very important individuals at The Archive, were very much enamored of Debian's apt-get packaging system. FreeBSD wasn't even on the map; The Archive is very much Linux-centric.

      Given all that, when I was told to go make the architectural decisions on this new cluster, Debian seemed like a no-brainer. I didn't even waste our time trying to convince anyone that we should go with anything else. I'm fairly nonpolitical about technology, but a lot of people feel very strongly that their choices are the only good choices. Debian was acceptable to everyone who needed to be able to work on the new systems, and choosing it meant that everyone could slide easily into development and administration without kicking up any fuss. I hate it when engineers argue, and am very much willing to suppress my own ideas about what constitutes a "best direction" and throw my support behind someone else's good idea, if it means the team can pull together and do what engineers are supposed to do. (qv this page outlining my philosophies on engineering.)

      All in all, Debian was not a bad selection. It is a good, solid distribution, and it has served us very well.

      -- TTK

  18. Re:Small form-factor is not a problem by Triones · · Score: 2, Informative

    Please open your own computer and take a look
    before posting misinformation.
    I just checked the spec. Like most other
    SFF, it has only ONE internal 3.5 storage bay.