RAID data processing method and device, chip, electronic equipment, storage medium and computer program product

By using the stripe area group structure and the second check information in the RAID data processing method, data is read only within the faulty area group for recovery, solving the problem of large read volume during data recovery in traditional RAID6 and achieving more efficient data recovery.

CN120723544AActive Publication Date: 2025-09-30SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511212566.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-09-30
Estimated Expiration
2045-08-28

AI Technical Summary

Technical Problem

When a storage device fails in traditional distributed RAID6, a large amount of data is read during the data recovery process, resulting in performance bottlenecks and low recovery efficiency and speed.

Method used

In the RAID data processing method, the data area and check area of ​​each stripe are divided into two area groups, and second check information is generated in each area group and stored in the hot spare area. In the event of a failure, only the data and second check information in the area group to which the failed area belongs are read for recovery.

Benefits of technology

It significantly reduces the total amount of data read during data recovery, reduces disk I/O load and system bandwidth usage, improves the efficiency and speed of data recovery, and overcomes the performance bottleneck of traditional RAID6.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723544A_ABST
    Figure CN120723544A_ABST
Patent Text Reader

Abstract

The invention provides an RAID data processing method and device, a chip, electronic equipment, a storage medium and a computer program product, the RAID data processing method and device, the chip, the electronic equipment, the storage medium and the computer program product are applied to an RAID, the RAID data processing device comprises a plurality of strips, each strip comprises at least two data areas, two verification areas and two hot standby areas, and the at least two data areas and the two verification areas of each strip are divided into two area groups; data information is stored in the data area, second verification information is stored in the hot standby area, and the method comprises the steps that it is detected that one storage device breaks down, a to-be-recovered area belonging to the storage device in a strip is determined, and the to-be-recovered area is the data area or the verification area; reading data information and / or first verification information of other regions in a region group to which the to-be-recovered region belongs and second verification information corresponding to the region group; and recovering the data information or the first verification information of the to-be-recovered area based on the data information and / or the first verification information and the second verification information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a RAID data processing method, device, chip, electronic device, storage medium, and computer program product. Background Art

[0002] In the field of RAID technology, traditional distributed RAID6 consists of multiple stripe groups, each of which includes multiple stripes, and each stripe spans multiple storage devices. When a storage device fails, all storage devices participate in the data recovery process, eliminating the write bottleneck of a single storage device. However, the amount of data blocks read from each storage device is very large, and disk read speed becomes a performance bottleneck for data recovery. Summary of the Invention

[0003] The present application provides a RAID data processing method, device, chip, electronic device, storage medium and computer program product.

[0004] In one aspect, an embodiment of the present application provides a RAID data processing method, applied to a RAID, wherein the RAID includes at least one stripe group, the stripe group includes multiple stripes, the stripe includes at least two data areas, two parity areas, and two hot spare areas, the at least two data areas and two parity areas of the stripe are divided into two area groups, the data area stores data information, the parity area stores first parity information, and the hot spare area stores second parity information, the second parity information being determined based on data information and / or the first parity information in a corresponding area group, the method comprising: Detecting a failure of a storage device, determining a to-be-recovered area in the stripe belonging to the storage device, wherein the to-be-recovered area is a data area or a check area; Reading data information and / or first verification information of other areas in the area group to which the area to be restored belongs and second verification information corresponding to the area group; The data information or the first verification information of the to-be-restored area is restored based on the data information and / or the first verification information and the second verification information.

[0005] The step of restoring the data information or the first verification information of the area to be restored based on the data information and / or the first verification information and the second verification information includes: Obtaining location information corresponding to the data information and / or the first verification information and the second verification information, where the location information is determined based on a storage device to which areas corresponding to the data information and / or the first verification information and the second verification information belong; The data information or the first verification information of the area to be restored is determined based on the data information and / or the first verification information, the second verification information, and the location information.

[0006] The method further comprises: detecting failures of two storage devices, and determining areas to be recovered in the stripe belonging to the storage devices; If the two to-be-recovered areas of the stripe belong to two different area groups, respectively, reading data information and / or first verification information of other areas in the area group and second verification information corresponding to the area group; The data information or the first verification information of the to-be-restored area in the area group is restored based on the data information and / or the first verification information and the second verification information.

[0007] The method further comprises: If the two to-be-recovered areas of the stripe belong to the same area group, reading all data information and first check information of the stripe; The data information or the first verification information of the area to be restored is determined based on the data information and the first verification information.

[0008] The method further comprises: The data information or the first verification information of the area to be restored is stored in the hot standby area to which the corresponding second verification information belongs.

[0009] The method further comprises: Upon detecting that the failure of the storage device is resolved, the data information or the first verification information stored in the hot spare area is transferred to a restored area of ​​the storage device in the corresponding stripe; determining second verification information corresponding to the regional group to which the restored region belongs based on data information and / or first verification information in the regional group to which the restored region belongs; The second verification information is stored in the hot standby area.

[0010] The method further comprises: detecting that the failure of the storage device is resolved, and determining second verification information based on data information of the region group to which the restored region in the stripe belongs and / or the first verification information; The second verification information is stored in the restored area.

[0011] Another aspect of the present invention provides a RAID data processing device, comprising: A processing module, configured to detect a failure of a storage device and determine a to-be-recovered area in a stripe belonging to the storage device, wherein the to-be-recovered area is a data area or a check area; a read / write module, configured to read data information and / or first verification information of other areas in the area group to which the area to be restored belongs, and second verification information corresponding to the area group; A calculation module is used to restore the data information or the first verification information of the area to be restored based on the data information and / or the first verification information and the second verification information.

[0012] The processing module is further configured to obtain location information corresponding to the data information and / or the first verification information and the second verification information, wherein the location information is determined based on a storage device to which an area corresponding to the data information and / or the first verification information and the second verification information belongs; The calculation module is further configured to determine the data information or the first verification information of the area to be restored based on the data information and / or the first verification information, and the second verification information and the location information.

[0013] The processing module is further configured to detect that two storage devices have failed, and determine a region to be restored in the stripe that belongs to the storage devices; The read / write module is further configured to read data information and / or first verification information of other areas in the regional group and second verification information corresponding to the regional group when the two to-be-recovered areas of the stripe belong to two different regional groups respectively; The calculation module is further configured to restore the data information or the first verification information of the to-be-restored area in the area group based on the data information and / or the first verification information and the second verification information.

[0014] The read / write module is further configured to read all data information and first verification information of the stripe when the two to-be-recovered areas of the stripe belong to the same area group; The calculation module is further configured to determine the data information or the first verification information of the area to be restored based on the data information and the first verification information.

[0015] Another aspect of an embodiment of the present application provides a chip, the chip including a processor, and the processor capable of executing the RAID data processing method.

[0016] Another aspect of an embodiment of the present application provides an electronic device, the electronic device includes a chip, the chip includes a processor, and the processor is capable of executing the RAID data processing method.

[0017] Another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the RAID data processing method.

[0018] On the other hand, an embodiment of the present application provides a computer program product, including a computer program or instructions, for causing a processor to execute and implement the RAID data processing method provided in the embodiment of the present application.

[0019] In the above-described scheme, when a single storage device fails, the structure of the region groups divided within the stripe and the preset second verification information allow data in the area to be recovered to be recovered by only reading the data within the region group to which the failed area belongs (including data information in the same group and / or first verification information and the second verification information corresponding to the region group), without having to read data from all regions within the stripe. Because the region group only contains some of the data disks and verification disks within the stripe (usually half of the total number of disks), this method strictly limits the read operations required for the data recovery process to the single region group to which the failed area belongs, reducing the actual amount of data required to be read when recovering a single faulty disk to half of the total data volume, thereby significantly reducing the total amount of data required to be read during the data recovery process. This significantly reduces disk I / O load and system bandwidth usage, significantly improves the efficiency and speed of data recovery, and effectively overcomes the performance bottleneck caused by the need to read all disk data when recovering a single disk failure in traditional distributed RAID6.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other objects, features and advantages of the exemplary embodiments of the present application will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present application are shown in an illustrative and non-limiting manner, in which: In the drawings, the same or corresponding reference numerals denote the same or corresponding parts.

[0022] Figure 1 A flowchart of a RAID data processing method according to an embodiment of the present application is shown; Figure 2 A flowchart of a RAID data processing method according to another embodiment of the present application is shown; Figure 3 A flowchart of a RAID data processing method according to another embodiment of the present application is shown; Figure 4 A flowchart of a RAID data processing method according to another embodiment of the present application is shown; Figure 5 A flowchart of a RAID data processing method according to another embodiment of the present application is shown; Figure 6 A flowchart of a RAID data processing method according to another embodiment of the present application is shown; Figure 7 A schematic structural diagram of a RAID data processing device according to an embodiment of the present application is shown; Figure 8 A schematic diagram of the structure of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0023] In order to make the purpose, features, and advantages of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.

[0024] The solution of this application is used in distributed RAID 6 (a RAID level).

[0025] Each stripe in a distributed RAID 6 uses two parity areas to store one copy of the first parity data. Both copies of the first parity data are encoded based on the data stored in the stripe's data area. When a drive error occurs, up to two failed drives can be recovered simultaneously.

[0026] For example, a distributed RAID 6 is composed of k storage devices. Each stripe includes two parity areas (areas storing first parity data) and k-2 data areas (areas storing data information). These areas belong to different storage devices. The two copies of first parity data are p and q. The two copies of first parity data, p and q, can be determined using the data information stored in the k-2 data areas and the following formulas (1) and (2).

[0027]

[0028] in, is the XOR operation, For the Data information in each data area, For the The location information of the storage device to which each area belongs.

[0029] When a disk error occurs, the data information in the non-error disk area, the first check information, and the above formulas (1) and (2) can be decoded to recover the data in at most two error disks at the same time. However, whether there is a single error disk or two error disks at the same time, when recovering the data in the error disk, it is necessary to read the data information and the first check information stored in all other areas of the stripe to recover the data in the error disk. The amount of data to be read is very large, so the data recovery efficiency is low and the speed is slow.

[0030] For example, as shown in Table 1, Table 1 shows a distributed RAID6 that includes 8 storage devices, divided into 2 stripe groups, each stripe group includes 6 stripes and is written to disk in a left-handed non-aligned manner. Each stripe has 4 data areas for storing data information, 2 check areas for storing first verification information, and 2 hot spare areas. The hot spare area is used to temporarily store data recovered from a faulty disk when a faulty disk occurs in the RAID. When the storage device 5 in the RIAD fails, it is necessary to read the data shown in the shaded part in Table 1, that is, the data information and / or the first verification information of all areas except the area where the faulty disk is located and the hot spare area, to restore the data information and / or the first verification information in the storage device 5.

[0031] Table 1

[0032] In order to break through the performance bottleneck of data recovery and improve the speed and efficiency of data recovery, an embodiment of the present application provides a RAID data processing method, which is applied to RAID, wherein the RAID includes at least one stripe group, the stripe group includes multiple stripes, the stripe includes at least two data areas, two check areas and two hot spare areas, the at least two data areas and two check areas of the stripe are divided into two area groups, the data area stores data information, the check area stores first check information, and the hot spare area stores second check information, and the second check information is determined based on the data information and / or the first check information in the corresponding area group.

[0033] For example, as shown in Table 2, Table 2 shows that based on distributed RAID6, all data areas and check areas of each stripe are divided into two area groups, the data information and / or first check information of each area group are encoded to obtain the second check information corresponding to the area group, and the two obtained second check information are stored in two hot spare areas respectively. Stripe 1 in stripe group 1, 、 and Divide into the area group 1 of the strip, and then encode it using the following formula (3) to obtain the second check information of the strip area group 1 .Will 、 、 Divide into the area group 2 of the strip, and then encode it using the following formula (4) to obtain the second check information of the strip area group 2 The two second verification information are stored in the two hot spare areas of the stripe respectively. The subsequent stripes are the same as the above method and will not be described in detail here.

[0034]

[0035] in, is the XOR operation, For the Data information in each data area, For the The location information of the storage device to which each area belongs, is the first group of regions in the strip, is the second group of regions in the strip, , is the second verification information corresponding to the first group of area groups in the stripe, The second verification information corresponding to the second group of region groups in the stripe.

[0036] Table 2

[0037] like Figure 1 As shown, the method includes: Step 101: Detecting a failure of a storage device, determining an area to be recovered in the stripe belonging to the storage device, wherein the area to be recovered is a data area or a check area.

[0038] When a storage device failure is detected, a to-be-recovered area in each stripe belonging to the failed storage device is determined. The to-be-recovered area may originally be a data area or a check area.

[0039] For example, as shown in Table 2, if storage device 5 fails, the shaded area in Table 2 is the area to be restored for each stripe. That is, the area to be restored for stripe 1 in stripe group 1 is The area to be restored for stripe 2 in stripe group 1 is The area to be restored for stripe 3 in stripe group 1 is The data area where the stripe 4 in stripe group 1 is located is The data area where the stripe is located. The area to be restored for stripe 5 in stripe group 1 is The data area where the stripe 6 in stripe group 1 is located is The data area where the stripe is located. The area to be restored for stripe 1 in stripe group 2 is The area to be restored for stripe 2 in stripe group 2 is The area to be restored for stripe 3 in stripe group 2 is The data area where the stripe 4 in stripe group 2 is located is The data area where the stripe 5 in stripe group 2 is located is The data area where the stripe 6 in stripe group 2 is located is The data area.

[0040] Step 102: Read data information and / or first verification information of other areas in the area group to which the area to be restored belongs, and second verification information corresponding to the area group.

[0041] Continuing with the above example, in stripe 1 of stripe group 1, 、 and The area is divided into area group 1, and the second verification information is obtained by encoding 、 and The area is divided into area group 2, and the second verification information is obtained by encoding When the storage device 5 fails, The verification area is the area to be restored and belongs to area group 2, then all data information and / or first verification information in area group 2 except the area to be restored and the second verification information corresponding to area group 2 are read, that is, 、 and In stripe 3 of stripe group 1, 、 and The area is divided into area group 1, and the second verification information is obtained by encoding . 、 and The area is divided into area group 2, and the second verification information is obtained by encoding When the storage device 5 fails, The data area where it is located is the area to be restored and belongs to area group 1, then all data information and / or first verification information in area group 1 except the area to be restored and the second verification information corresponding to area group 1 are read, that is, 、 and The subsequent strips are the same as the above method and will not be repeated here.

[0042] Step 103: Restore the data information or the first verification information of the area to be restored based on the data information and / or the first verification information and the second verification information.

[0043] Continuing with the above example, in stripe 1 of stripe group 1, all data information and / or first check information except the area to be recovered in read region group 2 and the second check information corresponding to region group 2, that is, 、 and Then, the data in the area to be restored of the stripe is determined by formula (4), that is, the first check information In stripe 3 of stripe group 1, all data information and / or first check information except the area to be restored in read region group 1 and the second check information corresponding to region group 1, that is, 、 and Then, the data in the area to be restored of the stripe is determined by formula (3), that is, the first check information The subsequent strips are the same as the above method and will not be repeated here.

[0044] In the above-described scheme, when a single storage device fails, the structure of the region groups divided within the stripe and the preset second verification information allow data in the area to be recovered to be recovered by only reading the data within the region group to which the failed area belongs (including data information in the same group and / or first verification information and the second verification information corresponding to the region group), without having to read data from all regions within the stripe. Because the region group only contains some of the data disks and verification disks within the stripe (usually half of the total number of disks), this method strictly limits the read operations required for the data recovery process to the single region group to which the failed area belongs, reducing the actual amount of data required to be read when recovering a single faulty disk to half of the total data volume, thereby significantly reducing the total amount of data required to be read during the data recovery process. This significantly reduces disk I / O load and system bandwidth usage, significantly improves the efficiency and speed of data recovery, and effectively overcomes the performance bottleneck caused by the need to read all disk data when recovering a single disk failure in traditional distributed RAID6.

[0045] In an example of the present application, a RAID data processing method is also provided. Figure 2 As shown, the restoring the data information or the first verification information of the to-be-restored area based on the data information and / or the first verification information and the second verification information includes: Step 201: Obtain location information corresponding to the data information and / or the first verification information and the second verification information, where the location information is determined based on a storage device to which an area corresponding to the data information and / or the first verification information and the second verification information belongs.

[0046] In the above formulas (3) and (4), it is also necessary to obtain the location information corresponding to each piece of information to perform data recovery. In this embodiment, the location information is the serial number of the storage device to which the area where the information is located belongs.

[0047] For example, as shown in Table 2, storage device 5 fails. In stripe 1 of stripe group 1, 、 and The area is divided into area group 1, and the second verification information is obtained by encoding 、 and The area is divided into area group 2, and the second verification information is obtained by encoding When the storage device 5 fails, The verification area is the area to be restored and belongs to area group 2, then all data information and / or first verification information in area group 2 except the area to be restored and the second verification information corresponding to area group 2 are read, that is, 、 and You also need to obtain 、 and The corresponding location information. The data area where it is located belongs to the storage device 4, so The corresponding position information is 4. The data area where it is located belongs to the storage device 6, so The corresponding position information is 6. The data area where it is located belongs to the storage device 8, so The corresponding position information is 8.

[0048] Step 202: Determine the data information or first verification information of the area to be restored based on the data information and / or first verification information, the second verification information, and the location information.

[0049] Following the above example, based on 、 and , Corresponding location information 4, Corresponding location information 6, The corresponding location information 8 and formula (4) determine the first verification information of the area to be restored .

[0050] In the above solution, when using the data information within the regional group and / or the first verification information for data recovery, by obtaining and integrating the corresponding location information of each information, the integrity of the data recovery can be ensured, and the system's adaptability to physical layout changes can be enhanced. While reducing the amount of data read, the fault tolerance and operational security of data recovery are significantly improved.

[0051] In an example of the present application, a RAID data processing method is also provided. Figure 3 As shown, the method further includes: Step 301: It is detected that two storage devices fail, and the areas to be recovered belonging to the storage devices in the stripe are determined.

[0052] For example, as shown in Table 3, in the distributed RAID 6 shown in Table 3, if storage device 2 and storage device 5 fail at the same time, the shaded area in Table 3 is the area to be recovered for each stripe. and The area to be restored for stripe 2 in stripe group 1 is and The area to be restored for stripe 3 in stripe group 1 is and The data area where the stripe 4 in stripe group 1 is located is and The data area where the stripe is located. The area to be restored for stripe 5 in stripe group 1 is and The data area where the stripe 6 in stripe group 1 is located is and The data area where the stripe is located. The area to be restored for stripe 1 in stripe group 2 is and The area to be restored for stripe 2 in stripe group 2 is and The area to be restored for stripe 3 in stripe group 2 is and The data area where the stripe 4 in stripe group 2 is located is and The data area where the stripe 5 in stripe group 2 is located is and The data area where the stripe 6 in stripe group 2 is located is and The data area.

[0053] Table 3

[0054] Step 302: If the two to-be-recovered areas of the stripe belong to two different area groups, data information and / or first verification information of other areas in the area group and second verification information corresponding to the area group are read.

[0055] Continuing with the above example, in stripe 1 of stripe group 1, 、 and The area is divided into area group 1, and the second verification information is obtained by encoding . 、 and The area is divided into area group 2, and the second verification information is obtained by encoding When storage devices 2 and 5 fail, The data area belongs to area group 1. The verification area where it is located belongs to area group 2. If it belongs to different area groups, then all data information and / or first verification information in area group 1 except the area to be restored and the second verification information corresponding to area group 1 are read, that is, 、 and Read all data information and / or first verification information in area group 2 except the area to be restored and the second verification information corresponding to area group 2, that is, 、 and . And in stripe 3 of stripe group 1, 、 and The area is divided into area group 1, and the second verification information is obtained by encoding . 、 and The area is divided into area group 2, and the second verification information is obtained by encoding When storage devices 2 and 5 fail, The data area belongs to area group 1. If the data area belongs to area group 2, all data information and / or first verification information in area group 1 except the area to be restored and the second verification information corresponding to area group 1 are read, that is, 、 and Read all data information and / or first verification information in area group 2 except the area to be restored and the second verification information corresponding to area group 2, that is, 、 and The subsequent strips are the same as the above method and will not be repeated here.

[0056] Step 303: Restore the data information or first verification information of the to-be-restored area in the area group based on the data information and / or the first verification information and the second verification information.

[0057] Continuing with the above example, in stripe 1 in stripe group 1, all data information and / or first check information except the area to be recovered in read region group 1 and the second check information corresponding to region group 1, that is, 、 and Then, the data in the area to be recovered in the stripe area group 1 is determined by formula (3), that is, the data information . Read all data information and / or first verification information in the area group 2 except the area to be restored and the second verification information corresponding to the area group 2, that is, 、 and Then, the data in the area to be recovered in the stripe area group 2 is determined by formula (4), that is, the first check information In stripe 3 of stripe group 1, all data information and / or first check information except the area to be restored in read region group 1 and the second check information corresponding to region group 1, that is, 、 and Then, the data in the area to be recovered in the stripe area group 1 is determined by formula (3), that is, the data information . Read all data information and / or first verification information in the area group 2 except the area to be restored and the second verification information corresponding to the area group 2, that is, 、 and Then, the data in the area to be recovered in the stripe area group 2 is determined by formula (4), that is, the data information The subsequent strips are the same as the above method and will not be repeated here.

[0058] In the above scheme, when two storage devices fail simultaneously and the areas to be recovered in the stripe of these two storage devices belong to different area groups of the stripe, the system can operate the independent recovery processes of the two area groups in parallel. By synchronously reading the data information and / or first verification information of each area group except the area to be recovered and the second verification information corresponding to the area group, the data within the group can be recovered without calling data across groups. Due to the characteristics of the encoding formula (i.e., formula (3) and formula (4)), compared with the traditional distributed RAID6 data recovery method (i.e., formula (1) and formula (2)), the amount of data calculation can be significantly reduced during the data recovery process, thereby further accelerating the efficiency and speed of data recovery.

[0059] In an example of the present application, a RAID data processing method is also provided. Figure 4 As shown, the method further includes: Step 401: If the two to-be-recovered areas of the stripe belong to the same area group, all data information and / or first check information of the stripe are read.

[0060] For example, as shown in Table 4, in stripe 1 in stripe group 1, 、 and The area is divided into area group 1, and the second verification information is obtained by encoding 、 and The area is divided into area group 2, and the second verification information is obtained by encoding When storage devices 4 and 5 fail, and The area where it is located belongs to area group 2, then all data information and / or first check information in stripe 1 of stripe group 1 are read, that is, 、 、 and . And in stripe 3 of stripe group 1, 、 and The area is divided into area group 1, and the second verification information is obtained by encoding . 、 and The area is divided into area group 2, and the second verification information is obtained by encoding When storage devices 4 and 5 fail, and The area where it is located belongs to area group 2, then all data information and / or first check information in stripe 3 of stripe group 1 are read, that is, 、 、 and The subsequent strips are the same as the above method and will not be repeated here.

[0061] Table 4

[0062] Step 402: Determine the data information or the first verification information of the area to be restored based on the data information and the first verification information.

[0063] Following the above example, in stripe 1 of stripe group 1, all data information and / or first check information of stripe 1 of stripe group 1 is read, that is, 、 、 and Then, the data in the area to be recovered of the strip is determined by formula (1) and formula (2), that is, the data information and the first verification information In stripe 3 of stripe group 1, all data information and / or first check information of stripe 3 of stripe group 1 are read, that is, 、 、 and Then, the data in the area to be restored of the stripe is determined by formula (1) and formula (2), that is, the first check information and data information The subsequent strips are the same as the above method and will not be repeated here.

[0064] In the above solution, when two faulty drives are located in the same zone group within a stripe, data recovery is performed using traditional distributed RAID 6 data recovery methods by reading the data information and / or first parity information in the stripe, excluding the area to be recovered. This provides a fallback when the partition recovery mechanism fails, ensuring accurate data recovery even when two faulty drives are located in the same zone group within a stripe, significantly improving the stability and robustness of data recovery.

[0065] In an example of the present application, a RAID data processing method is further provided, the method further comprising: The data information or the first verification information of the area to be restored is stored in the hot standby area to which the corresponding second verification information belongs.

[0066] For example, in the distributed RAID 6 shown in Table 2, a failure occurs in storage device 5. The first parity information in stripe group 1, stripe 1, region group 2 is recovered by the data recovery method. , since the original area of ​​the information has failed, the first check information will be restored as shown in Table 5 The data in stripe group 1, stripe 3 and region group 1 are restored by the data recovery method. , since the original area of ​​the information has failed, the restored data information is as shown in Table 5. The second verification information corresponding to area group 1 is stored in the hot standby area.

[0067] Table 5

[0068] For another example, in the distributed RAID 6 shown in Table 3, storage devices 2 and 5 fail. The data information in stripe group 1, stripe 1, and region group 1 is recovered by the data recovery method. and the first verification information in area group 2 , since the original area of ​​the information has failed, the restored data information is as shown in Table 6. The first verification information is stored in the hot spare area corresponding to the second verification information of area group 1, and the restored first verification information is The data in stripe group 1, stripe 3 and region group 1 are restored by the data recovery method. and data information in regional group 2 , since the original area of ​​the information has failed, the restored data information is as shown in Table 6. The restored data information is stored in the hot spare area to which the second verification information corresponding to area group 1 belongs. The second verification information corresponding to area group 2 is stored in the hot standby area.

[0069] Table 6

[0070] In the above solution, after data in the area to be recovered is restored, it is directly stored in the hot spare area corresponding to the area group. Recovered data is stored directly in the storage space of the second verification information, which was already used during the recovery process. This eliminates the need to wait for failed disks to be replaced or repaired, ensuring accurate reuse of hot spare area resources. By persisting recovered data in the hot spare area, data recovery timeliness and resource utilization are significantly improved.

[0071] In an example of the present application, a RAID data processing method is also provided. Figure 5 As shown, the method further includes: Step 501: It is detected that the failure of the storage device is resolved, and the data information or first verification information stored in the hot spare area is transferred to a restored area of ​​the storage device in the corresponding stripe.

[0072] It is detected that the fault of the storage device is resolved, that is, the faulty storage device is repaired or replaced with a new storage device to resolve the fault.

[0073] For example, in the distributed RAID 6 shown in Table 2, a failure occurs in the storage device 5. As shown in Table 5, the first parity information in the stripe group 1, stripe 1, and region group 2 is recovered by the data recovery method. , and the first check information The data in stripe group 1, stripe 3 and region group 1 are restored by the data recovery method. and the data information The first parity information stored in the hot spare area to which the second parity information corresponding to stripe region group 1 belongs is stored. When the failure of storage device 5 is resolved, as shown in Table 7, the first parity information stored in the hot spare area to which the second parity information corresponding to stripe region group 2 belongs is stored. Transfer the data stored in the hot spare area of ​​the second check information corresponding to stripe group 1, stripe 3 and area group 1 to the area of ​​storage device 5. Transfer to the area of ​​the storage device 5 corresponding to the stripe.

[0074] Table 7

[0075] Step 502: Determine second verification information corresponding to the regional group to which the restored region belongs based on the data information and / or the first verification information in the regional group.

[0076] Step 503: Store the second verification information into the hot standby area.

[0077] After the data transfer, the data distribution in the data area and parity area of ​​each stripe is the same as before the failure. However, because the second parity information in the hot spare area has been overwritten by the restored data, the second parity information needs to be re-determined based on the data in the restored data area and parity area.

[0078] Following the above example, the first check information stored in the hot spare area to which the second check information corresponding to stripe group 1, stripe 1, and region group 2 belongs is converted. After being transferred to the area of ​​the storage device 5 corresponding to the stripe, as shown in Table 8, based on 、 and , determine the second verification information through formula (4) , and store it in the corresponding hot spare area. The data information stored in the hot spare area to which the second check information corresponding to stripe group 1 stripe 3 area group 1 belongs After being transferred to the area of ​​the storage device 5 corresponding to the stripe, as shown in Table 8, based on 、 and , determine the second verification information through formula (3) , and stored in the corresponding hot standby area.

[0079] Table 8

[0080] In the above solution, after the faulty storage device is rectified, the recovered data temporarily stored in the hot spare area is migrated back to its original area, and the hot spare area is released. Second parity information is then regenerated based on the recovered data in the area group and written back to the corresponding hot spare area. This allows for rapid data recovery and restores the data distribution to its original disk layout.

[0081] In an example of the present application, a RAID data processing method is also provided. Figure 6 As shown, the method further includes: Step 601: It is detected that the failure of the storage device is resolved, and second verification information is determined based on data information of the region group to which the restored region in the stripe belongs and / or first verification information.

[0082] Step 602: Store the second verification information into the restored area.

[0083] After detecting that the failure of the storage device is resolved, the recovery data stored in the hot spare area is not transferred. Instead, the second verification information is re-determined based on the data information of the area group to which the recovered area belongs (i.e., the area group to which the recovery data belongs) and / or the first verification information, and then the second verification information is stored in the recovered area.

[0084] For example, in the distributed RAID 6 shown in Table 2, a failure occurs in the storage device 5. As shown in Table 5, the first parity information in the stripe group 1, stripe 1, and region group 2 is recovered by the data recovery method. , and the first check information The data in stripe group 1, stripe 3 and region group 1 are restored by the data recovery method. and the data information The second check information corresponding to the stripe area group 1 is stored in the hot spare area. When the failure of the storage device 5 is resolved, as shown in Table 9, based on 、 and in the hot standby area , determine the second verification information through formula (4) , and stored in the restored area (i.e., the area corresponding to storage device 5 in stripe 1 of stripe group 1). 、 and in the hot standby area , determine the second verification information through formula (3) , and stored in the recovered area (that is, the area corresponding to storage device 5 in stripe 3 of stripe group 1).

[0085] Table 9

[0086] In the above solution, after the faulty storage device is rectified, the hot spare area's recovery data is not transferred. Instead, the previously overwritten second parity information is directly determined based on the recovery data of the area group to which the recovery data belongs, and then written into the recovered area. This eliminates the need to transfer the hot spare area's data, avoiding additional data transfer overhead and further improving data recovery efficiency and speed.

[0087] In order to implement the above-mentioned RAID data processing method, as Figure 7 As shown, an example of the present application provides a RAID data processing device, including: Processing module 701 is configured to detect a storage device failure and determine a to-be-recovered area in a stripe belonging to the storage device, where the to-be-recovered area is a data area or a parity area; A read / write module 702 is configured to read data information and / or first verification information of other regions in the region group to which the region to be restored belongs, and second verification information corresponding to the region group; The calculation module 703 is configured to restore the data information or the first verification information of the area to be restored based on the data information and / or the first verification information and the second verification information.

[0088] The processing module 701 is further configured to obtain location information corresponding to the data information and / or the first verification information and the second verification information, where the location information is determined based on a storage device to which an area corresponding to the data information and / or the first verification information and the second verification information belongs; The calculation module 703 is further configured to determine the data information or the first verification information of the area to be restored based on the data information and / or the first verification information, and the second verification information and the location information.

[0089] The processing module 701 is further configured to detect that two storage devices have failed, and determine a region to be restored in the stripe that belongs to the storage devices; The read / write module 702 is further configured to read data information and / or first verification information of other regions in the regional group and second verification information corresponding to the regional group when the two to-be-recovered regions of the stripe belong to two different regional groups. The calculation module 703 is further configured to restore the data information or the first verification information of the to-be-restored area in the area group based on the data information and / or the first verification information and the second verification information.

[0090] The read / write module 702 is further configured to read all data information and first check information of the stripe when the two to-be-recovered areas of the stripe belong to the same area group; The calculation module 703 is further configured to determine the data information or the first verification information of the area to be restored based on the data information and the first verification information.

[0091] The read / write module 702 is further configured to store the data information or the first verification information of the area to be restored into the hot standby area to which the corresponding second verification information belongs.

[0092] The read / write module 702 is further configured to detect that the failure of the storage device is resolved and transfer the data information or the first verification information stored in the hot spare area to the restored area of ​​the storage device in the corresponding stripe; The calculation module 703 is further configured to determine second verification information corresponding to the regional group to which the restored region belongs based on the data information and / or the first verification information in the regional group to which the restored region belongs; The read-write module 702 is further configured to store the second verification information into the hot standby area.

[0093] The calculation module 703 is further configured to detect that the failure of the storage device is resolved and determine the second verification information based on the data information of the region group to which the restored region in the stripe belongs and / or the first verification information; The read-write module 702 is further configured to store the second verification information into the restored area.

[0094] An embodiment of the present application further provides a chip, which includes a processor capable of executing the RAID data processing method provided in the embodiment of the present application.

[0095] An embodiment of the present application also provides an electronic device.

[0096] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0097] like Figure 8As shown, electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. Computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to bus 804.

[0098] Various components in device 800 are connected to I / O interface 805, including an input unit 806, such as a keyboard, mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0099] The computing unit 801 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the RAID data processing method. For example, in some embodiments, the RAID data processing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed onto the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the RAID data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the RAID data processing method via any other suitable means (e.g., via firmware).

[0100] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, wherein a computer program is stored therein, and the computer program is used to execute the RAID data processing method provided by the embodiment of the present application.

[0101] An embodiment of the present application provides a computer program product, comprising a computer program or instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or instructions from the computer-readable storage medium and executes the computer program or instructions, causing the computer device to perform the RAID data processing method described above in the embodiment of the present application.

[0102] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or various devices including one or any combination of the above memories.

[0103] In some embodiments, a computer program may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0104] By way of example, a computer program may be deployed to be executed on one computing device or on multiple computing devices at one site or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0105] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0106] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0107] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0108] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0109] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0110] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0111] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.

[0112] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the present disclosure, "plurality" means two or more, unless otherwise specifically defined.

[0113] The above description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.

Claims

1. A RAID data processing method, characterized in that: A method is applied to a RAID, wherein the RAID includes at least one stripe group, the stripe group includes multiple stripes, the stripe includes at least two data areas, two parity areas, and two hot spare areas, the at least two data areas and two parity areas of the stripe are divided into two area groups, the data areas store data information, the parity areas store first parity information, and the hot spare areas store second parity information, the second parity information being determined based on data information and / or the first parity information in the corresponding area group, and the method includes: Detecting a failure of a storage device, determining a to-be-recovered area in the stripe belonging to the storage device, wherein the to-be-recovered area is a data area or a check area; Reading data information and / or first verification information of other areas in the area group to which the area to be restored belongs and second verification information corresponding to the area group; The data information or the first verification information of the to-be-restored area is restored based on the data information and / or the first verification information and the second verification information.

2. The method according to claim 1, characterized in that The restoring the data information or the first verification information of the to-be-restored area based on the data information and / or the first verification information and the second verification information includes: Obtaining location information corresponding to the data information and / or the first verification information and the second verification information, where the location information is determined based on a storage device to which areas corresponding to the data information and / or the first verification information and the second verification information belong; The data information or the first verification information of the area to be restored is determined based on the data information and / or the first verification information, the second verification information, and the location information.

3. The method according to claim 1, characterized in that The method further comprises: detecting failures of two storage devices, and determining areas to be recovered in the stripe belonging to the storage devices; If the two to-be-recovered areas of the stripe belong to two different area groups, respectively, reading data information and / or first verification information of other areas in the area group and second verification information corresponding to the area group; The data information or the first verification information of the to-be-restored area in the area group is restored based on the data information and / or the first verification information and the second verification information.

4. The method according to claim 3, characterized in that The method further comprises: If the two to-be-recovered areas of the stripe belong to the same area group, reading all data information and first check information of the stripe; The data information or the first verification information of the area to be restored is determined based on the data information and the first verification information.

5. The method according to any one of claims 1, 3 and 4, characterized in that: The method further comprises: The data information or the first verification information of the area to be restored is stored in the hot standby area to which the corresponding second verification information belongs.

6. The method according to claim 5, characterized in that The method further comprises: Upon detecting that the failure of the storage device is resolved, the data information or the first verification information stored in the hot spare area is transferred to a restored area of ​​the storage device in the corresponding stripe; determining second verification information corresponding to the regional group to which the restored region belongs based on data information and / or first verification information in the regional group to which the restored region belongs; The second verification information is stored in the hot standby area.

7. The method according to claim 5, characterized in that The method further comprises: detecting that the failure of the storage device is resolved, and determining second verification information based on data information of the region group to which the restored region in the stripe belongs and / or the first verification information; The second verification information is stored in the restored area.

8. A RAID data processing device, characterized in that: The device comprises: A processing module, configured to detect a failure of a storage device and determine a to-be-recovered area in a stripe belonging to the storage device, wherein the to-be-recovered area is a data area or a check area; a read / write module, configured to read data information and / or first verification information of other areas in the area group to which the area to be restored belongs, and second verification information corresponding to the area group; A calculation module is used to restore the data information or the first verification information of the area to be restored based on the data information and / or the first verification information and the second verification information.

9. The device according to claim 8, characterized in that include: The processing module is further configured to obtain location information corresponding to the data information and / or the first verification information and the second verification information, where the location information is determined based on a storage device to which an area corresponding to the data information and / or the first verification information and the second verification information belongs; The calculation module is further configured to determine the data information or the first verification information of the area to be restored based on the data information and / or the first verification information, and the second verification information and the location information.

10. The device according to claim 8, characterized in that include: The processing module is further configured to detect that two storage devices have failed and determine a region to be recovered in the stripe that belongs to the storage devices; The read / write module is further configured to read data information and / or first verification information of other areas in the regional group and second verification information corresponding to the regional group when the two to-be-recovered areas of the stripe belong to two different regional groups respectively; The calculation module is further configured to restore the data information or the first verification information of the to-be-restored area in the area group based on the data information and / or the first verification information and the second verification information.

11. The device according to claim 10, characterized in that include: The read / write module is further configured to read all data information and first verification information of the stripe when the two to-be-recovered areas of the stripe belong to the same area group; The calculation module is further configured to determine the data information or the first verification information of the area to be restored based on the data information and the first verification information.

12. A chip, characterized in that: The chip includes a processor, and the processor is capable of executing the RAID data processing method according to any one of claims 1 to 7.

13. An electronic device, characterized in that: The electronic device includes a chip, the chip includes a processor, and the processor can execute the RAID data processing method according to any one of claims 1 to 7.

14. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and the computer program is used to execute the RAID data processing method according to any one of claims 1 to 7.

15. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the RAID data processing method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Data recovery method, system and device and computer readable storage medium

    CN114442950A

  • Data processing method and device, storage medium and electronic equipment

    CN120406856A

  • Data processing method and device, storage medium and electronic equipment

    CN120469650A

  • RAID data processing method and device, chip, electronic equipment, storage medium and computer program product

    CN120704958A

  • Data storage method and apparatus, and device and non-volatile readable storage medium

    US20250117292A1