RAID Storage-centric computing, cloud computing. Benefits: Improved reliability (via error correcting code, redundancy). Improved performance (via redundancy).
Independent disks. RAID Level 0 Provides a striping configuration at the level of blocks (block striped). No redundancy (such as mirroring or parity bits). Requests to different disks can be handled in parallel. Single large request can be handled in parallel (improved performance but not reliability). - Bit-level striping - Byte-level striping - Block-level striping: most common
Independent disks. RAID Level 1 Redundancy (mirroring). Read can be from either disk. Write to both disks (can be done in parallel). Improved reliability (but not necessarily performance). High cost.
RAID Level 2 Synchronized spindles (r/w heads in same pos.). Parity bits for error-correcting code. P1 = x3 x5 x7 (parity=0 when # of 1 bits is even) P2 = x3 x6 x7 (parity=1 when # of 1 bits is odd) P4 = x5 x6 x7 Can correct 1-bit error C1 = P1 x3 x5 x7 if C1 = 1, there must be an error in one of the 4 bits: 1, 3, 5, and 7, which can be determined using a table. Hamming Code P1 P2 X3 P4 X5 X6 X7 - When a bit in data disks is damaged, the computed parity does not match the stored parity. - When a stored parity bit is damaged, then it does not match the computed parity.
1-bit error correction C1 = P1 x3 x5 x7 C2 = P2 x3 x6 x7 C4 = P4 x5 x6 x7 When C1C2C4 = 000, there is no disk errors. Otherwise, there is some disk error. Example: If X3X5X6X7 = 1010, then P1P2P4 = 101, hence C1C2C4 = 000. If we have the following: C1C2C4 = 110, then according to the table, it indicates that X3 is the disk that has the error (X3 appears in both C1 and C2). C4 0 0 0 0 1 1 1 1 C2 0 0 1 1 0 0 1 1 C1 0 1 0 1 0 1 0 1 ------------------------------------------ -- 1 2 3 4 5 6 7 P1 error P2 error X3 in error P4 error X5 in error X6 in error X7 in error If one of the disks fails, the remaining disks can be used to reconstruct the damaged data. It requires 3 disks overhead for 4 disks of data, whereas RAID 1 requires 4 disks overhead.
RAID Level 3 (bit-interleaved parity) Single parity disk is needed (P4). P4 is defined as follows: P4(i) = x3(i) x2(i) x1(i) x0(i) If x1 fails, then recovery can be carried out x1(i) = 0: if P4(i) = x3(i) x2(i) x0(i) x1(i) = 1: if P4(i) x3(i) x2(i) x0(i) Reduced mode: Read: missing data regenerated on the fly. Write: update parity disk (P4) for later regeneration.
RAID Level 3 (contd.) Since disk controllers can detect if a sector has been read correctly, so a single parity bit can be used for error correction and detection. RAID 3 is as good as RAID 2, but only with one parity disk overhead (RAID 2 is not used in practice). Advantages over RAID 1: Less overhead. - One parity disk is needed Transfer rate for R/W a single block is faster. N-way data striping (R/W of a byte are spread over multiple disks) Disadvantages over RAID 1: Fewer I/Os per second since every disk has to participate in every I/O request. Expense of computing and writing the parity.
RAID Level 4 (block-interleaved parity) Independent member disks Block level striping, and a parity block on parity disk for all N blocks on data disks. Higher overall I/O rate since all disks can be read in parallel.
RAID Level 4 (contd.) Implication of a write request P4 (i) = x3(i) x2(i) x1 (i) x0(i) = x3(i) x2(i) x1 (i) x0(i) x1(i) x1(i) = P4(i) x1(i) x1 (i) two reads (P4(i), x1(i)) and two writes (P4 (i), x1 (i)). Parity disk becomes potential bottleneck.
RAID Level 5 Independent member disks. Organized similarly as RAID 4. Parity strips are across all disks (parity for n th disk is stored in disk (n+1) mod 5) Avoid potential bottleneck in RAID 4.
Similar to RAID 5. Differences: RAID Level 6 2 bits of redundant data for every 4 bits of data Can tolerate 2 disks failures. P + Q redundancy scheme using Reed-Solomon Codes (two parity disks P and Q spreading in all disks
Nested RAID: RAID 0+1 RAID 0+1: disks are striped first, and then a stripe is mirrored to an equivalent stripe (two stripes). RAID 0 + 1 2 striping sets: {D1,D3,D5,D7}, {D2,D4,D6,D8} Bottom-line: if 2 drives fail in different stripe sets, the entire system is down (both stripes down). stripe set D2 D4 D6 D8 D1 D3 D5 D7 D1 D2 D3 D4
Nested RAID: RAID 1+0 RAID 1+0: disks are mirrored in pairs first, and then the resulting mirrored pairs are striped (one stripe). stripe set D2 D4 D6 D8 D1 D2 D3 D4 RAID 1 + 0 4 mirror sets: {D1,D2},, {D7,D8} Bottom-line: at most 4 drives can fail without affecting operation, so long as they are in diff. mirror sets. mirror set D1 D3 D5 D7
RAID Level 10 (RAID 1 + 0) It uses more disk space to provide redundant data than RAID 5. But, it offers a performance benefit through reading from all disks in parallel and avoiding the write penalty of RAID 5 (no parity). A second benefit is that it enjoys a better performance than RAID 5 when a failed drive remains unreplaced. In RAID 5, each attempted read of the failed drive can be fulfilled only by reading all of the other disks, whereas in RAID 10, a failed disk can be recovered by a single read of its mirrored pair. Because it has no parity blocks
Other Nested RAID RAID 1+0+0 RAID 0+3/3+0 RAID 0+5 / 5+0 / 5+1 / 5+3 RAID 6+0
References http://www.consensys.com/html/rzma1_raid_disk_array overvie.html http://www.ecs.umass.edu/ece/koren/architecture/raid/raidhome.html