A decoding method, system, device and medium for a disk array

By constructing the unknown matrix relationship of TP-RAID and using Gaussian elimination to simplify decoding, the complex decoding problem in RAID technology when multiple disks fail is solved, and the speed and efficiency of erroneous data recovery are improved.

CN114756175BActive Publication Date: 2026-01-27SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210405642.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2026-01-27
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

Existing RAID technologies face complex and time-consuming decoding processes when multiple disks fail, especially in TP-RAID, where the computational load is high when recovering from three errors, impacting system performance.

Method used

An unknown matrix relation is constructed using a TP-RAID-based encoding formula, and the decoding process is simplified by Gaussian elimination. Appropriate matrix relations are selected for decoding based on different error scenarios.

Benefits of technology

It simplifies the decoding process, reduces the number of data blocks read, and improves the recovery speed of erroneous data after disk failure in TP-RAID.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114756175B_ABST
    Figure CN114756175B_ABST
Patent Text Reader

Abstract

The application discloses a decoding method, system, device and medium for a disk array, and the method comprises the following steps: constructing an unknown matrix relation formula based on a TP-RAID encoding formula; performing Gaussian elimination on the unknown matrix relation formula based on a Gaussian elimination method to obtain a Gaussian-eliminated unknown matrix relation formula; and selecting the unknown matrix relation formula or the Gaussian-eliminated unknown matrix relation formula based on an error-occurred scene to decode error-occurred data. Through the scheme, the error data can be decoded and recovered in the scene where the TP-RAID occurs disk errors, the operation process is simple, the calculation time is short, and the decoding speed when the error data is recovered after the disk occurs errors is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of storage technology, and in particular to a decoding method, system, device, and medium for disk arrays. Background Technology

[0002] With the rapid development of communication and network technologies, digital information is growing exponentially, posing significant challenges to data storage technology. The reliability of data and the energy consumption of storage systems are receiving increasing attention. Currently, with such massive data volumes, the reliability of data in a storage system is inversely proportional to the number of components it contains; that is, the more components a storage system has, the lower its reliability. According to relevant surveys, in an internet data center consisting of 600 disks, approximately 30 disks fail each month. In large-scale storage systems, the decline in data reliability caused by disk failures is a serious problem, prompting research into related fault-tolerance technologies.

[0003] In 1988, the RAID (Redundant Arrays of Independent Disks) architecture, proposed by Professor D.A. Patterson and others at the University of California, Berkeley, became a key technology for improving storage capacity. RAID combines multiple independent disks to create a large-capacity disk group. Using RAID storage technology can significantly increase storage capacity, improve system I / O request processing capabilities, and enhance data reliability through distributed storage, parallel access, and information redundancy.

[0004] After its design concept was proposed, RAID was quickly adopted by the industry. As a high-performance, high-reliability storage technology, RAID is now widely used in people's production and daily lives. RAID mainly utilizes data striping, data parity, and mirroring technologies to achieve strong performance, higher reliability, better fault tolerance, and strong scalability. Depending on different data application needs, these three technologies can be used or combined in different strategies and architectures. Therefore, according to different strategies and architectures, RAID can be divided into different levels, including RAID 0, 1, 5, 6, 10, etc.

[0005] RAID 0, or Data Stripping, is the earliest RAID mode. It's the simplest form of disk array, requiring only two or more hard drives, making it low-cost and improving overall disk performance and throughput. RAID 0 doesn't offer redundancy or error correction capabilities, but its implementation cost is the lowest. The simplest way to implement RAID 0 is to connect N identical hard drives together in hardware via an intelligent disk controller or in software via disk drivers in the operating system to create a large volume. During use, computer data is written sequentially to each hard drive. Its biggest advantage is that it can double the hard drive capacity. For example, using three 80GB hard drives in RAID 0 mode will result in a total disk capacity of 240GB. Its speed is exactly the same as a single hard drive. The biggest disadvantage is that if any one hard drive fails, the entire system will be compromised; its reliability is only 1 / N of that of a single hard drive.

[0006] RAID 1, or disk mirroring, works by mirroring data from one disk to another. This means that while data is being written to one disk, a mirror image is created on a spare disk. This maximizes system reliability and recoverability without impacting performance. As long as at least one disk in any mirror pair is usable, the system can continue operating even if half the hard drives fail. When a hard drive fails, the system ignores it and uses the remaining mirror disks for reading and writing data, providing excellent disk redundancy. While this ensures absolute data security, it significantly increases costs. Disk utilization is reduced to 50%; for example, with four 80GB hard drives, only 160GB of space is usable. Furthermore, a RAID system with a failed hard drive is unreliable and should be replaced promptly. Otherwise, if the remaining mirror disks also fail, the entire system will collapse. After replacing the drive, the original data requires a long time to synchronize with the mirror image. External access to the data is unaffected, but overall system performance will decrease. Therefore, RAID 1 is primarily used for storing critical and important data.

[0007] RAID 5 (Distributed Parity Independent Disk Architecture) uses a parity check code distributed across all disks. Here, p0 represents the parity value of stripe 0, and the others have similar meanings. RAID 5 offers high read efficiency, moderate write efficiency, and good block-level collective access efficiency. Because the parity code is distributed across different disks, reliability is improved. However, it struggles with handling data transfer parallelism, and controller design is quite challenging. With RAID 5, most data transfers operate on only one disk, allowing for parallel operations. RAID 5 has a "write penalty," meaning each write operation results in four actual read / write operations: two reads of old data and parity information, and two writes of new data and parity information.

[0008] RAID 6 is a parity array with two distributed storage options. It's an extension of RAID 5, primarily used in applications requiring absolutely error-free data. Because it introduces a second parity value, it requires N+2 disks, significantly increasing the complexity of the controller design and further enhancing the data reliability of the array. It requires more space to store the parity value and incurs a higher performance penalty during write operations.

[0009] RAID-TP uses Huawei's optimized FlexEC algorithm, which allows the system to tolerate the simultaneous failure of three disks. This not only improves reliability but also allows for longer rebuild times. Compared with traditional RAID systems, the amount of data actually read from a single disk during rebuild is reduced by 70%, thus reducing the impact on system performance.

[0010] With the advancement of storage technology, the amount of stored data is increasing, the number of disks in storage systems is growing, and the required security is becoming increasingly stringent. Therefore, it is necessary to develop TP-RAID (Triple-parity-Redundant Arrays of Independent Disks) based on the existing RAID arrays. Triple parity, as the name suggests, addresses RAID 5 and 6 by using the same method, through the Vandermonde algorithm, by adding a parity disk. This allows for recovery from any three errors, and the recovery method is similar to the RAID 5 and RAID 6 algorithms.

[0011] RAID technology is widely used in today's distributed storage servers. RAID 5, RAID 6, and TP-RAID can recover one, two, or three faulty blocks, respectively. However, each data recovery is still limited by the speed of reading large amounts of data from each disk. Summary of the Invention

[0012] In view of this, the present invention proposes a decoding method, system, device and medium for disk arrays, which simplifies the decoding operation process, reduces the amount of data blocks read during decoding, and optimizes the decoding speed compared with traditional RAID algorithms.

[0013] To achieve the above objectives, one aspect of the present invention provides a decoding method for a disk array, specifically including the following steps:

[0014] Constructing the unknown matrix relationship based on the TP-RAID encoding formula;

[0015] The unknown matrix relation is obtained by performing Gaussian elimination on the Gaussian elimination method.

[0016] Based on the scenario in which the error occurred, the data in question is decoded using either the unknown matrix relation or the unknown matrix relation after Gaussian elimination.

[0017] In some implementations, based on the scenario in which the error occurred, the data in which the error occurred is decoded using either the unknown matrix relation or the unknown matrix relation after Gaussian elimination, including:

[0018] If any of the three disks that make up the TP-RAID array encounter an error, the erroneous data is decoded based on the error scenario, using either the unknown matrix relation or the unknown matrix relation after Gaussian elimination.

[0019] In some implementations, based on the scenario in which the error occurred, the data in which the error occurred is decoded using either the unknown matrix relation or the unknown matrix relation after Gaussian elimination, including:

[0020] If one or two disks in the TP-RAID array encounter an error, the erroneous data is decoded based on the unknown matrix relationship and value selection strategy after Gaussian elimination.

[0021] In some implementations, the relational expression of the unknown matrix after Gaussian elimination includes the unknown matrix;

[0022] Based on the unknown matrix relationship and value selection strategy after Gaussian elimination, the erroneous data is decoded, including:

[0023] After taking values ​​for the positions of the data that did not have errors in the unknown matrix based on the value selection strategy, and then substituting them into the unknown matrix relationship after Gaussian elimination, the values ​​of the data that had errors are obtained.

[0024] In some implementations, the relationship of the unknown matrix is ​​as follows:

[0025] ,

[0026] in, Let D be an unknown matrix. x D y D z These represent the data where errors occurred. Let D be a parameter matrix, where x, y, and z represent D respectively. x D y D z The corresponding position Given a matrix of numbers, a, b, and c represent D respectively. x D y D z The corresponding known data.

[0027] In some implementations, the relationship between the unknown matrix after Gaussian elimination is as follows:

[0028] .

[0029] In another aspect of this invention, a decoding system for a disk array is also provided, comprising:

[0030] A construction module, configured to construct an unknown matrix relationship based on the TP-RAID encoding formula;

[0031] A conversion module is configured to perform Gaussian elimination on the unknown matrix relation based on Gaussian elimination to obtain the unknown matrix relation after Gaussian elimination.

[0032] The decoding module is configured to decode the erroneous data based on the unknown matrix relation or the unknown matrix relation after Gaussian elimination, depending on the scenario in which the error occurred.

[0033] In some implementations, the decoding module is specifically configured as follows:

[0034] If any of the three disks that make up the TP-RAID array encounter an error, the erroneous data is decoded based on the error scenario, using either the unknown matrix relation or the unknown matrix relation after Gaussian elimination.

[0035] In another aspect of the present invention, a computer device is provided, comprising: at least one processor; and a memory storing a computer program executable on the processor, the computer program performing the steps of the method described above when executed by the processor.

[0036] In another aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method steps.

[0037] This invention has at least the following beneficial technical effects: it constructs an unknown matrix relation based on the encoding formula of TP-RAID; it performs Gaussian elimination on the unknown matrix relation to obtain a Gaussian-eliminated unknown matrix relation; and it selects either the unknown matrix relation or the Gaussian-eliminated unknown matrix relation based on the error scenario to decode the erroneous data, thus realizing the decoding and recovery of erroneous data in the scenario of disk error in TP-RAID. The calculation process is simple, the calculation time is short, and the decoding speed is improved when recovering erroneous data after disk error. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art 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 embodiments can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a RAID 6 configuration consisting of 5 disks.

[0040] Figure 2 This is a TP-RAID configuration consisting of 6 disks.

[0041] Figure 3 This is a block diagram of an embodiment of the decoding method for a disk array provided by the present invention;

[0042] Figure 4 This is a schematic diagram of an embodiment of the decoding system for a disk array provided by the present invention;

[0043] Figure 5 A schematic diagram of the structure of an embodiment of the computer device provided by the present invention;

[0044] Figure 6 This is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.

[0046] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two entities or parameters with the same name but different names. It is clear that "first" and "second" are only for the convenience of expression and should not be construed as limiting the embodiments of the present invention. Subsequent embodiments will not explain this in detail.

[0047] Traditional RAID 6, after being encoded and configured, can recover from any two or fewer errors. The encoding principle of RAID 6 is as follows:

[0048] (1)

[0049] Wherein d1~d m This indicates that p1 and p2 represent the data in any strip of the RAID6 array, where p1 and p2 represent d1~d2. m The two parity blocks generated by RAID 6 encoding of the stripe have parameters preceding d and p corresponding to the positions of d and p. The traditional RAID 6 parameter assignment method conforms to the method given in formula (1), that is, all parameters in the first row are 1, and the parameters in the second row are constructed in the 1234… manner according to the construction principle of Vandermonde formula. Different positions of the parity blocks result in different corresponding parameters.

[0050] With the increasing demands for data storage, disk security, and RAID group security, the ability to recover from any three errors in a RAID group has gradually become a mainstream requirement, leading to the development of TP-RAID. TP-RAID refers to a RAID group that can recover from any three errors at the cost of three parity checks. Most constructed ternary linear equations can fulfill the requirements of TP-RAID, but because RAID groups need to support both upgrades and downgrades, TP-RAID construction must be based on RAID5 and RAID6, meaning the constructed TP-RAID must first meet the encoding and decoding requirements of formula (1). Therefore, the formula for a typical constructed TP-RAID is:

[0051] (2)

[0052] Among them, p3 is the third check code, which is a new check code added compared to the two check codes of RAID6. The first two lines of the relation are derived from the same conditions of formula (1). The third line is the relation added based on the Vandermonde construction formula. Specifically, as long as the Vandermonde relation is satisfied, or any other condition that makes p3 have a solution under the condition that the first two lines of the relation are satisfied, it is acceptable.

[0053] In the actual setup of a RAID group, load balancing also needs to be ensured, causing the positions of the parameters preceding d and p to change based on the actual load balancing. Figure 1As shown, this is a RAID 6 array consisting of 5 disks and 3 data disks, built using a left-rotating misaligned load balancing method.

[0054] Figure 1 There are 5 disks, corresponding to the 5 columns in the diagram, one disk per column. Each disk is divided into 5 stripes. 3 disks are used to store user data. Each stripe on each disk follows a left-handed, non-aligned load balancing method, meaning each stripe has 3 data blocks and 2 parity blocks. The positions of the data blocks and parity blocks change according to the load balancing order within each stripe. The encoding parameters (1, 2, 3…(m+1)…) of the parity block in each stripe follow a specific pattern. Figure 1 The parameter values ​​given in the first row are assigned values. Therefore, an example illustrating the stripe coding in the first row is shown below:

[0055] (3)

[0056] Similarly, for the above situation, adding one disk to form a TP-RAID will result in a TP-RAID structure as follows: Figure 2 As shown, TP-RAID is constructed with 6 disks, 3 data disks, and a load balancing method based on left-hand non-alignment.

[0057] Accordingly, the encoding of the first stripe is illustrated as follows:

[0058] (4)

[0059] The decoding method for TP-RAID groups is similar to that of RAID5 and RAID6, as detailed below:

[0060] 1) When an error occurs and recovery is needed

[0061] At this point, RAID5 is used for recovery. All remaining data blocks and parity blocks are read, and all are XORed to obtain the data that needs to be recovered.

[0062] Because each data block is relatively large and is limited by the speed limit of the corresponding disk read speed, namely IIPOS (Input / Output Operations Per Second), data recovery from errors is slow.

[0063] Taking the encoding case of formula (2) as an example, if an error occurs in D0 and recovery is required, the recovery method at this time is as follows:

[0064] (5)

[0065] 2) When two errors occur and recovery is needed

[0066] At this point, RAID6 is used for recovery. All remaining data blocks and parity blocks are read, multiplied by the parameters according to RAID6, and then XORed to obtain the data that needs to be recovered.

[0067] Because each data block is relatively large and is limited by the speed limit of the corresponding disk read speed, namely IIPOS (Input / Output Operations Per Second), data recovery from errors is slow.

[0068] Taking the encoding case of formula (2) as an example, if errors occur in D0 and D1 and recovery is required, the recovery method in this case is as follows:

[0069] (6)

[0070] 3) When three errors occur and recovery is required

[0071] At this point, it is necessary to solve the three-variable linear equation of formula (4) to obtain the relational expression that needs to be restored. The solution is relatively complicated and requires a long calculation time.

[0072] Based on the above objectives, a first aspect of the present invention provides an embodiment of a decoding method for a disk array. For example... Figure 3 As shown, it includes the following steps:

[0073] Step S101: Construct the unknown matrix relationship based on the TP-RAID encoding formula;

[0074] Step S103: Perform Gaussian elimination on the unknown matrix relation based on Gaussian elimination method to obtain the unknown matrix relation after Gaussian elimination;

[0075] Step S105: Based on the scenario in which the error occurred, select the unknown matrix relation or the unknown matrix relation after Gaussian elimination to decode the data in which the error occurred.

[0076] Specifically, in step S101, the encoding formula for TP-RAID is the formula (2) mentioned above:

[0077]

[0078] Based on formula (2), construct the unknown matrix relation. The unknown matrix relation is a matrix that represents the relationship between the unknown and the known, including the unknown matrix, parameter matrix and known matrix.

[0079] There are three scenarios in which TP-RAID errors occur: one disk fails, two disks fail, or three disks fail (i.e., the disks are lost from the TP-RAID).

[0080] Since TP-RAID is mainly used to recover from scenarios where one, two, or three disks have failed, the unknown matrix is ​​a 3-row × 1-column matrix.

[0081] The unknown matrix relation is constructed based on the most complex scenario of three disk errors. Therefore, the unknown matrix in the unknown matrix relation contains three data, such as D1, D2, and D3, which correspond to the three error data in each stripe. The parameter matrix is ​​composed of the coefficients corresponding to D1, D2, and D3 in formula (2). The known matrix is ​​obtained by XORing the remaining data other than the error data in formula (2).

[0082] Based on the relationship between the unknown matrix, the erroneous data in the disk array under the scenario of three disks encountering errors can be decoded and the erroneous data can be recovered.

[0083] In steps S103 and S105, Gaussian elimination is performed on the unknown matrix relationship. Based on Gaussian elimination, the known matrix is ​​transformed into a matrix relationship corresponding to the location of the erroneous data. This allows for direct substitution of the location of the erroneous data into the Gaussian-eliminated matrix relationship to decode and recover the erroneous data when a disk error occurs. The specific decoding and recovery process is discussed in detail below, depending on the different error scenarios:

[0084] For scenarios where three disks in a TP-RAID array fail, the erroneous data (three data points) in each stripe can be directly substituted into the matrix relationship after Gaussian elimination for decoding. This allows for the recovery of the erroneous data in each stripe, thus recovering the failed disk. Compared to the traditional TP-RAID method of solving a system of three linear equations for data decoding and recovery when three disks fail, this simplifies the calculation process, reduces computation time, and improves the decoding speed when disk errors occur.

[0085] For TP-RAID scenarios where one or two disks fail, since the unknown matrix is ​​a 3x1 matrix, it's necessary to construct the location of virtual error data. The locations of these virtual error data and the actual error data are then substituted into the matrix relationship after Gaussian elimination for decoding to recover the erroneous data. Compared to traditional TP-RAID where all remaining data blocks and parity blocks are read and XORed to obtain the recoverable data when one or two disks fail, this reduces the need to read data blocks and parity blocks, effectively improving decoding speed when disk errors occur.

[0086] Error data decoding and recovery here is based on striping. For example, if three disks have errors, then the data in the corresponding data blocks of each stripe of the three disks has also been corrupted. The error data of each stripe can be decoded and recovered based on the above method.

[0087] It should be noted that, based on the method of this invention, different unknown matrix relationships can be constructed for different application scenarios to achieve recovery in scenarios where multiple disks fail, and are not limited to the scenario where one, two, or three disks fail as described above. Since TP-RAID mainly supports data recovery when one, two, or three disks fail, scenarios involving data recovery after more disks fail are not common. Instead, the focus is on rebuilding the TP-RAID disks. Therefore, this embodiment only describes the scenario where one, two, or three disks fail.

[0088] In this embodiment, an unknown matrix relation is constructed based on the encoding formula of TP-RAID; Gaussian elimination is performed on the unknown matrix relation to obtain the Gaussian-eliminated unknown matrix relation; depending on the error scenario, the unknown matrix relation or the Gaussian-eliminated unknown matrix relation is selected to decode the erroneous data. This realizes the decoding and recovery of erroneous data in the scenario of disk error in TP-RAID. The operation process is simple, the calculation time is short, and the decoding speed is improved when recovering erroneous data after disk error.

[0089] In some implementations, based on the scenario in which the error occurred, the data in which the error occurred is decoded using either the unknown matrix relation or the unknown matrix relation after Gaussian elimination, including:

[0090] If any of the three disks that make up the TP-RAID array encounter an error, the erroneous data is decoded based on the error scenario, using either the unknown matrix relation or the unknown matrix relation after Gaussian elimination.

[0091] Specifically, for a scenario where three disks in a TP-RAID array fail, the positions corresponding to the erroneous data (three in total) in each stripe can be directly substituted into the unknown matrix relationship after Gaussian elimination for decoding. This allows for the recovery of the erroneous data in each stripe, thereby recovering the erroneous disk. Compared to the traditional TP-RAID method of solving a system of three linear equations for data decoding and recovery when three disks fail, this simplifies the calculation process, reduces computation time, and improves the decoding speed when disk errors occur.

[0092] In some implementations, based on the scenario in which the error occurred, the data in which the error occurred is decoded using either the unknown matrix relation or the unknown matrix relation after Gaussian elimination, including:

[0093] If one or two disks in the TP-RAID array encounter an error, the erroneous data is decoded based on the unknown matrix relationship and value selection strategy after Gaussian elimination.

[0094] Specifically, in the scenario where one or two disks in TP-RAID fail, since the unknown matrix is ​​a 3-row × 1-column matrix, when recovering the erroneous data for each stripe, it is necessary to construct the location of the virtual erroneous data. The location of the virtual erroneous data and the location of the actual erroneous data are then substituted into the matrix relationship after Gaussian elimination for decoding to recover the erroneous data.

[0095] A further value selection strategy considers the relationship between the location of virtual error data and the location of actual error data, specifically requiring that the following requirements be met simultaneously:

[0096] 1) The values ​​at the positions of the three data points contain 1;

[0097] 2) The position values ​​of the three data points are in a multiple relationship.

[0098] The above value selection strategy is illustrated with an example:

[0099] For the case of a single error, assuming the error corresponds to D1 and its position b is 2, then based on the above relationship, we take a as 1 and c as twice the relationship of 2, and get c=4;

[0100] For the case of a single error, assuming the error corresponds to D1 and its position b is 1, then based on the above relationship, we take a as 2 and c as twice the relationship of 2, thus obtaining c=4;

[0101] For the case where two errors occur, assuming that the positions of the errors D1 and D2 are 2 and 3 respectively, then based on the above relationship, we take a as 1.

[0102] In this embodiment, compared to the traditional TP-RAID where all remaining data blocks and parity blocks are read and XORed to obtain the data to be recovered when one or two disks fail, this embodiment reduces the number of data blocks read per stripe when one disk fails and reduces the number of data blocks read per stripe when two disks fail. This greatly improves the decoding speed when disk errors occur.

[0103] In some implementations, the relational expression of the unknown matrix after Gaussian elimination includes the unknown matrix;

[0104] Based on the unknown matrix relationship and value selection strategy after Gaussian elimination, the erroneous data is decoded, including:

[0105] After taking values ​​for the positions of the data that did not have errors in the unknown matrix based on the value selection strategy, and then substituting them into the unknown matrix relationship after Gaussian elimination, the values ​​of the data that had errors are obtained.

[0106] In some implementations, the relationship of the unknown matrix is ​​as follows:

[0107] ,

[0108] in, Let D be an unknown matrix. x D y D z These represent the data where errors occurred. Let D be a parameter matrix, where x, y, and z represent D respectively. x D y D z The corresponding position Given a matrix of numbers, a, b, and c represent D respectively. x D y D z The corresponding known data.

[0109] In some implementations, the relationship between the unknown matrix after Gaussian elimination is as follows:

[0110] .

[0111] The specific implementation of the present invention will be described below through another specific embodiment.

[0112] The unknown matrix relationship is constructed by using the encoding formula (2) of TP-RAID. Since TP-RAID can recover from the simultaneous failure of up to three disks, there are three unknowns in each stripe that need to be solved. Since the encoding and decoding have the same unknown relationship, the unknowns during encoding can be changed based on formula (2) to obtain:

[0113] (7)

[0114] The left side of formula (7) can be viewed as a matrix composed of unknowns, i.e., the unknown matrix, and the right side can be viewed as a new matrix obtained from the knowns, i.e., the known matrix. Let a, b, and c represent these. Thus, the relationship between the unknown matrix and the known matrix can be constructed as follows:

[0115] (8)

[0116] in, Let D be an unknown matrix. x D y D z These represent the data where errors occurred. Let D be a parameter matrix, where x, y, and z represent D respectively. x D y D z The corresponding position Given a matrix of numbers, a, b, and c represent D respectively. x D y D z The corresponding known data.

[0117] Specifically, assuming that data errors occur in p1, p2, and p3 of a certain band, combining formulas (7) and (8), we can see that the values ​​of a, b, and c are:

[0118] (9)

[0119] therefore,

[0120] (10)

[0121] Extracting the parameters of p1, p2, and p3 yields the parameter matrix H, which, when substituted into formula (9), gives:

[0122] (11)

[0123] Therefore, solving for each unknown p1, p2, p3 in the unknown matrix can be simplified to the matrix inversion operation, as follows:

[0124] (12)

[0125] Here, E represents the identity matrix, which is a matrix where the elements on the main diagonal are 1s and the rest are 0s. The above solution process can be directly called in programs such as MATLAB, without the need for manual solution.

[0126] Combining formulas (4), (7), and (8), the erroneous data p1, p2, and p3 can be decoded and recovered. The process is as follows:

[0127] (13)

[0128] The above completes the decoding of three errors in TP-RAID.

[0129] Next, we will decode single errors and two errors.

[0130] Based on the three disk array error decoding methods described above, decoding and recovery can be achieved when one or two disks encounter errors.

[0131] Since there is actually no scenario of three disk errors when one or two disk errors occur in TP-RAID, the condition for building the H matrix in formula (11) does not exist. It is necessary to assume that there are two or one other errors to build the H matrix. However, different ways of building the H matrix will lead to different computational complexities. In order to achieve a simple computational process, the parameter matrix H is subjected to Gaussian elimination to obtain the parameter matrix H after Gaussian elimination. The specific process is as follows:

[0132] Based on Gaussian elimination, we can obtain the following from equation (8):

[0133] (14)

[0134] The resulting matrix relation after Gaussian elimination is thus obtained. This is the parameter matrix after Gaussian elimination. Given a known matrix after Gaussian elimination, decoding of erroneous data can be completed simply by substituting the erroneous data into this matrix, further simplifying the decoding process. Furthermore, Gaussian elimination can also be used to recover erroneous data in TP-RAID systems that contain one or two disk errors. This involves substituting the positions corresponding to the erroneous data into the matrix relationship after Gaussian elimination and combining this with the known numbers a, b, and c to recover the erroneous data.

[0135] To further simplify the calculation, a value selection strategy can be constructed. Based on this strategy, values ​​are selected for the positions corresponding to the unknowns in the unknown matrix. x, y, and z must satisfy the following conditions:

[0136] 1) x, y, z should be as close to 1 as possible.

[0137] 2) x, y, z are multiples of each other

[0138] Specific examples are as follows:

[0139] For the case of a single error, assuming the error corresponds to D1 and its position y is 2, then based on the above relationship, taking x as 1 and z as twice the relationship of 2, we get z=4;

[0140] Then, substituting x, y, and z into formula (14) yields:

[0141] (15)

[0142] Substituting a, b, and c, we can obtain the value of D1. At this point, each stripe requires two fewer data blocks to be read, which greatly improves the speed of decoding and recovering erroneous data.

[0143] For the case where two errors occur, assuming the positions of the errors D1 and D2 are 2 and 3 respectively, then based on the above relationship, taking x as 1, substituting it into formula (14) yields:

[0144] (16)

[0145] Substituting a, b, and c, we can obtain the values ​​of D1 and D2. At this point, each stripe requires one less data block to read, which greatly improves the speed of decoding and recovering erroneous data.

[0146] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 4 As shown, embodiments of the present invention also provide a decoding system for a disk array, comprising:

[0147] Construction module 110, configured to construct an unknown matrix relationship based on the TP-RAID encoding formula;

[0148] The conversion module 120 is configured to perform Gaussian elimination on the unknown matrix relation based on Gaussian elimination to obtain the unknown matrix relation after Gaussian elimination.

[0149] The decoding module 130 is configured to decode the erroneous data based on the unknown matrix relation or the unknown matrix relation after Gaussian elimination, depending on the scenario in which the error occurred.

[0150] In some embodiments, the decoding module 130 is specifically configured as follows:

[0151] If any of the three disks that make up the TP-RAID array encounter an error, the erroneous data is decoded based on the error scenario, using either the unknown matrix relation or the unknown matrix relation after Gaussian elimination.

[0152] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 5 As shown, an embodiment of the present invention also provides a computer device 30, which includes a processor 310 and a memory 320. The memory 320 stores a computer program 321 that can be run on the processor. When the processor 310 executes the program, it performs the steps of the method described above.

[0153] The memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the decoding method for disk arrays described in the embodiments of this application. The processor executes various functional applications and data processing of the device by running the non-volatile software programs, instructions, and modules stored in the memory, thereby implementing the decoding method for disk arrays described in the above embodiments.

[0154] The memory may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0155] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 6 As shown, embodiments of the present invention also provide a computer-readable storage medium 40, which stores a computer program 410 that, when executed by a processor, performs the methods described above.

[0156] Finally, it should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium for the program can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The above computer program embodiments can achieve the same or similar effects as any of the corresponding foregoing method embodiments.

[0157] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.

[0158] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. The sequence numbers of the disclosed embodiments of this invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.

[0159] It should be understood that, as used herein, the singular form “a” is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, “and / or” refers to any and all possible combinations of one or more of the associated listed items.

[0160] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

Claims

1. A decoding method for a disk array, characterized in that, include: Constructing the unknown matrix relationship based on the TP-RAID encoding formula; The unknown matrix relation is obtained by performing Gaussian elimination on the Gaussian elimination method. If any of the three disks that make up the TP-RAID encounter an error, the erroneous data is decoded based on the unknown matrix relationship after Gaussian elimination. If one or two disks in the TP-RAID array encounter an error, the erroneous data is decoded based on the unknown matrix relationship and value selection strategy after Gaussian elimination. The relationship between the unknown matrix is ​​as follows: , in, Let D be an unknown matrix. x D y D z These represent the data where errors occurred. Let D be a parameter matrix, where x, y, and z represent D respectively. x D y D z The corresponding position Given a matrix of numbers, a, b, and c represent D respectively. x D y D z The corresponding known data; The relationship between the unknown matrix after Gaussian elimination is as follows: 。 2. The method according to claim 1, characterized in that, The relationship between the unknown matrix after Gaussian elimination includes the unknown matrix; Based on the unknown matrix relationship and value selection strategy after Gaussian elimination, the erroneous data is decoded, including: After taking values ​​for the positions of the data that did not have errors in the unknown matrix based on the value selection strategy, and then substituting them into the unknown matrix relationship after Gaussian elimination, the values ​​of the data that had errors are obtained.

3. A decoding system for a disk array, characterized in that, include: A construction module, configured to construct an unknown matrix relationship based on the TP-RAID encoding formula; A conversion module is configured to perform Gaussian elimination on the unknown matrix relation based on Gaussian elimination to obtain the unknown matrix relation after Gaussian elimination. The decoding module is configured to decode the erroneous data based on the unknown matrix relationship after Gaussian elimination if an error occurs in the three disks that make up the TP-RAID. If one or two disks in the TP-RAID array encounter an error, the erroneous data is decoded based on the unknown matrix relationship and value selection strategy after Gaussian elimination. The relationship between the unknown matrix is ​​as follows: , in, Let D be an unknown matrix. x D y D z These represent the data where errors occurred. Let D be a parameter matrix, where x, y, and z represent D respectively. x D y D z The corresponding position Given a matrix of numbers, a, b, and c represent D respectively. x D y D z The corresponding known data; The relationship between the unknown matrix after Gaussian elimination is as follows: 。 4. A computer device, comprising: At least one processor; as well as A memory storing a computer program executable on the processor, characterized in that the processor executes the steps of the method as described in claim 1 or 2 when executing the program.

5. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it performs the steps of the method as described in claim 1 or 2.

Citation Information

Patent Citations

  • A three-fault-tolerant data layout method in an RAID storage system

    CN109086000A

  • A RAID 6 encoding method friendly to data updates and single disk error fixes

    CN109358980A