Abnormal data positioning method, device, equipment, program product and storage medium
By determining the parity chain calculation results and combination strategies in the RAID system, abnormal data can be accurately located and recovered, solving the problem of inaccurate location in existing technologies and improving user experience and system stability.
Patent Information
- Application Number
- CN202510969579.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-07-15
AI Technical Summary
In RAID systems, current technology cannot accurately locate the disk where abnormal data is located, making recovery difficult and reducing user experience.
By determining the check chain calculation results of each check chain in the target stripe, if the calculation results of some check chains are zero, the disk corresponding to them is identified as the disk where the abnormal data is located. Data recovery is performed using check chain combination and hierarchical traversal strategies. Combined with real-time data reconstruction and disk marking mechanisms, accurate location and repair are ensured.
It enables efficient and accurate location and recovery of abnormal data, improves user experience, and ensures data security and system stability.
Smart Images

Figure CN120469849B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of independent disk redundant arrays, and in particular to an abnormal data location method, apparatus, device, program product and storage medium. Background Technology
[0002] In current RAID (Redundant Array of Independent Disks) systems, although stripe consistency checks can be used to determine the stripe to which the abnormal data belongs when it exists on a disk, a single stripe involves multiple disks, and related technologies cannot further determine which disk in the stripe the abnormal data is located on. This makes it difficult to recover the abnormal data in the stripe and reduces the user experience.
[0003] Therefore, how to provide a solution to the above-mentioned technical problems is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this invention is to provide an abnormal data location method, apparatus, device, program product, and storage medium. In this invention, for a target strip containing abnormal data, the calculation results of each check chain can be determined. If the calculation results of each check chain are partially zero, the disk corresponding to the check chain with a non-zero calculation result can be regarded as the disk where the abnormal data is located, thereby efficiently and accurately locating the disk where the abnormal data is located, facilitating the recovery of abnormal data, and improving the user experience.
[0005] To solve the above-mentioned technical problems, the present invention provides an anomaly data location method, comprising:
[0006] For a target stripe containing anomalous data in the storage system, the check chain calculation results of each check chain in the target stripe are determined by using the current data of each data block in the target stripe.
[0007] If the calculation result of each check chain is zero, then the disk corresponding to the check chain whose calculation result is not zero will be the disk where the abnormal data is located.
[0008] The data blocks include business data blocks and verification data blocks. The disks corresponding to the verification chains are the disks in the target stripes to which the verification data in the verification chains belongs. The storage system is an independent disk redundant array system.
[0009] On the other hand, for a target stripe containing anomalous data in the storage system, after determining the check chain calculation results of each check chain in the target stripe using the current data of each data block in the target stripe, the anomalous data location method further includes:
[0010] If all the calculation results of each check chain are non-zero, the check chain is divided into two check chain combinations. The number of check chains in each check chain combination is a preset number, which is the total number of check chains minus one.
[0011] For any combination of service data blocks in the target strip, the service data is recovered by each combination of verification chains to obtain the service data recovery result of each combination of verification chains for the combination of service data blocks.
[0012] Determine whether the recovery results of each business data item in the combination of business data blocks are consistent;
[0013] If they match, the disk to which each business data block in the business data block combination belongs will be the disk where the abnormal data is located.
[0014] On the other hand, the disks to which each business data block in the aforementioned business data block combination belongs are designated as the disks where the abnormal data resides, including:
[0015] Determine whether there are any business data blocks in the combination of business data blocks that meet the preset removal conditions, wherein the preset removal conditions include the recovery data being consistent with the existing data;
[0016] If present, the disk containing the business data blocks in the business data block group that do not meet the preset removal conditions will be designated as the disk containing the abnormal data.
[0017] On the other hand, the target strip has at least three check chains;
[0018] If all the calculation results of each check chain are non-zero, then the check chain is divided into two check chain combinations, including:
[0019] If all the calculation results of each check chain are non-zero, then select one check chain of the target strip as the initial check chain.
[0020] For any business data block in the target strip, the data of the business data block is recovered through the initial verification chain to obtain the recovered data of the business data block;
[0021] If there is a business data block in the target strip whose recovered data is consistent with the existing data, then the disk to which the business data block in the target strip whose recovered data is consistent with the existing data belongs will be the disk where the abnormal data is located.
[0022] If there is no business data block in the target strip that is consistent with the recovered data and the existing data, the verification chain will be divided into two verification chain combinations.
[0023] On the other hand, dividing the check chain into two check chain combinations includes:
[0024] From all the check chains of the target strip, a preset number of check chains are randomly selected to form the first check chain combination;
[0025] From all the check chains of the target strip, a preset number of check chains are randomly selected to form a second check chain combination;
[0026] The first check chain combination is different from the second check chain combination.
[0027] On the other hand, the generation of the business data block combination adopts a hierarchical traversal strategy:
[0028] Prioritize traversing combinations of data blocks on the disk that have recently experienced input / output errors;
[0029] Next, traverse the disk data block combinations marked as high-risk aging levels in the storage system;
[0030] Finally, iterate through the remaining disk data block combinations.
[0031] On the other hand, for any combination of service data blocks in the target strip, service data recovery is performed on the combination of service data blocks through each check chain combination. The service data recovery results of each check chain combination for the combination of service data blocks include:
[0032] For any combination of business data blocks in the target strip, a first set of data recovery equations is constructed for the combination of business data blocks using the first verification chain combination, and a second set of data recovery equations is constructed for the combination of business data blocks using the second verification chain combination.
[0033] The solution result of the first set of data recovery equations is used as the business data recovery result of the first verification chain combination for the business data block combination.
[0034] The solution result of the second set of data recovery equations is used as the business data recovery result of the second verification chain combination for the business data block combination.
[0035] On the other hand, the abnormal data location method also includes:
[0036] After identifying the disk containing the abnormal data, a real-time data reconstruction process is triggered, including:
[0037] Read data from normal business data blocks and verification data blocks in the target strip, and calculate the target value of abnormal data blocks in reverse based on the verification chain equation;
[0038] Overwrite the target value onto the corresponding anomalous data block.
[0039] On the other hand, after overwriting the target value onto the corresponding abnormal data block, the abnormal data localization method further includes:
[0040] Verify whether the abnormal data blocks in the target strip can be successfully recovered;
[0041] If recovery fails, the disk containing the abnormal data will be marked as untrusted and isolated.
[0042] On the other hand, verifying whether the anomalous data blocks in the target strip can be successfully recovered includes:
[0043] Calculate the check chain calculation result for any check chain of the target strip;
[0044] If the result of the verification chain calculation is non-zero, the real-time data reconstruction process will be triggered a second time.
[0045] Based on the abnormal data block recovered in the second recovery, calculate the check chain calculation result of any check chain of the target strip;
[0046] If the check chain calculation result is non-zero, the physical disk is marked as untrusted and isolated.
[0047] On the other hand, the abnormal data location method also includes:
[0048] Once the disk containing the abnormal data is identified, it is marked as abnormal before any recovery is performed. The read / write policies of the storage system are then adjusted to prevent further access to the abnormal disk.
[0049] On the other hand, the independent disk redundant array system applies dual verification technology or triple verification technology;
[0050] The target strip contains at least two check data blocks, and each check data block corresponds to a different check chain.
[0051] On the other hand, for a target stripe containing anomalous data in the storage system, after determining the check chain calculation results of each check chain in the target stripe using the current data of each data block in the target stripe, the anomalous data location method further includes:
[0052] If the calculation results of each check chain are all zero, then the data blocks in the target strip are determined to be normal, and there is no need to perform abnormal data location operations.
[0053] On the other hand, the abnormal data location method also includes:
[0054] Periodically inspect multiple stripes in the storage system, and identify target stripes with abnormal data by comparing the check chain calculation results of each stripe with the preset benchmark value.
[0055] On the other hand, the abnormal data location method also includes:
[0056] When determining the result of the check chain calculation, if N consecutive stripes are detected to have non-zero results in the same check chain, it is determined that the physical disk corresponding to the check chain has a systemic failure, so as to trigger the preventive disk replacement process.
[0057] To address the aforementioned technical problems, the present invention also provides an abnormal data location device, comprising:
[0058] The first determining module is used to determine the check chain calculation results of each check chain of the target stripe by using the current data of each data block in the target stripe, for a target stripe containing abnormal data in the storage system.
[0059] The second determining module is used to determine the disk corresponding to the check chain whose check chain calculation result is not zero if the result of each check chain is partially zero, and to determine the disk where the abnormal data is located.
[0060] The data blocks include business data blocks and verification data blocks. The disks corresponding to the verification chains are the disks in the target stripes to which the verification data in the verification chains belongs. The storage system is an independent disk redundant array system.
[0061] To address the aforementioned technical problems, the present invention also provides an abnormal data location device, comprising:
[0062] Memory, used to store computer programs;
[0063] A processor is configured to implement the steps of the abnormal data location method described above when executing the computer program.
[0064] On the other hand, the processor is integrated into the field-programmable gate array of the independent disk redundancy array controller card, and the parity chain calculation is performed through the following hardware acceleration unit:
[0065] Galois multiplier array for parallel computation of verification equation coefficients;
[0066] The XOR operation tree module is used for XOR chain calculations.
[0067] To address the aforementioned technical problems, the present invention also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements the steps of the abnormal data location method described above.
[0068] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the abnormal data location method described above.
[0069] Beneficial Effects: This invention provides a method for locating abnormal data. Considering that in a target stripe containing abnormal data, if there is a check chain with a calculation result of zero, it indicates that all business data blocks are normal. In this case, the disk corresponding to the check chain with a non-zero calculation result is the disk where the abnormal data is located. Therefore, this invention can determine the check chain calculation result of each check chain for a target stripe containing abnormal data. If the calculation result of each check chain is partially zero, the disk corresponding to the check chain with a non-zero calculation result can be used as the disk where the abnormal data is located, thereby efficiently and accurately locating the disk where the abnormal data is located, facilitating the recovery of abnormal data, and improving the user experience.
[0070] The present invention also provides an abnormal data location device, equipment, program product and storage medium, which have the same beneficial effects as the above abnormal data location method. Attached Figure Description
[0071] To more clearly illustrate the technical solutions in the embodiments of the present invention, the relevant technologies and the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0072] Figure 1 A flowchart illustrating an abnormal data location method provided by the present invention;
[0073] Figure 2 This is a schematic diagram illustrating the distribution of abnormal data in the first type of RAID6 stripe provided by the present invention;
[0074] Figure 3 This is a schematic diagram illustrating the distribution of anomalous data in the first type of RAID TP stripe provided by the present invention;
[0075] Figure 4 This is a schematic diagram illustrating the distribution of abnormal data in the second type of RAID6 stripe provided by the present invention;
[0076] Figure 5 This is a schematic diagram illustrating the distribution of anomalous data in the second type of RAID TP stripe provided by the present invention;
[0077] Figure 6 This is a schematic diagram of the structure of an abnormal data location device provided by the present invention;
[0078] Figure 7 This is a schematic diagram of the structure of an abnormal data location device provided by the present invention;
[0079] Figure 8 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. Detailed Implementation
[0080] The core of this invention is to provide an abnormal data location method, apparatus, device, program product, and storage medium. In this invention, for a target strip containing abnormal data, the calculation results of each check chain can be determined. If the calculation results of each check chain are partially zero, the disk corresponding to the check chain with a non-zero calculation result can be regarded as the disk where the abnormal data is located, thereby efficiently and accurately locating the disk where the abnormal data is located, facilitating the recovery of abnormal data, and improving the user experience.
[0081] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0082] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating an anomaly data localization method provided by the present invention. The anomaly data localization method includes:
[0083] S101: For a target stripe containing abnormal data in the storage system, determine the check chain calculation results of each check chain of the target stripe by using the current data of each data block in the target stripe;
[0084] Specifically, considering the technical problems mentioned above, and taking into account that in a target stripe containing abnormal data, if there is a check chain with a calculation result of zero, it indicates that all business data blocks are normal. In this case, the disk corresponding to the check chain with a non-zero calculation result is the disk where the abnormal data is located. Therefore, in order to achieve accurate location of the disk where the abnormal data is located, this embodiment of the invention intends to set up this scheme based on the correlation between the check chain calculation result and disk abnormality, and to filter abnormal disks through the check chain calculation result, so as to provide an accurate target for data repair.
[0085] Specifically, in this step, for the target stripe containing abnormal data in the storage system, the current data of each data block in the target stripe can be used to determine the check chain calculation results of each check chain in the target stripe, so as to use them as the data basis for subsequent steps.
[0086] S102: If the calculation result of each check chain is zero, then the disk corresponding to the check chain whose calculation result is not zero shall be the disk where the abnormal data is located.
[0087] The data blocks include business data blocks and verification data blocks. The disks corresponding to the verification chains are the disks in the target stripes to which the verification data in the verification chains belongs. The storage system is an independent disk redundant array system.
[0088] Specifically, once the check chain calculation results of each check chain in the target stripe are determined, based on the above concept, if the calculation results of some check chains are zero, the disks corresponding to the check chains with non-zero calculation results can be used as the disks where the abnormal data is located, thus achieving accurate location of the abnormal data in the target stripe.
[0089] For example, in a RAID TP (Redundant Array of Independent Disks with Triple Parity) system consisting of 7 disks, the target stripe includes service data blocks (such as d0-dn, where 0-n are the sequence numbers of the service data blocks and n is the total number of service data blocks, with data in 4k units) and parity data blocks (P, Q, R, corresponding to different parity chains). For the current data in each data block within the target stripe, the check chain calculation results are calculated for each check chain: the P check chain result is d0+d1+d2+d3+d4+d5+P, the Q check chain result is a0×d0+a1×d1+a2×d2+a3×d3+a4×d4+a5×d5+Q, and the R check chain result is (a0)²×d0+(a1)²×d1+(a2)²×d2+(a3)²×d3+(a4)²×d4+(a5)²×d5+R (where ai is a constant, i∈0-n). If the P check chain calculation result is non-zero, and the Q and R check chain calculation results are zero, then the disk corresponding to the P check chain is determined to be the disk containing the abnormal data. Here, a stripe is a set of location-related data blocks on different partitions of the array, data blocks are data in 4KB units, and the storage system is an independent disk redundant array system.
[0090] Specifically, for a better explanation of the embodiments of the present invention, please refer to... Figures 2 to 5 , Figure 2 This is a schematic diagram illustrating the distribution of abnormal data in the first type of RAID6 stripe provided by the present invention. Figure 3 This is a schematic diagram illustrating the distribution of anomalous data in the first type of RAID TP stripe provided by the present invention. Figure 4 This is a schematic diagram illustrating the distribution of abnormal data in the second type of RAID6 stripe provided by the present invention. Figure 5 This is a schematic diagram illustrating the distribution of anomalous data in the second type of RAID TP stripe provided by the present invention. Figures 2 to 5 The data blocks containing abnormal data are indicated by bolded borders. Figure 2 and Figure 3 The abnormal data are all distributed in the verification data block. Figure 4 and Figure 5 All abnormal data in the data is distributed business data blocks.
[0091] This invention provides a method for locating abnormal data. Considering that in a target stripe containing abnormal data, if there is a check chain with a calculation result of zero, it indicates that all business data blocks are normal. In this case, the disk corresponding to the check chain with a non-zero calculation result is the disk where the abnormal data is located. Therefore, this invention can determine the check chain calculation result of each check chain for a target stripe containing abnormal data. If the calculation result of each check chain is partially zero, the disk corresponding to the check chain with a non-zero calculation result can be taken as the disk where the abnormal data is located, thereby efficiently and accurately locating the disk where the abnormal data is located, facilitating the recovery of abnormal data, and improving the user experience.
[0092] Based on the above embodiments:
[0093] As an optional embodiment, for a target stripe containing anomalous data in the storage system, after determining the check chain calculation results of each check chain in the target stripe using the current data of each data block in the target stripe, the anomalous data location method further includes:
[0094] If all the calculation results of each check chain are non-zero, the check chain is divided into two check chain combinations. The number of check chains in each check chain combination is a preset number, which is the total number of check chains minus one.
[0095] For any combination of business data blocks in the target strip, the business data is restored by each combination of verification chains, and the business data restoration result of each combination of verification chains for the combination of business data blocks is obtained.
[0096] Determine whether the recovery results of each business data in the business data block combination are consistent;
[0097] If they match, the disks to which each business data block in the business data block combination belongs will be used as the disks where the abnormal data is located.
[0098] Specifically, considering that when all verification chain calculation results are non-zero, there may be multiple abnormal disks or complex anomalies, which cannot be located using only a single verification chain, this embodiment of the invention divides the verification chain into verification chain combinations. Business data block combinations are recovered using different verification chain combinations, and the consistency of the recovery results is used to identify abnormal disks, thus improving the location capability in complex scenarios.
[0099] For example, in a RAID6 system (n data disks, 2 parity disks), if the parity chain result P = d0 + d1 + ... + dn + P ≠ 0 and the parity chain result Q = a0 × d0 + a1 × d1 + ... + an × dn + Q ≠ 0, the parity chains are divided into two combinations: {P} and {Q} (each combination has 1 parity chain, the total number of parity chains is 2, and the preset number is the total number of parity chains minus one). For the business data block combination {d0}, d0 is recovered through the {P} combination: d0' = -d1 - d2 - ... - dn - P; d0 is recovered through the {Q} combination: d0'' = (-a1 × d1 - ... - an × dn - Q) / a0. It is then determined whether d0' and d0'' are consistent. If they are consistent, the disk containing the business data block d0 in {d0} is considered the disk containing the abnormal data. RAID6 is a RAID array containing two check disks and has error correction capabilities. When two or fewer disks fail, the data on the failed disks can be recovered from the other disks. A stripe is a collection of data blocks that are related in position on different partitions of the array.
[0100] As an optional embodiment, the disks to which each business data block in the business data block combination belongs are designated as the disks where the abnormal data resides, including:
[0101] Determine whether there are any business data blocks in the combination of business data blocks that meet the preset removal conditions, where the preset removal conditions include that the restored data is consistent with the existing data;
[0102] If it exists, the disk containing the business data blocks in the business data block group, excluding the business data blocks that meet the preset removal conditions, will be designated as the disk where the abnormal data is located.
[0103] Specifically, considering that some data blocks in a business data block combination may be normal while others are abnormal, direct location might lead to misjudgment. To accurately filter abnormal disks, preset rejection conditions are set to eliminate interference from normal data blocks and ensure that the location results only include truly abnormal disks.
[0104] Specifically, based on the previous embodiment, if the recovery result d0'=d0'' of the business data block combination {d0,d1} is further determined whether the recovered data d0' of d0 is consistent with the existing data d0. The preset removal condition is that the recovered data is consistent with the existing data. If d0'=d0, then there is a business data block d0 that meets the preset removal condition, and the disk to which the business data block d1 in the business data block combination belongs (excluding d0) is regarded as the disk where the abnormal data is located.
[0105] Of course, in addition to this specific form, "taking the disk to which each business data block in the business data block combination belongs as the disk where the abnormal data is located" can also be in other forms, and this embodiment of the invention does not limit it here.
[0106] As an optional embodiment, the target stripe has at least three check chains;
[0107] If all the calculation results of each check chain are non-zero, then the check chain is divided into two check chain combinations, including:
[0108] If all the calculation results of each check chain are non-zero, then select one check chain of the target strip as the initial check chain.
[0109] For any business data block in the target strip, data recovery is performed on the business data block through the initial verification chain to obtain the recovered data of the business data block;
[0110] If there is a business data block in the target strip whose recovered data is consistent with the existing data, then the disk to which the business data block in the target strip whose recovered data is consistent with the existing data belongs will be the disk where the abnormal data is located.
[0111] If there is no business data block in the target strip that is consistent with the recovered data and the existing data, the verification chain will be divided into two verification chain combinations.
[0112] Specifically, considering that recovery using a single check chain may have limitations when the target stripe has at least three check chains, this embodiment of the invention first uses the initial check chain to recover data and determine whether there are consistent data blocks, which can quickly locate abnormal disks; if not, the check chains are then divided into combinations to improve the efficiency and accuracy of the location.
[0113] Specifically, in a RAID TP system (n data disks, 3 parity disks), the target stripe has three parity chains: P, Q, and R. If the calculation results of all three parity chains are non-zero, the P parity chain is selected as the initial parity chain to recover the service data block d0: d0' = -d1 - d2 - ... - dn - P. If d0' in the target stripe matches the existing data d0, the disk to which d0 belongs is considered the disk containing the abnormal data. If there is no service data block in the target stripe whose recovered data matches the existing data, the parity chain is divided into two combinations: {P,Q} and {P,R}. RAID TP is a RAID array containing 3 parity disks, which has error correction capabilities. When three or fewer disks fail, the data on the failed disk can be recovered from the other disks.
[0114] Of course, in addition to this specific form, "if all the calculation results of each check chain are non-zero, then the check chain is divided into two check chain combinations" can also be in other forms, and the embodiments of the present invention are not limited here.
[0115] As an optional embodiment, dividing the check chain into two check chain combinations includes:
[0116] From all the check chains of the target strip, a preset number of check chains are randomly selected to form the first check chain combination;
[0117] From all the check chains of the target strip, a preset number of check chains are randomly selected to form a second check chain combination;
[0118] The first check chain combination is different from the second check chain combination.
[0119] Specifically, to ensure the randomness and comprehensiveness of the check chain combination and avoid positioning deviations caused by fixed combinations, randomly selecting check chains to form combinations can cover more possible abnormal situations and improve the reliability of positioning.
[0120] For example, in a RAID TP system, two parity chains (preset to be 3 minus one) are randomly selected from all parity chains P, Q, and R of the target stripe to form the first parity chain combination, such as {P,Q}; two parity chains are randomly selected from all parity chains of the target stripe to form the second parity chain combination, such as {P,R}, and the first parity chain combination is different from the second parity chain combination.
[0121] Of course, in addition to this specific form, "dividing the check chain into two check chain combinations" can also take other forms, and this embodiment of the invention does not limit them here.
[0122] As an optional implementation, the generation of business data block combinations adopts a hierarchical traversal strategy:
[0123] Prioritize traversing combinations of data blocks on the disk that have recently experienced input / output errors;
[0124] Next, traverse the disk data block combinations marked as high-risk aging levels in the storage system;
[0125] Finally, iterate through the remaining disk data block combinations.
[0126] Specifically, considering the different probabilities of anomalies among different disks, disks that have recently experienced input / output errors or are marked as high-risk aging disks are more likely to be anomalies. Therefore, this embodiment of the invention employs a hierarchical traversal strategy, prioritizing the inspection of high-risk disks, which can improve the efficiency of anomaly localization and quickly locate the disk containing the abnormal data.
[0127] Specifically, for example, the generation of business data block combinations can adopt a hierarchical traversal strategy. In a RAID system, the data block combinations on disks that have recently experienced input / output (I / O) errors are traversed first, such as disk A; then, the data block combinations on disks marked as high-risk aging levels by the storage system are traversed, such as disk B; finally, the data block combinations on the remaining disks are traversed, such as disks C and D, etc. Here, I / O is an abbreviation for input / output, used to describe the transfer of data between storage devices and processing units.
[0128] Of course, in addition to this specific form, the hierarchical traversal strategy can also take other forms, which are not limited in this embodiment of the invention.
[0129] As an optional embodiment, for any combination of service data blocks in the target stripe, service data recovery is performed on the combination of service data blocks through each check chain combination. The service data recovery results of each check chain combination for the combination of service data blocks include:
[0130] For any combination of business data blocks in the target strip, the first set of data recovery equations is constructed for the combination of business data blocks by the first verification chain combination, and the second set of data recovery equations is constructed for the combination of business data blocks by the second verification chain combination.
[0131] The solution result of the first set of data recovery equations is used as the business data recovery result of the first verification chain combination for the business data block combination.
[0132] The solution result of the second set of data recovery equations is used as the business data recovery result of the second verification chain combination for the business data block combination.
[0133] Specifically, considering that by constructing a set of data recovery equations and using the mathematical relationships of the verification chains to solve for the business data recovery results, the accuracy and logic of the recovery results can be ensured, providing a reliable basis for judging abnormal disks, this embodiment of the invention can construct a first set of data recovery equations for any combination of business data blocks in the target stripe using a first set of verification chains, and construct a second set of data recovery equations for the business data block combination using a second set of verification chains; the solution result of the first set of data recovery equations is used as the business data recovery result of the first set of verification chains for the business data block combination; the solution result of the second set of data recovery equations is used as the business data recovery result of the second set of verification chains for the business data block combination.
[0134] Specifically, for the service data block combination {d0, d1} in the target stripe of a RAID6 system, a first set of data recovery equations is constructed for this service data block combination using the first parity chain combination {P}: d0 + d1 + d2 + ... + dn + P = 0; a second set of data recovery equations is constructed for this service data block combination using the second parity chain combination {Q}: a0 × d0 + a1 × d1 + a2 × d2 + ... + an × dn + Q = 0. The solution result of the first set of data recovery equations, d0' = -d1 - d2 - ... - dn - P, is taken as the service data recovery result of the first parity chain combination for this service data block combination; the solution result of the second set of data recovery equations, d0'' = (-a1 × d1 - a2 × d2 - ... - an × dn - Q) / a0, is taken as the service data recovery result of the second parity chain combination for this service data block combination. Here, ai is a constant, and RAID6 is a RAID array containing two parity disks.
[0135] As an optional embodiment, the abnormal data location method further includes:
[0136] After identifying the disk containing the abnormal data, a real-time data reconstruction process is triggered, including:
[0137] Read data from normal business data blocks and verification data blocks in the target strip, and calculate the target value of abnormal data blocks in reverse based on the verification chain equation;
[0138] Overwrite the target value onto the corresponding anomalous data block.
[0139] Specifically, considering that once the disk containing the abnormal data is identified, the abnormal data needs to be repaired promptly to prevent further data damage or impact on normal system operation, this embodiment of the invention can trigger a real-time data reconstruction process. This process uses normal data and verification data to reverse-calculate the target value of the abnormal data and overwrite it, thus achieving data repair.
[0140] Specifically, for example, in a RAID6 system, after determining that the Q parity disk is abnormal, a real-time data reconstruction process is triggered. Data is read from the normal business data blocks d0, d1, etc. and the P parity data block in the target stripe. Based on the parity chain equation Q=a0×d0+a1×d1+…+an×dn (where ai is a constant), the target value Q'=a0×d0+a1×d1+…+an×dn of the abnormal data block Q is calculated in reverse. The target value Q' is then overwritten onto the corresponding abnormal data block Q.
[0141] As an optional embodiment, after overwriting the target value to the corresponding anomalous data block, the anomalous data location method further includes:
[0142] Verify whether the abnormal data blocks in the target strip can be successfully recovered;
[0143] If recovery fails, the disk containing the abnormal data will be marked as untrusted and isolated.
[0144] Specifically, considering the possibility of repair failure after data reconstruction, the repair results need to be verified to ensure data reliability. Therefore, in this embodiment of the invention, if recovery fails, the disk is marked and isolated to prevent the abnormal disk from continuing to affect the system and ensure data security.
[0145] In the previous embodiment, after overwriting the target value Q' with the corresponding aberrant data block Q, it is verified whether the aberrant data block in the target stripe can be successfully recovered. The parity chain calculation result X = d0 + d1 + ... + dn + Q' of the P parity chain of the target stripe is calculated. If X is non-zero, it indicates that the aberrant data block cannot be successfully recovered, and the disk containing the aberrant data is marked as untrusted and isolated.
[0146] As an optional implementation, verifying whether anomalous data blocks in the target strip can be successfully recovered includes:
[0147] Calculate the check chain calculation result for any check chain of the target strip;
[0148] If the result of the verification chain calculation is non-zero, the real-time data reconstruction process will be triggered a second time.
[0149] Based on the abnormal data block recovered in the second recovery, calculate the check chain calculation result of any check chain of the target strip;
[0150] If the check chain calculation result is non-zero, the physical disk is marked as untrusted and isolated.
[0151] Specifically, considering that other factors may influence the data reconstruction process after a failure, triggering the reconstruction process again and verifying it can further confirm whether the disk is truly unrepairable. If the reconstruction still fails after two attempts, it indicates a serious disk failure, requiring isolation. Therefore, in this embodiment of the invention, the following steps can be taken: calculate the checksum calculation result of any checksum chain of the target stripe; if the checksum calculation result is non-zero, trigger the real-time data reconstruction process a second time; based on the abnormal data blocks recovered in the second attempt, calculate the checksum calculation result of any checksum chain of the target stripe; if the checksum calculation result is non-zero, mark the physical disk as untrusted and isolate it.
[0152] Specifically, for example, when verifying whether an abnormal data block in the target stripe can be successfully recovered, the verification chain calculation result X = d0 + d1 + ... + dn + Q' of the P-check chain of the target stripe is calculated. If X is non-zero, the real-time data reconstruction process is triggered a second time, and data is reread from the normal business data blocks and check data blocks in the target stripe. The target value Q'' of the abnormal data block Q is calculated and overwritten onto the abnormal data block Q. Based on the abnormal data block Q'' recovered in the second instance, the verification chain calculation result X' = d0 + d1 + ... + dn + Q'' of the P-check chain of the target stripe is calculated. If X' is non-zero, the physical disk is marked as untrusted and isolated.
[0153] Of course, in addition to this specific form, "verifying whether the abnormal data block in the target strip can be successfully recovered" can also take other forms, and this embodiment of the invention does not limit it here.
[0154] As an optional embodiment, the abnormal data location method further includes:
[0155] Once the disk containing the abnormal data is identified, it is marked as abnormal before any recovery is performed. The read / write policies of the storage system are then adjusted to prevent further access to the abnormal disk.
[0156] Specifically, considering that further access to the abnormal disk may lead to data corruption or system failure before recovering abnormal data, this embodiment of the invention first marks the abnormal state and adjusts the read / write strategy, which can ensure the stability of the system and the security of the data.
[0157] For example, in a RAID system, once a data disk d0 is determined to be abnormal, before the abnormal data is recovered, the disk containing the abnormal data is marked as abnormal, and the read / write strategy of the storage system is adjusted. For example, writing data to this disk is prohibited, and data is retrieved from other normal disks first, in order to avoid further access to the abnormal disk.
[0158] As an optional implementation, the standalone disk redundant array system applies dual-check technology or triple-check technology;
[0159] The target strip contains at least two check data blocks, and each check data block corresponds to a different check chain.
[0160] Specifically, considering that independent disk redundant array systems can improve system fault tolerance and data security by applying dual-check technology (such as RAID6) or triple-check technology (such as RAID TP), the target stripe in this embodiment of the invention contains at least two check data blocks, corresponding to different check chains, providing more verification basis for abnormal data location and improving the accuracy and reliability of location.
[0161] Specifically, the independent disk redundant array system uses dual parity technology (RAID6). The target stripe contains two parity data blocks, P and Q, and each parity data block corresponds to a different parity chain (P parity chain and Q parity chain). RAID6 is a RAID array with two parity disks and has error correction capabilities. When two or fewer disks fail, the data on the failed disks can be recovered from the other disks.
[0162] As an optional embodiment, for a target stripe containing anomalous data in the storage system, after determining the check chain calculation results of each check chain in the target stripe using the current data of each data block in the target stripe, the anomalous data location method further includes:
[0163] If the calculation results of each check chain are all zero, then the data blocks in the target strip are determined to be normal, and there is no need to perform abnormal data location operations.
[0164] Specifically, considering that when all check chain calculation results are zero, it means that the data blocks in the target strip are all normal and there is no need to perform abnormal data location operations, in this embodiment of the invention, if the calculation results of each check chain are all zero, it is determined that the data blocks in the target strip are all normal and there is no need to perform abnormal data location operations, thereby avoiding unnecessary calculations and resource waste and improving system efficiency.
[0165] For example, for a target stripe in a RAID6 system containing abnormal data, the P parity chain calculation result X=d0+d1+…+dn+P and the Q parity chain calculation result Y=a0×d0+a1×d1+…+an×dn+Q of the target stripe are calculated based on the current data of each data block in the target stripe. If both X and Y are zero, it is determined that the data blocks in the target stripe are all normal, and there is no need to perform abnormal data location operations.
[0166] As an optional embodiment, the abnormal data location method further includes:
[0167] Periodically inspect multiple stripes in the storage system, and identify target stripes with abnormal data by comparing the check chain calculation results of each stripe with the preset benchmark value.
[0168] Specifically, considering that periodic inspections of multiple stripes in a storage system can promptly identify target stripes with abnormal data, enabling early anomaly localization and repair, and ensuring data security and system stability, this embodiment of the invention can periodically inspect multiple stripes in the storage system. By comparing the check chain calculation results of each stripe with a preset benchmark value, the target stripe with abnormal data can be identified.
[0169] Specifically, for example, multiple stripes in a storage system can be periodically inspected. By comparing the parity chain calculation results of each stripe with a preset baseline value (the preset baseline value is zero), for example, calculating the P parity chain result X and the Q parity chain result Y of a certain stripe, if X or Y is not zero, then the stripe is identified as a target stripe with abnormal data.
[0170] As an optional embodiment, the abnormal data location method further includes:
[0171] When determining the result of the check chain calculation, if N consecutive stripes are detected to have non-zero results in the same check chain, it is determined that the physical disk corresponding to the check chain has a systemic failure, so as to trigger the preventive disk replacement process.
[0172] Specifically, considering that if N consecutive stripes show non-zero results on the same check chain, it indicates that the physical disk corresponding to the check chain may have a systemic failure, triggering a preventive disk replacement process to replace the faulty disk in advance and avoid data loss and system failure, in this embodiment of the invention, when determining the check chain calculation result, if N consecutive stripes show non-zero results on the same check chain, it is determined that the physical disk corresponding to the check chain has a systemic failure, so as to trigger a preventive disk replacement process.
[0173] For example, when determining the result of the check chain calculation, if three consecutive stripes are detected to have non-zero results in the Q check chain, it is determined that the physical disk corresponding to the Q check chain has a systemic failure, so as to trigger the preventive disk replacement process and replace the physical disk in advance.
[0174] Please refer to Figure 6 , Figure 6 This is a schematic diagram of an anomaly data location device provided by the present invention. The anomaly data location device includes:
[0175] The first determining module 61 is used to determine the check chain calculation results of each check chain of the target stripe by using the current data of each data block in the target stripe for a target stripe containing abnormal data in the storage system.
[0176] The second determining module 62 is used to determine the disk corresponding to the check chain whose check chain calculation result is not zero if the result of each check chain is zero.
[0177] The data blocks include business data blocks and verification data blocks. The disks corresponding to the verification chains are the disks in the target stripes to which the verification data in the verification chains belongs. The storage system is an independent disk redundant array system.
[0178] For a description of the abnormal data location device provided in the embodiments of the present invention, please refer to the aforementioned embodiments of the abnormal data location method; the embodiments of the present invention will not be repeated here.
[0179] Please refer to Figure 7 , Figure 7 This is a schematic diagram of an abnormal data location device provided by the present invention. The abnormal data location device includes:
[0180] Memory 71 is used to store computer programs;
[0181] The processor 72 is used to implement the steps of the abnormal data location method as described in the foregoing embodiments when executing a computer program.
[0182] As an optional embodiment, the processor is integrated into the field-programmable gate array of the independent disk redundancy array controller card, and the parity chain calculation is performed through the following hardware acceleration unit:
[0183] Galois multiplier array for parallel computation of verification equation coefficients;
[0184] The XOR operation tree module is used for XOR chain calculations.
[0185] For an introduction to the abnormal data location device provided in the embodiments of the present invention, please refer to the aforementioned embodiments of the abnormal data location method; the embodiments of the present invention will not be repeated here.
[0186] Specifically, considering that the processor is integrated into the field-programmable gate array (FPGA) of the independent disk redundant array controller card, the parallel computing capability of the FPGA, combined with hardware acceleration units such as Galois multiplier array and XOR operation tree module, can improve the speed and efficiency of parity chain calculation and meet the high performance requirements of the storage system. Therefore, the processor and hardware acceleration unit in the embodiment of the present invention were designed.
[0187] Specifically, the processor is integrated into the FPGA of the independent disk redundant array controller card. The verification chain calculation is performed through the following hardware acceleration units: a Galois multiplier array is used for parallel calculation of the verification equation coefficients, such as calculating ai × di (where ai is a constant and di is a data block); an XOR operation tree module is used for XOR chain calculation, such as calculating d0 + d1 + ... + dn + P (where "+" is the XOR operation). Here, the FPGA is a field-programmable integrated circuit used to implement customized hardware logic; the Galois field is a finite field used for mathematical operations of data verification and encoding.
[0188] The present invention also provides a computer program product, including a computer program / instruction that, when executed by a processor, implements the steps of the abnormal data location method as described in the foregoing embodiments.
[0189] For a description of the computer program product provided in the embodiments of the present invention, please refer to the aforementioned embodiments of the abnormal data location method; the embodiments of the present invention will not be repeated here.
[0190] Please refer to Figure 8 , Figure 8 This is a schematic diagram of a computer-readable storage medium provided by the present invention. The computer-readable storage medium 81 stores a computer program 82. When the computer program 82 is executed by a processor, it implements the steps of the abnormal data location method as described in the foregoing embodiments.
[0191] For a description of the computer-readable storage medium provided in the embodiments of the present invention, please refer to the foregoing embodiments of the abnormal data location method; the embodiments of the present invention will not be repeated here.
[0192] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatuses disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section. It should also be noted that in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0193] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for locating abnormal data, characterized in that, include: For a target stripe containing anomalous data in the storage system, the calculation results of each check chain of the target stripe are determined by the current data of each data block in the target stripe; the target stripe contains at least two check data blocks, and each check data block corresponds to a different check chain; If the calculation result of each check chain is zero, then the disk corresponding to the check chain whose calculation result is not zero will be the disk where the abnormal data is located. The data blocks include business data blocks and verification data blocks. The disks corresponding to the verification chains are the disks in the target stripes to which the verification data in the verification chains belongs. The storage system is an independent disk redundant array system.
2. The abnormal data location method according to claim 1, characterized in that, For a target stripe containing anomalous data in a storage system, after determining the check chain calculation results of each check chain in the target stripe using the current data of each data block in the target stripe, the anomalous data location method further includes: If all the calculation results of each check chain are non-zero, the check chain is divided into two check chain combinations. The number of check chains in each check chain combination is a preset number, which is the total number of check chains minus one. For any combination of service data blocks in the target strip, the service data is recovered by each combination of verification chains to obtain the service data recovery result of each combination of verification chains for the combination of service data blocks. Determine whether the recovery results of each business data item in the combination of business data blocks are consistent; If they match, the disk to which each business data block in the business data block combination belongs will be the disk where the abnormal data is located.
3. The abnormal data location method according to claim 2, characterized in that, The disks to which each business data block in the aforementioned business data block combination belongs are included as the disks where the abnormal data is located: Determine whether there are any business data blocks in the combination of business data blocks that meet the preset removal conditions, wherein the preset removal conditions include the recovery data being consistent with the existing data; If present, the disk containing the business data blocks in the business data block group that do not meet the preset removal conditions will be designated as the disk containing the abnormal data.
4. The abnormal data location method according to claim 2, characterized in that, The target strip has at least three check chains; If all the calculation results of each check chain are non-zero, then the check chain is divided into two check chain combinations, including: If all the calculation results of each check chain are non-zero, then select one check chain of the target strip as the initial check chain. For any business data block in the target strip, the data of the business data block is recovered through the initial verification chain to obtain the recovered data of the business data block; If there is a business data block in the target strip whose recovered data is consistent with the existing data, then the disk to which the business data block in the target strip whose recovered data is consistent with the existing data belongs will be the disk where the abnormal data is located. If there is no business data block in the target strip that is consistent with the recovered data and the existing data, the verification chain will be divided into two verification chain combinations.
5. The abnormal data location method according to claim 2, characterized in that, Dividing the check chain into two check chain combinations includes: From all the check chains of the target strip, a preset number of check chains are randomly selected to form the first check chain combination; From all the check chains of the target strip, a preset number of check chains are randomly selected to form a second check chain combination; The first check chain combination is different from the second check chain combination.
6. The abnormal data location method according to claim 2, characterized in that, The generation of the business data block combination adopts a hierarchical traversal strategy: Prioritize traversing combinations of data blocks on the disk that have recently experienced input / output errors; Next, iterate through the disk data block combinations marked as high-risk aging levels in the storage system; Finally, iterate through the remaining disk data block combinations.
7. The abnormal data location method according to claim 2, characterized in that, For any combination of service data blocks in the target strip, service data recovery is performed on the combination of service data blocks through various check chain combinations. The service data recovery results for the combination of service data blocks for each check chain combination include: For any combination of business data blocks in the target strip, a first set of data recovery equations is constructed for the combination of business data blocks using the first verification chain combination, and a second set of data recovery equations is constructed for the combination of business data blocks using the second verification chain combination. The solution result of the first set of data recovery equations is used as the business data recovery result of the first verification chain combination for the business data block combination; The solution result of the second set of data recovery equations is used as the business data recovery result of the second verification chain combination for the business data block combination.
8. The abnormal data location method according to claim 1, characterized in that, The abnormal data location method also includes: After identifying the disk containing the abnormal data, a real-time data reconstruction process is triggered, including: Data is read from normal business data blocks and verification data blocks in the target strip, and the target value of abnormal data blocks is calculated in reverse based on the verification chain equation; Overwrite the target value onto the corresponding anomalous data block.
9. The abnormal data location method according to claim 8, characterized in that, After overwriting the target value onto the corresponding abnormal data block, the abnormal data location method further includes: Verify whether the abnormal data blocks in the target strip can be successfully recovered; If recovery fails, the disk containing the abnormal data will be marked as untrusted and isolated.
10. The abnormal data location method according to claim 9, characterized in that, Verifying whether anomalous data blocks in the target strip can be successfully recovered includes: Calculate the check chain calculation result for any check chain of the target strip; If the result of the verification chain calculation is non-zero, the real-time data reconstruction process will be triggered a second time. Based on the abnormal data block recovered in the second recovery, calculate the check chain calculation result of any check chain of the target strip; If the check chain calculation result is non-zero, the physical disk is marked as untrusted and isolated.
11. The abnormal data location method according to claim 1, characterized in that, The abnormal data location method also includes: Once the disk containing the abnormal data is identified, it is marked as abnormal before any recovery is performed. The read / write policies of the storage system are then adjusted to prevent further access to the abnormal disk.
12. The abnormal data location method according to claim 1, characterized in that, The independent disk redundant array system uses dual verification technology or triple verification technology.
13. The abnormal data location method according to claim 1, characterized in that, For a target stripe containing anomalous data in a storage system, after determining the check chain calculation results of each check chain in the target stripe using the current data of each data block in the target stripe, the anomalous data location method further includes: If the calculation results of each check chain are all zero, then the data blocks in the target strip are determined to be normal, and there is no need to perform abnormal data location operations.
14. The abnormal data location method according to claim 1, characterized in that, The abnormal data location method also includes: Periodically inspect multiple stripes in the storage system, and identify target stripes with abnormal data by comparing the check chain calculation results of each stripe with the preset benchmark value.
15. The abnormal data location method according to any one of claims 1 to 14, characterized in that, The abnormal data location method also includes: When determining the result of the check chain calculation, if N consecutive stripes are detected to have non-zero results in the same check chain, it is determined that the physical disk corresponding to the check chain has a systemic failure, so as to trigger the preventive disk replacement process.
16. An abnormal data location device, characterized in that, include: The first determining module is used to determine the check chain calculation results of each check chain of a target stripe containing abnormal data in the storage system by using the current data of each data block in the target stripe; the target stripe contains at least two check data blocks, and each check data block corresponds to a different check chain; The second determining module is used to determine the disk corresponding to the check chain whose check chain calculation result is not zero if the result of each check chain is partially zero, and to determine the disk where the abnormal data is located. The data blocks include business data blocks and verification data blocks. The disks corresponding to the verification chains are the disks in the target stripes to which the verification data in the verification chains belongs. The storage system is an independent disk redundant array system.
17. An abnormal data location device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the abnormal data location method as described in any one of claims 1 to 15 when executing the computer program.
18. The abnormal data location device according to claim 17, characterized in that, The processor is integrated into the field-programmable gate array of the independent disk redundancy array controller card, and the parity chain calculation is performed through the following hardware acceleration unit: Galois multiplier array for parallel computation of verification equation coefficients; The XOR operation tree module is used for XOR chain calculations.
19. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps of the abnormal data location method as described in any one of claims 1 to 15.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the abnormal data location method as described in any one of claims 1 to 15.
Citation Information
Patent Citations
RAID (redundant array of independent disk) system and data recovery method thereof
CN102043685A
N-Code-based RAID6 disk array capacity expansion method and data filling method
CN112799604A