Build a Cheap and Fast RAID 5 NAS

RAID ("Redundant Arrays of Independent Disks"), especially RAID level 5, is particularly compelling to geeks, even wannabe geeks like me. What's not to love? You lose one disk, throw in another and your data rocks on! This is the RAID 5 dream. RAID 5 reality, however, is not so compelling. In fact, many people who know they should be using RAID 5 systems do not or cannot use the technology.

The purpose of this article is to build an inexpensive RAID 5 Network Attached Storage (NAS) system. I'll then compare the home-built system to off-the-shelf products to see how they compare in terms of performance. If we cut enough cost and produce enough value, we might convert some of the RAID 5 procrastinating masses into RAID 5 users.

For this project, I chose a RAID card from LSI Logic's MegaRAID family of RAID 5 adapters. I found the MegaRAID family based on a Tom's Hardware review (Cheap and Reliable RAID 5 Storage Compared) of the SATA 4 port adapter; I have been using these adapters since late 2004. After building my first RAID 5 system on the MegaRAID SATA 4, I noticed on the 'net that the older IDE/ATA generation of MegaRAID cards was available on eBay at a fraction of the price of the SATA card. (At the time of this writing, I can buy an ATA card for $80 on eBay, while the LSI MegaRAID SATA card on froogle.google.com is $260.)

Those of you who are very frugal may wonder why I'm not using a software RAID 5 solution. Well, I tried to use software RAID 5 and even bought the O'Reilly book Managing RAID on Linux in order to learn how. Recovery is the single most important aspect of RAID 5 to be sure you understand before implementing RAID 5. But even with the O'Reilly book, I could not figure out how I would recover from a drive failure, step by step. So instead, it's a hardware RAID 5 solution for me.

After using hardware-based RAID for two years, I've successfully recovered from drive failures, but just as importantly, I've learned that hardware RAID gives you a degree of freedom in designing your NAS. A hardware RAID card insulates you from operating systems and their issues. Since I use a well-supported hardware RAID card, I have installed Windows 2003, freenas, Ubuntu, ClarkConnect, and SUSE, on the same hardware, without having to learn each operating system's setup for RAID and how to perform RAID recovery.

Join our discussion on this topic

Create a new thread in the Audio forum about this subject
This thread is closed for comments
5 comments
    Your comment
  • Anonymous
    interesting article, but the beauty of linux software RAID5 is that an array rebuild will happen automatically when you replace the faulty drive (well you have to tell it that you replaced the drive using mdadm). you can even simulate a failure and then watch it rebuild the array to get an idea of how your system will respond under different scenarios. here's a snippet of what needs to be done to replace the missing drive/partition:

    Rebuilding:

    To remove the failed partition and add the new parition:
    mdadm /dev/mdX -r /dev/sdYZ -a /dev/sdYZ

    where X is the array number (0,1,etc) and YZ is your disk/partition (sda3 for example)

    e.g.:
    mdadm /dev/md0 -r /dev/sde3 -a /dev/sdr3
    (where sde3 is the 3rd partition on your faulty drive, and sdr3 is the 3rd partition on the new drive)


    Watch the automatic reconstruction run with:
    watch -n1 cat /proc/mdstat
    0
  • Anonymous
    I understand that people fear the console commands. It can be a bit scary at first. But mdadm is pretty simple when you're used to console apps and a little bit of linux. It's mostly just mdadm and such. I currently run two software raids with 7 and 5 disks.
    0
  • Anonymous
    i believe his concerns with software raid5 were not just the rebuilding points. i believe he liked the fact that if the os drive took a crap, he could take the card and array and move it to any operating computer and it would power up and work. if you lose the operating system that wrote the software raid array, you have lost the array.
    0
  • Anonymous
    Hi! I have now suffered RAID5 failure due to one failed disk and the status now of my RAID5 controller is degraded.. Is it safe to rebuild the same failed drive? we're using MegaRAID WEBIOS controller? will the data be lost if we do this?

    We are in the hesitation mode of doing this.. :(

    I hope this will be stressed out...thanks for your help!
    0
  • Anonymous
    re: above

    Do not try to rebuild your raid array with a drive that already failed. I cannot say 100% b/c I do not use MegaRAID controllers, but it is telling you to get a new drive. Go get a new drive and follow the rebuild instructions for your controller. It is trying to save you.... don't outsmart yourself here ;) You will regret it.
    0