• No results found

RAID. Storage-centric computing, cloud computing. Benefits:

N/A
N/A
Protected

Academic year: 2021

Share "RAID. Storage-centric computing, cloud computing. Benefits:"

Copied!
16
0
0

Loading.... (view fulltext now)

Full text

(1)

RAID

•  Storage-centric computing, cloud computing.

•  Benefits:

– Improved

reliability

(

via error correcting code, redundancy

).

(2)

RAID Level 0

•  Independent disks.

•  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

(3)

RAID Level 1

•  Independent disks.

•  Redundancy (

mirroring

).

•  Read can be from either disk.

•  Write to both disks (

can be done

in parallel

).

•  Improved reliability (

but not

necessarily performance

).

(4)

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.

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.

(5)

1-bit error correction

•  C1 = P1 ⊕ x3 ⊕ x5 ⊕ x7

•  C2 = P2 ⊕ x3 ⊕ x6 ⊕ x7

•  C4 = P4 ⊕ x5 ⊕ x6 ⊕ x7

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

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

P1 e rro r P2 e rro r P4 e rro r X3 i n e rro r X5 i n e rro r X6 i n e rro r X7 i n e rro r

If one of the disks fails, the remaining disks can be used to reconstruct the damaged data.

(6)

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

(7)

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.

–  Transfer rate for R/W a single block is faster.

•  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

.

- One parity disk is needed

(8)

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.

(9)

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)

).

(10)

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

)

(11)

RAID Level 6

•  Similar to RAID 5.

•  Differences:

– 2 bits of redundant data for every 4 bits of

data

– Can tolerate 2 disks failures.

P + Q redundancy scheme using

(12)

Nested RAID: RAID 0+1

•  RAID 0+1: disks are

striped first

, and then

a stripe is mirrored to an equivalent stripe

(

two stripes

).

D5 D6 D2 D4 D3 D7 D8 D1 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

(13)

Nested RAID: RAID 1+0

•  RAID 1+0: disks are

mirrored in pairs first

,

and then the resulting mirrored pairs are

striped (

one stripe

).

D5 D6 D2 D4 D3 D7 D8 D1 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.

stripe set

mirror set

(14)

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.

(15)

Other Nested RAID

•  RAID 1+0+0

•  RAID 0+3/3+0

(16)

References

References

Related documents