Do you know the RAID initialization process?
The RAID system is an effective means to protect the stored data. During RAID creation, a very long system initialization process often exists. Why is there such an operation during RAID initialization? What is the impact of this operation on SSD? From the perspective of technology R & D, Mr. Wu analyzed and studied the RAID initialization process.
Shows the basic organizational structure of traditional RAID:
All disks attached to a RAID Group are split into a series of slices according to the LBA address. These slices are called Stripe Unit, the Stripe Unit corresponding to the same LBA address in different disks is organized into a strip ). All data is encoded in one strip. For example, RAID6 generates two encoding data blocks P and Q, which can allow both data disks to be damaged at the same time.
Therefore, in the RAID system, all the data in the Strip must meet the encoding/decoding algorithm rules, that is, all the data in the strip can generate encoding data according to certain rules, the encoding data is the same as the encoding data stored in the Strip. In this case, the data in the strip is consistent. When a disk fails, you can use the encoding stored in the band to recover lost data blocks.
If the data in a strip is inconsistent, that is, the encoding result calculated by the data in the strip is different from the stored encoding data, once a disk fails, the lost data blocks cannot be restored correctly by storing the encoding data in the Strip. Therefore, a data inconsistency strip may cause data correctness problems when a fault occurs.
When creating a RAID system, the disk in the RAID Group may be a new disk or a used data disk. The data on these disks will not be zero. In this case, the data strip built using these disks cannot meet the data consistency requirements. That is, the encoding data calculated by the data in each band according to certain rules is inconsistent with the encoding data in the band. Such inconsistent data strip poses a great risk to the correctness of RAID data.
For this reason, when creating a RAID, you must consider initializing all the strip in the system to ensure data consistency in the Strip. The following two methods can be used for strip initialization:
1. Initialize all the strip in the RAID system by completely writing zero. If the data is zero, the verification data is zero. Therefore, zero data can ensure the consistency of the Strip.
2. Verify and compute all the Strip, and update the validation data in the Strip to achieve the consistency of the Strip data.
After a RAID system is initialized, the data in all the strip will be consistent, as shown in:
The RAID system initialization process is a very long process, mainly because all the strip in the system needs to be initialized. You also need to consider the performance balance with the front-end user IO. Therefore, RAID system initialization is often a background execution process that will last for a long time, it also affects the performance of front-end applications.
For SSD, the RAID system initialization process also introduces other problems. During system initialization, data must be written to the SSD disk in both the mode of writing zero or verifying data updates. This process causes unnecessary data write amplification. When user data has not been written, a data ing table has been created in the SSD through initialization. SSD reduces service life and performance. Therefore, an SSD-oriented RAID system needs to consider the optimization of the system initialization process. Traditional RAID does not take into account the special features of SSD. Therefore, traditional RAID cannot be deployed directly on SSD, which may affect the service life and performance of SSD.
The RAID system uses data striping to protect data. However, a series of problems are introduced during the striping data protection process. system initialization is a typical striping consistency problem. An excellent RAID Data protection system can solve this problem during the design process. For example, EMC's Data Domain RAID does not have a system initialization process. Of course, it needs to work with the file system, in addition, the distribution of RAID strip data has been greatly optimized.
How to build a RAID 10 array on Linux
Debian soft RAID Installation notes-use mdadm to install RAID1
Common RAID technology introduction and demo (Multi-chart)
The most common disk array in Linux-RAID 5
RAID0 + 1 and RAID5 Performance Test Results
Getting started with Linux: disk array (RAID)
This article permanently updates the link address: