Slashdot Mirror


Which RAID for a Personal Fileserver?

Dredd2Kad asks: "I'm tired of HD failures. I've suffered through a few of them. Even with backups, they are still a pain to recover from. I've got all fairly inexpensive but reliable hardware picked out, but I'm just not sure which RAID level to implement. My goals are to build a file server that can live through a drive failure with no loss of data, and will be easy to rebuild. Ideally, in the event of a failure, I'd just like to remove the bad hard drive and install a new one and be done with it. Is this possible? How many drives to I need to get this done, 2,4 or 5? What size should they be? I know when you implement RAID, your usable drive space is N% of the total drive space depending on the RAID level."

9 of 898 comments (clear)

  1. Re:RAID 1 by arth1 · · Score: 4, Interesting

    For a file server, I'd use the combination of RAID 1 and striping known as RAID 1+0 or RAID 10.
    The benefits are that you get the same protection as with RAID 1, but lose the speed penalty, all without needing special hardware or spare CPU power for expensive CRC calculations.
    With a 4 drive RAID 1+0, you'll get read performance of 2x-4x a single drive, while writes will be from 1x-2x. In theory, that is. In reality, if using a RAID PCI card or motherboard solution hooked to the south bridge, you'll most likely max out the read speed.

    Anyhow, it's a very cheap solution that doesn't tax your CPU too much even if done through software (like with a highpoint controller), and it does give you piece of mind.

    The worst downside is that you will have to take the system down to change a drive (correct me if I'm wrong, but I've never seen a hot-swappable RAID 1+0 solution), and the performance before you do that will take a substantial hit.

    Raid 4/5 is nice because it doesn't waste a lot of drive space, but it comes at the price of very slow writes, and very high CPU use unless you also get a hardware controller with an onboard CPU.

    Regards,
    --
    *Art

  2. Re:RAID 1 by robi2106 · · Score: 5, Interesting

    No kidding. I wonke up one morning, turned on my system and found my one an only partition for my storage drive (non-raid) totally gone. WinXp Pro just decided to wipe it clean. I surfed around a while and find a nice Russian (or some other foreign site) that served up a juicy hacked exe for a harddrive recovery app. It did the trick and recovered my data by rebuilding the partition table based on the data (or something like that).

    I was even thinking of buying the app until I surfed to the company's site and found it was >$2K US. Screw that. If it happens again, I may not reciver my stuff.

    I didn't have anything critical on there, but it woudl have been very time consuming to re-rip my CDs again.

    jason

  3. Re:RAID 1 by dead+sun · · Score: 4, Interesting
    And if two drives go down in a RAID 1 you're how much better off than in RAID 5? RAID 1 consists of two drives. At least with RAID 5 you'd still have at least one good drive that you could hastily format and use if need be.

    The only semi-common RAID I know of that could handle two drives failing at the same time would be RAID 10, A mirrored set of striped drives, and then only if one side of the mirror died.

    For your diligence bit, I've actually worked with a machine that had a drive fail in the RAID 5 set and then as the hot spare came online and started rebuilding the data needed to keep the R in RAID another drive died. The whole set was then completely unusable and somebody probably would have been fired if there weren't a set of recent backups around. As it was a couple people got to work about 12 more hours on top of their 8 for the day to make sure the machine was running again by the next day.

    Thus my moral, RAID isn't a replacement for backups, as there still can be failures. RAID will reduce the frequency with which you need said backups, hopefully to never, but it can still fail. Nothing replaces a good backup.

    Oh, and also another good reason for RAID 5 instead of 1, there should be a bit of speedup since there's multiple disks involved, assuming, of course, your RAID card can handle all the XORs.

    --
    If not now, when?
  4. Re:RAID 1 by jsebrech · · Score: 4, Interesting

    DO NOT RELY ON RAID TO PROTECT YOUR DATA.

    Amen. I have vivid memories of typing rm -rf * in the wrong directory (and that was WITH pwd in my prompt). It took an entire week to duplicate the work lost.

    Combining the rm command and lack of sleep is like combining a loaded gun and your forehead. You can only do it so often before you destroy something valuable.

  5. Re:RAID 1 by Cecil · · Score: 4, Interesting

    Yeah, because if two drives fail in a RAID 5 configuration it'll work just fine. And a 2-drive RAID 1 also works fine if two drives fail.

    If you're having two drives fail before you can get one replaced you need better hardware or a better failure notification system, or both.

    And, speaking from personal experience, and both the theoretical and real-world benchmark tests, I can say quite firmly that the software RAID 1+0 on my dual P3 1GHz fileserver does give a 'spead boost'. Not the theoretical maximum of 4x read 2x write, obviously, but certainly a noticable speed boost.

    And finally, you complain about a writing performance hit under RAID 1? Have you ever even used or benchmarked a RAID 5 system? Computing parity information, unelss you have a *very* expensive RAID 5 controller, puts RAID 5 well behind every other type of RAID when it comes to writing speed.

    Like seriously man, have you ever even experimented with different RAID setups, or are you just extrapolating these ideas from something you read on the web?

  6. Re:Software raid by Oestergaard · · Score: 4, Interesting

    If it's just a mirror, writes are slowed slightly

    Hardware controllers with batter backed RAM (note; not all controllers have this), will have an edge over software solutions on ALL writes - no matter which RAID level you use.

    Don't even bother trying to do RAID 5 in software

    SW RAID is usually a lot faster than HW RAID solutions, when you factor out the battery-backed RAM part. Any HW RAID controller with battery backed memory will lose big-time to SW RAID on even moderately faster CPUs (like 500MHz P-IIIs), especially on RAID-5 which is compute intensive, an even more on RAID-6 which is also compute intensive but not XOR based.

    Modern HW RAID controllers have reasonably fast CPUs with XOR accelerators built in - therefore they can do RAID-5 as fast as the pure SW solution. But this is not the case with older controllers.

    I know of people who use 3ware cards for large RAID-5 servers, but only use the 3ware cards as "dumb" IDE controllers, and leave the RAID-5 handling to SW-RAID. The reason? Their benchmarks indicate that this is significantly faster.

    And when you think about it, it makes sense. Nobody puts a GHz processor on a RAID controller. Even a slow-by-todays-standards P-III is able to XOR more than a gigabyte of data per second - much much more than anything you put thru most file servers out there.

    So, the "HW RAID is faster than SW RAID" is true in one scenario only; when you have write-intensive workloads and a HW RAID controller with battery backed cache.

    In *all* other cases, SW RAID will be a win, performance wise.

    For a personal file server, I wouldn't hesitate to run RAID-5 in plain software. It's as fast or faster than any HW RAID controller in the sub-$3K price range, it's reliable, and the flexibility beats the heck out of any HW based solution out there (mixing IDE/SCSI, allowing a cryptographic layer between the RAID layer and the physical disks, etc. etc...)

  7. Re:RAID 1 by tedgyz · · Score: 4, Interesting

    The hot swap bays let me yank a drive out on my way out of the house if the place catches on fire. Yes, I know I should be storing that third drive at a friend's house, but it's too inconvenient to retrieve it every time I want to backup my array. So a fire may destroy everything if I'm not home or can't safely pull a drive on my way out. I'm comfortable with that.

    You can resolve this issue with high-capacity, portable storage. I keep all most critical stuff (software, licenses, photos, pr0n, etc.) on my 40GB portable drive. Forget those keychain things. The FireLite SmartDisk is a USB 2.0, aluminum encased laptop drive. It draws power from USB - it even worked on my old USB 1.l system. They provide a special power cable, in case your old USB ports aren't pushing enough power. I toss thing in backpack every day and lug it all over - it has yet to show signs of weakness.

    I totally agree with your configuration. For my Linux server, I've been using Linux (RH7.2) Software RAID-1 mirrored for ~3 years without a single issue.

    --
    "No matter where you go, there you are." -- Buckaroo Banzai
  8. Building a home fileserver by KaiLoi · · Score: 5, Interesting

    I have just finished doing this exact thing.

    I basically built a box to do nothing other than fileserv. I put together a nice simple old PC (550mhz with 256 meg of ram) and mounted it in an old rack mount case I had lying round.

    It's running debian with 2.4.26.

    I'm running software raid and installed 2 x 2 interface IDE cards.

    I threw in 6 seagate 120 gig drives (the ones with the 8 meg cache) and ran raid5 across 5 of them and a hot spare to rebuild the raid should a drvie fail. Each drive has it's own IDE channel to prevent channel faliure from screwing my raid.

    I'm using ext3 as the filesystem and wrote my own little raid mon script that SMS's me should a drive fail and alarms locally.

    This setup has been rock steady and gives me 460 (ish) gig of usable space after formatting.

    For added peice of mind the machine is plugged into a UPS that is connected to the machine via Serial. If the UPS kicks in it shuts the machine down properly after sending an alarm SMS (the DSL and switch are also on the UPS) (yes I'm a paranoid freak)

    This makes a perfectly good media and file server and I've had no problem with it in the few months I've had it.

    I also reccomend setting the spin down time onm the drives manually with hdparm. It was getting awfully warm in the box till I turned that on on the seagates. Modern drives are rather hot. ;)

    I have the whole thing mounted via SMB on my other boxes around the house and it's fast,(gig ethernet) reliable and easy.

    Tho do remember that no amount of raiding will save you if you lose 2 drives through some horrible freak of badness, and no raid level is going to protect you from a house fire. Hence mine also rsyncs all my absoloutely vital files (scanned family photos and docs) offsite to a file storage site every night at 2am so as not to chew my bandwidth dduring usable times. Don't forget the only truely secure data is that which is backed up.. and offsite.... twice. ;)

  9. Re:RAID 1 by bersl2 · · Score: 4, Interesting

    I've done that once. This is why I've started to touch -- -i in every directory with important data. In case of accidental rm -rf *, you're not fucked. I forget where I learned that trick, but I'm sure it will be a life-saver someday.