Striping is a technique to store data on the disk array. The contigous stream of data is divided into blocks, and blocks are written to multiple disks in a specific pattern. Striping is used with RAID levels 0, 5, 6, and 10.
Block size is selected when the array is created. Typically, blocks are from 32KB to 128KB in size.
Parity: The use of parity bits is a common method of detecting errors in data transmission and storage.
RAID 0 (Stripe set)
Minimum of 2 or more drives
If one or more drive fails the whole array is lost.
Excellent performance (Blocks are striped)
Good if you want large capacity and don’t mind if you lose it all.
Array Capacity: (Size of Smallest Drive * Number of Drives).
RAID 1 (Mirror)
Minimum of 2 disks
Good performance (no striping. no parity)
Excellent redundancy (as blocks are mirrored)
Mirroring stores two identical copies of data on two hard drives. Should one of the drives fail, all the data can be read from the other drive.
Array Capacity: Size of Smaller Drive.
RAID 5 (Stripe with parity)
Minimum 3 disks.
Good performance (as blocks are striped)
Good redundancy (distributed parity)
RAID5 is a cost effective option providing both performance and redundancy. Use this for databases that are heavily read oriented. Write operations will be slow.
The capacity of one member drive is used to maintain fault tolerance. E.g. if you have 10 drives 1TB each, the resulting RAID5 capacity would be 9TB
Single-parity RAID 5 takes longer than mirroring as data has to be read from each drive in the set, with rebuild times taking longer the more drives there are.
Each disk increases the chance of the array failing,
Array Capacity: (Size of Smallest Drive) * (Number of Drives – 1).
RAID 6 (Stripe with dual parity)
Minimum of 4 disks
Like with RAID 5, read data transactions are very fast.
The capacity of the array is (N-2) times the size of the smallest member disk for the array of N disks
Read speed is (N-2) times faster than in case of a single disk – two disks in the row hold a parity which is useless to read. Such read speed values are roughly the same as in RAID 5
There is no performance increase as to the write speed in RAID 6, because every new write requires a recalculation and update of two different parity blocks
Due to the complexity of dual distributed parity, degradation can be substantial after a failure and during rebuilding. Dual redundancy may allow rebuilding to be delayed to avoid performance hit.
RAID 6’s double parity takes longer than RAID 5 to rebuild, although rebuild times are less of a consideration as two drives can fail without data loss.
Can lose 2 disks and still continue to work
Array Capacity: (Size of Smallest Drive) * (Number of Drives – 2).
RAID 10 (Mirror & striping)
Minimum 4 disks.
Excellent redundancy (as blocks are mirrored)
Excellent performance (as blocks are striped)
If you can afford it, this is the best option for any mission critical application (especially databases)
Read speed of the N-drive RAID10 array is N times faster than that of a single drive. Each drive can read its block of data independently, same as in RAID0 of N disks
Writes are two times slower than reads, because both copies have to be updated. As far as writes are concerned, RAID10 of N disks is the same as RAID0 of N/2 disks
You can lose up to 2 drives, 1 drive from each mirrored segment in the array. If you lose 2 drives from the same segment, your data is lost.
Rebuild times are fast with RAID 10.
Array Capacity: Total disk space / 2
Q: Should I go with RAID 5 or RAID 6?
A: I prefer RAID 6 even though RAID 5 has a write performance advantage. Please note RAID 6 has additional protection against block failures and controller errors by the extra parity. If zero loss of data is a priority, this is something to consider.
RAID 6 will withstand two failed disks, regardless of which disk fails. Also, if the disks are very large, RAID 6 would ensure no data loss in the event of single-disk failure while waiting for a replacement disk to rebuild. With RAID 5 if the hard disks are old then there is a greater risk of disks failing when you need to rebuild the raid array.
Q: I set up my server with RAID 10, six 2 TB drives. Does this mean there are three pairs and I could lose one disk out of each pair?
A: Performance will usually be better with 6 drives instead of 4, but it depends on how much you need to protect the array from disk failure. A 6-disk RAID 10 could withstand between 1-3 disk failures (depending on which ones fail); a 4-disk RAID 10, 1-2. Rebuild times with RAID10 are faster then RAID6.
Go with RAID 6 if availability is more important than performance or RAID 10 if performance is more important with faster rebuild times.
See more links:
Great table on raid levels – http://eaegis.com/pages/raid-calculator