Method and device for recovering disk data

By introducing multiple verification chains and encoding matrices into the RAID6 array, the problem of insufficient fault tolerance of existing RAID6 arrays is solved, and data recovery is achieved when multiple disks fail at the same time.

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

Patent Information

Application Number
CN202510058402.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The fault tolerance of existing RAID6 arrays is relatively low, and it is not effective tolerate more than two disks fail simultaneously.

Method used

By introducing diagonal verification chains, anti-diagonal verification chains and new verification chains into the disk array, an encoding matrix is ​​formed, and the transformation matrix is ​​used to restore the data in the failed disk.

Benefits of technology

Improves fault tolerance of RAID6 arrays, enabling them to effectively recover data when multiple disks fail at the same time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066855A_ABST
    Figure CN120066855A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and a device for recovering disk data, which are applied to a disk array, the disk array is composed of a plurality of disks, the maximum number of simultaneously invalid disks allowed by the disk array is r, and r is an integer greater than 2, and the method comprises the following steps: under the condition that the number of simultaneously invalid disks of the disk array is n, obtaining coded data from the disk array, each piece of coding data in the coding matrix respectively belongs to a diagonal check chain, a reverse diagonal check chain and a newly added check chain, and n is an integer greater than or equal to 1 and less than or equal to r; obtaining a transformation matrix of the disk array; and recovering the data in the invalid disk through the transformation matrix and the coding matrix. According to the invention, the problem that the fault-tolerant capability of the RAID6 array is relatively low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] An embodiment of the present invention relates to the field of communications, and in particular, to a method and apparatus for recovering disk data. Background Art

[0002] The RAID6 structure in a disk array can still recover data after any two disks in the array fail simultaneously, thus significantly improving the reliability of the storage system. The fault tolerance of the RAID6 array comes from the underlying RAID6 encoding. The performance of the RAID6 encoding largely determines the overall performance of the RAID6 array.

[0003] The existing RAID6 arrays have relatively low fault tolerance and can tolerate at most two disks failing simultaneously. As the disk scale of the storage system and the complexity of the system architecture increase, the situation where more than two disks fail simultaneously becomes more frequent. Therefore, multi-fault tolerance issues must be considered when designing an efficient and reliable storage system.

[0004] In view of the above problems, there is currently no effective solution. Summary of the Invention

[0005] An embodiment of the present invention provides a method and apparatus for recovering disk data to at least solve the problem of relatively low fault tolerance of the RAID6 array in the related art.

[0006] According to an embodiment of the present invention, there is provided a method for recovering disk data, which is applied to a disk array composed of multiple disks. The maximum number of disks that can fail simultaneously in the disk array is r, where r is an integer greater than 2, and the method includes: when the number of disks that have failed simultaneously in the disk array is n, obtaining encoded data from the disk array to obtain an encoding matrix, where each encoded data in the encoding matrix belongs to a diagonal parity chain, an anti-diagonal parity chain, and a new parity chain, and n is an integer greater than or equal to 1 and less than or equal to r; obtaining a transformation matrix of the disk array; and recovering the data in the failed disks through the transformation matrix and the encoding matrix.

[0007] In an exemplary embodiment, the disk array includes m sub-stripes, each sub-stripe includes p disks, the diagonal parity chain includes m*p diagonal parity elements, the anti-diagonal parity chain includes m*p anti-diagonal parity elements, the block for storing the diagonal parity elements in each disk is a diagonal parity block, the block for storing the anti-diagonal parity elements in each disk is an anti-diagonal parity block, each disk includes one diagonal parity block and one anti-diagonal parity block, and each disk further includes p - 2 data blocks for storing the encoded data.

[0008] In an exemplary embodiment, the relationship between each anti-diagonal check element in the anti-diagonal check chain and each data block in the disk array is as follows:

[0009]

[0010] Wherein, is the anti-diagonal check element stored in the block at the (p - 2)-th row and the j-th column in the disk array, is the exclusive OR operation, is the rounding operation, is the encoded data re-stored in the block at the i-th row and the -th column.

[0011] In an exemplary embodiment, the relationship between each diagonal check element in the diagonal check chain and each data block in the disk array is as follows:

[0012]

[0013] Wherein, is the diagonal check element stored in the block at the (p - 2)-th row and the j-th column in the disk array, is the exclusive OR operation, is the rounding operation, is the encoded data re-stored in the block at the i-th row and the -th column.

[0014] In an exemplary embodiment, the newly added check chain includes a plurality of newly added check elements, and the newly added check elements are stored in other disks in the disk array.

[0015] In an exemplary embodiment, the relationship between each newly added check element in the newly added check chain and each data block in the disk array is as follows:

[0016]

[0017] Wherein, is the newly added check element stored in the block at the ip-th row and the mp + j-th column in the disk array, is the exclusive OR operation, is the encoded data re-stored in the block at the k-th row and the -th column, && represents AND.

[0018] In an exemplary embodiment, recovering the data in the failed disk through the transformation matrix and the encoding matrix includes:

[0019] Obtaining the original data matrix B through the following formula:

[0020]

[0021] Among them, H is the transformation matrix and D is the encoding matrix.

[0022] According to another embodiment of the present invention, there is provided a device for restoring disk data, which is applied to a disk array. The disk array is composed of multiple disks, and the maximum number of disks that can fail simultaneously in the disk array is r, where r is an integer greater than 2. The device includes: a first acquisition module, configured to obtain encoded data from the disk array to obtain an encoding matrix when the number of disks that fail simultaneously in the disk array is n, wherein each encoded data in the encoding matrix belongs to a diagonal parity chain, an anti-diagonal parity chain, and a newly added parity chain, and n is an integer greater than or equal to 1 and less than or equal to r; a second acquisition module, configured to acquire the transformation matrix of the disk array; and a restoration module, configured to restore the data in the failed disks through the transformation matrix and the encoding matrix.

[0023] According to still another embodiment of the present invention, there is further provided a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.

[0024] According to still another embodiment of the present invention, there is further provided an electronic device including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0025] According to still another embodiment of the present invention, there is further provided a computer program product including a computer program, wherein when the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.

[0026] Through the present invention, since the disk array is composed of multiple disks, the maximum number of disks that can fail simultaneously in the disk array is r, where r is an integer greater than 2, and each encoded data in the encoding matrix obtained by the disk array belongs to a diagonal parity chain, an anti-diagonal parity chain, and a newly added parity chain. When the number of disks that fail simultaneously in the disk array is n, the data in the failed disks is restored through the transformation matrix and the encoding matrix. The purpose of the fault tolerance ability of the RAID6 array being greater than two disks is achieved. Therefore, the problem of relatively low fault tolerance ability of the RAID6 array can be solved, and the effect of improving the fault tolerance ability of the AID6 array can be achieved. Description of the Drawings

[0027] Figure 1 is a hardware structure block diagram of a mobile terminal for a method of restoring disk data according to an embodiment of the present invention;

[0028] Figure 2 is a flowchart of a method for restoring disk data according to an embodiment of the present invention;

[0029] Figure 3 is a schematic diagram of an encoded data structure according to an embodiment of the present invention;

[0030] Figure 4 is a schematic diagram of a transformation matrix according to an embodiment of the present invention;

[0031] Figure 5 is a schematic diagram of a vector composition according to an embodiment of the present invention;

[0032] Figure 6 is a structural block diagram of a device for restoring disk data according to an embodiment of the present invention. Detailed implementation manners

[0033] In the following, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in conjunction with the embodiments.

[0034] The following explanations are given for the keywords involved in this application:

[0035] RAID: Redundant Array of Independent Disks, an array with redundancy composed of independent disks.

[0036] Strip: Also known as stride; it is a set of position-related strips on different partitions of the array and is the unit for organizing chunks on different partitions.

[0037] Chunk: Also known as strip / chunk; a partition is divided into multiple blocks (Blocks) of equal size and adjacent addresses, and these blocks are called chunks. Chunks are usually considered as elements of strips. The virtual disk maps the address of the virtual disk to the address of the member disk in units of it.

[0038] Data chunk: The chunk in the strip used to store valid data.

[0039] Parity chunk: The chunk in the strip used to store parity data.

[0040] p: The number of disks.

[0041] Di: The disk number where it is located.

[0042] mi: The element not included in the diagonal parity chain sequence.

[0043] j: The record of the optimized array group number.

[0044] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence.

[0045] The method embodiments provided in the embodiments of the present application can be executed on a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal for a method of restoring disk data according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above-mentioned mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal may further include more or fewer components than Figure 1 shown in the figure, or have a different configuration from Figure 1 shown in the figure.

[0046] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the method of restoring disk data in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0047] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC for Network Interface Controller), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (abbreviated as RF) module, which is used to communicate with the Internet wirelessly.

[0048] In this embodiment, a method for restoring disk data running on the above-mentioned mobile terminal is provided, which is applied to a disk array. The disk array is composed of multiple disks, and the maximum number of disks that can fail simultaneously in the disk array is r, where r is an integer greater than 2. Figure 2 It is a flowchart of the method for restoring disk data according to an embodiment of the present invention, as Figure 2 shown. The process includes the following steps:

[0049] Step S202, when the number of disks that fail simultaneously in the disk array is n, obtain encoded data from the disk array to obtain an encoding matrix, where each encoded data in the encoding matrix belongs to a diagonal parity chain, an anti-diagonal parity chain, and a new parity chain respectively, and n is an integer greater than or equal to 1 and less than or equal to r;

[0050] Step S204, obtain the transformation matrix of the disk array;

[0051] Step S206, restore the data in the failed disks through the transformation matrix and the encoding matrix.

[0052] Optionally, the execution subject of the above steps can be a background processor, or other devices with similar processing capabilities, or a machine integrating at least an image acquisition device and a data processing device. Among them, the image acquisition device can include graphic acquisition modules such as cameras, and the data processing device can include terminals such as computers and mobile phones, but is not limited thereto.

[0053] Through the above steps, since the disk array is composed of multiple disks, the maximum number of disks that can fail simultaneously in the disk array is r, where r is an integer greater than 2, and each encoded data in the encoding matrix obtained by the disk array belongs to a diagonal parity chain, an anti-diagonal parity chain, and a new parity chain respectively. When the number of disks that fail simultaneously in the disk array is n, the data in the failed disks is restored through the transformation matrix and the encoding matrix. The purpose of the RAID6 array having a fault tolerance greater than two disks is achieved. Therefore, the problem of relatively low fault tolerance of the RAID6 array can be solved, and the effect of improving the fault tolerance of the AID6 array can be achieved.

[0054] The execution order of step S202 and step S204 can be interchanged, that is, step S104 can be executed first, and then S102 can be executed.

[0055] As an optional implementation manner, it can be used It is used to represent a fault-tolerant scheme based on sub-strip encoding. Among them, p represents the parameter of X-code (each sub-strip includes p disks), m represents the number of sub-strips (or X-codes in a strip), and r represents the maximum number of disks that are allowed to fail simultaneously.

[0056] Specifically, the disk array includes m sub-strips, each sub-strip includes p disks, the diagonal parity chain includes m * p diagonal parity elements, the anti-diagonal parity chain includes m * p anti-diagonal parity elements, the block for storing diagonal parity elements in each disk is the diagonal parity block, the block for storing anti-diagonal parity elements in each disk is the anti-diagonal parity block, each disk includes a diagonal parity block and an anti-diagonal parity block, and each disk also includes p - 2 data blocks, and the data blocks are used to store the encoded data.

[0057] Take as an example. As Figure 3 shown, a RAID6 composed of 12 disks (component disks, columns 0 - 11 in Figure 3 , each column corresponds to a disk). Each row includes 2 sub-strips (the first X-code and the second X-code), select 2 (m = 2) X-codes spliced as sub-strips, and additionally add 2 disks (the 10th and 11th columns) to store the parity blocks of the newly added parity chain. Each column consists of 3 data blocks and 2 parity blocks. Taking the 0th column as an example, it includes data blocks: , , , and parity blocks: A, .

[0058] The newly added parity chain can be regarded as extracting data blocks on a diagonal line with a slope of 2 and then performing an exclusive OR operation. The capital letters A - G in the figure represent the anti-diagonal parity chain, the Greek letters α - ξ represent the diagonal parity chain, and the numbers 1 - 10 represent the newly added parity chain. Each encoded data stored in each data block in the figure contains three parity chain serial numbers. For example, the data block (D, γ, 1) belongs to the anti-diagonal parity chain D, the diagonal parity chain γ, and the newly added parity chain 1. Obviously, the maximum fault tolerance of the 3 types of parity chains in the figure is 3. For the case where 4 disks fail simultaneously, it is necessary to newly add extracting data blocks on a diagonal line with a slope of -2 and then performing an exclusive OR operation. And additionally add 2 nodes to store these parity blocks.

[0059] Based on the X-code+(5, 2, 3) encoding process, the relationship between the parity elements in each parity chain and each data block can be summarized as follows:

[0060] As an optional implementation manner, the relationship between each anti-diagonal parity element in the anti-diagonal parity chain and each data block in the disk array is:

[0061]

[0062] Among them, is the anti-diagonal check element stored in the block at the (p - 2)-th row and j-th column in the disk array, is the exclusive OR operation, is the integer part operation, is the encoded data re-stored in the block at the i-th row and -th column.

[0063] The relationship between each diagonal check element in the diagonal check chain and each data block in the disk array is:

[0064]

[0065] Among them, is the diagonal check element stored in the block at the (p - 2)-th row and j-th column in the disk array, is the exclusive OR operation, is the integer part operation, is the encoded data re-stored in the block at the i-th row and -th column.

[0066] The new check chain includes multiple new check elements, and the new check elements are stored in other disks in the disk array, such as Figure 3 the new check elements in the 10th column and 11th column shown.

[0067] The relationship between each new check element in the new check chain and each data block in the disk array is:

[0068]

[0069] Among them, is the new check element stored in the block at the ip-th row and (mp + j)-th column in the disk array, is the exclusive OR operation, is the encoded data re-stored in the block at the k-th row and -th column, && represents AND.

[0070] As an optional implementation manner, recovering the data in the failed disk through the transformation matrix and the encoding matrix includes:

[0071] Obtaining the original data matrix B through the following formula:

[0072]

[0073] Among them, H is the transformation matrix and D is the encoding matrix.

[0074] As an alternative embodiment, it can be divided into the following steps:

[0075] Step 1: Based on the anti-diagonal check chain and diagonal check chain of X-code, a new strip check chain is added, and X-code is extended to X-code+; Step 2: Based on the new coding scheme X-code+, a new decoding scheme is formulated. The specific implementation of the fault tolerance scheme X-code+ for sub-strip coding is as follows:

[0076] Taking X-code+(5, 2, 3) as an example above, the maximum fault tolerance of X-code+(5, 2, 3) is 3. When the number of faulty nodes in a single sub-band is 3, decoding can be achieved by constructing a transformation matrix H and combining matrix operations, thereby restoring the element data.

[0077] The relationship between the data block and the check block can be abstracted into a matrix. Since all check chains are based on the exclusive OR operation of extracting specific data blocks, the elements in the matrix where the selected data blocks are located can be set to 1, otherwise 0. Therefore, it can be known that the transformation matrix H is a 01 matrix. The check chains can be represented by rows and the data blocks by columns. Thus, the transformation matrix of X-code+(5, 2, 3) is as Figure 4 shown.

[0078] Original data matrix B:

[0079]

[0080] Among them, represents a block matrix of 12 data blocks, and each element is composed of a vector as Figure 5 shown. Thus, the coding matrix D can be obtained: .

[0081] Therefore, when a disk failure occurs, only the original data B needs to be inversely calculated by combining D and H.

[0082] If H is not a square matrix, the method of solving the linear equations by SVD decomposition can be selected to solve for B.

[0083] The general idea of SVD decomposition is as follows:

[0084] Any real matrix can be decomposed into: ;

[0085] : Unitary matrix, and the column vectors of U are called the left singular vectors of A;

[0086] : Unitary matrix, and the column vectors of V are called the right singular vectors of A;

[0087] : The diagonal elements are called the singular values of A, which are arranged in decreasing order along the diagonal and are non-negative values;

[0088]

[0089] Thus, the encoding matrix D can be obtained:

[0090]

[0091] According to the matrix analysis theory, solving can be transformed into the following optimization problem:

[0092]

[0093] The derivation process is as follows:

[0094]

[0095] Let , then

[0096] It can be obtained that:

[0097] This application is applicable to the scenario of recovering data of multiple (more than 2) failed disks in a RAID6 array. Multiple X-code sub-stripes are placed horizontally in a "hand in hand" manner, and then the parity chains of multiple X-code sub-stripes are extracted and calculated according to certain rules to generate new parity blocks, and new nodes are added to store these parity blocks, so as to break through the limitation that the traditional X-code can tolerate at most two node failures. Based on this, relevant algorithms are designed to significantly improve the fault tolerance ability of the RAID6 array. Thus, the device performance is improved, and the user experience of using the RAID6 array by users is improved.

[0098] Utilizing the diagonal parity chain and anti-diagonal parity chain block coding characteristics of RAID6X-code, new stripe parity chains are added to expand X-code to X-code+. Then, SVD decomposition is used to recover data, improving the fault tolerance ability of the array. Without adding too many nodes, the fault tolerance ability of recovering failed disks is significantly improved.

[0099] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0100] In this embodiment, a device for restoring disk data is also provided. This device is used to implement the above embodiments and preferred embodiments, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0101] Figure 6 is a structural block diagram of a device for restoring disk data according to an embodiment of the present invention, which is applied to a disk array. The disk array is composed of multiple disks, and the maximum number of disks that can fail simultaneously in the disk array is r, where r is an integer greater than 2. As Figure 6 shown, the device includes:

[0102] A first acquisition module 62, configured to obtain encoded data from the disk array to obtain an encoding matrix when the number of disks that fail simultaneously in the disk array is n, where each encoded data in the encoding matrix belongs to a diagonal check chain, an anti-diagonal check chain, and a new check chain respectively, and n is an integer greater than or equal to 1 and less than or equal to r; a second acquisition module 64, configured to obtain a transformation matrix of the disk array; a recovery module 66, configured to recover the data in the failed disks through the transformation matrix and the encoding matrix.

[0103] In an exemplary embodiment, the disk array includes m sub-stripes, each sub-stripe includes p disks, the diagonal check chain includes m*p diagonal check elements, the anti-diagonal check chain includes m*p anti-diagonal check elements, the block for storing the diagonal check elements in each disk is a diagonal check block, the block for storing the anti-diagonal check elements in each disk is an anti-diagonal check block, each disk includes one diagonal check block and one anti-diagonal check block, and each disk further includes p - 2 data blocks, and the data blocks are used to store the encoded data.

[0104] In an exemplary embodiment, the relationship between each anti-diagonal check element in the anti-diagonal check chain and each data block in the disk array is as follows:

[0105]

[0106] Wherein, is the anti-diagonal check element stored in the block at the (p - 2)-th row and the j-th column in the disk array, is the exclusive OR operation, is the integer operation, is the encoded data re-stored in the block at the i-th row and the -th column.

[0107] In an exemplary embodiment, the relationship between each diagonal check element in the diagonal check chain and each data block in the disk array is as follows:

[0108]

[0109] Wherein, is the diagonal check element stored in the block at the (p - 2)-th row and the j-th column in the disk array, is the exclusive OR operation, is the integer operation, is the encoded data re-stored in the block at the i-th row and the -th column.

[0110] In an exemplary embodiment, the new check chain includes a plurality of new check elements, and the new check elements are stored in other disks in the disk array.

[0111] In an exemplary embodiment, the relationship between each new check element in the new check chain and each data block in the disk array is as follows:

[0112]

[0113] Wherein, is the new check element stored in the block at the ip-th row and the mp + j-th column in the disk array, is the exclusive OR operation, is the encoded data re-stored in the block at the k-th row and the -th column, && represents AND.

[0114] In an exemplary embodiment, the above device is further configured to obtain the original data matrix B through the following formula:

[0115]

[0116] Wherein, H is the transformation matrix and D is the encoding matrix.

[0117] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited thereto: all the above-mentioned modules are located in the same processor; or, the above-mentioned various modules are separately located in different processors in any combination form.

[0118] An embodiment of the present invention also provides a computer-readable storage medium, in which a computer program is stored. Wherein, when the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.

[0119] In an exemplary embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks or optical discs and other various media that can store computer programs.

[0120] An embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0121] In an exemplary embodiment, the above-mentioned electronic device may further include a transmission device and an input / output device. Wherein, the transmission device is connected to the above-mentioned processor, and the input / output device is connected to the above-mentioned processor.

[0122] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details are not repeated here.

[0123] An embodiment of the present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.

[0124] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present invention is not limited to any specific combination of hardware and software.

[0125] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for recovering disk data, characterized in that: Applied to a disk array, the disk array is composed of multiple disks, and the maximum number of disks allowed to fail simultaneously in the disk array is r, where r is an integer greater than 2, including: When the number of disks in the disk array that fail simultaneously is n, code data is obtained from the disk array to obtain a code matrix, wherein each code data in the code matrix belongs to a diagonal check chain, an anti-diagonal check chain, and a newly added check chain, respectively, and n is an integer greater than or equal to 1 and less than or equal to r; Obtaining a transformation matrix of the disk array; The data in the failed disk is restored by using the transformation matrix and the encoding matrix.

2. The method according to claim 1, characterized in that The disk array includes m sub-strips, each of which includes p disks, the diagonal check chain includes m*p diagonal check elements, the anti-diagonal check chain includes m*p anti-diagonal check elements, the blocks storing the diagonal check elements in each disk are diagonal check blocks, the blocks storing the anti-diagonal check elements in each disk are anti-diagonal check blocks, each disk includes one diagonal check block and one anti-diagonal check block, and each disk also includes p-2 data blocks, and the data blocks are used to store the encoded data.

3. The method according to claim 2, characterized in that The relationship between each anti-diagonal check element in the anti-diagonal check chain and each data block in the disk array is: in, is the anti-diagonal check element stored in the block at the p-2th row and the jth column in the disk array, is an XOR operation, is the rounding operation, is the i-th row The encoded data is stored in blocks of columns.

4. The method according to claim 2, characterized in that: The relationship between each diagonal check element in the diagonal check chain and each data block in the disk array is: in, is the diagonal parity element stored in the block at the p-2th row and the jth column in the disk array, is an XOR operation, is the rounding operation, is the i-th row The encoded data is stored in blocks of columns.

5. The method according to claim 2, characterized in that: The newly added check chain includes a plurality of newly added check elements, and the newly added check elements are stored in other disks in the disk array.

6. The method according to claim 5, characterized in that The relationship between each newly added check element in the newly added check chain and each data block in the disk array is: in, is the newly added check element stored in the block at the ipth row and the mp+jth column in the disk array, is an XOR operation, is the kth row The encoded data is stored in blocks of columns, and && represents AND.

7. The method according to claim 1, characterized in that Restoring the data in the failed disk by using the transformation matrix and the encoding matrix includes: The original data matrix B is obtained by the following formula: Wherein, H is the transformation matrix, and D is the encoding matrix.

8. A device for recovering disk data, characterized in that: Applied to a disk array, the disk array is composed of multiple disks, and the maximum number of disks allowed to fail simultaneously in the disk array is r, where r is an integer greater than 2, including: A first acquisition module is used to acquire coding data from the disk array to obtain a coding matrix when the number of disks that fail simultaneously in the disk array is n, wherein each coding data in the coding matrix belongs to a diagonal check chain, an anti-diagonal check chain and a newly added check chain, respectively, and n is an integer greater than or equal to 1 and less than or equal to r; A second acquisition module, used to acquire the transformation matrix of the disk array; A recovery module is used to recover the data in the failed disk through the transformation matrix and the encoding matrix.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.