Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I went with some advice I was given from someone I know to go with a RAID setup for this server I ordered. The specs are below. I plan on using this server to host multiple sites in a PHP/MySQL environment and an SVN repository in Ubuntu Server. I'd like to have a setup where the primary drive is mirrored so that in the event of failure on a drive the server could just use the other pair of drives.

I'm reading on wikipedia about raid setups and I see RAID 0-5, but don't see a 10 listed on wikipedia. Perhaps I'm just not sure what I'm looking for, to be honest I've never used anything RAID.

On-Board Intel ESB2 RAID controller - 0,1,5,10 SATA RAID

Manufacturer: SuperMicro
Model / Part Number: 6015P-TR
Processor(s): Dual (2x) Intel Xeon 2GHz 5130 Dual Core 64-Bit Processors - 4MB Cache, 1333MHz FSB
Memory: 4GB RAM (4x 1GB PC2-5300) - 8 slots on motherboard
Hard Drive(s): Four (4) Hitachi 500GB 7200RPM SATA Hard Drives
Optical Drive: DVD-ROM
Floppy Drive: Included
Network Interface: Dual 10/100/1000 Gigabit Ethernet
RAID: On-Board Intel ESB2 RAID controller - 0,1,5,10 SATA RAID
Power Supplies: 2 (Redundant) - 700W each
Form Factor: Rack Mount - 1U

I'm not sure the best route to take with RAID for what I'm looking for as I'm totally new to it.


update

At this point, when I select RAID10 from the raid controller and go into Ubuntu server installation it shows 2 separate 500GB drives instead of a single 1 TB drive. Ubuntu is not giving me any RAID options duration installation.

I'm thinking I'm just going to install everything on one of those 500 GB drives for the server, then have all my site's data on the other drive.

I need to get moving on this server, I can't spend weeks working out RAID issues.

share|improve this question
    
How many drives do you have, and how much write is going to this array? –  tore- Aug 2 '10 at 13:37
1  
4 drives, each 500 GB 7200 RPM –  Webnet Aug 2 '10 at 14:02
1  
May I suggest that regardless of which configuration you go for, add a hot spare if possible. –  John Gardeniers Aug 4 '10 at 1:52
    
What is a hot spare? –  Webnet Aug 4 '10 at 2:28
    
A hot spare is a disk that's on standby, and when another disk fails it is activated to replace the failed disk: en.wikipedia.org/wiki/Hot_spare. This would save you if one disk failed, and then the mirrored disk failed before you had time to replace the first failed disk. This is quite an unlikely situation, but not as unlikely as it may appear: en.wikipedia.org/wiki/RAID#Correlated_failures –  Josh Aug 4 '10 at 15:41
add comment

4 Answers

up vote 19 down vote accepted

The idea of most RAID levels is to provide better reliability or speed for arrays of disks using a combination of the below methods:

  • striping - splits data speed-efficiently across two or more disks +speed
  • mirroring - copies the data onto two or more disks -capacity +reliability
  • parity - a separate disk(s) to verify the data on the other disks is correct +reliability

You have to decide what's most important for you, capacity, reliability, or speed.

Raid 1+0

The official name for RAID 10 is RAID 1+0. Raid 1+0 is a good compromise between speed and reliability as it combines striping and mirroring. Using Raid 1+0, you will have 1TB of space.

How a RAID 1+0 hardware controller works:

+-----------------------------------------------------+
|                                                     |    :
|  500GB          500GB        500GB          500GB   |    :
|    |              |            |              |     |    :
|    +-500GB-MIRROR-+            +-500GB-MIRROR-+     |    : RAID Controller
|           |                           |             |    :
|           +---------1TB-STRIPE--------+             |    :
|                         |                           |    :
+-------------------------|---------------------------+
                          |
+-------------------------|---------------------------+
|                         |                           |    :
|                  OPERATING SYSTEM                   |    :
|                         |                           |    : Software
|                    APPLICATION                      |    :
|                                                     |    :
+-----------------------------------------------------+

It is important to understand that, with a RAID controller, the operating system knows nothing about RAID or multiple disks, it will merely see a plain, single hard drive. All hardware-controlled RAID configuration must be done through the BIOS.

Redundancy: RAID 1+0 vs RAID 0+1

RAID 0+1 is effectively the same thing as RAID 1+0, just the other way round:

                 RAID 1+0              ¡             RAID 0+1              
                                       |                                   
        [#]      [#]   [#]      [#]    |    [#]      [#]   [#]      [#]    
         |        |     |        |     |     |        |     |        |     
         +-MIRROR-+     +-MIRROR-+     |     +-STRIPE-+     +-STRIPE-+     
             |              |          |         |              |          
             +----STRIPE----+          |         +----MIRROR----+          
                     |                 !                 |                 

RAID 1+0 is far more commonly used, however, because it has better redundancy (smaller chance of array failure because of multiple drive failures). The probability of array failure for each RAID level is:

  • RAID 1+0: 1 drive fails: 0 (0%), 2 drives fail: ⅓ (33%), 3 drives fail: 1 (100%)
  • RAID 0+1: 1 drive fails: 0 (0%), 2 drives fail: ⅔ (66%), 3 drives fail: 1 (100%)
share|improve this answer
    
If I understand you correctly, with RAID 1+0 I would have 2 1TB drives as far as the system is concerned with all data being written to both drives as a form of redundancy? –  Webnet Aug 2 '10 at 14:31
    
@Webnet: That's the idea, but all the RAID stuff is handled by the controller, so the computer only sees one hard drive. I've added an ASCII diagram of how a RAID 1+0 hardware controller works. –  Josh Aug 2 '10 at 17:01
    
You're awesome... perfect. I've never set this up, I suppose it's very simple? Is it done in the bios or on the drive itself, some hardware setting? –  Webnet Aug 2 '10 at 17:09
1  
I believe you have that diagram backwards, you want to pair the disks in mirrors (raid1) and then stripe the two pair (raid0). If you do raid 1 over raid 0 (as your diagram shows), loose one disk in a pair, and that pair is useless, loose one disk from each pair, and you are dead. Raid0 over raid1, you can loose one disk in each pair and not loose anything but hair (read performance will drop a bit, but that is all). –  Ronald Pottol Aug 2 '10 at 21:18
1  
You're still wrong about the probability of array failure with 2 failures on 4 drives. On a RAID 1+0 (stripe over mirror), if you lose both disks in 1 pair you lose data, so the array failure probability for 2 drives failing is 33% (you lose the 1 drive in the already degraded array, out of the 3 possible); on a RAID 0+1 array (mirror over stripe), losing 1 drive degrades the entire array, so the probability of degrading the entire array with a second drive failure becomes 66% (lose either of the 2 drives in the remaining good mirror, out of the possible 3). –  Andrew Aug 3 '10 at 9:19
show 9 more comments

RAID 10 is not an official RAID level, it is instead a Nested Raid Level. It is effectively RAID 1+0, a stripe of mirrors. It is where you effectively take 2 or more RAID 1 sets, and stripe them into a RAID 0 set.

In a normal RAID 0 set, if one disk failed you would loose the Array, in a RAID 10 set, if one whole mirrored set failed, you would loose the Array.

So, in looking at what setup you want, it depends if you are looking for redundancy, speed or both. If it is just redundancy you are looking for, then RAID 1 or 5 would be better for you, you gain no extra redundancy going from RAID 1 to 10.

share|improve this answer
    
Since I have 4 drives... I'm guessing the best route would be for 2 to be a "shared" drive via RAID where they're treated as 1 drive. Then the other 2 to be mirrored with what the first two are written. Right? –  Webnet Aug 2 '10 at 14:00
1  
The point of this answer is that "it depends"... –  Nate Aug 2 '10 at 14:04
    
I'm looking for both. –  Webnet Aug 2 '10 at 14:07
3  
If you want both redundancy and speed, you want RAID-10. –  Nate Aug 2 '10 at 15:04
add comment

In a situation like this, your choice is one between reliability and speed.

You can go with RAID 10, which as Sam Cogan pointed out, is a RAID 1 (mirror) of RAID 0 (stripes). This is the higher performance option. As Sam also pointed out, you can lose one disk and still have a good set. Losing a second disk has a 50% chance of causing you data loss, because it's possible to lose one RAID 1 set entirely.

If you would rather trade performance for reliability, you can use RAID 6, which reserves 2 drives for parity information. Since you have 4 drives, you would have 2 drives worth of usable space (the same as RAID10, in this case). This is slower than RAID10, but at no time will a loss of 2 disks cause you to lose data.

share|improve this answer
    
If just 1 disk were lost, would I lose data or would the RAID automatically switch the other set of disks to read the data? –  Webnet Aug 2 '10 at 14:32
    
Chance of losing data: 1 drive fails: 0 (0%), 2 drives fail: 1/3 (33%), 3 drives fail: 1 (100%). More info in my answer: serverfault.com/questions/166300/which-raid-setup-to-use/… –  Josh Aug 2 '10 at 17:42
add comment

As always, ask into a room: "Which RAID level should I use?" and you'll get (N + 1) answers where N is the number of sysadmins in the room. You might want to read the numerous past posts on this topic.

For a 4 disk server I would say:

  • RAID "10" if you want to maximize performance. This one is a no-brainer. Note that RAID "10" is not a classical RAID level, it is a nested RAID, and depending on manufacturer implementation it is either RAID 0+1 or RAID 1+0.

  • RAID 5 if you want to maximize disk space. Don't use RAID 6 on only 4 drives, RAID 6 is for protecting against simultaneous 2 disk failure, and that is highly unlikely on just 4 disks. It's much more likely on a large (~10+ disks) array where rebuild times are also larger. Keep in mind that RAID 5's small file write performance is not good.

With RAID 10 you will have 1 TB space and with RAID 5 you'll have 1.5 TB (not correcting for file system overhead and harddisk manufacturers' marketing).

Don't forget to to set up proactive monitoring so that you'll be alerted if a disk fails, so that you can replace it and rebuild the array to full strength.

share|improve this answer
    
I'll go with RAID 10 then I suppose. Do you have any good suggestions on software to monitor this server that is lightweight? When it comes to RAID, is it a hardware or software configuration I should be looking for? –  Webnet Aug 2 '10 at 14:46
    
@Webnet: Monitoring is done by RAID controller vendor (via a dedicated network port or software that you install on the host server), and tied into your overall monitoring system via email alerts, SNMP, specific agents or something else. So look at your RAID controller manual. Now I see your "RAID controller" is a basic Intel on-board thing, so you probably don't have that many choices... –  Jesper Mortensen Aug 2 '10 at 15:02
    
Last question.... for now. Is there any configuration I need to do in order for Unbuntu Server to function with this RAID setup? –  Webnet Aug 2 '10 at 15:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.