20
Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

Embed Size (px)

Citation preview

Page 1: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

Redundant Array of Inexpensive Disks

aka

Redundant Array of Independent Disks

(RAID)

Modified from CCT slides

Page 2: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

The challenge Disk transfer rates are improving, but CPU

performance is increasing faster Hungry for data

Use many disks in parallel to improve data rate bandwidth not latency Striping

Striping reduces reliability 10 disks have 1/10th the MTBF (mean time between

failures) of one disk Must address reliability too

2

Page 3: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

Reliability Multiple failures at same time are extremely rare

SATA MTBF ~ 600,000 hours (up to ~1.5 Million)

To improve reliability, add error correction data Adds redundancy too

So: Performance from striping Reliability from error correction

which steals back a bit of the performance gain

3

Page 4: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

RAID

A RAID = Redundant Array of Inexpensive Disks or Redundant Array of Independent Disks

Disks are small and cheap, so it’s easy to put lots of disks (10s to 100s) in one box for increased storage, performance, and availability

Data plus some redundant information is striped across the disks in some way

How striping is done is key to performance and reliability

Animated tutorial 1, Animated Tutorial 2

04/19/234

Page 5: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

Some RAID tradeoffs

Granularity fine-grained: stripe each file over all disks

high throughput for the file limits transfer to 1 file at a time

course-grained: stripe each file over only a few disks limits throughput for 1 file allows concurrent access to multiple files

Redundancy uniformly distribute redundancy information on disks

avoids load-balancing problems concentrate redundancy information on a small number

of disks partition the disks into data disks and redundancy disks

04/19/235

Page 6: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

RAID Level 0: Non-Redundant Striping

RAID Level 0 is a non-redundant disk array Files are striped across disks, no redundant info High (single file) read throughput Best write throughput (no redundant info to write) Any disk failure data loss

What is lost? Is this concept used elsewhere?

04/19/236

Page 7: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

RAID Level 1: Mirrored Disks

Files are striped across half the disks, and mirrored to the other half 2x space expansion

Reads: Read from either copy

Writes: Write both copies

On failure, just use the surviving disk

04/19/237

What is the effecton performance?

How many simultaneous disk failures can be

tolerated?

Page 8: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

RAID Levels 2, 3, and 4: Striping + Parity Disk

RAID 2, 3, and 4 use Error Correcting Code (ECC) aka parity parity calculated per byte each byte (XOR parity)

A large read accesses all the data disks A single block read accesses only one disk (RAID 4)

A write updates one or more data disks plus the parity disk Recovers from single disk failures (How?) Better ECC higher failure resistance more parity disks

04/19/238

Page 9: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

Refresher: What’s parity?

To each byte, add a bit set so that the total number of 1’s is even

Any single missing bit can be reconstructed Why does memory parity not work quite this

way? Think of ECC as just being similar but

fancier (more capable)

04/19/239

1 0 1 1 0 1 1 0 1

Page 10: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

RAID 3 Parity

XP = X3 (+) X2 (+) X1 (+) X0 (+) = XOR

Assume X1 fails Detect Regenerate missing bit

X1 = X3 (+) X2 (+) XP (+) X0 Replace drive 1 and regenerate whole

drive

04/19/23

© 2007 Gribble, Lazowska, Levy, Zahorjan

10

How detect?

Page 11: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

Raid 3? Looks great in theory

“In theory, there is no difference between theory and practice. In practice there is.”

Requires synchronously rotating disks And a specialized controller In practice implement an approximation

But not much used

04/19/23

© 2007 Gribble, Lazowska, Levy, Zahorjan

11

Page 12: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

RAID Level 5

RAID Level 5 uses block interleaved distributed parity Like parity scheme, but distribute the parity info (as

well as data) over all disks for each block, one disk holds the parity, and the other

disks hold the data Significantly better performance

parity disk is not a hot spot

04/19/2312

. . .

Page 13: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

RAID Performance comparison

Page 14: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

Raid – learn more http://www.aaa-datarecovery.com/raid_tutorial.htm Homework:

1. Describe clearly in your own words the difference between Raid 1-0 and Raid 0-1

2. Compare Raid 10 to Raid 5

In your answers address performance (read and write), costs, reliability

3. Calculate the XOR parity bit for 10110101 (show work)

04/19/23

© 2007 Gribble, Lazowska, Levy, Zahorjan

14

Page 15: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

Typical Implementation

04/19/2315

DisksController

OS

Page 16: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

04/19/2316 RAID 0,1

0+1 vs 1+0?Which one more

robust?Rebuild?

Page 17: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

04/19/2317 RAID 5

Page 18: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

Final Issues

If you’re running a RAID level with redundancy, do you need backup? What’s the difference between RAID and backup?

Does RAID provide “sufficient” reliability? What if you’re Amazon.com?

04/19/2318

Page 19: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

Heading for 5 nines 5 nines = 99.999% uptime = ?? Minutes per year down? (Bell telephone)

Tier I Single path for power and cooling distribution, no redundant components, 99.671% availability

Tier II Single path for power and cooling distribution, redundant components, 99.741% availability

Tier III Multiple power and cooling distribution paths, but only one path active, redundant components, concurrently maintainable, 99.982% availability

Tier IVMultiple active power and cooling distribution paths, redundant components, fault tolerant, 99.995% availability

04/19/23

© 2007 Gribble, Lazowska, Levy, Zahorjan

19

Page 20: Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides

04/19/23

© 2001 The Uptime Institute

20

Uptime Institute (link)