+ All Categories
Home > Documents > RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13...

RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13...

Date post: 08-Mar-2021
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
22
RAID-Z Expansion Matt Ahrens
Transcript
Page 1: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

RAID-Z ExpansionMatt Ahrens

Page 2: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Problem:You have a RAID-Z pool with 4 disks in it

You want to add a 5th disk

Page 3: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

How does traditional RAID 4/5/6 do it?

1 2 3 4 P1-4

5 6 7 8 P5-8

9 10 11 12 P9-12

13 14 15 16 P13-1

6

17 18 19 20 P17-2

0

1 2 3 P1-3

4 5 6 P4-6

7 8 9 P7-9

10 11 12 P10-1

2

13 14 15 P13-1

5

Color indicates parity group (stripe)

Page 4: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

RAID-Z Expansion: Reflow

1p 2 3 4 5p

6 7p 8 9 10

11p 12 13p 14 15

16 17p 18 19 20

21 22 23 24 25

1p 2 3 4

5p 6 7p 8

9 10 11p 12

13p 14 15 16

17p 18 19 20

Color indicates parity group (logical stripe)

Page 5: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

RAID-Z Expansion: Reflow copies allocated data

1p 2 3 4 5p

6 7p 8 9 10

11 12 13 14 15

16 17p 18 19 20

21 22 23 24 25

1p 2 3 4

5p 6 7p 8

9 10 11 12

13 14 15 16

17p 18 19 20

Color indicates parity group (logical stripe)

Page 6: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

This works!● Doesn’t change block pointers● Reads / Writes sequentially● Spacemaps tell us what we need to copy● Each logical stripe is independent

○ Don’t need to know where parity is○ Segments still on different disks, so redundancy is preserved○ (contraction couldn’t work this way)

Page 7: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

RAID-Z Expansion: new writes, new stripe width

1p 2 3 4 5p

6 7p 8 9 10

11p 12 13 14 15

16x 17p 18 19 20

21 22 23 24 25

1p 2 3 4

5p 6 7p 8

9 10 11 12

13 14 15 16

17p 18 19 20

Color indicates parity group (logical stripe)

Page 8: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Logical vs Physical stripe width● After conversion, physical stripe width is 5● Old blocks still have logical stripe width of 4● New blocks have logical stripe width of 5

○ Improved data : parity ratio (4:1 instead of 3:1)

● When reading, need to know logical stripe width○ Use block’s birth time (+ expansion time) to determine

Page 9: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Reflow Progress = 4; Chunk Size = 1

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

Color indicates logical stripe; white=unused

Page 10: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Reflow Progress = 5; Chunk Size = 1

1 2 3 4 5

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

Color indicates logical stripe; white=unused

Page 11: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Reflow Progress = 6; Chunk Size = 1

1 2 3 4 5

6 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

Color indicates logical stripe; white=unused

Page 12: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Reflow Progress = 7; Chunk Size = 1

1 2 3 4 5

6 7 7 8

9 10 11 12

13 14 15 16

17 18 19 20

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

Color indicates logical stripe; white=unused

Page 13: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Reflow Progress = 8; Chunk Size = 2

1 2 3 4 5

6 7 8 8

9 10 11 12

13 14 15 16

17 18 19 20

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

Color indicates logical stripe; white=unused

Page 14: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Reflow Progress = 10; Chunk Size = 2

1 2 3 4 5

6 7 8 9 10

9 10 11 12

13 14 15 16

17 18 19 20

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

Color indicates logical stripe; white=unused

Page 15: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Reflow Progress = 12; Chunk Size = 3

1 2 3 4 5

6 7 8 9 10

11 12 11 12

13 14 15 16

17 18 19 20

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

Color indicates logical stripe; white=unused

Page 16: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Reflow Progress = 15; Chunk Size = 3

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

13 14 15 16

17 18 19 20

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

Color indicates logical stripe; white=unused

Page 17: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Reflow Progress = 18; Chunk Size = 4

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

16 17 18 16

17 18 19 20

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

Color indicates logical stripe; white=unused

Page 18: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Reflow Progress = 22; Chunk Size = 5

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

16 17 18 19 20

21 22 19 20

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

17 18 19 20

Color indicates logical stripe; white=unused

Page 19: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Reflow process● Need to track progress to know the physical stripe width● Each TXG can only overwrite what’s previously unused● Exponential increase in amount that can be copied per TXG

○ 41 TXG’s for 1MB○ 113 TXG’s for 1GB○ 186 TXG’s for 1TB○ 258 TXG’s for 1PB

Page 20: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Design implications● Works with RAIDZ-1/2/3● Can expand multiple times (4-wide -> 5 wide -> 6 wide)● Old data has old Data : Parity ratio● New data has new Data : Parity ratio● RAIDZ must be healthy (no missing devices) during reflow

○ If disk dies, reflow will pause and wait for it to be reconstructed

● Reflow works in the background

Page 21: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Thank you!

Page 22: RAID-Z ExpansionRAID-Z Expansion: Reflow copies allocated data 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16 17 p 18 19 20 21 22 23 24 25 1 p 2 3 4 5 p 6 7 p 8 9 10 11 12 13 14 15 16

Status● High level design complete● Detailed design 80% complete● Zero lines of code written● Expect significant updates at BSDCAN (June 2018) and next year’s

DevSummit (~October 2018)


Recommended