the weakest links in a computing system. There are disk platters rotating at 7.2k to 15k RPMs, read and write heads moving over the rotating platters at a high rate of speed, and the data is magnetically written to the platter. A Disk drive is subject to failure due to shock, wear and tear on bearings, accidental erasure from magnetic fields, and damage from electrostatic discharge or power surges. For an individual, company, or enterprise that cannot tolerate system downtime, it makes sense to plan and implement contingency plans for the near-certainty that a hard drive is going to fail. When properly implemented, RAID can help maintain data availability when one or more disk drives fail.
RAID is an acronym for Redundant Array of Independent Disks. In the early days of RAID, it was sometimes called Redundant Array of Inexpensive Disks. Both terms describe the same thing: A method of utilizing a number of disks for data storage. Why use multiple disks? There are three primary reasons:
1) Increased storage capacity - The maximum size of hard drives is increasing; every 8 months to a year the technology advances and it becomes possible to build a hard drive that will hold more data, and its barely keeping up with demand due to virtualized computing.
2) Increased performance when striping - Multiple drives can be used in a scheme where the data is striped across multiple drives. Consider this example: Suppose you had data that takes T seconds to write to a single disk. If you striped across two disks it would only take T/2 since you don’t have to wait. This is multiplexing across a stripe. To stripe across n drives, it would take T/n. The more drives you have in a stripe, the faster you can write since mechanical drive speeds are orders of magnitude slower than processor or RAID HW speeds.
3) Data Availability (Fault tolerance) - If you only have one drive, and it fails, you are down until you can install a new drive and copy your backup data to this drive. Utilizing any RAID scheme (other and RAID 0), it is possible to create a scheme in which a drive failure(s) can be tolerated. That means, the system will stay up and running and data will not be lost.
Of course, there can be combinations of the above reasons for using multiple drives, and there are different types of RAID or “RAID Levels” to address these requirements.
Let’s look at different RAID levels and examine the advantages and weaknesses. RAID 0 - Striping
Disk 0 Disk 1
A1 A2 B1 B2
RAID 0 requires a minimum of 2 disks, and it stripes the data across disks. The system sees the RAID array as one volume. When using two disks, the RAID controller simultaneously places one part of the file on disk one and the next part of the file on disk 2. The diagram above shows two write operations, A and B. Part of write operation A is written to disk 0 and part of write operation A is written to disk 1, and write operation B is striped in the same fashion. Since the write operation to each disk involves half of the file, writing the file takes about half the time it would take if there were a single disk.
RAID 0 has a number of positive aspects: it speeds up read and write operation, all of the disk space is usable, and it is the least expensive form of RAID to implement. It does have a major shortcoming in that it leaves out one part of the RAID acronym – Redundancy. With RAID 0, parts of files are stored on multiple drives. If one of the drives fails, all data is lost. There is no fault tolerance. In fact since there are multiple disks, there are more opportunities for failure. RAID 1 – Mirroring Disk 0 Disk 1 A1 A1 A2 A2 B1 B1 B2 B2
RAID 10 – Striping and Mirroring
RAID 1
RAID 0 RAID 0
Disk 0 Disk 1 Disk 2 Disk 3
A1 A2 A1 A2 B1 B2 B1 B2
RAID 10 is a combination of RAID 0 and RAID 1. It is also a nested RAID because it “nests” RAID 0 arrays under a RAID 1 array. In the diagram above, notice disk 0 and disk 1 data is being mirrored to disk 2 and disk 3. RAID 10 takes a RAID 0 stripe, and mirrors data across the different spans. This offers a level of redundancy. If any one drive fails, functionality will continue. If both drives on one side of one of the Mirrors fail, functionality will continue. Note that disk 0 and disk 2 are identical, and disk 1 and disk 3 are identical. If disks 0 and 2 both fail, the system will fail because the data they contain is not available anywhere else. The same is true with disks 1 and 3. Like any of the other RAID schemes that use mirroring, only half of the total disk space is available for storage; the other half is devoted to the mirror image.
RAID 5 – Striping with Parity
Disk 0 Disk 1 Disk 2 Disk 3
P1 A1 A2 A3
B1 P2 B2 B3
C1 C2 P3 C3
D1 D2 D3 P4
When a RAID 5 array is healthy with no failed disks, read operations are relatively fast, for the same reasons RAID 0 is fast – data is being simultaneously read from multiple disks. For write operations, the writing of parity bits adds some overhead, so write performance is not as good as RAID levels that do not use parity. In many cases, the fault tolerance and disk utilization that is achieved with RAID 5 can make the performance tradeoff worthwhile.
It is important to note that parity takes up some of the usable disk space, but significantly less space than is used with RAID levels that mirror drives. RAID 5 requires one disk worth of space for parity, so adding more disks to the array can reduce this overhead.
RAID 50 – Nesting RAID 5 Arrays in a RAID 0 Striping Array RAID 0
RAID 5 RAID 5
Disk 0 Disk 1 Disk 2 Disk 3 Disk 4 Disk 5 Disk 6 Disk 7
P01 A01 A02 A03 P11 A11 A12 A13
B01 P02 B02 B03 B11 P12 B12 B13
C01 C02 P03 C03 C11 C12 P13 C13
D01 D02 D03 P04 D11 D12 D13 P14
RAID 50 nests a number of RAID 5 arrays under a RAID 0 array. Remember that RAID 5 uses striping and parity, and RAID 0 uses striping, but no parity. RAID 0 has no fault tolerance, while RAID 5 can tolerate the failure of one disk. As we have seen previously, if a RAID 0 array loses a member, all data is lost. This is still true with a RAID 50 array, but now each member of the RAID 0 array is not a single disk, but a RAID 50 Array, and each RAID 50 array can tolerate the failure of one disk.
RAID 50 could withstand one drive failure in each RAID 5 array (up to 4 disks in the example above) and keep functioning. A second drive failure in one of the individual RAID 5 array would cause all data to be lost.
RAID 6 – Striping with Dual Parity
Disk 0 Disk 1 Disk 2 Disk 3
P1 P2 A B
C D P3 P4
P5 P6 E F
G H P7 P8
RAID 6 is also a striping and parity scheme, but the difference between RAID 5 and RAID 6 is that RAID 6 utilizes two parity calculations per write operation, whereas RAID 5 utilizes one parity calculation per write operation. RAID 6 requires a minimum of four drives, and will tolerate the failure of any two drives. Upon the failure of the third drive, all data is lost. This additional fault tolerance comes at a cost. During write operations, a RAID 6 controller must calculate and write two parity blocks for each write operation. This takes time, making RAID 6 write performance slower than other RAID schemes.
RAID 60 – Nesting RAID 6 Arrays in RAID 0 Striping Array RAID 0
RAID 6 RAID 6
Disk 0 Disk 1 Disk 2 Disk 3 Disk 4 Disk 5 Disk 6 Disk 7
P01 P02 A0 B0 P11 P12 A1 B1
C0 D0 P03 P04 C1 D1 P13 P14
P05 P06 E0 F0 P15 P16 E1 F1
G0 H0 P07 P08 G1 H1 P17 P18
RAID 60 takes multiple RAID 6 arrays and nests them in a RAID 0 array, in a similar fashion to the way RAID 50 stripes individual disks. It has higher fault tolerance and can survive two disk faults per RAID 6 array.
RAID levels compared in a 12 disk NAS system
RAID
LEVEL Method Fault Tolerance
Disk utilization (efficiency) Read Performance Write Performance
RAID 0 Striping across disks None 100% Highest Highest
RAID 1 Mirroring disks 1 Disk 50% High Low
RAID 10 Stripe mirrored arrays Up to 1 disk failure in each sub-array 50% High High
RAID 5 Striping and Single Parity across disks 1 Disk 91.67% High Low
RAID 50 Striping across RAID 5 arrays Up to 1 disk failure in each sub-array 91.67% High Medium
RAID 6 Striping and Dual Parity across disks 2 disks 83.33% High Lowest