Raid data processing method and device, chip, electronic equipment, storage medium and computer program product
By dividing the data and parity areas within the RAID stripe into area groups and generating second parity information, the problem of large read volume in traditional RAID6 during failure is solved, achieving more efficient data recovery.
Patent Information
- Application Number
- CN202511212566.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-08-28
AI Technical Summary
In traditional distributed RAID6, when storage devices fail, the large amount of data reads during data recovery makes disk read speed a performance bottleneck, affecting recovery efficiency and speed.
The RAID stripe data area and parity area are divided into two area groups, and a second parity information is generated in each area group and stored in the hot spare area. In case of failure, only the data and second parity information in the area group to which the failed area belongs need to be read for recovery.
It significantly reduces the total amount of data read during data recovery, lowers disk I/O load and system bandwidth usage, improves the efficiency and speed of data recovery, and overcomes the performance bottleneck of traditional methods.
Smart Images

Figure CN120723544B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more particularly to a RAID data processing method, apparatus, chip, electronic device, storage medium, and computer program product. Background Technology
[0002] In the RAID technology field, traditional distributed RAID6 consists of multiple stripe groups, each stripe group containing multiple stripes, and each stripe spanning multiple storage devices. When one storage device fails, during data recovery, although all storage devices participate in the recovery process, eliminating the write bottleneck of a single storage device, the read volume of data blocks on each storage device is very large. At this point, disk read speed becomes the performance bottleneck for data recovery. Summary of the Invention
[0003] This application provides a RAID data processing method, apparatus, chip, electronic device, storage medium, and computer program product.
[0004] This application provides a RAID data processing method applied to RAID, wherein the RAID includes at least one stripe group, the stripe group includes multiple stripes, each 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 the data information in the corresponding area group and / or the first parity information, the method comprising:
[0005] A storage device failure is detected, and a region within the stripe belonging to the storage device that needs to be recovered is determined. The region to be recovered is either a data region or a verification region.
[0006] Read data information and / or first verification information of other regions in the region group to which the region to be recovered belongs, as well as second verification information corresponding to the region group;
[0007] Based on the data information and / or the first verification information and the second verification information, the data information or the first verification information of the area to be recovered is restored.
[0008] The step of recovering the data information or first verification information of the area to be recovered based on the data information and / or the first verification information and the second verification information includes:
[0009] Acquire the data information and / or the first verification information and the location information corresponding to the second verification information, wherein the location information is determined based on the storage device to which the area corresponding to the data information and / or the first verification information and the second verification information belongs;
[0010] 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, as well as the second verification information and the location information.
[0011] The method further includes:
[0012] Two storage devices were detected to be faulty, and the area in the stripe that belongs to the storage devices and needs to be recovered was determined.
[0013] If the two regions to be recovered in the strip belong to two different region groups, then read the data information and / or the first verification information of other regions in the region group and the second verification information corresponding to the region group;
[0014] Based on the data information and / or the first verification information and the second verification information, the data information or the first verification information of the region to be recovered in the region group is restored.
[0015] The method further includes:
[0016] If the two regions to be recovered in the strip belong to the same region group, then all data information and the first verification information of the strip are read;
[0017] The data information or the first verification information of the area to be recovered is determined based on the data information and the first verification information.
[0018] The method further includes:
[0019] The data information or first verification information of the area to be restored is stored in the hot backup area to which the corresponding second verification information belongs.
[0020] The method further includes:
[0021] Once the fault of the storage device is detected to be resolved, the data information or first verification information stored in the hot standby area is transferred to the recovered area of the storage device in the corresponding stripe.
[0022] The second verification information corresponding to the region group is determined based on the data information in the region group to which the recovered region belongs and / or the first verification information.
[0023] The second verification information is stored in the hot standby area.
[0024] The method further includes:
[0025] Upon detecting that the fault of the storage device has been cleared, second verification information is determined based on the data information of the region group to which the recovered region in the strip belongs and / or the first verification information;
[0026] The second verification information is stored in the recovered area.
[0027] Another embodiment of this application provides a RAID data processing apparatus, the apparatus comprising:
[0028] The processing module is used to detect a failure in a storage device and determine the area to be recovered in the stripe that belongs to the storage device, wherein the area to be recovered is a data area or a verification area;
[0029] The read / write module is used to read data information and / or first verification information of other areas in the area group to which the area to be recovered belongs, as well as second verification information corresponding to the area group;
[0030] The calculation module is used to recover the data information or the first verification information of the area to be recovered based on the data information and / or the first verification information and the second verification information.
[0031] The processing module is further configured to acquire the data information and / or the first verification information and the location information corresponding to the second verification information, wherein the location information is determined based on the storage device to which the area corresponding to the data information and / or the first verification information and the second verification information belongs;
[0032] 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, as well as the second verification information and the location information.
[0033] The processing module is also used to detect two storage devices malfunctioning and determine the area in the strip that belongs to the storage device and needs to be recovered;
[0034] The read / write module is also used to read data information and / or first verification information of other regions in the region group and the second verification information corresponding to the region group when the two regions to be recovered of the strip belong to different two region groups respectively;
[0035] The calculation module is further configured to recover the data information or the first verification information of the region to be recovered in the region group based on the data information and / or the first verification information and the second verification information.
[0036] The read / write module is further configured to read all data information and first verification information of the strip when the two regions to be recovered of the strip belong to the same region group;
[0037] The calculation module is also used to determine the data information or the first verification information of the area to be recovered based on the data information and the first verification information.
[0038] Another embodiment of this application provides a chip, the chip including a processor, the processor being capable of executing the RAID data processing method.
[0039] Another aspect of this application provides an electronic device, the electronic device including a chip, the chip including a processor, the processor being capable of executing the RAID data processing method.
[0040] Another embodiment of this application provides a computer-readable storage medium storing a computer program for executing the RAID data processing method described above.
[0041] Another aspect of this application provides a computer program product, including a computer program or instructions, for inducing a processor to execute and implement the RAID data processing method provided in this application.
[0042] In the above scheme, when a single storage device fails, by using the area group structure within the stripe and the preset second check information, it is only necessary to read the data within the area group to which the failed area belongs (including the data information of the same group and / or the first check information and the second check information corresponding to the area group) to complete the recovery of the data in the area to be recovered, without having to read the data of all areas within the stripe. Since the area group only contains a portion of the data disks and check 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 a single area group to which the failed area belongs, reducing the actual amount of data that needs to be read when recovering a single faulty disk to half of the total data volume, thereby significantly reducing the total amount of data that needs 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 traditional distributed RAID6 method of requiring the reading of the entire disk data when recovering a single disk failure.
[0043] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0044] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, wherein:
[0045] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0046] Figure 1 A flowchart of a RAID data processing method according to an embodiment of this application is shown;
[0047] Figure 2 A flowchart of a RAID data processing method according to another embodiment of this application is shown;
[0048] Figure 3 A flowchart of a RAID data processing method according to another embodiment of this application is shown;
[0049] Figure 4 A flowchart of a RAID data processing method according to another embodiment of this application is shown;
[0050] Figure 5 A flowchart of a RAID data processing method according to another embodiment of this application is shown;
[0051] Figure 6 A flowchart of a RAID data processing method according to another embodiment of this application is shown;
[0052] Figure 7 A schematic diagram of the structure of a RAID data processing apparatus according to an embodiment of this application is shown;
[0053] Figure 8 A schematic diagram of the composition structure of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0054] To make the objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0055] The scheme proposed in this application is used in distributed RAID6 (a RAID level).
[0056] In distributed RAID6, each stripe stores one copy of the first parity data in two parity areas. Both copies of the first parity data are encoded based on the data information stored in the data areas of that stripe. When a disk failure occurs, up to two failed disks can be recovered simultaneously.
[0057] For example, a distributed RAID6 consists of k storage devices. Each stripe includes two parity regions (regions storing first parity data) and k-2 data regions (regions storing data information), which belong to different storage devices. The two first parity data are p and q. The two first parity data p and q can be determined by the data information stored in the k-2 data regions and the following formulas (1) and (2).
[0058]
[0059] in, For XOR operation, For the first Data information in each data area For the first Location information of the storage device to which each region belongs.
[0060] When a disk error occurs, data can be decoded using the data information in the non-error disk area, the first check information, and the above formulas (1) and (2), thus enabling the simultaneous recovery of data from up to two error disks. However, regardless of whether one or two error disks occur simultaneously, recovering data from the error disk requires reading the data information and first check information stored in all other areas of the stripe in order to recover the data from the error disk. The amount of data read is very large, resulting in low data recovery efficiency and slow speed.
[0061] For example, as shown in Table 1, a distributed RAID 6 array consists of 8 storage devices divided into 2 stripe groups, each stripe group containing 6 stripes written to disk in a left-hand, non-aligned manner. Each stripe has 4 data areas for storing data information, 2 parity areas for storing first parity information, and 2 hot spare areas. The hot spare areas are used to temporarily store data recovered from a failed disk in the RAID. When storage device 5 in this RAID fails, the data shown in the shaded portion of Table 1—that is, the data information and / or first parity information from all areas except the area where the failed disk occurred and the hot spare areas—needs to be read to recover the data information and / or first parity information from storage device 5.
[0062] Table 1
[0063]
[0064] To overcome the performance bottleneck of data recovery and improve the speed and efficiency of data recovery, one embodiment of this application provides a RAID data processing method applied to RAID. The RAID includes at least one stripe group, the stripe group includes multiple stripes, and each 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 is determined based on the data information in the corresponding area group and / or the first parity information.
[0065] For example, as shown in Table 2, based on distributed RAID6, all data areas and parity areas of each stripe are divided into two area groups. The data information and / or first parity information of each area group are encoded to obtain the second parity information corresponding to that area group, and the two obtained second parity information are stored in two hot spare areas respectively. Stripe 1 in stripe group 1 will... , and The region is divided into area group 1 of the strip, and then encoded using the following formula (3) to obtain the second check information of area group 1 of the strip. .Will , , The region is divided into two groups, and then encoded using the following formula (4) to obtain the second check information of the region group 2. The two second verification messages are then stored in the two hot-standby areas of this stripe, respectively. Subsequent stripes follow the same method and will not be described again here.
[0066]
[0067] in, For XOR operation, For the first Data information in each data area For the first Location information of the storage device to which each region belongs. This is the first region group in the strip. This is the second region group in the strip. , This is the second verification information corresponding to the first group of regions in the strip. This is the second verification information corresponding to the second group of regions in the strip.
[0068] Table 2
[0069]
[0070] like Figure 1 As shown, the method includes:
[0071] Step 101: A storage device malfunction is detected, and the area to be recovered in the stripe belonging to the storage device is determined. The area to be recovered is a data area or a verification area.
[0072] When a storage device failure is detected, the recovery area belonging to the failed storage device in each stripe is determined. The recovery area may have originally been a data area or a verification area.
[0073] For example, as shown in Table 2, if storage device 5 malfunctions, the shaded areas in Table 2 represent the areas to be recovered for each stripe. That is, the area to be recovered for stripe 1 in stripe group 1 is... The verification area it is located in. The area to be recovered for stripe 2 in stripe group 1 is... The verification area it is located in. The area to be recovered for stripe 3 in stripe group 1 is... The data area it is located in. The area to be recovered for stripe 4 in stripe group 1 is... The data area it is located in. The area to be recovered for stripe 5 in stripe group 1 is... The data area it is located in. The area to be recovered for stripe 6 in stripe group 1 is... The data area it is located in. The area to be recovered for stripe 1 in stripe group 2 is... The verification area it is located in. The area to be recovered for stripe 2 in stripe group 2 is... The area to be recovered for stripe 3 in stripe group 2 is the verification area. The data area it is located in. The area to be recovered for stripe 4 in stripe group 2 is... The data area it is located in. The area to be recovered for stripe 5 in stripe group 2 is... The data area it is located in. The area to be recovered for stripe 6 in stripe group 2 is... The data area it is located in.
[0074] Step 102: Read the data information and / or first verification information of other regions in the region group to which the region to be recovered belongs, as well as the second verification information corresponding to the region group.
[0075] Continuing with the example above, in stripe 1 of stripe group 1, , and The area is divided into area group 1, and the second verification information is obtained through encoding. , and The area was divided into area group 2, and the second verification information was obtained through encoding. When storage device 5 malfunctions, If the verification area is the area to be recovered and belongs to area group 2, then all data information and / or the first verification information and the second verification information corresponding to area group 2, excluding the area to be recovered, are read from area group 2. , and In strip 3 of strip group 1, , and The area is divided into area group 1, and the second verification information is obtained through encoding. . , and The area was divided into area group 2, and the second verification information was obtained through encoding. When storage device 5 malfunctions, If the data area is the area to be recovered and belongs to area group 1, then all data information and / or the first verification information and the second verification information corresponding to area group 1, excluding the area to be recovered, are read from area group 1. , and The subsequent striping process follows the same method as described above, and will not be repeated here.
[0076] Step 103: Recover the data information or the first verification information of the area to be recovered based on the data information and / or the first verification information and the second verification information.
[0077] Continuing with the above example, in stripe 1 of stripe group 1, all data information and / or first verification information in region group 2, excluding the region to be recovered, and the second verification information corresponding to region group 2 are read. , and Then, the data in the area to be recovered in the strip is determined by formula (4), which is the first verification information. In stripe 3 of stripe group 1, all data information and / or first verification information in region group 1, excluding the region to be recovered, and the second verification information corresponding to region group 1 are read. , and Then, the data in the area to be recovered in the strip is determined by formula (3), which is the first verification information. The subsequent striping process follows the same method as described above, and will not be repeated here.
[0078] In the above scheme, when a single storage device fails, by using the area group structure within the stripe and the preset second check information, it is only necessary to read the data within the area group to which the failed area belongs (including the data information of the same group and / or the first check information and the second check information corresponding to the area group) to complete the recovery of the data in the area to be recovered, without having to read the data of all areas within the stripe. Since the area group only contains a portion of the data disks and check 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 a single area group to which the failed area belongs, reducing the actual amount of data that needs to be read when recovering a single faulty disk to half of the total data volume, thereby significantly reducing the total amount of data that needs 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 traditional distributed RAID6 method of requiring the reading of the entire disk data when recovering a single disk failure.
[0079] This application also provides a RAID data processing method in one example, such as Figure 2 As shown, the step of recovering the data information or first verification information of the area to be recovered based on the data information and / or the first verification information and the second verification information includes:
[0080] Step 201: Obtain the data information and / or the first verification information and the location information corresponding to the second verification information, wherein the location information is determined based on the storage device to which the area corresponding to the data information and / or the first verification information and the second verification information belongs.
[0081] In formulas (3) and (4) above, it is also necessary to obtain the location information corresponding to each piece of information for data recovery. In this embodiment, the location information is the serial number of the storage device to which the information is located.
[0082] For example, as shown in Table 2, storage device 5 malfunctions. In stripe 1 of stripe group 1, , and The area is divided into area group 1, and the second verification information is obtained through encoding. , and The area was divided into area group 2, and the second verification information was obtained through encoding. When storage device 5 malfunctions, If the verification area is the area to be recovered and belongs to area group 2, then all data information and / or the first verification information and the second verification information corresponding to area group 2, excluding the area to be recovered, are read from area group 2. , and At the same time, it is also necessary to obtain , and The corresponding location information. The data area in question belongs to storage device 4, therefore... The corresponding location information is 4. The data area in question belongs to storage device 6, therefore... The corresponding location information is 6. The data area in question belongs to storage device 8, therefore... The corresponding location information is 8.
[0083] Step 202: Determine the data information or first verification information of the area to be recovered based on the data information and / or the first verification information, as well as the second verification information and the location information.
[0084] Following the above example, based on , and , Corresponding location information 4, Corresponding location information 6, The corresponding location information 8, and the first verification information of the area to be restored determined by formula (4) .
[0085] In the above-described scheme, when using data information within the regional group and / or the first verification information for data recovery, the integrity of the data recovery can be ensured by acquiring and fusing the location information corresponding to each piece of information, and the system's adaptability to changes in physical layout can be enhanced. While reducing the amount of data read, the fault tolerance and operational safety of data recovery are significantly improved.
[0086] This application also provides a RAID data processing method in one example, such as Figure 3 As shown, the method further includes:
[0087] Step 301: Two storage devices are detected to be faulty, and the area to be recovered belonging to the storage device in the strip is determined.
[0088] For example, as shown in Table 3, in the distributed RAID 6 array shown in Table 3, if storage device 2 and storage device 5 fail simultaneously, then the shaded areas in Table 3 represent the recoverable areas of each stripe. The recoverable area of stripe 1 in stripe group 1 is... and The verification area it is located in. The area to be recovered for stripe 2 in stripe group 1 is... and The verification area it is located in. The area to be recovered for stripe 3 in stripe group 1 is... and The data area it is located in. The area to be recovered for stripe 4 in stripe group 1 is... and The data area it is located in. The area to be recovered for stripe 5 in stripe group 1 is... and The data area it is located in. The area to be recovered for stripe 6 in stripe group 1 is... and The data area it is located in. The area to be recovered for stripe 1 in stripe group 2 is... and The verification area it is located in. The area to be recovered for stripe 2 in stripe group 2 is... and The area to be recovered for stripe 3 in stripe group 2 is the verification area. and The data area it is located in. The area to be recovered for stripe 4 in stripe group 2 is... and The data area it is located in. The area to be recovered for stripe 5 in stripe group 2 is... and The data area it is located in. The area to be recovered for stripe 6 in stripe group 2 is... and The data area it is located in.
[0089] Table 3
[0090]
[0091] Step 302: If the two regions to be recovered in the strip belong to two different region groups, then read the data information and / or the first verification information of other regions in the region group and the second verification information corresponding to the region group.
[0092] Continuing with the example above, in stripe 1 of stripe group 1, , and The area is divided into area group 1, and the second verification information is obtained through encoding. . , and The area was divided into area group 2, and the second verification information was obtained through encoding. When storage devices 2 and 5 malfunction, The data area it belongs to is region group 1. If the verification area belongs to area group 2, and the data belongs to different area groups, then all data information and / or the first verification information and the second verification information corresponding to area group 1, excluding the area to be recovered, are read from area group 1. , and Read all data information and / or first verification information in region group 2, excluding the region to be recovered, as well as the second verification information corresponding to region group 2. , and In strip 3 of strip group 1, , and The area is divided into area group 1, and the second verification information is obtained through encoding. . , and The area was divided into area group 2, and the second verification information was obtained through encoding. When storage devices 2 and 5 malfunction, The data area it belongs to is region group 1. If the data area belongs to region group 2, then read all data information and / or the first verification information from region group 1, excluding the area to be recovered, as well as the second verification information corresponding to region group 1. , and Read all data information and / or first verification information in region group 2, excluding the region to be recovered, as well as the second verification information corresponding to region group 2. , and The subsequent striping process follows the same method as described above, and will not be repeated here.
[0093] Step 303: Based on the data information and / or the first verification information and the second verification information, recover the data information or the first verification information of the region to be recovered in the region group.
[0094] Continuing with the above example, in stripe 1 of stripe group 1, all data information and / or first verification information in region group 1 excluding the region to be recovered, as well as the second verification information corresponding to region group 1, are read. , and Then, the data in the area to be recovered in the strip region group 1 is determined by formula (3), that is, the data information. Read all data information and / or first verification information in region group 2, excluding the region to be recovered, as well as the second verification information corresponding to region group 2. , and Then, the data in the area to be recovered in the strip region group 2 is determined by formula (4), that is, the first verification information. In stripe 3 of stripe group 1, all data information and / or first verification information in region group 1, excluding the region to be recovered, and the second verification information corresponding to region group 1 are read. , and Then, the data in the area to be recovered in the strip region group 1 is determined by formula (3), that is, the data information. Read all data information and / or first verification information in region group 2, excluding the region to be recovered, as well as the second verification information corresponding to region group 2. , and Then, the data in the area to be recovered in the strip region group 2 is determined by formula (4), that is, the data information. The subsequent striping process follows the same method as described above, and will not be repeated here.
[0095] In the above scheme, when two storage devices fail simultaneously and the areas to be recovered for these two storage devices belong to different area groups within 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 and the second verification information corresponding to the area group in each area group, data within the group can be recovered without cross-group data access. Due to the characteristics of the encoding formulas (i.e., formulas (3) and (4)), compared with the traditional distributed RAID6 data recovery method (i.e., through formulas (1) and (2)), the amount of data computation can be significantly reduced during the data recovery process, thereby further accelerating the efficiency and speed of data recovery.
[0096] This application also provides a RAID data processing method in one example, such as Figure 4 As shown, the method further includes:
[0097] Step 401: If the two regions to be recovered in the strip belong to the same region group, then read all the data information and / or the first verification information of the strip.
[0098] For example, as shown in Table 4, in strip 1 of strip group 1, , and The area is divided into area group 1, and the second verification information is obtained through encoding. , and The area was divided into area group 2, and the second verification information was obtained through encoding. When storage devices 4 and 5 malfunction, and If the region belongs to region group 2, then all data information and / or the first check information in stripe 1 of stripe group 1 are read, i.e. , , and In strip 3 of strip group 1, , and The area is divided into area group 1, and the second verification information is obtained through encoding. . , and The area was divided into area group 2, and the second verification information was obtained through encoding. When storage devices 4 and 5 malfunction, and If the region belongs to region group 2, then all data information and / or the first check information in stripe 3 of stripe group 1 are read, i.e. , , and The subsequent striping process follows the same method as described above, and will not be repeated here.
[0099] Table 4
[0100]
[0101] Step 402: Determine the data information or first verification information of the area to be recovered based on the data information and the first verification information.
[0102] Continuing with the example above, in stripe 1 of stripe group 1, all data information and / or first check information in stripe 1 of stripe group 1 are read, i.e. , , and Then, the data in the area to be recovered in the strip is determined using formulas (1) and (2), i.e., the data information. and the first verification information In stripe 3 of stripe group 1, all data information and / or first check information in stripe 3 of stripe group 1 are read, i.e. , , and Then, the data in the area to be recovered in the strip is determined by formulas (1) and (2), namely the first verification information. and data information The subsequent striping process follows the same method as described above, and will not be repeated here.
[0103] In the above scheme, when two faulty disks are located in the same area group within a stripe, data recovery is performed by reading data information from that stripe excluding the area to be recovered and / or the first parity information, and then using traditional distributed RAID6 data recovery methods. This provides a fallback guarantee when the partition recovery mechanism fails, ensuring accurate data recovery even when two faulty disks are located in the same area group within a stripe, significantly improving the stability and robustness of data recovery.
[0104] This application also provides a RAID data processing method in one example, the method further comprising:
[0105] The data information or first verification information of the area to be restored is stored in the hot backup area to which the corresponding second verification information belongs.
[0106] For example, in the distributed RAID6 shown in Table 2, storage device 5 failed. The first parity information in stripe group 1, region group 2 was recovered using data recovery methods. Since the original area of this information is faulty, the first verification information will be restored as shown in Table 5. The data was stored in the hot backup area corresponding to the second verification information of area group 2. Data information from area group 1 of stripe group 1, stripe 3, was recovered using data recovery methods. Since the original area of this information is faulty, the data information to be recovered will be as shown in Table 5. Store it in the hot standby area to which the second verification information belongs in area group 1.
[0107] Table 5
[0108]
[0109] For example, in the distributed RAID6 shown in Table 3, storage devices 2 and 5 failed. Data recovery methods were used to recover the data from stripe group 1, region group 1. and the first verification information in region group 2 Since the original area of this information is faulty, the data information to be recovered will be as shown in Table 6. The first verification information will be restored in the hot standby area corresponding to the second verification information stored in area group 1. The data was stored in the hot backup area corresponding to the second verification information of area group 2. Data information from area group 1 of stripe group 1, stripe 3, was recovered using data recovery methods. and data information in region group 2 Since the original area of this information is faulty, the data information to be recovered will be as shown in Table 6. The data information to be restored will be stored in the hot standby area corresponding to the second verification information of area group 1. Store it in the hot standby area to which the second verification information belongs in area group 2.
[0110] Table 6
[0111]
[0112] In the above solution, after data recovery in the area to be recovered is completed, it is stored in the hot standby area corresponding to the area group. The recovered data is stored directly using the storage space of the second verification information already used during the recovery process, eliminating the need to wait for replacement or repair of the faulty disk, ensuring accurate reuse of hot standby area resources. By storing the recovered data in the hot standby area, the timeliness and resource utilization of data recovery are significantly improved.
[0113] This application also provides a RAID data processing method in one example, such as Figure 5 As shown, the method further includes:
[0114] Step 501: Upon detecting that the fault of the storage device has been cleared, the data information or first verification information stored in the hot standby area is transferred to the recovered area of the storage device in the corresponding stripe.
[0115] The fault in the storage device is detected and resolved, meaning that the faulty storage device is repaired or replaced with a new storage device to resolve the fault.
[0116] For example, in the distributed RAID6 shown in Table 2, storage device 5 failed. As shown in Table 5, the first parity information in stripe group 1, area group 2 of stripe group 1 was recovered using data recovery methods. and the first verification information The data was stored in the hot backup area corresponding to the second verification information of stripe region group 2. Data information from stripe group 1, stripe 3, region group 1 was recovered using data recovery methods. and data information The information is stored in the hot spare area corresponding to the second verification information of stripe region group 1. When the fault in storage device 5 is resolved, as shown in Table 7, the first verification information stored in the hot spare area corresponding to the second verification information of stripe 1 region group 2 of stripe group 1 is transferred. The data information is transferred to the area of the storage device 5 corresponding to that stripe. The data information stored in the hot standby area corresponding to the second verification information of stripe group 1, stripe 3, area group 1 is transferred. Transferred to the area of the storage device 5 corresponding to that strip.
[0117] Table 7
[0118]
[0119] Step 502: Determine the second verification information corresponding to the region group based on the data information in the region group to which the recovered region belongs and / or the first verification information.
[0120] Step 503: Store the second verification information in the hot standby area.
[0121] After the data transfer, the data distribution of each stripe's data area and check area is the same as the data distribution before the failure. However, since the second check information in the hot standby area was overwritten by the recovered data, it is necessary to redetermine the second check information based on the recovered data area and check area.
[0122] Continuing with the example above, the first verification information stored in the hot standby area corresponding to the second verification information of stripe group 1, region group 2 is placed in stripe group 1. After being transferred to the area of the storage device 5 corresponding to the strip, as shown in Table 8, based on , and The second verification information is determined by formula (4). The data information stored in the corresponding hot standby area is then transferred to the hot standby area corresponding to the second verification information of stripe group 1, stripe 3, region group 1. After being transferred to the area of the storage device 5 corresponding to the strip, as shown in Table 8, based on , and The second verification information is determined by formula (3). And store it in the corresponding hot standby area.
[0123] Table 8
[0124]
[0125] In the above scheme, after the faulty storage device is repaired, the recovered data temporarily stored in the hot standby area is migrated back to its original area, and then the hot standby area is released. Subsequently, the second verification information is regenerated based on the data recovered from the area group and written back to the corresponding hot standby area. This allows for rapid data recovery while restoring the data distribution to its original disk persistence method.
[0126] This application also provides a RAID data processing method in one example, such as Figure 6 As shown, the method further includes:
[0127] Step 601: The fault of the storage device is detected to be resolved, and the second verification information is determined based on the data information of the region group to which the recovered region in the strip belongs and / or the first verification information.
[0128] Step 602: Store the second verification information into the recovered area.
[0129] After the fault of the storage device is detected to be resolved, the recovery data stored in the hot standby 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.
[0130] For example, in the distributed RAID6 shown in Table 2, storage device 5 failed. As shown in Table 5, the first parity information in stripe group 1, area group 2 of stripe group 1 was recovered using data recovery methods. and the first verification information The data was stored in the hot backup area corresponding to the second verification information of stripe region group 2. Data information from stripe group 1, stripe 3, region group 1 was recovered using data recovery methods. and data information The information is stored in the hot spare area corresponding to the second verification information of stripe area group 1. When the fault in storage device 5 is resolved, as shown in Table 9, based on... , and in the hot standby area The second verification information is determined by formula (4). And store it in the recovered area (i.e., the area of storage device 5 corresponding to stripe 1 in stripe group 1). Based on , and in the hot standby area The second verification information is determined by formula (3). And store it in the recovered area (i.e., the area of the corresponding storage device 5 in strip group 1 strip 3).
[0131] Table 9
[0132]
[0133] In the above scheme, after the faulty storage device is repaired, the recovered data in the hot spare area is not transferred. Instead, the previously overwritten second verification information is determined directly based on the recovered data of the area group to which the recovered data belongs, and then written to the recovered area. This eliminates the need for the data transfer step in the hot spare area, avoids additional data transfer overhead, and further improves the efficiency and speed of data recovery.
[0134] To implement the RAID data processing method described above, such as Figure 7 As shown, an example of this application provides a RAID data processing apparatus, including:
[0135] Processing module 701 is used to detect a failure in a storage device and determine a region in the stripe that belongs to the storage device and needs to be recovered, wherein the region to be recovered is a data region or a verification region;
[0136] The read / write module 702 is used to read data information and / or first verification information of other areas in the area group to which the area to be recovered belongs, as well as second verification information corresponding to the area group;
[0137] The calculation module 703 is used to recover the data information or the first verification information of the area to be recovered based on the data information and / or the first verification information and the second verification information.
[0138] The processing module 701 is further configured to acquire the data information and / or the first verification information and the location information corresponding to the second verification information, wherein the location information is determined based on the storage device to which the area corresponding to the data information and / or the first verification information and the second verification information belongs;
[0139] 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, as well as the second verification information and the location information.
[0140] The processing module 701 is further configured to detect two storage devices malfunctioning and determine the area in the strip that belongs to the storage device and needs to be recovered;
[0141] The read / write module 702 is further configured to read data information and / or first verification information of other regions in the region group and the second verification information corresponding to the region group when the two regions to be recovered of the strip belong to different two region groups respectively;
[0142] The calculation module 703 is further configured to recover the data information or the first verification information of the region to be recovered in the region group based on the data information and / or the first verification information and the second verification information.
[0143] The read / write module 702 is further configured to read all data information and first verification information of the strip when the two regions to be recovered of the strip belong to the same region group;
[0144] The calculation module 703 is further configured to determine the data information or the first verification information of the area to be recovered based on the data information and the first verification information.
[0145] The read / write module 702 is further configured to store the data information or first verification information of the area to be recovered into the hot standby area to which the corresponding second verification information belongs.
[0146] The read / write module 702 is further configured to detect when the fault of the storage device is resolved, and transfer the data information or first verification information stored in the hot standby area to the recovered area of the storage device in the corresponding stripe;
[0147] The calculation module 703 is further configured to determine the second verification information corresponding to the region group based on the data information in the region group to which the recovered region belongs and / or the first verification information;
[0148] The read / write module 702 is also used to store the second verification information into the hot standby area.
[0149] The calculation module 703 is further configured to detect the fault resolution of the storage device and determine the second verification information based on the data information of the region group to which the recovered region in the strip belongs and / or the first verification information;
[0150] The read / write module 702 is also used to store the second verification information into the recovered area.
[0151] This application also provides a chip, which includes a processor capable of executing the RAID data processing method provided in this application.
[0152] This application also provides an electronic device.
[0153] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of this 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 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0154] like Figure 8 As shown, the 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. The RAM 803 may also store various programs and data required for the operation of the device 800. The 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 the bus 804.
[0155] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0156] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components 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 special-purpose 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 RAID data processing methods. For example, in some embodiments, the RAID data processing method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into 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 RAID data processing methods by any other suitable means (e.g., by means of firmware).
[0157] This application provides a computer-readable storage medium storing executable instructions, wherein a computer program is stored, the computer program being used to execute the RAID data processing method provided in this application.
[0158] This application provides a computer program product, which includes 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 this application.
[0159] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0160] In some embodiments, a computer program may take 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 standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0161] As an example, a computer program may be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0162] Various embodiments of the systems and techniques described above herein 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), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0163] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0164] In the context of this disclosure, a machine-readable medium can 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 can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0165] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).
[0166] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0167] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0168] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0169] 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 indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.
[0170] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A RAID data processing method, characterized in that, The method, applied to RAID 6, includes at least one stripe group, the stripe group including multiple stripes, each stripe including at least two data areas, two parity areas, and two hot spare areas. The at least two data areas and two parity areas of each stripe are divided into two area groups. The data areas store data information, the parity areas store first parity information, and each of the two hot spare areas stores a copy of second parity information. The second parity information is determined based on the data information in the corresponding area group and / or the first parity information. A storage device failure is detected, and a region within the stripe belonging to the storage device that needs to be recovered is determined. The region to be recovered is either a data region or a verification region. Read the data information and / or first verification information of other regions in the region group to which the region to be recovered belongs, as well as the second verification information corresponding to the region group; Based on the data information and / or the first verification information and the second verification information, recover the data information or the first verification information of the area to be recovered; The step of recovering the data information or first verification information of the area to be recovered based on the data information and / or the first verification information and the second verification information includes: Acquire the data information and / or the first verification information and the location information corresponding to the second verification information, wherein the location information is determined based on the storage device to which the area corresponding to the data information and / or the first verification information and the second verification information belongs; 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, as well as the second verification information and the location information.
2. The method according to claim 1, characterized in that, The method further includes: Two storage devices were detected to be faulty, and the area in the stripe that belongs to the storage devices and needs to be recovered was determined. If the two regions to be recovered in the strip belong to two different region groups, then read the data information and / or the first verification information of other regions in the region group and the second verification information corresponding to the region group; Based on the data information and / or the first verification information and the second verification information, the data information or the first verification information of the region to be recovered in the region group is restored.
3. The method according to claim 2, characterized in that, The method further includes: If the two regions to be recovered in the strip belong to the same region group, then all data information and the first verification information of the strip are read; The data information or the first verification information of the area to be recovered is determined based on the data information and the first verification information.
4. The method according to any one of claims 1, 2, and 3, characterized in that, The method further includes: The data information or first verification information of the area to be restored is stored in the hot backup area to which the corresponding second verification information belongs.
5. The method according to claim 4, characterized in that, The method further includes: Once the fault of the storage device is detected to be resolved, the data information or first verification information stored in the hot standby area is transferred to the recovered area of the storage device in the corresponding stripe. The second verification information corresponding to the region group is determined based on the data information in the region group to which the recovered region belongs and / or the first verification information. The second verification information is stored in the hot standby area.
6. The method according to claim 4, characterized in that, The method further includes: Upon detecting that the fault of the storage device has been cleared, second verification information is determined based on the data information of the region group to which the recovered region in the strip belongs and / or the first verification information; The second verification information is stored in the recovered area.
7. A RAID data processing device, characterized in that, The device is applied to RAID 6, which includes at least one stripe group, the stripe group including multiple stripes, each stripe including at least two data areas, two parity areas, and two hot spare areas. The at least two data areas and two parity areas of each stripe are divided into two area groups. The data areas store data information, the parity areas store first parity information, and each of the two hot spare areas stores a copy of second parity information. The second parity information is determined based on the data information in the corresponding area group and / or the first parity information. The device includes: The processing module is used to detect a failure in a storage device and determine the area to be recovered in the stripe that belongs to the storage device, wherein the area to be recovered is a data area or a verification area; The read / write module is used to read data information and / or first verification information of other areas in the area group to which the area to be recovered belongs, as well as second verification information corresponding to the area group; The calculation module is used to recover the data information or the first verification information of the area to be recovered based on the data information and / or the first verification information and the second verification information; The processing module is further configured to acquire the data information and / or the first verification information and the location information corresponding to the second verification information, wherein the location information is determined based on the storage device to which the 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, as well as the second verification information and the location information.
8. The apparatus according to claim 7, characterized in that, include: The processing module is also used to detect two storage devices malfunctioning and determine the area in the strip that belongs to the storage device and needs to be recovered; The read / write module is also used to read data information and / or first verification information of other regions in the region group and the second verification information corresponding to the region group when the two regions to be recovered of the strip belong to different two region groups respectively; The calculation module is further configured to recover the data information or the first verification information of the region to be recovered in the region group based on the data information and / or the first verification information and the second verification information.
9. The apparatus according to claim 8, characterized in that, include: The read / write module is also used to read all data information and first verification information of the strip when the two regions to be recovered of the strip belong to the same region group; The calculation module is also used to determine the data information or the first verification information of the area to be recovered based on the data information and the first verification information.
10. A chip, characterized in that, The chip includes a processor capable of executing the RAID data processing method according to any one of claims 1 to 6.
11. An electronic device, characterized in that, The electronic device includes a chip, the chip including a processor, the processor being capable of executing the RAID data processing method according to any one of claims 1 to 6.
12. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the RAID data processing method according to any one of claims 1 to 6.
13. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the RAID data processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
RAID data processing method and device, chip, electronic equipment, storage medium and computer program product
CN120704958A