Raid data processing method and device, chip, electronic equipment, storage medium and computer program product
By dividing the data area and parity area in the RAID data processing method into two groups to store local and global parity information, the problems of large read volume and insufficient recovery performance in traditional RAID6 are solved, and efficient data recovery is achieved.
Patent Information
- Application Number
- CN202511212568.4
- 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
Traditional distributed RAID6 suffers from problems such as large read volumes and insufficient recovery performance during data recovery, especially when multiple storage devices fail, making it unable to effectively recover data.
In the RAID data processing method, the data area and the parity area are divided into two area groups, and local parity information is stored in each area group. Data information is recovered through local parity formulas, and global parity information is used to improve fault tolerance and recovery performance.
It significantly reduces the I/O load and computational complexity during the data recovery process, improves the efficiency and performance of data recovery, and can effectively recover data when multiple storage devices fail.
Smart Images

Figure CN120704958B_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 comprising multiple stripes, and each stripe spanning multiple storage devices. When one storage device fails, although all storage devices participate in the data 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. Furthermore, traditional distributed RAID6 can only recover a maximum of two failed disks in a stripe simultaneously, resulting in insufficient recovery performance. 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 for 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, a first hot spare area, and a second hot spare area. 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, the first hot spare area stores second parity information, and the second hot spare area stores third parity information. The second parity information is determined based on the data information in any one of the area groups and / or the first parity information, and the third parity information is determined based on all data information and the first parity information. The method includes:
[0005] If up to three storage devices fail, determine up to three regions to be recovered in the stripe, wherein the regions to be recovered are a data region, a verification region, a first hot standby region and / or a second hot standby region.
[0006] The target region is determined based on the up to three regions to be recovered, wherein the target region is a data region, a verification region, a first hot standby region, and / or a second hot standby region other than the regions to be recovered.
[0007] Read the target information in the target area, and recover the data information and / or first verification information of the area to be recovered based on the target information.
[0008] The determination of the target region based on the at most three regions to be recovered includes:
[0009] A storage device failure is detected, and the corresponding area to be recovered in the stripe is determined to be a data area or a verification area. The target area is determined to be other data areas and / or verification areas in the area group where the area to be recovered is located, as well as the first hot standby area.
[0010] The determination of the target region based on the at most three regions to be recovered includes:
[0011] Two storage devices were detected to have malfunctioned, and it was determined that the two corresponding areas to be recovered in the stripe were both data areas and / or verification areas. The target area was determined to be all other data areas and / or verification areas.
[0012] The method further includes:
[0013] The two regions to be recovered are determined to belong to different region groups, and the target region is determined to be all other data regions and / or verification regions as well as the first hot standby region.
[0014] The determination of the target region based on the at most three regions to be recovered includes:
[0015] Two storage devices were detected to have failed, and it was determined that one of the areas to be recovered in the stripe was a data area or a verification area, and the other area to be recovered was a first hot standby area. The target area was determined to be all other data areas and verification areas.
[0016] The determination of the target region based on the at most three regions to be recovered includes:
[0017] Two storage devices are detected to have failed, and it is determined that one of the areas to be recovered in the stripe is a data area or a verification area, and the other area to be recovered is a second hot standby area. The target area is determined to be other data areas and / or verification areas in the area group where the data area or verification area is located, as well as the first hot standby area.
[0018] The determination of the target region based on the at most three regions to be recovered includes:
[0019] Three storage devices were detected to have failed, and it was determined that the three areas to be recovered in the stripe were all data areas and / or verification areas. The target area was determined to be all other data areas and / or verification areas except the three areas to be recovered, as well as the second hot standby area.
[0020] The determination of the target region based on the at most three regions to be recovered includes:
[0021] Three storage devices were detected to have failed, and it was determined that the two areas to be recovered in the stripe were both data areas and / or verification areas, and the other area to be recovered was the first hot standby area. The target area was determined to be all other data areas and / or verification areas.
[0022] The determination of the target region based on the at most three regions to be recovered includes:
[0023] Three storage devices were detected to have failed, and it was determined that the two areas to be recovered in the stripe were both data areas and / or verification areas, and the other area to be recovered was the second hot standby area. The target area was determined to be all other data areas and / or verification areas as well as the first hot standby area.
[0024] The determination of the target region based on the at most three regions to be recovered includes:
[0025] Three storage devices were detected to have failed, and one of the corresponding areas to be recovered in the stripe was determined to be a data area and / or a verification area. The other two areas to be recovered were the first hot standby area and the second hot standby area, respectively. The target area was determined to be all other data areas and / or verification areas.
[0026] The strip further includes a third hot standby region, and the method further includes:
[0027] The recovered data and / or the first verification information are stored in the first hot standby area, the second hot standby area, and / or the third hot standby area.
[0028] The method further includes:
[0029] Upon detecting that the fault in the storage device has been cleared, all data information and / or first verification information in any one of the region groups are read; and based on the data information and / or first verification information, second verification information in the first hot standby region is determined.
[0030] And / or, read all data information and / or first verification information; and determine the third verification information in the second hot standby area based on the data information and / or first verification information.
[0031] Another embodiment of this application provides a RAID data processing apparatus, the apparatus comprising:
[0032] The processing module is used to detect failures in up to three storage devices and determine up to three recovery areas in the stripe, wherein the recovery areas are a data area, a verification area, a first hot standby area and / or a second hot standby area;
[0033] The calculation module is used to determine a target area based on the up to three areas to be recovered, wherein the target area is a data area, a verification area, a first hot standby area and / or a second hot standby area other than the areas to be recovered;
[0034] The calculation module is also used to read target information in the target area and recover data information and / or first verification information of the area to be recovered based on the target information.
[0035] The calculation module is further configured to detect a storage device failure, determine that the corresponding area to be recovered in the stripe is a data area or a verification area, and determine the target area as other data areas and / or verification areas in the area group where the area to be recovered is located, as well as the first hot standby area.
[0036] The calculation module is further configured to detect two storage devices malfunctioning, determine that the two regions to be recovered in the stripe are both data regions and / or verification regions, and determine the target region as all other data regions and / or verification regions.
[0037] The calculation module is further configured to detect three storage device failures, determine that the three regions to be recovered in the stripe are all data regions and / or verification regions, and determine the target region as all other data regions and / or verification regions except the three regions to be recovered, as well as the second hot standby region.
[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] 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
[0043] 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, in which:
[0044] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0045] Figure 1 A flowchart of a RAID data processing method according to an embodiment of this application is shown;
[0046] Figure 2 A schematic diagram of the structure of a RAID data processing apparatus according to an embodiment of this application is shown;
[0047] Figure 3 A schematic diagram of the composition structure of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0048] 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.
[0049] The scheme proposed in this application is used in distributed RAID6 (a RAID level).
[0050] In distributed RAID6, each stripe stores one copy of the first parity information in two parity areas. Both copies of the first parity information are encoded based on the data information stored in the data area of that stripe. When a disk failure occurs, up to two failed disks can be recovered simultaneously.
[0051] For example, a distributed RAID6 consists of k+2 storage devices. Each stripe includes two parity areas (areas storing first parity information), k-2 data areas (areas storing data information), and two hot spare areas (areas used to temporarily store recovery data information and / or first parity information). These areas belong to different storage devices. The two sets of first parity information are p and q. The two sets of first parity information p and q can be determined by the data information stored in the k-2 data areas and the following formulas (1) and (2).
[0052]
[0053] 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. and This is the first verification information.
[0054] When a disk error occurs, if there is only one error, the data in the non-error area, the first check information, and the above formula (1) can be decoded to recover the data from the single error disk. If there are two error disks, the data in both error disks can be decoded using the data in the non-error area, the first check information, and the above formulas (1) and (2). However, regardless of whether there is one or two error disks, 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 in order to recover the data in the error disk. The amount of data read is very large, and in the case of two error disks, the computational load is large when performing joint decoding based on formulas (1) and (2). Therefore, the data recovery efficiency is low and the speed is slow. Furthermore, when there are three error disks, recovery is not possible.
[0055] For example, as shown in Table 1, a distributed RAID 6 array includes 8 storage devices, divided into 2 stripe groups, with each stripe group comprising 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.
[0056] Table 1
[0057]
[0058] For example, as shown in Table 2, a distributed RAID 6 array includes 8 storage devices, divided into 2 stripe groups, with 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 devices 1, 3, and 5 in this RAID fail, the RAID cannot recover from the failed disk.
[0059] Table 2
[0060]
[0061] To overcome the performance bottleneck of data recovery, improve the speed and efficiency of data recovery, enhance the recovery performance of RAID, and simultaneously achieve the recovery of up to three faulty disks in RAID6, 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, a first hot spare area, and a second hot spare area. 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, the first hot spare area stores second parity information, and the second hot spare area stores third parity information. The second parity information is determined based on the data information in any one of the area groups and / or the first parity information, and the third parity information is determined based on all data information and the first parity information.
[0062] For example, as shown in Table 3, based on distributed RAID6, all data areas and parity areas of each stripe are divided into two area groups. For ease of description, the hot spare area used to store the second parity information is described as the first hot spare area, and the hot spare area used to store the third parity information is described as the second hot spare area. All data information and / or the first parity information in any area group is encoded to obtain the second parity information, which is then stored in the first hot spare area. Stripe 1 in stripe group 1 will... , and The region is divided into group 1 of this strip. , and The region is divided into two groups, namely, the region group 2 of this strip, and then based on... , and The second check information of the stripe is obtained by encoding using the following formula (3). or based on , and The second check information of the stripe is obtained by encoding using the following formula (4). The second verification information is then stored in the first hot-standby area of this stripe. Subsequent stripes follow the same method and will not be described again here.
[0063]
[0064] in, For XOR operation, For the first Data information in each data area This is the first region group in the strip. This is the second region group in the strip. , This is the second checksum information in the stripe.
[0065] Then based on , , , , and ,as well as , , , , and Location information of the storage device , , , , and The third check information of the stripe is obtained by encoding using formula (5). The third verification information is then stored in the second hot standby area of this stripe. 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. and This is the first verification information. This is the third verification information.
[0068] Table 3
[0069]
[0070] like Figure 1 As shown, the method includes:
[0071] Step 101: Detecting failures in up to three storage devices, and determining up to three recovery areas corresponding to the stripe, wherein the recovery areas are a data area, a verification area, a first hot standby area, and / or a second hot standby area.
[0072] Building upon traditional RAID 6, after further encoding using the methods described above to obtain second and third parity information, it is possible to recover information from the corresponding unrecoverable area of each stripe in each storage device even if up to three storage devices fail.
[0073] The area to be recovered may be a data area, a verification area, a first hot standby area, and / or a second hot standby area.
[0074] Step 102: Determine the target area based on the at most three areas to be recovered. The target area is the data area, the verification area, the first hot standby area, and / or the second hot standby area, excluding the areas to be recovered.
[0075] Depending on the number and type of areas to be recovered, it is necessary to determine the corresponding target areas, and then read the target information in the target areas to recover the information in the areas to be recovered. The target areas can be data areas outside the areas to be recovered, verification areas, first hot spare areas, and / or second hot spare areas.
[0076] Step 103: Read the target information in the target area, and recover the data information and / or first verification information of the area to be recovered based on the target information.
[0077] When only one storage device fails at the same time, the corresponding area to be recovered in the stripe may be the data area, the verification area, the first hot spare area, or the second hot spare area.
[0078] If the area to be recovered is a data area or a verification area, the target area can be determined as all data areas and / or verification areas in the area group where the area to be recovered is located, excluding the area to be recovered, as well as the first hot standby area. The target data in the target area is read and the information in the area to be recovered is recovered through the above formula (3) or formula (4).
[0079] If the area to be restored is the first hot standby area, then no restoration is required. After the storage device failure ends or is repaired, read all data information and / or first verification information from any area group, and redetermine the second verification information using the above formula (3) or formula (4) and store it in the restored first hot standby area.
[0080] If the area to be restored is the second hot standby area, then no restoration is required. After the storage device failure ends or is repaired, all data information and the first verification information are read, and the third verification information is re-determined through the above formula (5) and stored in the restored second hot standby area.
[0081] When two storage devices fail simultaneously, three scenarios exist:
[0082] The first scenario involves two regions to be recovered within a stripe, both of which are data regions and / or verification regions. In this case, a determination is made to identify whether the two regions to be recovered are in the same region group. If they are in the same region group, the target region is determined to be all data regions and verification regions other than these two regions to be recovered. The data information and / or first verification information in these two regions to be recovered are then recovered using the formulas (1) and (2) above. If they are not in the same region group, the target region is determined to be all data regions and verification regions other than these two regions to be recovered, as well as the first hot standby region. The data information and / or first verification information in these two regions to be recovered are then recovered using the formulas (3) and (4) above.
[0083] It should be noted that when the two regions to be restored are not in the same region group, they can also be restored by the restoration method in the same region group. However, although the restoration method when they are not in the same region group reads more second verification information in the first hot standby region than the other restoration method, the computational complexity of restoration by formula (3) and formula (4) is lower than that of restoration by formula (1) and formula (2), that is, the calculation speed is faster and the efficiency is higher.
[0084] The second scenario involves one area to be recovered within a stripe being either a data area or a verification area, and the other area to be recovered being a first hot standby area. In this case, since the second verification information in the first hot standby area is lost, it cannot be recovered using formula (3) or formula (4). Therefore, the target area is determined to be all data areas and verification areas except for the area to be recovered. The target information in the target area is read, and the data information or first verification information in the area to be recovered is recovered using the formula (1) above. The second verification information in the first hot standby area can be recovered after the storage device is repaired by reading all the data information and / or first verification information in any group of areas, re-determining the second verification information using the formula (3) or formula (4) above, and storing it in the recovered first hot standby area.
[0085] The third type involves a stripe containing one area to be recovered as a data area or a verification area, and another area to be recovered as a second hot standby area. The target area is determined by including all data areas and / or verification areas in the area group containing the data area or verification area to be recovered, excluding the data area or verification area itself, as well as the first hot standby area. The target information in the target area is read, and the data information or verification information is recovered using the formula (3) or formula (4) above. The third verification information in the second hot standby area can be determined after the storage device's fault is repaired by reading all data information and / or the first verification information, and then re-determining the third verification information using the formula (5) above and storing it in the recovered second hot standby area.
[0086] When three storage devices fail simultaneously, four scenarios exist:
[0087] The first method involves three data areas and / or verification areas corresponding to the stripe. The target area is determined to be all data areas and / or verification areas other than these three data areas and / or verification areas, as well as the second hot standby area. The target information in the target area is read, and the data information and / or first verification information in the three data areas and / or verification areas are recovered using the above formulas (1), (2), and (5).
[0088] The second type involves two regions to be recovered within a stripe that are either data regions or verification regions, while the other region to be recovered is the first hot standby region.
[0089] At this time, since the second verification information in the first hot standby area is lost, it cannot be recovered using formulas (3) and (4). Therefore, the target area is determined to be all data areas and verification areas except the area to be recovered. The target information in the target area is read, and the data information or first verification information in the area to be recovered is recovered using the above formulas (1) and (2). The second verification information in the first hot standby area can be recovered after the storage device is repaired by reading all data information and / or first verification information in any group of areas, re-determining the second verification information using the above formulas (3) or (4), and storing it in the recovered first hot standby area.
[0090] The third type is where the two areas to be recovered in the strip are data areas or verification areas, and the other area to be recovered is the second hot standby area.
[0091] At this point, a judgment can be made first to determine whether the two areas to be recovered are in the same area group. If they are in the same area group, the target area is determined to be all data areas and verification areas other than the two areas to be recovered. The data information and / or first verification information in the two areas to be recovered are recovered using the above formulas (1) and (2). If they are not in the same area group, the target area is determined to be all data areas and verification areas other than the two areas to be recovered, as well as the first hot standby area. The data information and / or first verification information in the two areas to be recovered are recovered using the above formulas (3) and (4). The third verification information in the second hot standby area can be read after the storage device is repaired. All data information and / or first verification information can be read, and the third verification information can be re-determined using the above formula (5) and stored in the recovered second hot standby area.
[0092] The fourth type involves a data area or a verification area corresponding to one of the stripes, a first hot standby area, and a second hot standby area.
[0093] The target area is determined to be all data areas and / or verification areas except the area to be recovered. The target information in the target area is read, and the data information or first verification information in the area to be recovered is recovered using formulas (1) and (2). After the storage device is repaired, all data areas and / or verification areas in any group of areas are read, and the second verification information is re-determined using formula (3) or (4) and stored in the recovered first hot standby area. All data information and / or first verification information are read, and the third verification information is re-determined using formula (5) and stored in the recovered second hot standby area.
[0094] In the above scheme, by dividing the data area and parity area in traditional distributed RAID6 into two area groups, the local second parity information is determined based on the data information and / or first parity information in the area group and stored in the first hot spare area. The global third parity information is determined based on all data information and first parity information and stored in the second hot spare area, thereby significantly improving the system's fault tolerance, recovery performance, and recovery efficiency. When the faulty area is located within an area group, it is only necessary to read other data information and / or first parity information within the same group (rather than all data information and first parity information of the entire stripe), and directly recover using the local parity formula (3) or formula (4). This reduces the amount of data read when recovering a single data information or first parity information from the entire stripe to the area group scale, greatly reducing the I / O load and completely solving the performance bottleneck problem of full stripe reading in the traditional scheme. When two faulty regions appear simultaneously and belong to different region groups, each faulty region can be independently recovered using formulas (3) and (4) by reading the data information and / or first check information of the two region groups and the second check information of the first hot standby region. Compared with the traditional RAID6 method of decoding and recovering using full-strip data information and first check information through formulas (1) and (2), this significantly reduces the computational complexity and improves the recovery efficiency. When three faulty regions appear simultaneously (all of which are data regions and / or check regions), all data information, first check information, and third check information can be read, and the three faulty regions can be recovered using formulas (1), (2), and (5), which significantly improves the system's fault tolerance and recovery performance.
[0095] This application also provides a RAID data processing method in one example, wherein determining the target area based on the at most three areas to be recovered includes:
[0096] A storage device failure is detected, and the corresponding area to be recovered in the stripe is determined to be a data area or a verification area. The target area is determined to be other data areas and / or verification areas in the area group where the area to be recovered is located, as well as the first hot standby area.
[0097] For example, as shown in Table 4, in the distributed RAID 6 shown in Table 4, if storage device 4 fails, the shaded areas in Table 4 represent the recoverable areas of each stripe. The recoverable area of stripe 1 in stripe group 1 is... The data 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 1 in stripe group 2 is... The data area it is located in. The area to be recovered for stripe 2 in stripe group 2 is... The verification area it is located in.
[0098] When only one storage device fails, and the corresponding area to be recovered in the stripe is a data area or a verification area, the target area can be determined as all data areas and / or verification areas in the area group where the area to be recovered is located, excluding the area to be recovered, as well as the first hot standby area.
[0099] In the distributed RAID6 shown in Table 4, stripe 1 in stripe group 1 will... , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is If the data region is located in a certain area, then the target region of stripe 1 in stripe group 1 is determined as [the target region]. , The verification area and Located in the first hot standby zone. Strip 2 in strip group 1 will... , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is If the area is within the verification region, then the target region of stripe 2 in stripe group 1 is determined as... The data area and The verification area and Located in the first hot standby zone. Strip 1 in strip group 2 will... , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is If the data region is located in a certain area, then the target region of stripe 1 in stripe group 2 is determined as [the target region]. , The verification area and Located in the first hot standby zone. Strip 2 in strip group 2 will... , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is If the region is within the verification area, then the target region of stripe 2 in stripe group 2 is determined to be... The data area and The verification area and The first hot standby area. After reading the target information of the target area in the strip, the data information or first verification information in the area to be recovered is recovered by formula (3) or formula (4) (determined based on the area group where the area to be recovered is located).
[0100] Table 4
[0101]
[0102] In the above scheme, when a single storage device failure is detected and the area to be recovered is a data area or a parity area, the target area can be reduced from the "all data areas and parity areas" of traditional RAID6 to "other data areas and / or parity areas within the same area group and the first hot spare area" by using the second parity information determined in advance through the information in the area group. Only other data information and / or the first parity information (instead of all data information and the first parity information of the entire stripe) and the second parity information need to be read, and the local parity formula (3) or formula (4) can be used to directly recover the data. This reduces the amount of data read when recovering a single data information or the first parity information from the entire stripe to the area group scale, greatly reducing the I / O load and completely solving the performance bottleneck problem of full stripe reading in the traditional scheme.
[0103] This application also provides a RAID data processing method in one example, wherein determining the target area based on the at most three areas to be recovered includes:
[0104] Two storage devices were detected to have malfunctioned, and it was determined that the two corresponding areas to be recovered in the stripe were both data areas and / or verification areas. The target area was determined to be all other data areas and / or verification areas.
[0105] For example, as shown in Table 5, in the distributed RAID 6 shown in Table 5, if storage device 3 and storage device 4 fail simultaneously, then the shaded areas in Table 5 represent the recoverable areas of each stripe. The recoverable area of stripe 1 in stripe group 1 is... and The data area it is located in. The area to be recovered for stripe 2 in stripe group 1 is... The data area and The verification area it is located in. The area to be recovered for stripe 1 in stripe group 2 is... and The data area it is located in. The area to be recovered for stripe 2 in stripe group 2 is... The data area and The verification area it is located in.
[0106] When two storage devices fail simultaneously, and the corresponding recovery areas in the stripe are both data areas or verification areas, the target area can be determined to be all data areas and / or verification areas except for the recovery area.
[0107] In the distributed RAID6 shown in Table 5, the area to be recovered in stripe 1 of stripe group 1 is... and If the data region is located in a certain area, then the target region of stripe 1 in stripe group 1 is determined as [the target region]. , The data area and , The verification area it is located in. The area to be recovered for stripe 2 in stripe group 1 is... The data area and If the area is within the verification region, then the target region of stripe 2 in stripe group 1 is determined as... , , The data area and The verification area it is located in. The area to be recovered for stripe 1 in stripe group 2 is... and If the data region is located in a certain area, then the target region of stripe 1 in stripe group 2 is determined as [the target region]. , The data area and , The verification area it is located in. The area to be recovered for stripe 2 in stripe group 2 is... The data area and If the region is within the verification area, then the target region of stripe 2 in stripe group 2 is determined to be... , , The data area and The verification area is located in. After reading the target information of the target area in the strip, the data information and / or the first verification information in the area to be recovered are jointly decoded by formula (1) and formula (2).
[0108] Table 5
[0109]
[0110] This application also provides a RAID data processing method in one example, the method further comprising:
[0111] The two regions to be recovered are determined to belong to different region groups, and the target region is determined to be all other data regions and / or verification regions as well as the first hot standby region.
[0112] When two storage devices are detected to have failed, it can be first determined whether the corresponding recovery areas of these two storage devices belong to the same area group within the stripe. If the two recovery areas belong to the same area group, the target area is determined to be all data areas and the verification area excluding the recovery area. If the two recovery areas belong to different area groups, the target area is determined to be all data areas and the verification area excluding the recovery area, as well as the first hot spare area.
[0113] For example, in the distributed RAID6 shown in Table 5, stripe 1 in stripe group 1 will... , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is and If the two regions to be recovered belong to different region groups within the data area, then the target region for stripe 1 in stripe group 1 is determined as... , The data area and , The verification area and Located in the first hot standby zone. Strip 2 in strip group 1 will... , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is The data area and If the two regions to be recovered belong to the same region group within the verification area, then the target region of stripe 2 in stripe group 1 is determined to be... , , The data area and The verification area it is located in. Strip 1 in strip group 2 will... , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is and If the two regions to be recovered belong to different region groups within the data area, then the target region for stripe 1 in stripe group 2 is determined as... , The data area and , The verification area and Located in the first hot standby zone. Strip 2 in strip group 2 will... , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is The data area and If the two regions to be recovered belong to the same region group within the verification area, then the target region of stripe 2 in stripe group 2 is determined to be... , , The data area and The verification area is located in the following steps. For strip 1 in strip group 1 and strip 1 in strip group 2, after reading the target information of the target area in the strip, the data information and / or the first verification information in the area to be recovered are restored by joint decoding using formula (3) and formula (4). For strip 2 in strip group 1 and strip 2 in strip group 2, after reading the target information of the target area in the strip, the data information and / or the first verification information in the area to be recovered are restored by joint decoding using formula (1) and formula (2).
[0114] In the above scheme, when two storage devices fail simultaneously and the areas to be recovered are both data areas or verification areas, the second verification information, which is determined in advance through the information in the area group, is used to read the data in all data areas and verification areas except the area to be recovered, as well as the data in the first hot spare area, and to recover the data information and / or the first verification information in the area to be recovered. Although compared with the traditional RAID6 method of decoding and recovering the data information and the first verification information of the entire stripe through formulas (1) and (2), the data read includes the second verification information in the first hot spare area, the computational complexity is lower when decoding and recovering through formulas (3) and (4), thus significantly improving the calculation speed and recovery efficiency.
[0115] This application also provides a RAID data processing method in one example, wherein determining the target area based on the at most three areas to be recovered includes:
[0116] Two storage devices were detected to have failed, and it was determined that one of the areas to be recovered in the stripe was a data area or a verification area, and the other area to be recovered was a first hot standby area. The target area was determined to be all other data areas and verification areas.
[0117] When there are two corresponding areas to be recovered, one is a data area or a verification area, and the other is a first hot standby area. At this time, since the second verification information in the first hot standby area is lost, it cannot be recovered by formula (3) or formula (4). Therefore, the target area is determined to be all data areas and verification areas other than the areas to be recovered.
[0118] For example, as shown in Table 6, in the distributed RAID 6 shown in Table 6, if storage device 3 and storage device 7 fail simultaneously, then the shaded areas in Table 6 represent the recoverable areas of each stripe. The recoverable area of stripe 1 in stripe group 1 is... The data area and The first hot standby area. The area to be restored for strip 1 in strip group 2 is... The data area and It is located in the first hot standby zone.
[0119] In the distributed RAID6 shown in Table 6, the area to be recovered in stripe 1 of stripe group 1 is... The data area and If it is located in the first hot standby region, then the target region of stripe 1 in stripe group 1 is determined as follows. , , The data area and , The verification area it is located in. The area to be recovered for stripe 1 in stripe group 2 is... The data area and If the location is in the first hot standby region, then the target region of stripe 1 in stripe group 2 is determined as... , , The data area and , The verification area is located in. After reading the target information of the target area in the strip, the data information and / or the first verification information in the area to be recovered are jointly decoded by formula (1) and formula (2).
[0120] Table 6
[0121]
[0122] The second verification information in the first hot standby area can be read after the storage device is repaired. All data information and / or the first verification information in any group of areas can be read, and the second verification information can be re-determined by formula (3) or formula (4) and stored in the restored first hot standby area.
[0123] This application also provides a RAID data processing method in one example, wherein determining the target area based on the at most three areas to be recovered includes:
[0124] Two storage devices are detected to have failed, and it is determined that one of the areas to be recovered in the stripe is a data area or a verification area, and the other area to be recovered is a second hot standby area. The target area is determined to be other data areas and / or verification areas in the area group where the data area or verification area is located, as well as the first hot standby area.
[0125] When one of the two corresponding areas to be recovered is a data area or a verification area, and the other is a second hot standby area, recovery can be achieved through the second verification information in the first hot standby area. Therefore, the target area is determined to be all data areas and / or verification areas in the area group where the data area or verification area to be recovered is located, excluding the data area or verification area, as well as the first hot standby area.
[0126] For example, as shown in Table 6, in the distributed RAID 6 shown in Table 6, if storage device 3 and storage device 7 fail simultaneously, then the shaded areas in Table 6 represent the recoverable areas of each stripe. The recoverable area of stripe 2 in stripe group 1 is... The data area and The second hot standby area. The area to be restored for strip 2 in strip group 2 is... The data area and It is located in the second hot standby area.
[0127] In the distributed RAID6 shown in Table 6, stripe 2 in stripe group 1 will... , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is The data area and If the location is in the second hot standby zone, then the target area of stripe 2 in stripe group 1 is determined as... , The verification area and Located in the first hot standby zone. Strip 2 in strip group 2 will... , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is The data area and If the location is in the second hot standby region, then the target region of stripe 2 in stripe group 2 is determined as follows. , The verification area and The first hot standby area is located there. After reading the target information of the target area in the stripe, joint decoding is performed by formula (3) or formula (4) to recover the data information and / or the first verification information in the area to be recovered.
[0128] The third verification information in the second hot standby area can be read after the storage device is repaired. All data information and / or the first verification information can be read, and the third verification information can be re-determined through the above formula (5) and stored in the recovered second hot standby area.
[0129] In the above scheme, when two storage devices fail simultaneously, and one of the areas to be recovered is a data area or a parity area, and the other is a second hot spare area, the target area can be reduced from the "all data areas and parity areas" of traditional RAID6 to "other data areas and / or parity areas and the first hot spare area within the same area group" by utilizing the second parity information determined in advance through the information in the area group. Only other data information and / or the first parity information (instead of all data information and the first parity information of the entire stripe) and the second parity information need to be read within the same group, and the local parity formula (3) or formula (4) can be used to directly recover the data. This reduces the amount of data read when recovering a single data information or the first parity information from the entire stripe to the area group scale, significantly reducing the I / O load and completely solving the performance bottleneck problem of full stripe reading in the traditional scheme.
[0130] This application also provides a RAID data processing method in one example, wherein determining the target area based on the at most three areas to be recovered includes:
[0131] Three storage devices were detected to have failed, and it was determined that the three areas to be recovered in the stripe were all data areas and / or verification areas. The target area was determined to be all other data areas and / or verification areas except the three areas to be recovered, as well as the second hot standby area.
[0132] When three storage devices fail simultaneously, and the three areas to be recovered in the stripe are all data areas and / or verification areas, the target area is determined to be all data areas and / or verification areas other than the three areas to be recovered, as well as the second hot standby area. The target information in the target area is read, and the data information and / or first verification information in the three areas to be recovered are recovered using the above formulas (1), (2), and (5).
[0133] For example, as shown in Table 7, in the distributed RAID 6 array shown in Table 7, if storage devices 2, 3, and 5 fail simultaneously, the shaded areas in Table 7 represent the recoverable regions of each stripe. The recoverable region of stripe 1 in stripe group 1 is... , The data area and The verification area it is located in. The area to be recovered for stripe 2 in stripe group 1 is... , The data area and The verification area it is located in. The area to be recovered for stripe 1 in stripe group 2 is... , The data area and The verification area it is located in. The area to be recovered for stripe 2 in stripe group 2 is... , The data area and The verification area it is located in.
[0134] In the distributed RAID6 shown in Table 7, the area to be recovered in stripe 1 of stripe group 1 is... , The data area and If the region is within the verification area, then the target region of stripe 1 in stripe group 1 is determined as... , The data area and The verification area and The area to be restored in the second hot standby zone. The area to be restored for strip 2 in strip group 1 is... , The data area and If the area is within the verification region, then the target region of stripe 2 in stripe group 1 is determined as... , The data area and The verification area and The area to be restored in the second hot standby zone. The area to be restored in strip 1 of strip group 2 is... , The data area and If the area is within the verification region, then the target region of stripe 1 in stripe group 2 is determined to be... , The data area and The verification area and The second hot standby area. The area to be restored for strip 2 in strip group 2 is... , The data area and If the region is within the verification area, then the target region of stripe 2 in stripe group 2 is determined to be... , The data area and The verification area is located in the strip. After reading the target information of the target area in the strip, the data information and / or the first verification information in the area to be recovered are jointly decoded by formula (1), formula (2) and formula (5).
[0135] Table 7
[0136]
[0137] In the above scheme, when three storage devices fail simultaneously and the areas to be recovered are all data areas or verification areas, the system uses third verification information, pre-determined through all data information and first verification information in the stripe, to read data from all data areas and verification areas except the areas to be recovered, as well as data from the second hot spare area. The system then recovers the data information and / or first verification information from these three areas to be recovered. This enables simultaneous recovery of three faulty disks, significantly improving the system's fault tolerance and recovery performance.
[0138] This application also provides a RAID data processing method in one example, wherein determining the target area based on the at most three areas to be recovered includes:
[0139] Three storage devices were detected to have failed, and it was determined that the two areas to be recovered in the stripe were both data areas and / or verification areas, and the other area to be recovered was the first hot standby area. The target area was determined to be all other data areas and / or verification areas.
[0140] When three storage devices fail simultaneously, and two of the three areas to be recovered in the stripe are data areas and / or verification areas, and the other is the first hot standby area, recovery cannot be performed using formulas (3) and (4) due to the loss of the second verification information. Therefore, the target area is determined to be all data areas and / or verification areas other than these three areas to be recovered. The target information in the target area is read, and the two data information and / or the first verification information to be recovered are recovered using the above formulas (1) and (2).
[0141] For example, as shown in Table 8, in the distributed RAID 6 array shown in Table 8, if storage devices 3, 4, and 7 fail simultaneously, the shaded areas in Table 8 represent the recoverable regions of each stripe. The recoverable region of stripe 1 in stripe group 1 is... , The data area and The first hot standby area. The area to be restored for strip 1 in strip group 2 is... , The data area and It is located in the first hot standby zone.
[0142] In the distributed RAID6 shown in Table 8, the area to be recovered in stripe 1 of stripe group 1 is... , The data area and If it is located in the first hot standby region, then the target region of stripe 1 in stripe group 1 is determined as follows. , The data area and , The verification area it is located in. The area to be recovered for stripe 1 in stripe group 2 is... , The data area and If the location is in the first hot standby region, then the target region of stripe 1 in stripe group 2 is determined as... , The data area and , The verification area is located in. After reading the target information of the target area in the strip, the data information and / or the first verification information in the area to be recovered are jointly decoded by formula (1) and formula (2).
[0143] Table 8
[0144]
[0145] The second verification information in the first hot standby area can be read after the storage device is repaired. All data information and / or the first verification information in any group of areas can be read, and the second verification information can be re-determined by formula (3) or formula (4) and stored in the restored first hot standby area.
[0146] This application also provides a RAID data processing method in one example, wherein determining the target area based on the at most three areas to be recovered includes:
[0147] Three storage devices were detected to have failed, and it was determined that the two areas to be recovered in the stripe were both data areas and / or verification areas, and the other area to be recovered was the second hot standby area. The target area was determined to be all other data areas and / or verification areas as well as the first hot standby area.
[0148] When three storage devices fail simultaneously, and two of the three recovery areas in the stripe are data areas and / or parity areas, and the other is a second hot standby area, we can first determine whether the two data areas and / or parity areas to be recovered belong to the same area group in the stripe. If the two corresponding recovery areas belong to the same area group, the target area is determined to be all data areas and parity areas except the recovery areas. If the two corresponding recovery areas belong to different area groups, the target area is determined to be all data areas and parity areas except the recovery areas, as well as the first hot standby area.
[0149] For example, as shown in Table 8, in the distributed RAID 6 shown in Table 8, if storage devices 3, 4, and 7 fail simultaneously, then the shaded areas in Table 8 represent the recoverable areas of each stripe. The recoverable area of stripe 2 in stripe group 1 is... The data area and The verification area and The second hot standby area. The area to be restored for strip 2 in strip group 2 is... The data area and The verification area and It is located in the second hot standby area.
[0150] In the distributed RAID6 shown in Table 8, stripe 2 in stripe group 1 will... , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is The data area and The verification area and If the data area and the verification area belong to the same area group in the second hot standby area, then the target area of stripe 2 in stripe group 1 is determined as follows. , , The data area and The verification area is located in the strip. After reading the target information of the target area in the strip, the data information and / or the first verification information in the area to be recovered are jointly decoded using formulas (1) and (2). Strip 2 in strip group 2 will , and Divide into a group of regions, , and Divided into another group of regions, the region to be restored is The data area and The verification area and If the data area and the verification area belong to different area groups in the second hot standby area, then the target area of stripe 2 in stripe group 2 is determined as follows. , The data area and The verification area is located in. After reading the target information of the target area in the strip, the data information and / or the first verification information in the area to be recovered are restored by using formulas (3) and (4) respectively.
[0151] The third verification information in the second hot standby area can be read after the storage device is repaired. All data information and / or the first verification information can be read, and the third verification information can be re-determined through the above formula (5) and stored in the recovered second hot standby area.
[0152] In the above scheme, when two storage devices fail simultaneously, and one of the areas to be recovered is a data area or a parity area, and the other is a second hot spare area, the second parity information determined in advance through the information in the area group can be used to read the data in all data areas and parity areas except the area to be recovered, as well as the data in the first hot spare area, and recover the data information and / or the first parity information in the area to be recovered. Although compared with the traditional RAID6 method of decoding and recovering the data information and the first parity information of the entire stripe through formulas (1) and (2), the data read includes the second parity information in the first hot spare area, the computational complexity is lower when decoding and recovering through formulas (3) and (4), thus significantly improving the calculation speed and recovery efficiency.
[0153] This application also provides a RAID data processing method in one example, wherein determining the target area based on the at most three areas to be recovered includes:
[0154] Three storage devices were detected to have failed, and one of the corresponding areas to be recovered in the stripe was determined to be a data area and / or a verification area. The other two areas to be recovered were the first hot standby area and the second hot standby area, respectively. The target area was determined to be all other data areas and / or verification areas.
[0155] When three storage devices fail simultaneously, and one of the three areas to be recovered in the stripe is a data area or verification area, one is a first hot standby area, and the other is a second hot standby area, the target area is determined to be all data areas and / or verification areas other than these three areas to be recovered. The target information in the target area is read, and the data information or first verification information in the data area or verification area is recovered by formula (1) and formula (2) above.
[0156] For example, as shown in Table 9, in the distributed RAID 6 array shown in Table 9, if storage devices 2, 6, and 7 fail simultaneously, the shaded areas in Table 9 represent the recoverable regions of each stripe. The recoverable region of stripe 2 in stripe group 1 is... The data area where it is located The first hot standby area and The second hot standby area. The area to be restored for strip 2 in strip group 2 is... The data area where it is located The first hot standby area and It is located in the second hot standby area.
[0157] In the distributed RAID6 shown in Table 9, the area to be recovered in stripe 2 of stripe group 1 is... The data area where it is located The first hot standby area and If the location is in the second hot standby zone, then the target area of stripe 2 in stripe group 1 is determined as... , , The data area and , The verification area it is located in. The area to be recovered for stripe 2 in stripe group 2 is... The data area where it is located The first hot standby area and If the location is in the second hot standby region, then the target region of stripe 2 in stripe group 2 is determined as follows. , , The data area and , The verification area is located in. After reading the target information of the target area in the strip, the data information and / or the first verification information in the area to be recovered are jointly decoded by formula (1) and formula (2).
[0158] Table 9
[0159]
[0160] The second verification information in the first hot standby area and the third verification information in the second hot standby area can be used to read all data information and / or the first verification information in any group of areas after the storage device is repaired. The second verification information can be re-determined using the above formula (3) or formula (4) and stored in the restored first hot standby area. Alternatively, all data information and / or the first verification information can be read, and the third verification information can be re-determined using the above formula (5) and stored in the restored second hot standby area.
[0161] This application also provides a RAID data processing method in one example, wherein the stripe further includes a third hot spare area, and the method further includes:
[0162] The recovered data and / or the first verification information are stored in the first hot standby area, the second hot standby area, and / or the third hot standby area.
[0163] If a storage device fails and the corresponding data information to be recovered and / or the first verification information in the stripe is recovered, if there is a hot standby area in the stripe that has not failed, the recovered data information and / or the first verification information can be temporarily stored in the hot standby area.
[0164] When only one data area or verification area is faulty, the data information or first verification information can be stored in the first hot standby area or the second hot standby area after recovery. Since the computational workload required to recover the second verification information is less than that required to recover the third verification information, if neither the first hot standby area nor the second hot standby area is fault-free, the data is preferentially stored in the first hot standby area.
[0165] When there are two faulty data areas and / or verification areas at the same time, after the data information and / or the first verification information are restored, if neither the first hot standby area nor the second hot standby area has a fault, the data can be stored in the first hot standby area and the second hot standby area.
[0166] When there are three faulty data areas and / or verification areas at the same time, a third hot standby area needs to be provided in the stripe. After the data information and / or the first verification information are restored, if the first hot standby area, the second hot standby area and the third hot standby area are all without faults, the data can be stored in the first hot standby area, the second hot standby area and the third hot standby area.
[0167] It should be noted that multiple hot standby zones can be set up to improve system fault tolerance.
[0168] In the above solution, after recovering the data and / or the first verification information, it is stored in the hot backup area of the corresponding stripe. This eliminates the need to wait for replacement or repair of faulty disks, significantly improving the timeliness of data recovery.
[0169] This application also provides a RAID data processing method in one example, the method further comprising:
[0170] Upon detecting that the fault in the storage device has been cleared, all data information and / or first verification information in any one of the region groups are read; and based on the data information and / or first verification information, second verification information in the first hot standby region is determined.
[0171] And / or, read all data information and / or first verification information; and determine the third verification information in the second hot standby area based on the data information and / or first verification information.
[0172] After the faulty storage device is repaired or replaced, it is necessary to restore the faulty second and / or third verification information that was overwritten by the data information and the first verification information.
[0173] Read all data information and / or first verification information from any group of regions, and redetermine the second verification information using the above formula (3) or formula (4).
[0174] Read all data information and / or the first verification information, and redetermine the third verification information using the above formula (5).
[0175] After restoring the second or third verification information, if the corresponding first or second hot standby area is not covered by the data information and the first verification information, it can be stored in the corresponding first or second hot standby area.
[0176] If the corresponding first or second hot standby area is covered by data information and first verification information, the data information and first verification information in the first or second hot standby area can be transferred back to the recovered data area or verification area. Then, the recovered second or third verification information can be stored in the first or second hot standby area. Alternatively, the first or second hot standby area can be modified into a data area or verification area based on the stored data information or first verification information. Then, the recovered second or third verification information can be stored in the recovered data area or verification area. Finally, based on the stored second or third verification information, the recovered data area or verification area can be modified into the first or second hot standby area.
[0177] In the above solution, after the faulty storage device is repaired, the recovered data temporarily stored in the first or second hot standby area can be migrated back to its original recovered area. Then, the newly generated second or third verification information is written back to the corresponding first or second hot standby area. This improves the flexibility of data recovery while maintaining the overall structural integrity of the system after data recovery.
[0178] To implement the above RAID data processing method, such as Figure 2 As shown, an example of this application provides a RAID data processing apparatus, including:
[0179] Processing module 201 is used to detect that up to three storage devices have failed and to determine up to three regions to be recovered in the stripe, wherein the regions to be recovered are a data region, a verification region, a first hot standby region and / or a second hot standby region;
[0180] Calculation module 202 is used to determine a target area based on the up to three areas to be recovered, wherein the target area is a data area, a verification area, a first hot standby area and / or a second hot standby area other than the areas to be recovered;
[0181] The calculation module 202 is also used to read target information in the target area and recover data information and / or first verification information of the area to be recovered based on the target information.
[0182] The calculation module 202 is further configured to detect a storage device failure, determine that the corresponding area to be recovered in the stripe is a data area or a verification area, and determine the target area as other data areas and / or verification areas in the area group where the area to be recovered is located, as well as the first hot standby area.
[0183] The calculation module 202 is further configured to detect two storage devices malfunctioning, determine that the two regions to be recovered in the stripe are both data regions and / or verification regions, and determine the target region as all other data regions and / or verification regions.
[0184] The calculation module 202 is further configured to determine that the two regions to be recovered belong to different region groups, and to determine the target region as all other data regions and / or verification regions and the first hot standby region.
[0185] The calculation module 202 is further configured to detect two storage devices malfunctioning, and determine that one of the areas to be recovered in the stripe is a data area or a verification area, the other area to be recovered is a first hot standby area, and determine the target area as all other data areas and verification areas.
[0186] The calculation module 202 is further configured to detect two storage devices malfunctioning, and determine that one of the areas to be recovered in the stripe is a data area or a verification area, and the other area to be recovered is a second hot standby area, and determine the target area as other data areas and / or verification areas in the area group where the data area or verification area is located, as well as the first hot standby area.
[0187] The calculation module 202 is further configured to detect three storage devices malfunctioning, and determine that the three regions to be recovered in the stripe are all data regions and / or verification regions, and determine the target region as all other data regions and / or verification regions except the three regions to be recovered, as well as the second hot standby region.
[0188] The calculation module 202 is further configured to detect three storage devices malfunctioning, determine that the two regions to be recovered in the stripe are data regions and / or verification regions, the other region to be recovered is the first hot standby region, and determine the target region as all other data regions and / or verification regions.
[0189] The calculation module 202 is further configured to detect that three storage devices have failed, and to determine that the two regions to be recovered in the stripe are data regions and / or verification regions, the other region to be recovered is a second hot standby region, and to determine that the target region is all other data regions and / or verification regions and the first hot standby region.
[0190] The calculation module 202 is further configured to detect three storage devices malfunctioning, and determine that one of the corresponding areas to be recovered in the stripe is a data area and / or a verification area, and the other two areas to be recovered are a first hot standby area and a second hot standby area, respectively, and determine the target area as all other data areas and / or verification areas.
[0191] The processing module 201 is further configured to store the recovered data information and / or the first verification information into the first hot standby area, the second hot standby area, and / or the third hot standby area.
[0192] The computing module 202 is further configured to detect the fault clearing of the storage device, read all data information and / or first verification information in any one of the region groups; and determine second verification information in the first hot standby region based on the data information and / or first verification information.
[0193] And / or, the calculation module 202 is further configured to read all data information and / or first verification information; and determine third verification information in the second hot standby area based on the data information and / or first verification information.
[0194] This application also provides a chip, which includes a processor capable of executing the RAID data processing method provided in this application.
[0195] This application also provides an electronic device.
[0196] Figure 3A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure 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.
[0197] like Figure 3 As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. The RAM 303 may also store various programs and data required for the operation of the device 300. The computing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0198] Multiple components in device 300 are connected to I / O interface 305, including: input unit 306, such as keyboard, mouse, etc.; output unit 307, such as various types of monitors, speakers, etc.; storage unit 308, such as disk, optical disk, etc.; and communication unit 309, such as network card, modem, wireless transceiver, etc. Communication unit 309 allows device 300 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0199] The computing unit 301 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 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 301 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 308. In some embodiments, part or all of the computer program may be loaded and / or installed on device 300 via ROM 302 and / or communication unit 309. When the computer program is loaded into RAM 303 and executed by the computing unit 301, one or more steps of the RAID data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform RAID data processing methods by any other suitable means (e.g., by means of firmware).
[0200] 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.
[0201] 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.
[0202] 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.
[0203] 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.
[0204] 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.
[0205] 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.
[0206] 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.
[0207] 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.
[0208] 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).
[0209] 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.
[0210] 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.
[0211] 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.
[0212] 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.
[0213] 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 is 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, a first hot spare area, and a second hot spare area, 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, the first hot spare area stores second parity information, and the second hot spare area stores third parity information, the two first parity information are determined based on all data information of the stripe and the position information of the corresponding area, the second parity information is determined based on data information in any area group and / or the first parity information, and the third parity information is determined based on all data information and the first parity information, the method comprising: If up to three storage devices fail, determine up to three regions to be recovered in the stripe, wherein the regions to be recovered are a data region, a verification region, a first hot standby region and / or a second hot standby region. The target region is determined based on the up to three regions to be recovered, wherein the target region is a data region, a verification region, a first hot standby region, and / or a second hot standby region other than the regions to be recovered. Read the target information in the target area, and recover the data information and / or first verification information of the area to be recovered based on the target information.
2. The method according to claim 1, characterized in that, The determination of the target region based on the at most three regions to be restored includes: A storage device failure is detected, and the corresponding area to be recovered in the stripe is determined to be a data area or a verification area. The target area is determined to be other data areas and / or verification areas in the area group where the area to be recovered is located, as well as the first hot standby area.
3. The method according to claim 1, characterized in that, The determination of the target region based on the at most three regions to be restored includes: Two storage devices were detected to have malfunctioned, and it was determined that the two corresponding areas to be recovered in the stripe were both data areas and / or verification areas. The target area was determined to be all other data areas and / or verification areas.
4. The method according to claim 3, characterized in that, The method further includes: The two regions to be recovered are determined to belong to different region groups, and the target region is determined to be all other data regions and / or verification regions as well as the first hot standby region.
5. The method according to claim 1, characterized in that, The determination of the target region based on the at most three regions to be restored includes: Two storage devices were detected to have failed, and it was determined that one of the areas to be recovered in the stripe was a data area or a verification area, and the other area to be recovered was a first hot standby area. The target area was determined to be all other data areas and verification areas.
6. The method according to claim 1, characterized in that, The determination of the target region based on the at most three regions to be restored includes: Two storage devices are detected to have failed, and it is determined that one of the areas to be recovered in the stripe is a data area or a verification area, and the other area to be recovered is a second hot standby area. The target area is determined to be other data areas and / or verification areas in the area group where the data area or verification area is located, as well as the first hot standby area.
7. The method according to claim 1, characterized in that, The determination of the target region based on the at most three regions to be restored includes: Three storage devices were detected to have failed, and it was determined that the three areas to be recovered in the stripe were all data areas and / or verification areas. The target area was determined to be all other data areas and / or verification areas except the three areas to be recovered, as well as the second hot standby area.
8. The method according to claim 1, characterized in that, The determination of the target region based on the at most three regions to be restored includes: Three storage devices were detected to have failed, and it was determined that the two corresponding areas to be recovered in the stripe were both data areas and / or verification areas, and the other area to be recovered was the first hot standby area. The target area was determined to be all other data areas and / or verification areas.
9. The method according to claim 1, characterized in that, The determination of the target region based on the at most three regions to be restored includes: Three storage devices were detected to have failed, and it was determined that the two areas to be recovered in the stripe were both data areas and / or verification areas, and the other area to be recovered was the second hot standby area. The target area was determined to be all other data areas and / or verification areas as well as the first hot standby area.
10. The method according to claim 1, characterized in that, The determination of the target region based on the at most three regions to be restored includes: Three storage devices were detected to have failed, and one of the corresponding areas to be recovered in the stripe was determined to be a data area and / or a verification area. The other two areas to be recovered were the first hot standby area and the second hot standby area, respectively. The target area was determined to be all other data areas and / or verification areas.
11. The method according to any one of claims 1-7, characterized in that, The strip also includes a third hot standby region, and the method further includes: The recovered data and / or the first verification information are stored in the first hot standby area, the second hot standby area, and / or the third hot standby area.
12. The method according to claim 11, characterized in that, The method further includes: Upon detecting that the fault in the storage device has been cleared, all data information and / or first verification information in any one of the region groups are read; and based on the data information and / or first verification information, second verification information in the first hot standby region is determined. And / or, read all data information and / or first verification information; and determine the third verification information in the second hot standby area based on the data information and / or first verification information.
13. A RAID data processing device, characterized in that, An application 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, a first hot spare area, and a second hot spare area, 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, the first hot spare area stores second parity information, and the second hot spare area stores third parity information, the two first parity information are determined based on all data information of the stripe and the position information of the corresponding area, the second parity information is determined based on data information in any area group and / or the first parity information, and the third parity information is determined based on all data information and the first parity information, the device comprising: The processing module is used to detect failures in up to three storage devices and determine up to three recovery areas in the stripe, wherein the recovery areas are a data area, a verification area, a first hot standby area and / or a second hot standby area; The calculation module is used to determine a target area based on the up to three areas to be recovered, wherein the target area is a data area, a verification area, a first hot standby area and / or a second hot standby area other than the areas to be recovered; The calculation module is also used to read target information in the target area and recover data information and / or first verification information of the area to be recovered based on the target information.
14. The apparatus according to claim 13, characterized in that, include: The computing module is further configured to detect a storage device failure, determine that the corresponding area to be recovered in the stripe is a data area or a verification area, and determine the target area as other data areas and / or verification areas in the area group where the area to be recovered is located, as well as the first hot standby area.
15. The apparatus according to claim 13, characterized in that, include: The calculation module is also used to detect that two storage devices have failed, and to determine that the two regions to be recovered in the stripe are both data regions and / or verification regions, and to determine that the target region is all other data regions and / or verification regions.
16. The apparatus according to claim 13, characterized in that, include: The computing module is also configured to detect that three storage devices have failed, and to determine that the three areas to be recovered in the stripe are all data areas and / or verification areas, and to determine the target area as all other data areas and / or verification areas except the three areas to be recovered and the second hot standby area.
17. 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 12.
18. 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 12.
19. 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 12.
20. 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 12.
Citation Information
Patent Citations
Bad block data recovery method and device, storage medium and electronic equipment
CN111930552A
Data storage method and device, medium and product
CN118779146A