The hardware knowledge that architects have to know-disk array RAID

 

Overview

What is RAID? RAID (Redundant Array of Independent Disks) is a redundant array of independent disks, usually referred to as disk array. Simply put, RAID is a disk subsystem composed of multiple independent high-performance disk drives, which provides higher storage performance and data redundancy technology than a single disk . RAID is a type of multi-disk management technology that provides high-performance storage with moderate cost and high data reliability to the host environment.

There are three main RAID key concepts and technologies: mirroring (Mirroring) , data slice (Data Stripping) and data check (the Data Parity) .

Mirroring : Copying data to multiple disks can improve reliability on the one hand, and read data from two or more copies concurrently to improve read performance. Obviously, the write performance of mirroring is slightly lower, and it takes more time to ensure that data is correctly written to multiple disks.

Data striping : Save data slices on multiple different disks. Multiple data slices together form a complete data copy. This is different from multiple copies of mirroring. It is usually used for performance considerations. Data striping has a higher concurrency granularity. When accessing data, data located on different disks can be read and written at the same time, thereby obtaining a very considerable I/O performance improvement.

Data verification : Use redundant data for data error detection and repair. Redundant data is usually calculated by algorithms such as Hamming code and XOR operation. Using the check function can greatly improve the reliability, robustness and fault tolerance of the disk array. However, data verification needs to read data from multiple locations and perform calculations and comparisons, which will affect system performance. Different levels of RAID use one or more of the three technologies to obtain different data reliability, availability, and I/O performance.

Regarding which RAID mode the system needs, it is necessary to make a reasonable choice on the premise of a thorough understanding of the system requirements, and comprehensively evaluate the reliability, performance and cost to make a compromise choice.

Common RAID levels are:

  • Standard RAID RAID0, RAID1, RAID2, RAID3, RAID4, RAID5, RAID6 seven levels are designated as standard RAID levels

  • Mixed RAID: RAID10, RAID50, RAID60 ...

Below we introduce the various RAID levels and make a simple comparison.

RAID0

 

Using N disks to combine to achieve the effect of N times the performance, the write data will be divided into N parts, and the read data will be combined and read from the disk, so that the read and write performance is doubled.

Advantages: Using RAID0 can maximize the disk space utilization, which can reach 100%; the performance is fast, the more disks, the stronger the performance.

Disadvantages: No data protection, even more risky than a single disk. Any broken disk will cause data loss.

RAID 1

 

The disks in RAID 1 are mirror images of each other, and the written data will be stored in N copies, which can be read from any disk when reading. The read performance is doubled, and the write performance is the same as that of a single disk.

Advantages: Security grows in multiples of the number of physical hard drives in the array.

Disadvantages: Low space utilization, which is the lowest utilization among all arrays.

RAID 5

 

RAID5 considers both space utilization and performance improvement. It is combined with checksum instead of mirroring. A RAID5 array requires at least 3 disks. In the above figure, a combination of 4 disks is used. Any piece of data written will be divided into three data blocks + a parity block and put into 4 disks respectively, and the data blocks and parity blocks are distributed crosswise. Each disk has both data blocks and parity blocks. When reading data, A is read from Disk 0, 1, and 2 to A1, A2, and A3 respectively, and then combined into A; if a disk such as Disk2 is damaged at this time, it will be calculated by the read A1, A2+ check code A3, and then combine to generate data A to provide externally. RAID 5 can tolerate damage to one disk.

Advantages: In the case of reading, it is three times the data of a single disk; it has a certain degree of security and can tolerate damage to one disk.

Disadvantages: Because each data write needs to calculate the check block, the write performance is reduced; only one disk is tolerated damage

RAID 6

 

RAID6 can flexibly design the ratio of database and check block. The above figure is designed as a combination of 3 data blocks + 2 check blocks, which increases data reliability. RAID 6 is used more in backup data scenarios, and provides much higher data reliability than RAID 5.

Advantages: The number of fault-tolerant hard disks is higher than RAID5.

Disadvantages: The amount of calculation is larger than RAID5, and the space utilization is lower than RAID5.

RAID 10

 

First, the two disks are mirrored, and then combined according to the RAID0 method, which not only realizes data redundancy but also doubles the performance. RAID 1+0 is mostly suitable for database scenarios.

RAID 50

 

First make a RAID5 group and then combine it into RAID0, taking into account the characteristics of RAID5 and RAID0.

RAID 60

image.png

First make the combination of RAID6 and then combine into RAID0, taking into account the characteristics of RAID6 and RAID0.

Comparison between various combinations

RAID level redundancy Space utilization Read performance Write performance Minimum number of disks
RAID0 no 100% *** *** 2
RAID1 Yes 50% ** ** 2
RAID5 Yes 67-94% *** * 3
RAID6 Yes 50-88% ** * 4
RAID10 Yes 50% ** ** 4
RAID50 Yes 67-94% *** * 6
RAID60 Yes 50-88% ** * 8

Well, friends, this is the end of the content of this issue. You can see that the students here are all excellent students. The next promotion and salary increase is you!
If you think this article is helpful to you, please scan the QR code below and pay attention. "Forward" and "watching", develop a good habit! See you next time!

 

 

personal blog

Guess you like

Origin blog.csdn.net/jianzhang11/article/details/106205316