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

24 of 898 comments (clear)

  1. RAID 1 by Oculus+Habent · · Score: 5, Informative

    For personal use, a two-drive RAID 1 is probably the easiest way to go, and involves the fewest drives, but loses the most space (half). Raid 5 is the standard, but the hardware is more expensive and it involves at least one additional drive.

    For simplicity and low expense, even though you lose a full drive worth of capacity, go with RAID 1.

    You might want to read The Tech Report's recent article mentioned on Slashdot if you haven't already.

    --
    That what was all this school was for... to teach us how to solve our own problems. -- janeowit
    1. Re:RAID 1 by Anonymous Coward · · Score: 5, Informative

      You should really try out some of the SATA RAID solutions. They offer the best bang for your buck. I know that the next time I have a few hundred dollars lying around I'm going to go with a 1 TB RAID 5 with some WD SATA 250s. Also, Supermicro makes a very nice 5 drive chassis that only takes up 3 - 5.25" bays. This is the ideal home setup in my mind.

    2. Re:RAID 1 by ryanwright · · Score: 5, Informative

      The really best way is RAID 1 + a third drive for backups, on another system. If you can afford to pay 3 times the normal cost to store your data, this will virtually guarantee you'll never lose it.

      My fileserver has a mirrored pair of drives in front mounted, hot-swap bays. I have a third drive on my workstation and I sync to that every time I add significant amounts of data to my server. The mirroring protects against drive failure and the third drive protects against server failure, operator error, filesystem corruption or other problems that can wipe out a RAID array.

      Lastly, the stuff that changes often and is worth the most to me - small documents and other things I create - gets a nightly sync to the server's boot drive and I keep a month's worth of revisions. This lets me "go back in time" to retrieve things if I need to. Considering the relatively small size of this type of material, this doesn't take up a lot of space. I think the whole month's worth of revisions only takes up 10GB or so.

      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.

      --
      -Ryan, with the unoriginal sig
    3. Re:RAID 1 by kfg · · Score: 5, Informative

      The really best way is RAID 1 + a third drive for backups, on another system.

      At a different site.

      KFG

    4. Re:RAID 1 by ryanwright · · Score: 5, Informative

      I need to amend this, in case it wasn't perfectly clear:

      DO NOT RELY ON RAID TO PROTECT YOUR DATA. If you do, you will lose it some day. Raid only protects against hardware failure. There are plenty of other ways you can lose data and one of them will catch up to you eventually.

      If you can't afford to lose it, back it up to another drive on another computer. If you really can't afford to lose it no matter what, store your backup drive with a friend.

      --
      -Ryan, with the unoriginal sig
    5. 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

    6. Re:RAID 1 by MasTRE · · Score: 5, Funny

      >> The really best way is RAID 1 + a third drive for backups, on another system.

      > At a different site.


      In a galaxy far, far away..

      --
      Must-not-watch TV!
    7. Re:RAID 1 by z84976 · · Score: 5, Funny
      I have three 80GB IDE drives running RAID-5 on a server in a colo that is pounded 24x7. It's been in operation for more than two full years and hasn't failed.


      Of course it hasn't failed. See, there is some sort of weird universal law that applies in these situations. If you take the time to put in some redundancy (raid 5, or just mirroring) then none of your hard discs will ever fail. However, if you had used the exact same physical drives in a non-redundant fashion, you can bet your buttons they would have failed. It's just one of those things... like the drives know your situation or something. If they know that their failure won't really cause you major headaches, they figure it's just not worth their time to fail. They only strike when they know they're going to hurt you.

  2. Just remember the RAID song by 192939495969798999 · · Score: 5, Funny

    RAID 0, you need a hero,
    RAID 1, is equally fun,
    but RAID 5 keeps you alive!

    --
    stuff |
    1. Re:Just remember the RAID song by PhuCknuT · · Score: 5, Informative

      Raid 5 runs just fine in degraded mode until your extra drive gets there. I have one right now using software raid 5 in linux with a dead member waiting to be replaced. 0 downtime or data unavailability so far.

    2. Re:Just remember the RAID song by Shalda · · Score: 5, Informative

      And here's the definitions:
      RAID 0: This is a striped set, there is no redundancy. One drive goes, everything's gone. Useable space = 100%
      RAID 1: This is a mirrored set. Typically this involves 2 drives. One drive is an exact copy of the second. If a drive fails, you replace it and rebuild the set. Life goes on. Useable space = 50%. Most IDE raid cards only support RAID 0 AND 1.
      RAID 5: This is a striped set with parity. You get the performance associated with a striped set. Particularly on reads. If you have 4 drives, there are 4 stripes. 3 of those stripes are data stripes, the 4th is parity. Lose 1 drive and the parity information is used to rebuild the set. Useable space = (n-1)/n. To do this in hardware is typically fairly expensive.

      There's a lot of hardware solutions out there. It can also be done in software. Windows supports creating disk sets in software. Other options include the purchase of a Snap! server, or other brand of NAS. If you've got a little $ to throw around, NAS is the way to go. Plug it into your network, minimal setup, and your off and running. Not very upgradeable, and somewhat problematic if your drive does actually die, but I use them at the office for a zero maintenence file server.

  3. RAID 5 or RAID 10 by strictnein · · Score: 5, Informative

    Try RAID 5 or RAID 10 (not to be confused with RAID 0+1). This site has a nice overview of all the RAID options. And, of course, Wikipedia has some info.

    Quick overview:
    RAID 5 - Requires at least 3 HDs (many times implemented with 5 - can be used with up to 24 I believe). Data is not mirrored but can be reconstructed after drive failure using the remaining disks and the parity data (very similiar to how PAR files can reconstruct damaged/missing RAR files for the Newsgroup pirates out there). % of total space available dependent on number of drives used.

    RAID 10 - High performance, but expensive. You get ~50% of the total HD space as it is fully mirrored. So, 1 TB total disk space nets you 500 GB total storage space. Your data is mirrored so if one drive fails you do not lose everything. However, if you experience multiple drive failure you can be in big trouble.

  4. raid and ide channels by TheCoop1984 · · Score: 5, Informative

    Whatever you do, never have more than one disk on an ide channel. Only one disk per channel can be written to at the same time, so you will get absolutely horrible performance if you get more than one hd per channel. If possible, get an ide raid card (if you can afford it) or a SATA card/mobo and drives, which dont have this problem

    --
    95% of all computer errors occur between chair and keyboard (TM)
  5. Old PC + 4 channel raid controller = easy by patniemeyer · · Score: 5, Informative

    I went through this last year and here's what I came up with for the best benefit to cost ratio with the lowest hassle. In short, take an old PC and put a four channel raid controller card in it to do RAID 5. Add a big extra fan for safety and you're done.

    Here's what I came up with: Total cost about $1200 (probably less by now).

    0) Red Hat Linux, ext3 filesystem.
    1) 3Ware Escalade 7506-4LP card (64 bit card, but fits in 32bit slot)
    2) 4x 250Gb Western Digital drives
    3) Big fan.

    At RAID 5 This yields 750gigs (715Gb after crappy GB conversion).

    The 3Ware software has a nice web monitor interface and does daily or weekly integrity checks. It emails me if there is a problem - I did have one drive die already and replaced it easily.

    Pat Niemeyer
    Author of Learning Java, O'Reilly & Associates

  6. Re:search the fscking google by skirch · · Score: 5, Funny

    Another missed opportunity to use the internet's, uh, hottest new acronym: FGI.

  7. Dear Slashdot by ccwaterz · · Score: 5, Funny

    Dear Slashdot,

    which is better, SCSI or IDE?

    Googleless in VA

  8. www.google.com by baudilus · · Score: 5, Informative

    A quick note - if you re-initialize the RAID, it will erase everything you have. You should 'rebuild' the drive, unless you have a hot-swap, in which case you just take out the bad drive, pop in the good one, and ur good to go.

  9. Software RAID? by Suydam · · Score: 5, Insightful

    Have you thought about software RAID? Before everyone jumps down my throat, I realize that it's slower than hardware RAID...but, here is my rationale for using it:

    1) You don't need drives that are the same size.
    I've done hardware RAID, had a drive fail 2 years down the road and not been able to find an 18GB SCSI drive to re-insert to the array. That has the potential to jack your entire array. With software RAID, you buy a 36G drive, partition it so that 1 partition fits your array, and off you go

    2) It's a personal file server, so speed is less important than cost (i'm guessing). With software RAID you can mix all sorts of wonderous things together. IDE drives from the basement, SCSI-320 drives you stole from work and nearly everything in between. It's for flexible, and has no associated controller cost.

    3) It's easy as heck. You can configure it in Disk Druid/fdisk, and it works quite easily in any major distribution (I've done it in Slack, Debian, RH, Fedora and Mandrake).

    The major downside is that you cannot (as least I don't know how to) hot-swap drives. But again, this is a personal file server. Spend your money on pizza and beer, screw the SCA hot-swap drives that are going to cost you an arm and a leg.

    That's just my $0.02...flame away

    --


    Werd.
  10. Re:search the fscking google by douthat · · Score: 5, Informative
    I was thinking the same thing regarding "why doesn't he just google RAID", but your generalizations do not take into account the data types of all users.
    if you have more than two hard drives, the way to go is RAID-5
    Not necessarily. If you have 4 drives and require exremely fast disk writes and reads (ie, video) and you absolutely can't lose data, RAID5 sucks. You should go with RAID 0+1, because you can have the performance of RAID 0 and 1, without the parity overhead and without a significant slowdown on drive failure.
    If you have a problem, you remove the bad drive, replace it and reinitialize the RAID arrive.
    When a RAID 5 array loses a disk, performance is severely affected, as each "read" to the missing disk must be calculated by reading the same sector from every disk and caclulating the parity. When you replace the faulty drive, performance will still be terrible untill the entire dataset is rebuilt, which can take hours on BIG/SLOW drives.

    You also never touched on the possibility of him having only 2 drives, in which case RAID 1 would be the way to go for data redundancy.
    --
    She loves me: 09F911029D74E35BD84156C5635688C0 She loves me not: 09F911029D74E35BD84156C5635688BF ...
  11. Avoid Promise like the plague! by JoeShmoe · · Score: 5, Informative

    True story...had a personal fileserver with a Promise RAID card. I got the Promise card because it was cheap and had a good rating on a couple of review sites.

    What I didn't know at the time, but learned the hard way, is that Promises's RAID monitoring program "PAM" is a user-mode only application. That means that if you don't login, it doesn't run. Care to guess what happened to me?

    At some point while I was gone for the weekend, I can only guess something crashed and rebooted Windows 2000. When it rebooted, I didn't have it set to automatically login (why would I? it's a server). So "PAM" wasn't running when one of the drives in the RAID 5 set failed. Maybe it even had something to do with the crash, I don't know.

    Now, the point of PAM is that if a drive fails, an e-mail gets sent, in this case to my mobile phones textpage address. Since PAM wasn't running however, nothing was sent. The drive failed and, I can only guess, put off so much heat that it cooked the drive above it (why do so many cases mount hard drives horizontally above each other anyway?) and next thing I know, I can't login to my server from where I'm staying. I call a family member with a key to come by and they are unable to restart the server. It wasn't until I came home and read the BIOS messages that I understood why. Everything gone.

    I had a lot of stuff on CDR, but let me tell you, I was plenty outraged that Promise could design something so utterly stupid as a monitoring utility that doesn't know how to run as a service. Even to this day, PAM still will only run as a user-mode program, and even worse, you actually have to login to the program now to start it, which can't be scripted.

    F Promise. Only a complete and utter fool would be stupid enough to buy any of their products. May they rot in that special place reserved for child molesters. (Yes, I'm still bitter about it)

    - JoeShmoe
    .

    --
    -- I wonder which will go down in history as the bigger failure: the War on Drugs or the War on Filesharing
  12. 2 drives with a complete file copy at 4 am by tstoneman · · Score: 5, Informative

    Don't get too fancy with yourself on this one...

    You definitely don't need any type of RAID solution because it doesn't offer you what you really need. You say you want RAID, but what you really want is backup.

    All RAID solution deal with disaster recovery, but they don't deal with the situation where you accidentally rm -rf a directory that you wanted. If you mirror or RAID 5 your drives, you're still hosed because both drives will delete the files. In the end, this is more important and much more convenient.

    Instead, go with a better approach which is copy or tar your files every night (or every week) to a backup drive, preferably over the network on a completely different machine. This will prevent the problem of a power surge or accidental shutoff from corrupting both drives at the same time.

  13. Re:search the fscking google by flacco · · Score: 5, Insightful
    I have had ZERO problems with my server quality SCSI drives that still have 2 years left on their 5 year warrenty.

    there are two kinds of people: those who have had hard drive failures, and those that will have hard drive failures. i don't care if jesus h fucking christ himself blessed your hard drives.

    I suggest looking at getting reliable drives before looking at a RAID solution.

    and, if the poster is looking for the more-realtime-than-backup-restore reliability as he indicated, i suggest he look at raid BEFORE looking at drive quality.

    the name of the game is redundancy. a RAID array of cheap drives (let's remember that it stands for Redundant Array of Inexpensive Disks) *is* more likely to have a single hard drive failure - but it's recoverable. however, it's far less likely to have multiple, simultaneous drive failures on the same day (unrecoverable) than your one, expensive, better-quality hard drive is likely to have a single failure - which is unrecoverable.

    --
    pr0n - keeping monitor glass spotless since 1981.
  14. Re:Software raid by Ed+Random · · Score: 5, Informative
    Depends what kind of RAID you're doing. If it's just a mirror, writes are slowed slightly, and read performance is significantly improved over a single drive. Don't even bother trying to do RAID 5 in software. Buy a 3ware Escalade controller or a SCSI RAID controller if you need RAID 5. Keep in mind that many of the cheaper RAID IDE cards (Promise, for one) do much of their work in software too, and often perform about as well or even worse than straight software RAID.

    I've run software RAID-5 on Linux for several years on two of my home fileservers.

    The only problem I ever encountered were hardware failures (Promise *ack* *spit* PCI IDE cards) and one drive failure. Performance is not really an issue for home use; I can easily saturate my 100Mbps network card.

    My Fileserver: AMD Duron 1300MHz, 768MB RAM

    /dev/md0 441G 339G 93G 79% /home

    This device was built from 4x 160GB 7200rpm SW RAID-5 for online storage (including all of my digital photos, and my collection of CD's ripped to MP3).

    For backup I have an old Celeron 433, 512MB RAM box with 4x 120GB 5400rpm SW RAID-5

    The main fileserver is rsynced to the backup server once a week. CPU on the backup server is a bottleneck; the Celeron is a bit underpowered for rsync, but it works ;)

    My $0.02:
    - Software RAID is perfectly usable, especially for typical home use. Performance is adequate.
    - With RAID-5 you "lose" only one disk to parity so it is quite cheap to build
    - Yes, I'd really like a 3Ware Escalade but if the card fails I need to get a new one pronto; software RAID sets can be migrated to most PCs.

    --
    -- Gxis! Ed.
  15. 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. ;)