SlideShare a Scribd company logo
1 of 24
RAID Systems
CS 537 - Introduction to Operating Systems
Mass Storage
• Many systems today need to store many
terabytes of data
• Don’t want to use single, large disk
– too expensive
– failures could be catastrophic
• Would prefer to use many smaller disks
RAID
• Redundant Array of Inexpensive Disks
• Basic idea is to connect multiple disks
together to provide
– large storage capacity
– faster access to reading data
– redundant data
• Many different levels of RAID systems
– differing levels of redundancy, error checking,
capacity, and cost
Striping
• Take file data and map it to different disks
• Allows for reading data in parallel
file data block 1
block 0 block 2 block 3
Disk 0 Disk 1 Disk 2 Disk 3
Parity
• Way to do error checking and correction
• Add up all the bits that are 1
– if even number, set parity bit to 0
– if odd number, set parity bit to 1
• To actually implement this, do an exclusive OR of
all the bits being considered
• Consider the following 2 bytes
byte parity
10110011 1
01101010 0
• If a single bit is bad, it is possible to correct it
Mirroring
• Keep to copies of data on two separate disks
• Gives good error recovery
– if some data is lost, get it from the other source
• Expensive
– requires twice as many disks
• Write performance can be slow
– have to write data to two different spots
• Read performance is enhanced
– can read data from file in parallel
RAID Level-0
• Often called striping
• Break a file into blocks of data
• Stripe the blocks across disks in the system
• Simple to implement
– disk = file block % number of disks
– sector = file block / number of disks
• provides no redundancy or error detection
– important to consider because lots of disks
means low Mean Time To Failure (MTTF)
RAID Level-0
file data block 1
block 0 block 2 block 3 block 4
Disk 0 Disk 1
0 block 0
1 block 2
2 block 4
3
4
5
sectors
0 block 1
1 block 3
2
3
4
5
sectors
RAID Level-1
• A complete file is stored on a single disk
• A second disk contains an exact copy of the file
• Provides complete redundancy of data
• Read performance can be improved
– file data can be read in parallel
• Write performance suffers
– must write the data out twice
• Most expensive RAID implementation
– requires twice as much storage space
RAID Level-1
file data block 1
block 0 block 2 block 3 block 4
Disk 0 Disk 1
0 block 0
1 block 1
2 block 2
3 block 3
4 block 4
5
sectors
0 block 0
1 block 1
2 block 2
3 block 3
4 block 4
5
sectors
RAID Level-2
• Stripes data across disks similar to Level-0
– difference is data is bit interleaved instead of
block interleaved
• Uses ECC to monitor correctness of
information on disk
• Multiple disks record the ECC information
to determine which disk is in fault
• A parity disk is then used to reconstruct
corrupted or lost data
RAID Level-2
file data block 1
block 0 block 2 block 3 block 4
Data Disk Data Disk ECC Disk Parity Disk
ECC Disk
RAID Level-2
• Reconstructing data
– assume data striped across eight disks
– correct data: 10011010
– parity: 0
– data read: 10011110
– if we can determine that disk 2 is in error
– just use read data and parity to know which bit
to flip
RAID Level-2
• Requires fewer disks than Level-1 to provide
redundancy
• Still needs quite a few more disks
– for 10 data disks need 4 check disks plus parity disk
• Big problem is performance
– must read data plus ECC code from other disks
– for a write, have to modify data, ECC, and parity disks
• Another big problem is only one read at a time
– while a read of a single block can be done in parallel
– multiple blocks from multiple files can’t be read
because of the bit-interleaved placement of data
RAID Level-3
• One big problem with Level-2 are the disks
needed to detect which disk had an error
• Modern disks can already determine if there
is an error
– using ECC codes with each sector
• So just need to include a parity disk
– if a sector is bad, the disk itself tells us, and use
the parity disk to correct it
RAID Level-4
• Big problem with Level-2 and Level-3 is
the bit interleavening
– to access a single file block of data, must access
all the disks
– allows good parallelism for a single access but
doesn’t allow multiple I/O’s
• Level-4 interleaves file blocks
– allows multiple small I/O’s to be done at once
RAID Level-4
• Still use a single disk for parity
• Now the parity is calculated over data from
multiple blocks
– Level-2,3 calculate it over a single block
• If an error detected, need to read other
blocks on other disks to reconstruct data
Level-4 vs. Level-2,3
Transfer Units
L3
L3 Parity
L4
a
b
c
d
0 1 2 3
a0 b0 c0 d0 a1 b1 c1 d1 a2 b2 c2 d2 a3 b3 c3 d3
a b c d
a0 a1 a2 a3
L4 Parity
0 1 2 3
b0 b1 b2 b3 c0 c1 c2 c3 d0 d1 d2 d3
4 different disks
RAID Level-4
• Reads are simple to understand
– want to read block A, read it from disk 0
– if there is an error, read in blocks B,C, D, and
parity block and calculate correct data
• What about writes?
– it looks like a write still requires access to 4
data disks to recalculate the parity data
– not true, can use the following formula
• new parity = (old data xor new data) xor old parity
– a write requires 2 reads and 2 writes
RAID Level-4
• Doing multiple small reads is now faster
than before
• However, writes are still very slow
– this is because of calculating and writing the
parity blocks
• Also, only one write is allowed at a time
– all writes must access the check disk so other
writes have to wait
RAID Level-5
• Level-5 stripes file data and check data over
all the disks
– no longer a single check disk
– no more write bottleneck
• Drastically improves the performance of
multiple writes
– they can now be done in parallel
• Slightly improves reads
– one more disk to use for reading
RAID Level-5
Level-4 Level-5
1 2 3 4 5
data disks
check
disk
data and check disks
1 2 3 4 5
S0
S1
S2
S3
S4
S5
S0
S1
S2
S3
S4
S5
RAID Level-5
• Notice that for Level-4 a write to sector 0 on disk
2 and sector 1 on disk 3 both require a write to
disk five for check information
• In Level-5, a write to sector 0 on disk 2 and sector
1 on disk 3 require writes to different disks for
check information (disks 5 and 4, respectively)
• Best of all worlds
– read and write performance close to that of RAID
Level-1
– requires as much disk space as Levels-3,4
RAID Level-10
• Combine Level-0 and Level-1
• Stripe a files data across multiple disks
– gives great read/write performance
• Mirror each strip onto a second disk
– gives the best redundancy
• The most high performance system
• The most expensive system

More Related Content

Similar to RAID.ppt

Similar to RAID.ppt (20)

Hard disks
Hard disksHard disks
Hard disks
 
Storage memory
Storage memoryStorage memory
Storage memory
 
CS 2212- UNIT -4.pptx
CS 2212-  UNIT -4.pptxCS 2212-  UNIT -4.pptx
CS 2212- UNIT -4.pptx
 
Computer details
Computer detailsComputer details
Computer details
 
Disk
DiskDisk
Disk
 
disk.ppt
disk.pptdisk.ppt
disk.ppt
 
Understanding Cassandra, A Visual Approach
Understanding Cassandra, A Visual ApproachUnderstanding Cassandra, A Visual Approach
Understanding Cassandra, A Visual Approach
 
UNIT III.pptx
UNIT III.pptxUNIT III.pptx
UNIT III.pptx
 
Hadoop Distributed File System
Hadoop Distributed File SystemHadoop Distributed File System
Hadoop Distributed File System
 
Raid 1 3
Raid 1 3Raid 1 3
Raid 1 3
 
Raid level 4
Raid level 4Raid level 4
Raid level 4
 
Working of Volatile and Non-Volatile memory
Working of Volatile and Non-Volatile memoryWorking of Volatile and Non-Volatile memory
Working of Volatile and Non-Volatile memory
 
Class2
Class2Class2
Class2
 
Windows Server 2012 R2 Software-Defined Storage
Windows Server 2012 R2 Software-Defined StorageWindows Server 2012 R2 Software-Defined Storage
Windows Server 2012 R2 Software-Defined Storage
 
9_Storage_Devices.pptx
9_Storage_Devices.pptx9_Storage_Devices.pptx
9_Storage_Devices.pptx
 
Btrfs by Chris Mason
Btrfs by Chris MasonBtrfs by Chris Mason
Btrfs by Chris Mason
 
Raid 5
Raid 5Raid 5
Raid 5
 
DAS RAID NAS SAN
DAS RAID NAS SANDAS RAID NAS SAN
DAS RAID NAS SAN
 
Raid in SNA
Raid in SNA Raid in SNA
Raid in SNA
 
Disk Management through the Computer Management
Disk Management through the Computer ManagementDisk Management through the Computer Management
Disk Management through the Computer Management
 

Recently uploaded

一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理uodye
 
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime GuwahatiGuwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahatimeghakumariji156
 
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证wpkuukw
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理uodye
 
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in DammamAbortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammamahmedjiabur940
 
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证ehyxf
 
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURELANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHUREF2081syahirahliyana
 
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信oopacde
 
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...Priya Reddy
 
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...gajnagarg
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证tufbav
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...samsungultra782445
 
Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryoyebolasonuga14
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一uodye
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证tufbav
 
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证wpkuukw
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证wpkuukw
 

Recently uploaded (20)

一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
 
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime GuwahatiGuwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
 
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
 
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
 
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in DammamAbortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
 
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
 
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURELANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
 
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
 
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...
 
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
 
Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratory
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
 
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
 
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get CytotecAbortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get Cytotec
 

RAID.ppt

  • 1. RAID Systems CS 537 - Introduction to Operating Systems
  • 2. Mass Storage • Many systems today need to store many terabytes of data • Don’t want to use single, large disk – too expensive – failures could be catastrophic • Would prefer to use many smaller disks
  • 3. RAID • Redundant Array of Inexpensive Disks • Basic idea is to connect multiple disks together to provide – large storage capacity – faster access to reading data – redundant data • Many different levels of RAID systems – differing levels of redundancy, error checking, capacity, and cost
  • 4. Striping • Take file data and map it to different disks • Allows for reading data in parallel file data block 1 block 0 block 2 block 3 Disk 0 Disk 1 Disk 2 Disk 3
  • 5. Parity • Way to do error checking and correction • Add up all the bits that are 1 – if even number, set parity bit to 0 – if odd number, set parity bit to 1 • To actually implement this, do an exclusive OR of all the bits being considered • Consider the following 2 bytes byte parity 10110011 1 01101010 0 • If a single bit is bad, it is possible to correct it
  • 6. Mirroring • Keep to copies of data on two separate disks • Gives good error recovery – if some data is lost, get it from the other source • Expensive – requires twice as many disks • Write performance can be slow – have to write data to two different spots • Read performance is enhanced – can read data from file in parallel
  • 7. RAID Level-0 • Often called striping • Break a file into blocks of data • Stripe the blocks across disks in the system • Simple to implement – disk = file block % number of disks – sector = file block / number of disks • provides no redundancy or error detection – important to consider because lots of disks means low Mean Time To Failure (MTTF)
  • 8. RAID Level-0 file data block 1 block 0 block 2 block 3 block 4 Disk 0 Disk 1 0 block 0 1 block 2 2 block 4 3 4 5 sectors 0 block 1 1 block 3 2 3 4 5 sectors
  • 9. RAID Level-1 • A complete file is stored on a single disk • A second disk contains an exact copy of the file • Provides complete redundancy of data • Read performance can be improved – file data can be read in parallel • Write performance suffers – must write the data out twice • Most expensive RAID implementation – requires twice as much storage space
  • 10. RAID Level-1 file data block 1 block 0 block 2 block 3 block 4 Disk 0 Disk 1 0 block 0 1 block 1 2 block 2 3 block 3 4 block 4 5 sectors 0 block 0 1 block 1 2 block 2 3 block 3 4 block 4 5 sectors
  • 11. RAID Level-2 • Stripes data across disks similar to Level-0 – difference is data is bit interleaved instead of block interleaved • Uses ECC to monitor correctness of information on disk • Multiple disks record the ECC information to determine which disk is in fault • A parity disk is then used to reconstruct corrupted or lost data
  • 12. RAID Level-2 file data block 1 block 0 block 2 block 3 block 4 Data Disk Data Disk ECC Disk Parity Disk ECC Disk
  • 13. RAID Level-2 • Reconstructing data – assume data striped across eight disks – correct data: 10011010 – parity: 0 – data read: 10011110 – if we can determine that disk 2 is in error – just use read data and parity to know which bit to flip
  • 14. RAID Level-2 • Requires fewer disks than Level-1 to provide redundancy • Still needs quite a few more disks – for 10 data disks need 4 check disks plus parity disk • Big problem is performance – must read data plus ECC code from other disks – for a write, have to modify data, ECC, and parity disks • Another big problem is only one read at a time – while a read of a single block can be done in parallel – multiple blocks from multiple files can’t be read because of the bit-interleaved placement of data
  • 15. RAID Level-3 • One big problem with Level-2 are the disks needed to detect which disk had an error • Modern disks can already determine if there is an error – using ECC codes with each sector • So just need to include a parity disk – if a sector is bad, the disk itself tells us, and use the parity disk to correct it
  • 16. RAID Level-4 • Big problem with Level-2 and Level-3 is the bit interleavening – to access a single file block of data, must access all the disks – allows good parallelism for a single access but doesn’t allow multiple I/O’s • Level-4 interleaves file blocks – allows multiple small I/O’s to be done at once
  • 17. RAID Level-4 • Still use a single disk for parity • Now the parity is calculated over data from multiple blocks – Level-2,3 calculate it over a single block • If an error detected, need to read other blocks on other disks to reconstruct data
  • 18. Level-4 vs. Level-2,3 Transfer Units L3 L3 Parity L4 a b c d 0 1 2 3 a0 b0 c0 d0 a1 b1 c1 d1 a2 b2 c2 d2 a3 b3 c3 d3 a b c d a0 a1 a2 a3 L4 Parity 0 1 2 3 b0 b1 b2 b3 c0 c1 c2 c3 d0 d1 d2 d3 4 different disks
  • 19. RAID Level-4 • Reads are simple to understand – want to read block A, read it from disk 0 – if there is an error, read in blocks B,C, D, and parity block and calculate correct data • What about writes? – it looks like a write still requires access to 4 data disks to recalculate the parity data – not true, can use the following formula • new parity = (old data xor new data) xor old parity – a write requires 2 reads and 2 writes
  • 20. RAID Level-4 • Doing multiple small reads is now faster than before • However, writes are still very slow – this is because of calculating and writing the parity blocks • Also, only one write is allowed at a time – all writes must access the check disk so other writes have to wait
  • 21. RAID Level-5 • Level-5 stripes file data and check data over all the disks – no longer a single check disk – no more write bottleneck • Drastically improves the performance of multiple writes – they can now be done in parallel • Slightly improves reads – one more disk to use for reading
  • 22. RAID Level-5 Level-4 Level-5 1 2 3 4 5 data disks check disk data and check disks 1 2 3 4 5 S0 S1 S2 S3 S4 S5 S0 S1 S2 S3 S4 S5
  • 23. RAID Level-5 • Notice that for Level-4 a write to sector 0 on disk 2 and sector 1 on disk 3 both require a write to disk five for check information • In Level-5, a write to sector 0 on disk 2 and sector 1 on disk 3 require writes to different disks for check information (disks 5 and 4, respectively) • Best of all worlds – read and write performance close to that of RAID Level-1 – requires as much disk space as Levels-3,4
  • 24. RAID Level-10 • Combine Level-0 and Level-1 • Stripe a files data across multiple disks – gives great read/write performance • Mirror each strip onto a second disk – gives the best redundancy • The most high performance system • The most expensive system