A method, device, equipment and medium for improving the decoding speed of a disk array

By setting the data block of the wrong disk as a check block in the RAID 6 disk array and calculating data using load balancing algorithms and preset formulas, the problem of reading all disks when a single disk error in the RAID 6 disk array is solved, achieving faster decoding speed.

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

Patent Information

Application Number
CN202210268061.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-18
Publication Date
2025-08-05
Estimated Expiration
2042-03-18

AI Technical Summary

Technical Problem

The existing RAID 6 disk array needs to read all remaining disk data for recovery in a single disk error, resulting in slow recovery.

Method used

By setting the data block of each strip in the disk where the error occurs as the first check block in the disk array, the position of the second check block is obtained based on the load balancing algorithm, and using a preset formula to calculate the data of the first check block set in each strip, reducing the number of read disks.

Benefits of technology

In the event of a single disk error in the disk array, reduce the number of disks read and improve decoding speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114610241B_ABST
    Figure CN114610241B_ABST
Patent Text Reader

Abstract

The present invention provides a method, apparatus, device, and readable medium for improving disk array decoding speed. The method includes: in response to a disk error in a disk array, setting the data blocks of each stripe on the disk with the error as the first parity block in the disk array; obtaining the location of the second parity block based on the set first parity block; and calculating the data of the set first parity block in each stripe based on a preset formula. By using the solution of the present invention, fewer disks can be read when decoding a single disk error in the disk array, thereby improving the decoding speed of the disk array.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and more particularly to a method, apparatus, device and readable medium for improving the decoding speed of a disk array. Background Art

[0002] With the rapid development of communications and network technologies, digital information is growing exponentially, posing significant challenges to data storage technology. Data reliability and energy consumption in storage systems are becoming increasingly important. Faced with such massive data volumes, data reliability is inversely proportional to the number of components within the system: the more components a system has, the lower its reliability. According to relevant research, in an internet data center consisting of 600 disks, approximately 30 disks fail each month. In large-scale storage systems, the reduction in data reliability caused by disk failures is a significant problem, prompting research into fault-tolerant technologies.

[0003] In 1988, Professor D.A. Patterson of the University of California, Berkeley, proposed the RAID structure, which became a key technology for increasing storage capacity. RAID (Redundant Arrays of Independent Disks) is a disk array with redundant capabilities. A disk array combines multiple independent disks to create a large-capacity disk group. RAID storage technology can significantly increase storage capacity, improve the system's input and output request processing capabilities, and enhance data reliability through distributed data storage, parallel access, and information redundancy.

[0004] RAID 6 is an independent disk structure with two distributed parity check values. It's an extension of RAID 5, primarily intended for use in applications where data must be error-free. The introduction of a second parity check value requires N+2 disks, significantly complicating controller design and further improving the data reliability of the disk array. However, more space is required to store the parity check value, resulting in a higher performance penalty during write operations. RAID technology is widely used in today's distributed storage servers. RAID 5 and 6 can each recover one or two error blocks, but each data recovery is still limited by the speed of reading large amounts of data from each disk.

[0005] Under the existing technical environment, the number of data blocks (disks) in the RAID group is increasing. When any one or two data blocks are wrong, the RAID group implemented through RAID 6 needs to read all the remaining disk data for recovery. The amount of data to be read is huge, and the recovery speed is very slow under the limitation of limited IOPS. Summary of the Invention

[0006] In view of this, the purpose of the embodiments of the present invention is to propose a method, device, equipment and readable medium for improving the decoding speed of a disk array. By using the technical solution of the present invention, fewer disks can be read when a single disk decoding error occurs in the disk array, thereby improving the decoding speed of the disk array.

[0007] Based on the above objectives, one aspect of an embodiment of the present invention provides a method for improving the decoding speed of a disk array, comprising the following steps:

[0008] In response to an error occurring on a disk in the disk array, setting a data block of each stripe in the disk where the error occurs as a first parity block in the disk array;

[0009] Obtaining a position of a second check block based on the set first check block;

[0010] The data of the first check block set in each stripe is calculated based on a preset formula.

[0011] According to one embodiment of the present invention, calculating data of a first check block set in each stripe based on a preset formula includes:

[0012] Use the formula: Calculate the data of the first check block, where d p1 is the data of the first check block, x is the serial number of the position of the first check block in the stripe, y is the serial number of the position of the second check block in the stripe, d1 is the first data block, d2 is the second data block, d n is the nth data block, and n is the number of data blocks.

[0013] According to one embodiment of the present invention, obtaining the position of the second check block based on the set first check block includes:

[0014] Get the location of the disk where the error occurs in the disk array;

[0015] The position of the second check block in the disk array is obtained through a load balancing algorithm based on the position of the disk where the error occurs in the disk array.

[0016] According to one embodiment of the present invention, the further embodiment includes:

[0017] Calculate the layout of parity blocks and data blocks of each disk in the disk array through the load balancing algorithm;

[0018] The position information of each data block and check block in each stripe in the layout is counted in a table.

[0019] Another aspect of an embodiment of the present invention further provides a device for improving the decoding speed of a disk array, the device comprising:

[0020] A setting module, the setting module being configured to, in response to an error occurring on a disk in the disk array, set a data block of each stripe in the disk where the error occurred as a first parity block in the disk array;

[0021] an acquisition module, the acquisition module being configured to acquire a position of a second check block based on a set first check block;

[0022] The calculation module is configured to calculate the data of the first check block set in each stripe based on a preset formula.

[0023] According to one embodiment of the present invention, the calculation module is further configured to:

[0024] Use the formula: Calculate the data of the first check block, where d p1 is the data of the first check block, x is the serial number of the position of the first check block in the stripe, y is the serial number of the position of the second check block in the stripe, d1 is the first data block, d2 is the second data block, d n is the nth data block, and n is the number of data blocks.

[0025] According to one embodiment of the present invention, the acquisition module is further configured to:

[0026] Get the location of the disk where the error occurs in the disk array;

[0027] The position of the second check block in the disk array is obtained through a load balancing algorithm based on the position of the disk where the error occurs in the disk array.

[0028] According to one embodiment of the present invention, the present invention further includes a statistics module, which is configured to:

[0029] Calculate the layout of parity blocks and data blocks of each disk in the disk array through the load balancing algorithm;

[0030] The position information of each data block and check block in each stripe in the layout is counted in a table.

[0031] Another aspect of the embodiments of the present invention further provides a computer device, the computer device comprising:

[0032] at least one processor; and

[0033] The memory stores computer instructions that can be run on the processor, and when the instructions are executed by the processor, the steps of any of the above methods are implemented.

[0034] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of any one of the above methods are implemented.

[0035] The present invention has the following beneficial technical effects: the method for improving the decoding speed of a disk array provided by an embodiment of the present invention, in response to an error occurring on a disk in the disk array, sets the data blocks of each stripe in the disk where the error occurs as the first check block in the disk array; obtains the position of the second check block based on the set first check block; and calculates the data of the first check block set in each stripe based on a preset formula. This technical solution can read fewer disks when decoding a single disk error occurs in the disk array, thereby improving the decoding speed of the disk array. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 A schematic flow chart of a method for improving the decoding speed of a disk array according to an embodiment of the present invention;

[0038] Figure 2 A schematic diagram of a disk array layout that satisfies a left-handed non-aligned load balancing method according to an embodiment of the present invention;

[0039] Figure 3 A schematic diagram of a device for improving disk array decoding speed according to an embodiment of the present invention;

[0040] Figure 4 is a schematic diagram of a computer device according to one embodiment of the present invention;

[0041] Figure 5 FIG. 1 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0043] Based on the above objectives, a first aspect of an embodiment of the present invention provides an embodiment of a method for improving the decoding speed of a disk array. Figure 1 Shown is a schematic flow chart of the method.

[0044] like Figure 1 As shown in , the method may include the following steps:

[0045] In response to an error occurring on a disk in a disk array, S1 sets a data block of each stripe in the disk where the error occurs as a first parity block in the disk array.

[0046] S2 obtains the position of the second check block based on the set first check block.

[0047] In actual disk array operations, during encoding, because P1 (the first parity block) and P2 (the second parity block) are determined based on a load balancing algorithm, to reduce the computational power consumption of parameter calculations, the position of P1 is generally used to calculate the position of P2 based on load balancing. This then directly obtains the corresponding position information of P1 and P2 in all stripes that meet the load balancing requirement, as well as all encoding parameter information corresponding to this position information. This operation allows for the encoding operation of each stripe to be performed in advance using idle time. The positional relationship of the parameters is determined using the load balancing algorithm. The parameters for each data item involved in the encoding operation are then calculated based on the data item's position and stored in a fixed parameter table. The encoding operations involved then read the parameters from this table and multiply them by the data item, and the resulting sum is then added together. If a single error occurs in the disk array (an error on one disk), assuming the location of the error disk is the same as the location of P1 in the load balancing encoding process, the location information of the other parity block, P2, is then determined using the load balancing algorithm based on the error location information.

[0048] S3 calculates the data of the first check block set in each stripe based on a preset formula.

[0049] The preset formula is used to calculate all data except P1 and P2. After multiplying the data and parameters using Galois Field multiplication, all data is added together using XOR to obtain all data on the corresponding error disk. The specific formula is: Calculate the data of the first check block, where d p1is the data of the first check block, x is the serial number of the position of the first check block in the stripe, y is the serial number of the position of the second check block in the stripe, d1 is the first data block, d2 is the second data block, d n The nth data block is calculated using the above formula, where n is the number of data blocks. The data of the data block in this stripe is calculated using the above formula. The data of the data blocks in other stripes are also calculated using the above formula. Once the data blocks in all stripes are recovered, the data on the faulty disk can be recovered. In one embodiment of the present invention, the disk array is RAID 6.

[0050] By adopting the technical solution of the present invention, a smaller number of disks can be read when a single disk decoding error occurs in a disk array, thereby improving the decoding speed of the disk array.

[0051] In a preferred embodiment of the present invention, calculating the data of the first check block set in each stripe based on a preset formula includes:

[0052] Use the formula: Calculate the data of the first check block, where d p1 is the data of the first check block, x is the serial number of the position of the first check block in the stripe, y is the serial number of the position of the second check block in the stripe, d1 is the first data block, d2 is the second data block, d n is the nth data block, and n is the number of data blocks.

[0053] After a traditional disk array is built with coding, it can recover from any two or fewer errors. The coding principle for disk array building is as follows:

[0054]

[0055] Here, P1 and P2 represent two check blocks generated by disk array encoding. The traditional disk array parameter assignment method conforms to the method given in formula (1), that is, the parameters in the first row are all 1, and the parameters in the second row are constructed in the 1234… method according to the Vandermonde formula construction principle. The different positions of the check blocks result in different corresponding parameters.

[0056] The way to determine the location of the check block and data block is the load balancing algorithm, such as Figure 2 As shown in the figure, 5 disks are given, 3 of which are used to store user data, which satisfies the disk array layout method of left-handed non-aligned load balancing. Figure 2 As shown in the figure, the first row gives the parameter numbers corresponding to different positions. In this load balancing situation, P1 and P2 in the first row are at positions 5 and 1 respectively. The corresponding disk array formula is:

[0057]

[0058] When P1 and P2 are on the 5th disk and the 1st disk respectively, the corresponding coding method is as shown in formula (2). Therefore, for different stripe rows, based on the algorithm requirements of load balancing, there will be different corresponding positions, that is, there will be different parameters and their corresponding coding relationships.

[0059] Continue to take the coding situation of formula (1) as an example to decode the disk array. After the above disk array coding is completed, any 1 or 2 errors can be recovered. When one error occurs, taking the situation of formula (1) as an example, at this time the total number of data disks and parity disks is m + 2, and the coding relationship formula satisfied is as shown in (1). If dx has an error and 1 < x < m, the operation formula for recovery is:

[0060]

[0061] [[ID=1|2]] [[ID=1|3]]It can be seen that when one error occurs, the recovery method of the disk array is the same as that of RAID5, that is, all the remaining data is taken out and an exclusive OR operation is performed. When two errors occur, taking the situation of formula (1) as an example, assume that the errors occur in dx and dy at this time and 1 < x < y < m, then the operation formula for recovery is: [[ID=1|4]]

[0062] [[ID=1|5]] [[ID=1|6]] [[ID=1|7]]

[0063] Based on the above, assume that the total number of disks (data disks + parity disks) in the configured disk array is n. When one error occurs, the recovery method is as described in formula (3), and the number of disks to be read is n - 1; when two errors occur, the recovery method is as described in formula (4), and the number of disks to be read is n - 2.

[0064] When two errors occur, although the parameter generation method for reading the disk for recovery is more complex than when one error occurs (all 1s), the amount of disk read is one less. For current technology, the complexity of parameter calculation is not large for proprietary hardware. On the contrary, the disk data reading volume is limited by the disk IOPS, and reading one more disk has a great impact on the recovery speed. In actual applications, it is found that 99.7% of the cases are scenarios where a single disk error needs to be recovered. Therefore, the present invention considers recovering the disk array from a single disk error in a similar way to recovering from two disk errors, reducing the amount of disk read to achieve an improvement in speed. Therefore, when a disk error occurs in the disk array, assuming that the disk is the first check disk, the corresponding position of each stripe is the first check block. At the same time, based on the above-mentioned assumed first check disk, the corresponding second check disk is found, and it is also assumed that the second check disk has an error. At this time, data recovery can be performed using formula (4). Because it is assumed that both the first check disk and the second check disk have errors, the formula involves data from all data disks except the check disk. Compared with the conventional recovery method, one less disk (the second check disk) is read.

[0065] In a preferred embodiment of the present invention, obtaining the position of the second check block based on the set first check block includes:

[0066] Get the location of the disk where the error occurs in the disk array;

[0067] The position of the second check block in the disk array is obtained through a load balancing algorithm based on the position of the disk where the error occurs in the disk array.

[0068] In a preferred embodiment of the present invention, it also includes:

[0069] Calculate the layout of parity blocks and data blocks of each disk in the disk array through the load balancing algorithm;

[0070] The position information of each data block and check block in each stripe in the layout is counted in a table.

[0071] Example

[0072] like Figure 2 As shown in the figure, when an error occurs on disk 4, each location on disk 4 is recorded as the location of P1 (the first parity block) in the load balancing process. Based on the left-handed misaligned load balancing algorithm, the location corresponding to P2 (the second parity block) is the location of disk 5. At this time, all data recovery on disk 4 only requires reading the corresponding information on disks 1, 2, and 3. For example, if the D2 data block on disk 4 in stripe 1 needs to be recovered, the calculation formula at this time is: Wherein, x and y correspond to the position information of P1 and P2 respectively, so x=4, y=5.

[0073] Strip 1 is D2 data, and its recovery operation is:

[0074]

[0075]

[0076] The above calculation recovers D2, reading data from three blocks: P2, D0, and D1. Compared to traditional disk arrays, which require reading four blocks to recover data from a single error, this reduces the number of blocks required to read. Similarly, applying the same principle to other stripes, disk 4 can be recovered by reading data from only three disks, reducing the number of disks required to read and improving decoding speed.

[0077] In different application scenarios, any erroneous disk position can be set to P1 or P2. The corresponding P2 or P1 setting can be set by the above-mentioned multiplexed load balancing algorithm or determined by other methods. The amount of disk used will still be reduced by one.

[0078] By adopting the technical solution of the present invention, a smaller number of disks can be read when a single disk decoding error occurs in a disk array, thereby improving the decoding speed of the disk array.

[0079] It should be noted that those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM). The embodiment of the above-mentioned computer program can achieve the same or similar effects as any of the corresponding aforementioned method embodiments.

[0080] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a CPU, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the CPU, the above functions defined in the method disclosed in the embodiment of the present invention are performed.

[0081] Based on the above purpose, the second aspect of the embodiment of the present invention provides a device for improving the decoding speed of a disk array, such as Figure 3 As shown, the apparatus 200 includes:

[0082] A setting module, the setting module being configured to, in response to an error occurring on a disk in the disk array, set a data block of each stripe in the disk where the error occurred as a first parity block in the disk array;

[0083] an acquisition module, the acquisition module being configured to acquire a position of a second check block based on a set first check block;

[0084] The calculation module is configured to calculate the data of the first check block set in each stripe based on a preset formula.

[0085] In a preferred embodiment of the present invention, the calculation module is further configured to:

[0086] Use the formula: Calculate the data of the first check block, where d p1 is the data of the first check block, x is the serial number of the position of the first check block in the stripe, y is the serial number of the position of the second check block in the stripe, d1 is the first data block, d2 is the second data block, d n is the nth data block, and n is the number of data blocks.

[0087] In a preferred embodiment of the present invention, the acquisition module is further configured to:

[0088] Get the location of the disk where the error occurs in the disk array;

[0089] The position of the second check block in the disk array is obtained through a load balancing algorithm based on the position of the disk where the error occurs in the disk array.

[0090] In a preferred embodiment of the present invention, a statistical module is further included, and the statistical module is configured to:

[0091] Calculate the layout of parity blocks and data blocks of each disk in the disk array through the load balancing algorithm;

[0092] The position information of each data block and check block in each stripe in the layout is counted in a table.

[0093] Based on the above objectives, a third aspect of an embodiment of the present invention provides a computer device. Figure 4 FIG. 1 is a schematic diagram of an embodiment of a computer device provided by the present invention. Figure 4 As shown, the embodiment of the present invention includes the following apparatus: at least one processor 21; and a memory 22, wherein the memory 22 stores computer instructions 23 that can be executed on the processor, and when the instructions are executed by the processor, the following method is implemented:

[0094] In response to an error occurring on a disk in the disk array, setting a data block of each stripe in the disk where the error occurs as a first parity block in the disk array;

[0095] Obtaining a position of a second check block based on the set first check block;

[0096] The data of the first check block set in each stripe is calculated based on a preset formula.

[0097] In a preferred embodiment of the present invention, calculating the data of the first check block set in each stripe based on a preset formula includes:

[0098] Use the formula: Calculate the data of the first check block, where d p1 is the data of the first check block, x is the serial number of the position of the first check block in the stripe, y is the serial number of the position of the second check block in the stripe, d1 is the first data block, d2 is the second data block, d n is the nth data block, and n is the number of data blocks.

[0099] In a preferred embodiment of the present invention, obtaining the position of the second check block based on the set first check block includes:

[0100] Get the location of the disk where the error occurs in the disk array;

[0101] The position of the second check block in the disk array is obtained through a load balancing algorithm based on the position of the disk where the error occurs in the disk array.

[0102] In a preferred embodiment of the present invention, it also includes:

[0103] Calculate the layout of parity blocks and data blocks of each disk in the disk array through the load balancing algorithm;

[0104] The position information of each data block and check block in each stripe in the layout is counted in a table.

[0105] Based on the above objectives, a fourth aspect of an embodiment of the present invention provides a computer-readable storage medium. Figure 5 FIG. 1 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 5 As shown, the computer readable storage medium 31 stores a computer program 32 that performs the following method when executed by a processor:

[0106] In response to an error occurring on a disk in the disk array, setting a data block of each stripe in the disk where the error occurs as a first parity block in the disk array;

[0107] Obtaining a position of a second check block based on the set first check block;

[0108] The data of the first check block set in each stripe is calculated based on a preset formula.

[0109] In a preferred embodiment of the present invention, calculating the data of the first check block set in each stripe based on a preset formula includes:

[0110] Use the formula: Calculate the data of the first check block, where d p1 is the data of the first check block, x is the serial number of the position of the first check block in the stripe, y is the serial number of the position of the second check block in the stripe, d1 is the first data block, d2 is the second data block, d n is the nth data block, and n is the number of data blocks.

[0111] In a preferred embodiment of the present invention, obtaining the position of the second check block based on the set first check block includes:

[0112] Get the location of the disk where the error occurs in the disk array;

[0113] The position of the second check block in the disk array is obtained through a load balancing algorithm based on the position of the disk where the error occurs in the disk array.

[0114] In a preferred embodiment of the present invention, it also includes:

[0115] Calculate the layout of parity blocks and data blocks of each disk in the disk array through the load balancing algorithm;

[0116] The position information of each data block and check block in each stripe in the layout is counted in a table.

[0117] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a processor, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the above functions defined in the method disclosed in the embodiment of the present invention are performed.

[0118] In addition, the above method steps and system units can also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.

[0119] It will also be appreciated by those skilled in the art that the various exemplary logic blocks, modules, circuits and algorithmic steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given of the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0120] In one or more exemplary designs, the function can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted via a computer-readable medium. Computer-readable media include computer storage media and communication media, and the communication media include any media that helps to transmit a computer program from one location to another. The storage medium can be any available medium that can be accessed by a general or special-purpose computer. As an example and not limitation, the computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or any other medium that can be used to carry or store the required program code in the form of instructions or data structures and can be accessed by a general or special-purpose computer or a general or special-purpose processor. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves are used to send software from a website, server, or other remote source, the above-mentioned coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are all included in the definition of medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0121] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope of the embodiments disclosed in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless expressly limited to the singular.

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

[0123] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0124] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program instructing the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.

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

Claims

1. A method for improving the decoding speed of a disk array, characterized in that: The following steps are involved: In response to an error occurring on a disk in the disk array, setting a data block of each stripe in the disk where the error occurs as a first parity block in the disk array; Acquire a position of a second check block based on the set first check block; Calculate the data of the first check block in each stripe based on a preset formula; Calculating the data of the first check block in each stripe based on a preset formula includes: Use the formula: d p1 = d1⊕ d2⊕…⊕ d n Calculate the data of the first check block of the setting, where d p1 is the data of the first check block, x is the serial number of the position of the first check block in the stripe, y is the serial number of the position of the second check block in the stripe, d1 is the first data block, d2 is the second data block, d n is the nth data block, n is the number of data blocks; Acquiring the position of the second check block based on the set first check block includes: Get the location of the disk where the error occurs in the disk array; The position of the second check block in the disk array is obtained through a load balancing algorithm based on the position of the disk where the error occurs in the disk array.

2. The method according to claim 1, characterized in that Also includes: Calculate the layout of parity blocks and data blocks of each disk in the disk array through the load balancing algorithm; The position information of each data block and check block in each stripe in the layout is counted in a table.

3. A device for improving the decoding speed of a disk array, characterized in that: include: a setting module, wherein the setting module is configured to, in response to an error occurring on a disk in the disk array, set a data block of each stripe in the disk where the error occurred as a first parity block in the disk array; An acquisition module, the acquisition module is configured to acquire the position of the second check block based on the set first check block; the acquisition module is further configured to: acquire the position of the disk where the error occurs in the disk array; Obtaining the position of the second parity block in the disk array by a load balancing algorithm based on the position of the disk where the error occurs in the disk array; a calculation module configured to calculate data of the set first check block in each stripe based on a preset formula; The calculation module is also configured to use the formula: d p1 = d1⊕ d2⊕…⊕ d n Calculate the data of the first check block of the setting, where d p1 is the data of the first check block, x is the serial number of the position of the first check block in the stripe, y is the serial number of the position of the second check block in the stripe, d1 is the first data block, d2 is the second data block, d n is the nth data block, and n is the number of data blocks.

4. The device according to claim 3, characterized in that It also includes a statistics module, which is configured as follows: Calculate the layout of parity blocks and data blocks of each disk in the disk array through the load balancing algorithm; The position information of each data block and check block in each stripe in the layout is counted in a table.

5. A computer device, characterized in that: include: at least one processor; as well as A memory storing computer instructions executable on the processor, wherein the instructions implement the steps of the method according to claim 1 or 2 when executed by the processor.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 1 or 2 are implemented.

Citation Information

Patent Citations

  • Verification block recovery method, device and system based on RS erasure code and medium

    CN112860475A

  • Data storage method, device and equipment and computer readable storage medium

    CN114064347A