Data processing method and device, storage medium and electronic equipment
By adopting left-aligned data division and encoding and decoding rules in the RAID storage system, combined with the grouping method of multiple verification groups, the problem of insufficient fault tolerance capabilities of the RAID 55 algorithm is solved, and the data reliability and fault tolerance capabilities of the storage system are improved.
Patent Information
- Application Number
- CN202510896712.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-08-12
AI Technical Summary
The existing RAID technology still has room for improvement in fault tolerance, especially the RAID 55 algorithm is not effective when recovering three fault disks, which affects the reliability of the storage system.
The data blocks are divided into multiple strips by using the grouping method of left-hand aberration, and the grouping method of the first local verification group, the second local verification group and the global verification group is used to drop the disk to k physical disks, including k-3 first physical disks, 2 second physical disks and the third physical disks, and the fault tolerance ability is improved through encoding and decoding rules.
Improves the fault tolerance of the storage system in a single, double or three fault disk situations, and enhances data reliability and system stability.
Smart Images

Figure CN120469650A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method, device, storage medium, and electronic device. 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 prominent concerns. Faced with 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. Research indicates that 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, making fault-tolerance technologies a key research priority.
[0003] RAID (Redundant Arrays of Independent Disks) is a key technology for increasing storage capacity. A disk array combines multiple independent disks to create a single, massive disk group. RAID storage technology can significantly increase storage capacity, improve system input and output request processing capabilities, and enhance data reliability through distributed data storage, parallel access, and information redundancy.
[0004] RAID technology primarily utilizes data striping, data parity, and mirroring to achieve superior performance, higher reliability, better fault tolerance, and greater scalability. Depending on the needs of different data applications, strategies and architectures based on these three technologies can be applied or combined. RAID levels are categorized by these strategies and architectures: RAID 0, RAID 1, RAID 5, RAID 6, RAID 10, and so on.
[0005] RAID 0 uses data striping technology, which provides no redundancy or error recovery. It's implemented by concatenating N (N greater than or equal to 2) identical hard drives together in hardware via an intelligent disk controller or in software via the operating system's disk driver to create a single large volume. During use, computer data is written to each drive sequentially. This advantage is that it can double the capacity of the drives. For example, using three 80GB hard drives in RAID 0 configuration yields a capacity of 240GB. However, its disadvantage is that if any one drive fails, the entire system will be compromised, resulting in low reliability.
[0006] RAID 1, known as disk mirroring, works by mirroring data from one disk to another. That is, when data is written to one disk, a mirror file is created on the unused disk. This maximizes system reliability and recoverability without compromising performance. As long as at least one drive in any pair of mirrored disks is operational, the system can operate normally even if half the drives fail. If a drive fails, the system ignores it and uses the remaining mirrored drive for data reading and writing, providing excellent disk redundancy. However, its disadvantages are high cost and a disk utilization rate of only 50%. For example, with four 80GB hard drives, the available disk space is only 160GB. Furthermore, if a hard drive fails, the damaged drive must be replaced immediately; otherwise, if the remaining mirrored drive also fails, the entire system will crash. Resynchronizing the mirrors after replacing the new drive will take a long time. Therefore, RAID 1 is often used for storing critical data.
[0007] RAID 5 is an independent disk structure with distributed parity. Its parity code exists on all disks, with p0 representing the parity value of stripe 0. RAID 5 offers high read performance and average write performance, with good block-based collective access efficiency. Because the parity codes are located on different disks, reliability is improved. However, data parallelism is not well addressed, and controller design is quite difficult. In RAID 5, most data transfers occur on only one disk, allowing for parallel operations. However, RAID 5 has a "write loss," meaning that each write operation generates four actual read / write operations: two to read the old data and parity information, and two to write the new data and parity information.
[0008] RAID 6 is an independent disk structure with two distributed parity values. It expands upon RAID 5 and is primarily used in situations where data must be error-free. The introduction of a second parity value requires N+2 disks, significantly complicating the controller design and further improving the data reliability of the disk array. However, additional space is required to store the parity value, resulting in a higher performance penalty during write operations.
[0009] RAID technology is widely used in today's distributed storage servers, especially in RAID 5 and RAID 6, which can recover one or two error blocks respectively. Through fault tolerance and data recovery technology, data availability and system stability can be effectively improved.
[0010] However, each data recovery is still limited by the speed limit of reading large amounts of data from each disk, and the fault tolerance capability still needs to be improved. Summary of the Invention
[0011] The present disclosure provides a data processing method, device, storage medium and electronic device to at least solve the above technical problems existing in the prior art.
[0012] The technical solution of the embodiment of the present disclosure is implemented as follows: In a first aspect, an embodiment of the present disclosure provides a data processing method, the method comprising: In response to a data write request from the storage system, dividing the data to be written into at least one data block; Using 2N stripes, write the at least one data block to k physical disks, where 2N=k-1, and k≥5; The disk placement adopts a left-handed non-aligned manner, and the k physical disks include: k-3 first physical disks, 2 second physical disks, and a third physical disk; Each of the stripes is divided into a first local check group, a second local check group and a global check group; the global check group includes a global check disk, a first data disk part and a second data disk part; the first local check group includes a first local check disk, a first data disk part and a global check disk, the second local check group includes a second local check disk, a second data disk part and the global check disk, and one of the first local check group and the second local check group also includes a target disk that is written to the third physical disk; the global check disk is only written to the first physical disk or the second physical disk.
[0013] In a second aspect, an embodiment of the present disclosure provides a data processing device, the device comprising: A first processing module, configured to divide the data to be written into at least one data block in response to a data write request from the storage system; The second processing module is used to use 2N stripes to write the at least one data block to the disk k physical disks, 2N= k -1, k≥5; Wherein, the plate is placed in a left-handed and non-aligned manner, k The physical disks include: k -3 first physical disks, 2 second physical disks and a third physical disk; Each of the stripes is divided into a first local check group, a second local check group and a global check group; the global check group includes a global check disk, a first data disk part and a second data disk part; the first local check group includes a first local check disk, a first data disk part and a global check disk, the second local check group includes a second local check disk, a second data disk part and the global check disk, and one of the first local check group and the second local check group also includes a target disk that is written to the third physical disk; the global check disk is only written to the first physical disk or the second physical disk.
[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the data processing methods described.
[0015] In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute any one of the data processing methods.
[0016] The embodiments of the present disclosure have the following beneficial effects: The data processing method, device, storage medium and electronic device provided by the embodiments of the present disclosure are applied to a storage system, and the method includes: in response to a data write request of the storage system, dividing the data to be written into at least one data block; using 2N stripes to write the at least one data block to k physical disks, 2N=k-1, k≥5; wherein the writing adopts a left-handed unaligned manner, and the k physical disks include: k-3 first physical disks, 2 second physical disks and a third physical disk; each of the stripes is divided into a first local check group, a second local check group and a global check group; the global check group includes a global check disk, a first data disk part and a second data disk part; the first local check group includes a first local check disk, a first data disk part and a global check disk, the second local check group includes a second local check disk, a second data disk part and the global check disk, and one of the first local check group and the second local check group also includes a target disk for writing to the third physical disk; the global check disk is only written to the first physical disk or the second physical disk. In this way, the fault tolerance of the storage system is improved by grouping the first local check group, the second local check group, and the global check group, and flushing the data to the first physical disk, the second physical disk, and the third physical disk.
[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of a data processing method provided in an embodiment of the present disclosure; Figure 2 A schematic diagram of grouping a data disk, a check disk, and a target disk provided in an embodiment of the present disclosure; Figure 3 Schematic diagram of two misaligned disks provided in the application embodiment of the present disclosure Figure 1 ; Figure 4 Schematic diagram of two misaligned disks provided in the application embodiment of the present disclosure Figure 2 ; Figure 5 Schematic diagram of two misaligned disks provided in the application embodiment of the present disclosure Figure 3 ; Figure 6 Schematic diagram of two misaligned disks provided in the application embodiment of the present disclosure Figure 4 ; Figure 7 Schematic diagram of three mismatched disks provided in the application embodiment of the present disclosure Figure 1 ; Figure 8 Schematic diagram of three mismatched disks provided in the application embodiment of the present disclosure Figure 2 ; Figure 9 Schematic diagram of three mismatched disks provided in the application embodiment of the present disclosure Figure 3 ; Figure 10 Schematic diagram of three mismatched disks provided in the application embodiment of the present disclosure Figure 4 ; Figure 11 Schematic diagram of three mismatched disks provided in the application embodiment of the present disclosure Figure 5 ; Figure 12 Schematic diagram of three mismatched disks provided in the application embodiment of the present disclosure Figure 6 ; Figure 13 Schematic diagram of three mismatched disks provided in the application embodiment of the present disclosure Figure 7 ; Figure 14 Schematic diagram of three mismatched disks provided in the application embodiment of the present disclosure Figure 8 ; Figure 15 A schematic structural diagram of a data processing device provided in an embodiment of the present disclosure; Figure 16A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] To make the purposes, features, and advantages of the present disclosure more apparent and understandable, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative work shall fall within the scope of protection of the present disclosure.
[0020] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0021] If similar descriptions of "first / second" appear in the application documents, the following explanation is added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0023] Before further describing the embodiments of the present disclosure in detail, the related art will be described.
[0024] RAID55 is an enhanced version of RAID5, offering greater fault tolerance than RAID5. RAID55 can recover from any one or two failed drives, as well as some triple failed drives (unrecoverable in the following situations: three failed drives in a local RAID5 group; or two failed drives in a local RAID5 group with the other drive being a global parity drive). Furthermore, if the traditional left-handed misaligned drive flushing method is used, only any one or two failed drives can be recovered, not any triple failed drives, which reduces the fault tolerance of the RAID55 algorithm. Therefore, a method for improving fault tolerance is needed.
[0025] Based on this, the embodiments of the present disclosure provide a data processing method, device, storage medium and electronic device. By providing a grouping method of a first local check group, a second local check group and a global check group, as well as a method of writing data to a first physical disk, a second physical disk and a third physical disk, it is possible to recover from one, two or three faulty disks, thereby improving the fault tolerance of the storage system.
[0026] Figure 1 A flow chart of a data processing method provided by an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the method includes: Step 101: In response to a data write request from a storage system, divide the data to be written into at least one data block; Step 102: Use 2N stripes to write the at least one data block to the disk. k physical disks, 2N= k -1, k≥5; Wherein, the plate is placed in a left-handed and non-aligned manner, k The physical disks include: k -3 first physical disks, 2 second physical disks and a third physical disk; Each of the stripes is divided into a first local check group, a second local check group and a global check group; the global check group includes a global check disk, a first data disk part and a second data disk part; the first local check group includes a first local check disk, a first data disk part and a global check disk, the second local check group includes a second local check disk, a second data disk part and the global check disk, and one of the first local check group and the second local check group also includes a target disk that is written to the third physical disk; the global check disk is only written to the first physical disk or the second physical disk.
[0027] Here, the method can be applied to a storage system. In the storage system, each stripe may include: a first local parity disk, a second local parity disk, a global parity disk, a first data disk portion, and a second data disk portion; wherein the first data disk portion and the second data disk portion have the same number of data disks.
[0028] The data block written to the physical disk is called a data disk, which can also be called a data block or a data unit, and is the actual data stored on the physical disk.
[0029] The check data (such as local check data and global check data) written to the physical disk is called a check disk (such as local check disk and global check disk). Of course, the check disks such as local check disk and global check disk can also be called check blocks or check data units, which are the check data stored on the physical disk.
[0030] In storage systems like RAID, physical disks are the physical entities within a disk array, referring to actual hard drives. Data and parity disks can be thought of as logical blocks that are mapped to storage locations on physical disks. That is, each data block and parity block is written to a specific area on a physical disk.
[0031] Striping is a technology that distributes data across multiple disks. Specifically, striping divides data into blocks and stores these blocks sequentially across multiple physical disks. Consequently, when reading data, multiple blocks can be retrieved from multiple physical disks simultaneously, thereby improving storage system performance.
[0032] Here, the storage system has k physical disks, including: k -3 first physical disks, 2 second physical disks and a third physical disk; Accordingly, each stripe stores k The total number of the first local check disk, the second local check disk, the global check disk, the disks of the first data disk part, and the disks of the second data disk part (logically speaking) of the physical disk is also k , that is, each stripe of the storage system has k disks, including: 1 first local check disk, 1 second local check disk, 1 global check disk, k - 3 data disks, k≥ 5. The first data disk portion and the second data disk portion respectively have ( k -3) / 2 data disks.
[0033] The following is an example based on a strip.
[0034] In one example, assuming k= 13, then there are 10 data disks in total. 10 data disks and 1 global check disk form a global check group (also called a global RAID5 group). The first data disk part includes , the second data disk portion includes .
[0035] The five data disks of the first data disk part and the first partial check disk (denoted as ), global check disk (denoted as ) form a first local parity group (also called a first local RAID5 group); The 5 data disks of the second data disk part and the second partial check disk (recorded as ), global check disk (denoted as ) to form a second local parity group (also called a second local RAID5 group); Furthermore, the first partial check group or the second partial check group further includes a target disk flushed to the third physical disk.
[0036] In another example, suppose k= 15, then there are 12 data disks in total. 10 data disks and 1 global check disk form a global check group (also called a global RAID5 group). The first data disk part includes , the second data disk portion includes .
[0037] Correspondingly, the six data disks of the first data disk part and the first partial check disk (denoted as ), global check disk (denoted as ) to form the first local parity group (i.e., the first local RAID5 group); The 6 data disks of the second data disk part and the second partial check disk (recorded as ), global check disk (denoted as ) to form a second local parity group (i.e., the second local RAID5 group); Furthermore, the first partial check group or the second partial check group further includes a target disk flushed to the third physical disk.
[0038] It should be noted that the above only provides one k= 13. k= 15 o'clock storage system example, in actual application k The value of is not limited.
[0039] In some embodiments, the at least one data block is written to disk using 2N stripes. k physical disks, including: For the 1st to Nth stripes, local check data and global check data are generated according to the first encoding and decoding rule, and the data blocks, local check data and global check data are written to the disk. k A physical disk; The first encoding and decoding rule includes a first global encoding and decoding rule, a first local encoding and decoding rule corresponding to the first local check group, and a second local encoding and decoding rule corresponding to the second local check group; The first local check group includes: the first local check disk, a first data disk portion and the global check disk; The second local parity group includes: the second local parity disk, a second data disk portion, the global parity disk, and a target disk.
[0040] Here, the number of data blocks can be ( k-3) / 2, the data blocks written to the physical disk are called data disks, the local parity data written to the physical disk are called local parity disks, and the global parity data written to the physical disk are called global parity disks.
[0041] There are two local check data generated. Accordingly, after the data is stored on disk, there are two local check disks, namely, a first local check disk and a second local check disk.
[0042] The number of global checksum data is 1. Accordingly, there is one global checksum disk after the data is written to the disk.
[0043] In some embodiments, the first local encoding and decoding rule indicates that the result of an XOR operation after multiplying the address information of each disk and disk in the first local check group is 0; The second local encoding and decoding rule indicates that the sum of the first result and the second result is 0, the first result is the result of the XOR operation after multiplying the address information of each disk and the disk in the second local check group, and the second result is the result of multiplying the address information of the target disk and the target disk.
[0044] Here, the first global encoding and decoding rule indicates that the result of the XOR operation on each disk in the stripe is 0, which is expressed as formula (1): (1) in, represents the data disks on the same stripe, p represents the global parity disk on the same stripe; n represents the total number of data disks, n=k-3, Represents the exclusive OR operation.
[0045] The first local encoding and decoding rule represents each disk (including data disk, global check disk) in the first local check group. , First local check disk ) is multiplied by the disk address information and then the XOR operation result is 0; The second local encoding and decoding rule indicates that the sum of the first result and the second result is 0, and the first result is the sum of the disks (including data disks, global check disks) in the second local check group. , Second local check disk ) is multiplied by the address information of the target disk and then an exclusive OR operation is performed, the second result being a result of multiplying the target disk and the address information of the target disk; The first local encoding and decoding rule and the second local encoding and decoding rule can be expressed as formula:
[0046] Where m represents the stripe identifier, and v represents the location information of the corresponding disk. Specifically, Indicates the location information of the i-th data disk in the m-th stripe. Represents the local parity disk in the mth stripe location information, Indicates the location information of the global parity disk p in the mth stripe, Indicates the number of the mth stripe The location information may include the specific location of the disk in the physical disk where the disk is located.
[0047] In some embodiments, the at least one data block is written to disk using 2N stripes. k physical disks, including: For the N+1th to 2Nth stripes, local check data and global check data are generated according to the second encoding and decoding rule, and the data blocks, local check data and global check data are written to the disk. k A physical disk; The second encoding and decoding rule includes: a global encoding and decoding rule, a first local encoding and decoding rule corresponding to the first local check group, and a second local encoding and decoding rule corresponding to the second local check group; The first local check group includes: the first local check disk, a first data disk portion, the global check disk and a target disk; The second local parity group includes: the second local parity disk, a second data disk portion, and the global parity disk.
[0048] Here, the number of data blocks can be ( k -3) / 2, the data blocks written to the physical disk are called data disks, the local parity data written to the physical disk are called local parity disks, and the global parity data written to the physical disk are called global parity disks.
[0049] There are two local check data generated. Accordingly, after the data is stored on disk, there are two local check disks, namely, a first local check disk and a second local check disk.
[0050] The number of global checksum data is 1. Accordingly, there is one global checksum disk after the data is written to the disk.
[0051] In some embodiments, the first local encoding and decoding rule indicates that the sum of the third result and the second result is 0, the third result being the result of an XOR operation performed after multiplying the address information of each disk in the first local check group; and the second result being the result of multiplying the address information of the target disk by the target disk. The second local encoding and decoding rule indicates that a result of an XOR operation performed after multiplying the address information of each disk in the second local check group is 0.
[0052] Here, the global encoding and decoding rule indicates that the result of the XOR operation on each disk in the stripe is 0, as shown in the above formula (1).
[0053] The first local encoding and decoding rule indicates that the sum of the third result and the second result is 0, and the third result is the sum of the disks (including data disks, global check disks) in the first local check group. , First local check disk ) is multiplied by the address information of the target disk and then an exclusive OR operation is performed; the second result is the result of multiplying the target disk and the address information of the target disk; The second local encoding and decoding rule represents the disks (including data disks, global check disks) in the second local check group. , Second local check disk ) is multiplied by the disk address information and then the XOR operation result is 0.
[0054] The first local encoding and decoding rule and the second local encoding and decoding rule can be expressed as formula:
[0055] in, Represents the local parity disk in the mth stripe location information, Represents the local parity disk in the mth stripe location information, Indicates the location information of the global parity disk p in the mth stripe. The location information may include the specific location of the disk in the physical disk.
[0056] According to the above-mentioned first encoding and decoding rule and the second encoding and decoding rule, the first total encoding and decoding formula is obtained, including: the first global encoding and decoding rule, the first local encoding and decoding rule, and the second local encoding and decoding rule, which are respectively as follows: Formula (1), (2) (3): (1) (2) (3)
[0057] Wherein, formula (1) represents the first global encoding and decoding rule, formula (2) represents the first local encoding and decoding rule, and formula (3) represents the second local encoding and decoding rule; Indicates whether the target disk belongs to the first local check group. Indicates whether the target disk belongs to the second local check group, where The 0 in the The first row in the matrix is checked. The 1 in the The second row in the matrix is checked, and m is used to indicate which column to check based on the corresponding row. The upper right marks of 0 and 1 in the matrix indicate the column number of 0 and 1. If the result is 0, it indicates that the matrix does not belong to the corresponding local check group. If the result is 1, it indicates that the matrix belongs to the corresponding local check group.
[0058] Combine Figure 2 An example is provided. Assuming k=13 and 2N=12, the results of each stripe and each physical disk are obtained after the data processing method provided in the embodiment of the present disclosure is used to store the data on the disk.
[0059] For stripes 1 to 6, physical disks d1 to d5 (disk1...disk5), physical disk l0, and physical disk P are grouped together and flushed to disk using a left-handed, non-aligned method. Physical disks d8 to d12 (disk8...disk112) and physical disk l1 are grouped together and flushed to disk using a left-handed, non-aligned method, as shown in Table 1. Table 1
[0060] For the 7th to 12th stripes, physical disks d1 to d5 (disk1...disk5) and physical disk l0 are grouped together and flushed to disk in a left-handed, non-aligned manner; physical disks d8 to d12 (disk8...disk112) and physical disks d1 to d12 (disk8...disk112) are grouped together. l1 The disks and physical P disks are grouped together and are flushed in a left-handed, non-aligned manner, as shown in Table 2: Table 2
[0061] The final placement results obtained by the left-handed non-aligned placement method can be shown in Table 3.
[0062] Table 3
[0063] Among them, disk1, disk2...disk5, disk8...disk12 are the first physical disk; physical disk l0 and physical disk l1 are the second physical disk; physical disk p is the third physical disk; d1, d2...d10 are data disks, l0 and l1 are local parity disks, p is the global parity disk; t1, t2...t12 are stripes.
[0064] It can be seen that the global parity disk P is only written to the first physical disk (any disk) or the second physical disk (physical disk L0 or physical disk L1), and is not written to the third physical disk (physical disk P).
[0065] For this example, a global encoding and decoding rule is provided, as shown in the following formula (4): (4) For bands 1-6 ( ) is encoded, that is, the data in the physical P disk (ie, the target disk, recorded as ) is compiled into the second local check group, and the first encoding and decoding rule obtained is as follows:
[0066] For strips 7-12 ( ) is encoded, and the data in the physical P disk (i.e. the target disk, recorded as ) is incorporated into the first local check group, and the second encoding and decoding rule obtained is as follows:
[0067] Based on the above formulas, the first total encoding and decoding formulas are as follows:
[0068] In some embodiments, the method further comprises: In response to a disk error recovery request of the storage system, determining disk error information in the disk error recovery request; Determining a recovery method corresponding to the faulty disk based on the faulty disk information; Using the recovery method to recover data from the faulty disk, and obtaining a data recovery result; The error disk information includes at least one of the following: the number of error disks, the type of error disk, the check group where the error disk belongs, and whether the target disk is included; the number of error disks is at least one; The recovery method is a method for recovering error disk data by using target encoding and decoding rules.
[0069] Here, when a disk error is detected, the management unit of the storage system can be triggered to perform data recovery. That is, the management unit determines the corresponding recovery method based on the disk error recovery request. The disk error recovery request carries disk error information, and the specific recovery method to be used can be determined based on the disk error information.
[0070] A disk error occurs when a physical disk in the storage system experiences a fault or anomaly, causing the data disk and / or parity disk to be unable to read or write data, or even causing data loss. Common disk error conditions include hard drive damage, disk failure, or unrecognizable or inaccessible disks.
[0071] In storage systems, such as RAID storage technology, redundancy checking can be used to ensure data reliability. That is, if a problem occurs on a physical disk, resulting in a faulty disk, the storage system can use the recovery method to recover data from the faulty disk and obtain a data recovery result.
[0072] Here, each local check group and global check group corresponds to a coding and decoding rule, so that when a disk error occurs, data can be restored based on the coding and decoding rule.
[0073] The data processing method may be based on a RAID55 algorithm, which utilizes striping with parity. Data is stored across multiple physical disks, and each data stripe is assigned a corresponding parity disk (including a global parity disk and a local parity disk). The parity disks are calculated using an exclusive-OR (XOR) operation.
[0074] Codec rules can be used to encode data when storing it and to decode it when restoring it.
[0075] Data Encoding: When data is written to a RAID 5 array, the data disks are calculated and stored, and local and global parity disks are generated for each stripe's data disks. The encoding process uses an exclusive-OR (XOR) operation to generate parity information, ensuring that even if some disks are damaged, data can be recovered using the parity disk.
[0076] Data Decoding: When reading data, if a disk fails (i.e., a drive error occurs), the storage system can recover the lost data using an XOR algorithm based on the remaining data disks and the corresponding parity disk. The XOR operation is reversible, so the original data block on the failed disk can be recovered using the remaining data disks and parity disks in the stripe.
[0077] Here, the recovery method is a method of recovering error disk data using target encoding and decoding rules. The number of error disks can be one or more, and the target encoding and decoding rules can also include one or more, that is, the recovery method can be to recover one or more error disk data using one or more target encoding and decoding rules.
[0078] There are many different scenarios for disk failures. For example, there can be one or more failed disks, or one or more failed disk types (such as data disks, local check disks, and global check disks). The following describes how to recover data for each scenario.
[0079] In some embodiments, if the number of the faulty disks is 1, determining the recovery method corresponding to the faulty disk according to the faulty disk information includes: According to the encoding and decoding rules corresponding to the error disk, a target decoding rule is determined.
[0080] Here, in the case where there is only one wrong disk, it can be further divided into whether the wrong disk is located on the third physical disk (that is, whether it is the target disk).
[0081] If the data is not written to the third physical disk (that is, not the target disk), decoding is performed according to the encoding and decoding rules of the local check group where the wrong disk is located to restore the data on the wrong disk.
[0082] If the wrong disk is in the first local check group, the wrong disk can be decoded and restored according to the above formula (2); if the wrong disk is in the second local check group, the wrong disk can be decoded and restored according to the above formula (3).
[0083] Taking the above example of k=13 as an example, if the faulty disk is in the first local check group, the faulty disk can be decoded and restored according to the above formula (5) (i.e., the example of formula (2) when k=13); if the faulty disk is in the second local check group, the faulty disk can be decoded and restored according to the above formula (6) (i.e., the example of formula (3) when k=13).
[0084] It should be noted that each encoding and decoding operation is described based on a stripe, where m represents the stripe number. k =13, m can have 12, that is, the range of m is .
[0085] If the wrong disk is located on the third physical disk (that is, the target disk), you need to further determine the stripe number. In the case of , the above formula (3) is used to obtain the target decoding rule, and the decoding is restored to the wrong disk; In this case, the above formula (2) is used to obtain the target decoding rule and decode and recover the wrong disk.
[0086] With the above k=13, For example, for the 1st to 6th bands ( ), using the target disk (i.e. ) is used to recover data, that is, the above formula (6) is used to decode and recover the wrong disk. Specifically, according to formula (6), it can be obtained:
[0087] in, .
[0088] For strips 7-12 ( ), using the target disk (i.e. ) encoding and decoding rules to recover data, that is, use the above formula (5) to decode and recover the wrong disk. Specifically, according to formula (5), we can get:
[0089] in, .
[0090] It is not difficult to understand that the above is only k =13, For other cases, the target encoding and decoding rules of the error disk recovery method can also be obtained according to formulas (2) and (3) to perform data recovery, for example: For the 1st to Nth strips, according to formula (3), we get: , .
[0091] For the N+1th to 2Nth strips, according to formula (2), we get: , .
[0092] In some embodiments, if the number of the faulty disks is 2, determining the recovery method corresponding to the faulty disks according to the faulty disk information includes: If the error disk does not include the target disk and satisfies one of the first condition, the second condition, the third condition, and the fourth condition, selecting the codec rule corresponding to the combination of the corresponding condition as the target codec rule; The first condition is: the two faulty disks include a global check disk and a first disk, and the first disk is any data disk or a local check disk; The first combination of codec rules corresponding to the first condition includes: a local codec rule excluding the first disc and a local codec rule including the first disc.
[0093] The second condition is that the two faulty disks belong to different local parity groups and are data disks or local parity disks. The second combination of encoding and decoding rules corresponding to the second condition includes: local encoding and decoding rules corresponding to each local check group; The third condition is: the two faulty disks include any data disk and local check disk that belong to the same local check group; The third combination of encoding and decoding rules corresponding to the third condition includes: the first global encoding and decoding rule, and the local encoding and decoding rules corresponding to the arbitrary data disk and the local check disk.
[0094] The fourth condition is: the two faulty disks include two data disks belonging to the same local parity group; The fourth combination of encoding and decoding rules corresponding to the fourth condition includes: a first target decoding rule for two data disks, the first target decoding rule is generated based on the second global encoding and decoding rule, and the second global encoding and decoding rule is generated based on the first local encoding and decoding rule, the second local encoding and decoding rule and the first global encoding and decoding rule.
[0095] Here, the first global encoding and decoding rule refers to the above formula (1), the first local encoding and decoding rule refers to the above formula (2), and the second local encoding and decoding rule refers to the above formula (3), which are not described in detail here.
[0096] The second global encoding and decoding rule can be as follows:
[0097] in, ,
[0098] Based on the second global encoding and decoding rule and the above formula (1), any one of the two data disks in the wrong disk is eliminated to obtain the decoding rule of the other data disk.
[0099] Assume that the two data disks of the fault disk are denoted as: and , the first target decoding rule includes:
[0100]
[0101] In some embodiments, if the number of the faulty disks is 2, determining the recovery method corresponding to the faulty disks according to the faulty disk information includes: If the error disk includes the target disk and satisfies one of the fifth, sixth, and seventh conditions, select the codec rule corresponding to the combination of the corresponding conditions as the target codec rule; The fifth condition is: the two faulty disks include a global check disk and a target disk, and the target disk is a data disk; The fifth combination of encoding and decoding rules corresponding to the fifth condition includes: a second target decoding rule for the global check disk and the target disk generated based on the first global encoding and decoding rule and the local encoding and decoding rule including the target disk; The sixth condition is: the two faulty disks include a global check disk and a target disk, and the target disk is a local check disk; The sixth combination of encoding and decoding rules corresponding to the sixth condition includes: a first global encoding and decoding rule and a local encoding and decoding rule corresponding to the target disk; The seventh condition is: the two faulty disks include a first disk and a target disk, the first disk is any data disk or a partial check disk, and the target disk is a data disk or a partial check disk; The seventh combination of codec rules corresponding to the seventh condition includes: a local codec rule that does not include the first disk and a local codec rule that includes the first disk.
[0102] Here, the first global encoding and decoding rule refers to the above formula (1), the first local encoding and decoding rule refers to the above formula (2), and the second local encoding and decoding rule refers to the above formula (3), which are not described in detail here.
[0103] The following describes the case where there are two faulty disks, specifically distinguishing whether the faulty disk includes the target disk located on the third physical disk, and distinguishing whether the faulty disk is a data disk, a local check disk, or a global check disk, with examples for explanation.
[0104] The following is the above k =13, Taking the example of as an example, various situations are explained respectively with reference to the figures and formulas.
[0105] Case 1: The two wrong disks do not include the target disk that is located on the third physical disk. This is further divided into the following cases.
[0106] Case 1.1: When the faulty disk includes the global check disk (Assuming ), and any data disk or local parity disk (assuming ), which is equivalent to satisfying the first condition, such as Figure 3 Determine whether the data disk or the local check disk contains any of the data disks or the local check disk ( ) and the local encoding and decoding rules that do not include any data disk or local check disk as the target decoding rules. The specific recovery method includes: using the local encoding and decoding rules that do not include The local codec rules first restore the global check disk ; Using the included Local encoding and decoding rule recovery .
[0107] Case 1.2: When the faulty disk does not include the global check disk , and belong to two different local check groups, which is equivalent to satisfying the second condition, such as Figure 4 As shown, the target decoding rule is determined according to the encoding and decoding rules corresponding to the two local check groups. The specific recovery method includes: using the two local encoding and decoding rules to decode simultaneously.
[0108] Case 1.3: When the faulty disks include: data disks belonging to the same local parity group (assuming ) and the local check disk (assuming ), which is equivalent to satisfying the third condition, such as Figure 5 As shown, the target decoding rule is determined according to the first global encoding and decoding rule and the local encoding and decoding rule containing the error disk. The specific recovery method includes: solving the data disk by the first global encoding and decoding rule (Solve the data representing the recovery of the disk), and then solve it through the local encoding and decoding rules containing the wrong disk .
[0109] Case 1.4: When the wrong plate (two wrong plates are recorded as 、 ) includes: data disks belonging to the same local parity group, which is equivalent to meeting the fourth condition, such as Figure 6 As shown, first target decoding rules are determined for two data disks respectively, the first target decoding rules are generated based on the second global encoding and decoding rules, and the second global encoding and decoding rules are generated based on the combination of the first local encoding and decoding rules, the second local encoding and decoding rules, and the first global encoding and decoding rules. As shown below: In the first step, the second global encoding and decoding rule is obtained by combining the first local encoding and decoding rule, the second local encoding and decoding rule, and the first global encoding and decoding rule:
[0110] The second step is to pass Data disk Eliminate, get targeted The first target decoding rule:
[0111]
[0112] The same logic can be used to solve the problem. ,pass Data disk Eliminate, get targeted The first target decoding rule:
[0113] Case 2: The two wrong disks include the target disk that is located on the third physical disk. This is further divided into the following cases.
[0114] Case 2.1: Two faulty disks include: the global check disk and the target disk (denoted as ),and For a data disk, it is equivalent to satisfying the fifth condition. Then, according to the first global encoding and decoding rule and the local encoding and decoding rule including the target disk, the decoding rules for the global check disk and the target disk can be obtained. For example, assuming that the first global encoding and decoding rule and the local encoding and decoding rule including the target disk are respectively as the above formulas (4) and (5); through eliminate Recoverable target disk ;pass eliminate Recoverable global checksum disk , that is, the second target decoding rule for the global check disk and the target disk is obtained.
[0115] Here, if the local encoding and decoding rule including the target disk is formula (6), then the second target decoding rule for the global check disk and the target disk is obtained according to formulas (6) and (4).
[0116] Case 2.2: Two faulty disks include: Global check disk and the target disk (denoted as ),and The local check disk satisfies the sixth condition, and the target decoding rule is determined according to the first global encoding and decoding rule and the local encoding and decoding rule including the local check disk. The recovery method includes: solving the global check disk using the first global encoding and decoding rule , and then use the The local encoding and decoding rules are used to solve the local check disk.
[0117] Case 2.3: Wrong disk includes: target disk (recorded as ) and the first set (recorded as ),in It can be a data disk or a partial check disk. If the first disk is a data disk or a partial check disk, it is equivalent to meeting the seventh condition. The local encoding and decoding rules of the first disk and the local encoding and decoding rules of the first disk are used to determine the target decoding rules. The recovery method includes: using the local encoding and decoding rules that do not include Then, use the local encoding and decoding rules to restore the target disk. Local encoding and decoding rule recovery .
[0118] In some embodiments, if the number of the faulty disks is 3, determining the recovery method corresponding to the faulty disks according to the faulty disk information includes: If the error disk does not include the target disk and one of the eighth, ninth, and tenth conditions is met, the codec rule corresponding to the combination of the corresponding conditions is selected as the target codec rule; The eighth condition is: the three faulty disks include two second disks belonging to the same local parity group and a third disk belonging to another local parity group; the second disks are data disks, and the third disk is an arbitrary disk; An eighth combination of encoding and decoding rules corresponding to the eighth condition includes: a local encoding and decoding rule corresponding to the third disk and a third target decoding rule for the two second disks, wherein the third target decoding rule is generated based on the first global encoding and decoding rule and the local encoding and decoding rule corresponding to the third disk; The ninth condition is that the three faulty disks include a data disk and a local parity disk belonging to the same local parity group, and a fourth disk belonging to another local parity group; the fourth disk is any disk; The ninth combination of encoding and decoding rules corresponding to the ninth condition includes: the local encoding and decoding rule corresponding to the fourth disk, the first global encoding and decoding rule, and the local encoding and decoding rules corresponding to the data disk and the local check disk; The tenth condition is: the three faulty disks include a global parity disk, and a fifth disk and a sixth disk from two local parity groups, respectively; the fifth disk is a local parity disk or a data disk, and the sixth disk is a local parity disk or a data disk; The tenth combination of encoding and decoding rules corresponding to the tenth condition includes: a fourth target decoding rule for the fifth disk, a fifth target decoding rule for the sixth disk, and the first global encoding and decoding rule, the first local encoding and decoding rule, or the second local encoding and decoding rule; the fourth target decoding rule and the fifth target decoding rule are generated based on the first global encoding and decoding rule, the first local encoding and decoding rule, and the second local encoding and decoding rule.
[0119] Here, the first global encoding and decoding rule refers to the above formula (1), the first local encoding and decoding rule refers to the above formula (2), and the second local encoding and decoding rule refers to the above formula (3), which are not described in detail here.
[0120] The third target decoding rule, the fourth target decoding rule, and the fifth target decoding rule can be generated based on the above formulas (1), (2), and / or (3), which are specifically described below with reference to examples.
[0121] The following describes the case where there are three faulty disks, specifically distinguishing whether the faulty disk includes the target disk located on the third physical disk, and distinguishing whether the faulty disk is a data disk, a local check disk, or a global check disk, with examples for explanation.
[0122] The following is the above k =13, Taking the example of as an example, various situations are explained respectively with reference to the figures and formulas.
[0123] Case 1: The three wrong disks do not include the target disk located on the third physical disk. This is further divided into the following cases.
[0124] Case 3.1: The three faulty disks include data disks and / or local parity disks in the same local parity group, such as Figure 7 and Figure 8 As shown, it is not decodable at this time.
[0125] Case 3.2: Two of the three faulty disks belong to the same local parity group and are data disks or local parity disks. The other faulty disk belongs to another local parity group and is any disk (that is, it can be a data disk, a local parity disk, or a global parity disk). This is the error pattern 2+1. For various combinations of faulty disk types, see Table 4.
[0126] Table 4
[0127] For case 3.2, the error patterns are further divided.
[0128] Error pattern 3.2.1: The two faulty disks in the same local parity group are two data disks (equivalent to an example of a second disk), and the faulty disk in another local parity group is any disk. (This is equivalent to an example of a third disk, which can be any disk, that is, a data disk, a global check disk, or a local check disk), which is equivalent to satisfying the eighth condition, such as Figure 9 The corresponding recovery method 3.2.1 includes: Step 1: Use the included The local encoding and decoding rules are used to restore the wrong disk. Now there are only two wrong disks left. Step 2: Construct the third target decoding rule using the local encoding and decoding rules containing two wrong disks and the global encoding and decoding rules.
[0129] For example, the above k =13, For example, assuming that the error disk is in the first local check group , and the wrong disk in the second local check group is any disk (The third disk can be a data disk, a global check disk, or a local check disk): Step 1: Use any disk The corresponding local encoding and decoding rules, that is, formula (6) is solved ; Step 2: Generate a global RAID6 using the first global encoding and decoding rule and another local encoding and decoding rule, and then obtain The third target decoding rules, for example, global RAID6 are as follows:
[0130] pass Solvable :
[0131] pass Solvable :
[0132] It can be understood that here, the local encoding and decoding rule including two wrong disks is the above formula (5). If the local encoding and decoding rule including two wrong disks is the above formula (6), then the two wrong disks are restored according to the above formulas (6) and (4).
[0133] It should be noted that the above is only k =13, wrong disk includes and For other disc error situations, the decoding rules corresponding to the remaining two disc errors can also be obtained according to formulas (1) and (2), or formulas (1) and (3). We will not go into details here.
[0134] Error pattern 3.2.2: The two faulty disks in the same local parity group are a data disk and a local parity disk, and the faulty disk in another local parity group is an arbitrary disk. (can be a data disk, a global check disk, or a local check disk), which is equivalent to satisfying the ninth condition, such as Figure 10 The corresponding recovery method 3.2.2 includes: Step 1: Exploit The local encoding and decoding rules restore the wrong disk , at this time there are only two wrong disks left; Step 2: Decode the data disk using the first global encoding / decoding rule (e.g., formula (4)); at this point, only one error disk remains on the local check disk; Step 3: Use another local encoding and decoding rule to decode and restore the local check disk.
[0135] Case 3.3: One of the three faulty disks is a global check disk , the other two disks come from the data disks or partial parity disks in the two local parity groups, that is, the error pattern is 1+1+1. For various error disk type combinations, as shown in Table 5.
[0136] Table 5
[0137] Error pattern 3.3.1: Three error disks include: a local check disk in a local check group , a local check disk in another local check group , and global check disk ,like Figure 11 As shown, it is equivalent to a situation where the tenth condition is met, and the recovery method 3.3.1 includes: The first step is to decode the global check disk using the first global encoding and decoding rule ; At this time, there are only two partial check disks left The wrong plate; The second step is to use two local encoding and decoding rules to decode two local check disks at the same time. The wrong disk.
[0138] Error pattern 3.3.2: Three faulty disks include: a data disk in a local parity group, a local parity disk in another local parity group , Global check disk ;like Figure 12 As shown, assuming that the wrong disk is in the first local check group , and the data disks in the second local parity group , and global check disk , recovery method 3.3.2 includes: The first step is to generate a target decoding rule based on the first global encoding and decoding rule, the first local encoding and decoding rule and the second local encoding and decoding rule (i.e., formulas (4), (5) and (6)): Get restored The decoding rules are based on Get restored Decoding rules.
[0139] The second step is to solve and recover the first global encoding and decoding rule (i.e., formula (4)). .
[0140] Error pattern 3.3.3: Three faulty disks include: , the data disk in another local parity group, and the global parity disk , which is equivalent to a situation that satisfies the tenth condition, such as Figure 13 As shown, the decoding method is the same as the recovery method 3.3.2, and will not be repeated here.
[0141] Error mode 3.3.4: The three faulty disks include: a data disk in a local parity group, a data disk in another local parity group, and a global parity disk. , which is equivalent to a situation that satisfies the tenth condition, such as Figure 14 As shown, assuming that the wrong disk is in the first local check group , and the data disks in the second local parity group , and global check disk The recovery method 3.3.4 includes: The first step is to generate a target decoding rule based on the first global encoding and decoding rule, the first local encoding and decoding rule and the second local encoding and decoding rule (i.e., formulas (4), (5) and (6)): Get restored The decoding rules are based on Get restored Decoding rules.
[0142] The second step is to restore the global check disk through the first local encoding and decoding rule (i.e. formula (4)) .
[0143] In actual application, the three wrong disks may also include the target disk that is located on the third physical disk, and various situations need to be further subdivided.
[0144] Based on this, in some embodiments, if the number of faulty disks is 3, determining the recovery method corresponding to the faulty disk according to the faulty disk information includes: If the error disk includes the target disk and the eleventh condition is satisfied, the encoding and decoding rule corresponding to the eleventh condition is selected as the target encoding and decoding rule; The eleventh condition is: the three faulty disks include the target disk, the seventh disk, and the global check disk; the seventh disk is a local check disk or a data disk; the target disk is a data disk or a local check disk; The eleventh combination of encoding and decoding rules corresponding to the eleventh condition includes: a sixth target decoding rule for the seventh disk, and a seventh target decoding rule for the global check disk and the target disk; The sixth target decoding rule is generated based on the third global encoding and decoding rule, and the third global encoding and decoding rule is generated based on the first local encoding and decoding rule and the second encoding and decoding rule; The seventh target decoding rule is generated based on the first global encoding and decoding rule and the first local encoding and decoding rule.
[0145] In some embodiments, if the number of the faulty disks is 3, determining the recovery method corresponding to the faulty disks according to the faulty disk information includes: If the faulty disk includes the target disk and the twelfth condition is met, determining a decoding rule corresponding to each faulty disk based on the local parity disk and / or data disk in the local parity group according to the first global encoding and decoding rule, the first local encoding and decoding rule, and the second local encoding and decoding rule; The twelfth condition is: the three faulty disks include the target disk, the eighth disk, and the ninth disk; the eighth disk is a local check disk or a data disk; the ninth disk is a local check disk or a data disk; the target disk is a data disk or a local check disk; the eighth disk and the ninth disk belong to different local check groups.
[0146] In some embodiments, if the number of the faulty disks is 3, determining the recovery method corresponding to the faulty disks according to the faulty disk information includes: If the error disk includes the target disk and the thirteenth condition is met, the codec rule corresponding to the thirteenth condition is selected as the target codec rule; The thirteenth condition is: the three faulty disks include the target disk and two tenth disks in the same local parity group, and the tenth disk is a data disk or a local parity disk; The thirteenth combination of encoding and decoding rules corresponding to the thirteenth condition includes: the local encoding and decoding rules corresponding to the target disk and the eighth target decoding rule for the two tenth disks, and the eighth target decoding rule is generated based on the first global encoding and decoding rule and the local encoding and decoding rule corresponding to the tenth disk.
[0147] Here, the first global encoding and decoding rule refers to the above formula (1), the first local encoding and decoding rule refers to the above formula (2), and the second local encoding and decoding rule refers to the above formula (3), which are not described in detail here.
[0148] The sixth target decoding rule, the seventh target decoding rule, and the eighth target decoding rule can be generated based on the above formulas (1), (2), and / or (3). The following specifically describes various situations with reference to the accompanying drawings and formulas.
[0149] Case 4.1: Three faulty disks including: Global check disk , target disk (can be a data disk or a local check disk), any disk in a local check group (i.e., an example of a seventh disk, which can be a data disk or a local parity disk), which satisfies the eleventh condition; the recovery method includes: Step 1: Based on recover ; Step 2: Based on formulas (1) and (2), eliminate , restore the target disk ;according to eliminate , restore the global check disk ; Here, the local encoding and decoding rule including the target disk is the above formula (2). If the local encoding and decoding rule including the target disk is the above formula (3), then 、 , restore the global check disk , target disk .
[0150] Case 4.2: Three wrong disks include: target disk (can be a data disk or a local check disk), data in a local check group (can be a data disk or a local check disk), data in another local check group (It can be a data disk or a local parity disk), which is equivalent to meeting the twelfth condition; recovery methods include: Case 4.2.1: If It's a data disk. and All are data disks. Recovery methods include: Step 1: Eliminate ,according to Can be restored separately and ; Step 2: Utilize the included Local encoding and decoding rule recovery ; Case 4.2.2: If It's a data disk. and All are local check disks. Recovery methods include: Step 1: Restore using the first global codec rule ; Step 2: Use two local encoding and decoding rules to recover simultaneously and ; Case 4.2.3: If It's a data disk. and One is a data disk , one is a local check disk , recovery methods include: Step 1: Use the first global codec rule and the data disk The local encoding and decoding rules (such as the above formula (1) and (2) or (3)) can be constructed for and The decoding rules to recover and ; Step 2: Use the disk containing the local checksum The local encoding and decoding rules restore the local check disk ; Case 4.2.4: If It is a local check disk. and All are data disks. Recovery methods include: Step 1: Based on And formula (1) constructs global RAID6, which can be recovered separately and ; Step 2: Utilize the included Local encoding and decoding rule recovery ; Case 4.2.5: If It is a local check disk. and One is a data disk , one is a local check disk , recovery methods include: Step 1: Restore the data disk according to the first global encoding and decoding rule, that is, formula (1) ; Step 2: Utilize the included Local encoding and decoding rule recovery ; Step 3: Use the disk containing the local checksum The local encoding and decoding rules restore the local check disk .
[0151] Case 4.3: Three wrong disks include: (can be a data disk or a local check disk), data in the same local check group and (It can be a data disk or a local parity disk). For details, refer to the 2+1 error pattern in Table 4 above. Recovery methods may include: Step 1: Restore the disk according to the local encoding and decoding rules ; Step 2: According to formula (1) and another local encoding and decoding rule of the two discs, the recovery is obtained respectively. and The decoding rules are used to restore the other two wrong disks.
[0152] For details, please refer to the recovery method of the above 2+1 error style, which will not be repeated here.
[0153] Figure 15 A structural diagram of a data processing device provided in an embodiment of the present disclosure; Figure 15 As shown, the device includes: A first processing module, configured to divide the data to be written into at least one data block in response to a data write request from the storage system; The second processing module is used to use 2N stripes to write the at least one data block to the disk k physical disks, 2N= k -1, k≥5; Wherein, the plate is placed in a left-handed and non-aligned manner, k The physical disks include: k -3 first physical disks, 2 second physical disks and a third physical disk; Each of the stripes is divided into a first local check group, a second local check group and a global check group; the global check group includes a global check disk, a first data disk part and a second data disk part; the first local check group includes a first local check disk, a first data disk part and a global check disk, the second local check group includes a second local check disk, a second data disk part and the global check disk, and one of the first local check group and the second local check group also includes a target disk that is written to the third physical disk; the global check disk is only written to the first physical disk or the second physical disk.
[0154] In some embodiments, the second processing module is used to generate local check data and global check data for the 1st to Nth stripes according to the first encoding and decoding rule, and write the data block, local check data and global check data to the disk. k A physical disk; The first encoding and decoding rule includes a first global encoding and decoding rule, a first local encoding and decoding rule corresponding to the first local check group, and a second local encoding and decoding rule corresponding to the second local check group; The first local check group includes: the first local check disk, a first data disk portion and the global check disk; The second local parity group includes: the second local parity disk, a second data disk portion, the global parity disk, and a target disk.
[0155] In some embodiments, the first local encoding and decoding rule indicates that the result of an XOR operation after multiplying the address information of each disk and disk in the first local check group is 0; The second local encoding and decoding rule indicates that the sum of the first result and the second result is 0, the first result is the result of the XOR operation after multiplying the address information of each disk and the disk in the second local check group, and the second result is the result of multiplying the address information of the target disk and the target disk.
[0156] In some embodiments, the second processing module is used to generate local check data and global check data for the N+1th to 2Nth stripes according to the second encoding and decoding rule, and write the data blocks, local check data and global check data to the disk. k A physical disk; The second encoding and decoding rule includes: a first global encoding and decoding rule, a first local encoding and decoding rule corresponding to the first local check group, and a second local encoding and decoding rule corresponding to the second local check group; The first local check group includes: the first local check disk, a first data disk portion, the global check disk and a target disk; The second local parity group includes: the second local parity disk, a second data disk portion, and the global parity disk.
[0157] In some embodiments, the first local encoding and decoding rule indicates that the sum of the third result and the second result is 0, the third result being the result of an XOR operation performed after multiplying the address information of each disk in the first local check group; and the second result being the result of multiplying the address information of the target disk by the target disk. The second local encoding and decoding rule indicates that a result of an XOR operation performed after multiplying the address information of each disk in the second local check group is 0.
[0158] In some embodiments, the apparatus further comprises: a third processing module configured to respond to a disk error recovery request from the storage system and determine disk error information in the disk error recovery request; Determining a recovery method corresponding to the faulty disk based on the faulty disk information; Using the recovery method to recover data from the faulty disk, and obtaining a data recovery result; The error disk information includes at least one of the following: the number of error disks, the type of error disk, the check group where the error disk belongs, and whether the target disk is included; the number of error disks is at least one; The recovery method is a method for recovering error disk data by using target encoding and decoding rules.
[0159] In some embodiments, if the number of the wrong disks is 1, the third processing module is configured to determine a target decoding rule according to the encoding and decoding rule corresponding to the wrong disk.
[0160] In some embodiments, if the number of the error disks is 2, the third processing module is configured to select a codec rule corresponding to a combination of the corresponding conditions as the target codec rule if the error disks do not include the target disk and one of the first condition, the second condition, the third condition, and the fourth condition is satisfied; The first condition is: the two faulty disks include a global check disk and a first disk, and the first disk is any data disk or a local check disk; The first combination of codec rules corresponding to the first condition includes: a local codec rule excluding the first disc and a local codec rule including the first disc; The second condition is that the two faulty disks belong to different local parity groups and are data disks or local parity disks. The second combination of encoding and decoding rules corresponding to the second condition includes: local encoding and decoding rules corresponding to each local check group; The third condition is: the two faulty disks include any data disk and local check disk that belong to the same local check group; The third combination of encoding and decoding rules corresponding to the third condition includes: the first global encoding and decoding rule, and the local encoding and decoding rules corresponding to the arbitrary data disk and the local check disk; The fourth condition is: the two faulty disks include two data disks belonging to the same local parity group; The fourth combination of encoding and decoding rules corresponding to the fourth condition includes: a first target decoding rule for two data disks, the first target decoding rule is generated based on the second global encoding and decoding rule, and the second global encoding and decoding rule is generated based on the first local encoding and decoding rule, the second local encoding and decoding rule and the first global encoding and decoding rule.
[0161] In some embodiments, if the number of the error disks is 2, the third processing module is configured to select a codec rule corresponding to a combination of the corresponding conditions as the target codec rule if the error disks include a target disk and satisfy one of the fifth condition, the sixth condition, and the seventh condition; The fifth condition is: the two faulty disks include a global check disk and a target disk, and the target disk is a data disk; The fifth combination of encoding and decoding rules corresponding to the fifth condition includes: a second target decoding rule for the global check disk and the target disk generated based on the first global encoding and decoding rule and the local encoding and decoding rule including the target disk; The sixth condition is: the two faulty disks include a global check disk and a target disk, and the target disk is a local check disk; The sixth combination of encoding and decoding rules corresponding to the sixth condition includes: a first global encoding and decoding rule and a local encoding and decoding rule corresponding to the target disk; The seventh condition is: the two faulty disks include a first disk and a target disk, the first disk is any data disk or a partial check disk, and the target disk is a data disk or a partial check disk; The seventh combination of codec rules corresponding to the seventh condition includes: a local codec rule that does not include the first disk and a local codec rule that includes the first disk.
[0162] In some embodiments, if the number of the error disks is 3, the third processing module is configured to select a codec rule corresponding to a combination of the corresponding conditions as the target codec rule if the error disks do not include the target disk and one of the eighth condition, the ninth condition, and the tenth condition is satisfied; The eighth condition is: the three faulty disks include two second disks belonging to the same local parity group and a third disk belonging to another local parity group; the second disks are data disks, and the third disk is an arbitrary disk; An eighth combination of encoding and decoding rules corresponding to the eighth condition includes: a local encoding and decoding rule corresponding to the third disk and a third target decoding rule for the two second disks, wherein the third target decoding rule is generated based on the first global encoding and decoding rule and the local encoding and decoding rule corresponding to the third disk; The ninth condition is that the three faulty disks include a data disk and a local parity disk belonging to the same local parity group, and a fourth disk belonging to another local parity group; the fourth disk is any disk; The ninth combination of encoding and decoding rules corresponding to the ninth condition includes: the local encoding and decoding rule corresponding to the fourth disk, the first global encoding and decoding rule, and the local encoding and decoding rules corresponding to the data disk and the local check disk; The tenth condition is: the three faulty disks include a global parity disk, and a fifth disk and a sixth disk from two local parity groups, respectively; the fifth disk is a local parity disk or a data disk, and the sixth disk is a local parity disk or a data disk; The tenth combination of encoding and decoding rules corresponding to the tenth condition includes: a fourth target decoding rule for the fifth disk, a fifth target decoding rule for the sixth disk, and the first global encoding and decoding rule, the first local encoding and decoding rule, or the second local encoding and decoding rule; the fourth target decoding rule and the fifth target decoding rule are generated based on the first global encoding and decoding rule, the first local encoding and decoding rule, and the second local encoding and decoding rule.
[0163] In some embodiments, if the number of the error disks is 3, the third processing module is configured to select a codec rule corresponding to the combination of the eleventh condition as the target codec rule if the error disks include the target disk and the eleventh condition is satisfied; The eleventh condition is: the three faulty disks include the target disk, the seventh disk, and the global check disk; the seventh disk is a local check disk or a data disk; the target disk is a data disk or a local check disk; The eleventh combination of encoding and decoding rules corresponding to the eleventh condition includes: a sixth target decoding rule for the seventh disk, and a seventh target decoding rule for the global check disk and the target disk; The sixth target decoding rule is generated based on the third global encoding and decoding rule, and the third global encoding and decoding rule is generated based on the first local encoding and decoding rule and the second encoding and decoding rule; The seventh target decoding rule is generated based on the first global codec rule and the local codec rule including the target disk.
[0164] In some embodiments, if the number of the error disks is 3, the third processing module is configured to, if the error disks include a target disk and the twelfth condition is met, determine a decoding rule corresponding to each error disk based on the local parity group to which the local parity disks and / or data disks in the error disks belong, according to the first global encoding and decoding rule, the first local encoding and decoding rule, and the second local encoding and decoding rule; The twelfth condition is: the three faulty disks include the target disk, the eighth disk, and the ninth disk; the eighth disk is a local check disk or a data disk; the ninth disk is a local check disk or a data disk; the target disk is a data disk or a local check disk; the eighth disk and the ninth disk belong to different local check groups.
[0165] In some embodiments, if the number of the error disks is 3, the third processing module is configured to, if the error disks include a target disk and the thirteenth condition is met, select a codec rule corresponding to the thirteenth condition as the target codec rule; The thirteenth condition is: the three faulty disks include the target disk and two tenth disks in the same local parity group, and the tenth disk is a data disk or a local parity disk; The thirteenth combination of encoding and decoding rules corresponding to the thirteenth condition includes: the local encoding and decoding rules corresponding to the target disk and the eighth target decoding rule for the two tenth disks, and the eighth target decoding rule is generated based on the first global encoding and decoding rule and the local encoding and decoding rule corresponding to the tenth disk.
[0166] It is understood that when implementing the corresponding data processing methods, the data processing devices provided in the above embodiments can, as needed, distribute the aforementioned processing to different program modules to complete all or part of the aforementioned processing. Furthermore, the devices provided in the above embodiments and the corresponding method embodiments are based on the same concept. The specific implementation process is detailed in the method embodiments and will not be further described here.
[0167] The present invention provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a data processing method.
[0168] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the data processing method provided by the embodiment of the present application.
[0169] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or various devices including one or any combination of the above memories.
[0170] In some embodiments, executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0171] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).
[0172] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0173] Figure 16 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure; Figure 16 As shown, the electronic device 160 includes: a processor 1601, and a memory 1602 in communication with the processor 1601; the memory 1602 stores instructions that can be executed by the processor 1601. The instructions are executed by the processor 1601 to enable the processor 1601 to perform: In response to a data write request from the storage system, dividing the data to be written into at least one data block; Use 2N stripes to write the at least one data block to the disk k physical disks, 2N= k -1, k≥5; Wherein, the plate is placed in a left-handed and non-aligned manner, k The physical disks include: k -3 first physical disks, 2 second physical disks and a third physical disk; Each of the stripes is divided into a first local check group, a second local check group and a global check group; the global check group includes a global check disk, a first data disk part and a second data disk part; the first local check group includes a first local check disk, a first data disk part and a global check disk, the second local check group includes a second local check disk, a second data disk part and the global check disk, and one of the first local check group and the second local check group also includes a target disk that is written to the third physical disk; the global check disk is only written to the first physical disk or the second physical disk.
[0174] The electronic device provided in the above embodiments and the corresponding data processing method embodiments belong to the same concept. The specific implementation process is detailed in the method embodiments and will not be repeated here.
[0175] In actual application, the electronic device 160 may further include: at least one network interface 1603. The various components in the electronic device 160 are coupled together via a bus system 1604. It is understood that the bus system 1604 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 1604 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 16 In the figure, various buses are labeled as bus system 1604. There may be at least one processor 1601 and at least one memory 1602. The network interface 1603 is used for wired or wireless communication between the electronic device 160 and other devices.
[0176] The memory 1602 in the embodiment of the present disclosure is used to store various types of data to support the operation of the electronic device 160 .
[0177] The methods disclosed in the above embodiments of the present disclosure can be applied to or implemented by processor 1601. Processor 1601 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in processor 1601 or by software instructions. Processor 1601 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. Processor 1601 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present disclosure. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present disclosure can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in memory 1602. Processor 1601 reads information from memory 1602 and, in conjunction with its hardware, completes the steps of the above data processing method.
[0178] In some embodiments, the electronic device 160 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to execute the aforementioned method.
[0179] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0180] In the above description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
[0181] Unless otherwise defined, all technical and scientific terms used in this disclosure have the same meaning as commonly understood by those skilled in the art in the art of this disclosure. The terms used in this disclosure are only for the purpose of describing the embodiments of this disclosure and are not intended to limit this disclosure.
[0182] It should be understood that in the various embodiments of the present disclosure, the size of the serial number of each implementation process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
[0183] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the present disclosure, "plurality" means two or more, unless otherwise specifically defined.
[0184] The above description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. A data processing method, characterized in that: The method comprises: In response to a data write request from the storage system, dividing the data to be written into at least one data block; Use 2N stripes to write the at least one data block to the disk k physical disks, 2N= k -1, k≥5; Wherein, the plate is placed in a left-handed and non-aligned manner, k The physical disks include: k -3 first physical disks, 2 second physical disks and a third physical disk; Each of the stripes is divided into a first local check group, a second local check group and a global check group; the global check group includes a global check disk, a first data disk part and a second data disk part; the first local check group includes a first local check disk, a first data disk part and a global check disk, the second local check group includes a second local check disk, a second data disk part and the global check disk, and one of the first local check group and the second local check group also includes a target disk that is written to the third physical disk; the global check disk is only written to the first physical disk or the second physical disk.
2. The method according to claim 1, characterized in that The step of using 2N stripes to store the at least one data block on k physical disks includes: For the 1st to Nth stripes, local check data and global check data are generated according to the first encoding and decoding rule, and the data blocks, local check data and global check data are written to the disk. k A physical disk; The first encoding and decoding rule includes a first global encoding and decoding rule, a first local encoding and decoding rule corresponding to the first local check group, and a second local encoding and decoding rule corresponding to the second local check group; The first local check group includes: the first local check disk, a first data disk portion and the global check disk; The second local parity group includes: the second local parity disk, a second data disk portion, the global parity disk, and a target disk.
3. The method according to claim 2, characterized in that The first local encoding and decoding rule indicates that the result of an XOR operation after multiplying the address information of each disk in the first local check group is 0; The second local encoding and decoding rule indicates that the sum of the first result and the second result is 0, the first result is the result of the XOR operation after multiplying the address information of each disk and the disk in the second local check group, and the second result is the result of multiplying the address information of the target disk and the target disk.
4. The method according to claim 1, wherein The at least one data block is written to the disk using 2N stripes. k physical disks, including: For the N+1th to 2Nth stripes, local check data and global check data are generated according to the second encoding and decoding rule, and the data blocks, local check data and global check data are written to the disk. k A physical disk; The second encoding and decoding rule includes: a first global encoding and decoding rule, a first local encoding and decoding rule corresponding to the first local check group, and a second local encoding and decoding rule corresponding to the second local check group; The first local check group includes: the first local check disk, a first data disk portion, the global check disk and a target disk; The second local parity group includes: the second local parity disk, a second data disk portion, and the global parity disk.
5. The method according to claim 4, characterized in that The first local encoding and decoding rule indicates that the sum of a third result and a second result is 0, the third result being the result of an XOR operation performed after multiplying the address information of each disk in the first local check group; and the second result being the result of multiplying the address information of the target disk by the target disk. The second local encoding and decoding rule indicates that a result of an XOR operation performed after multiplying the address information of each disk in the second local check group is 0.
6. The method according to claim 1, characterized in that The method further comprises: In response to a disk error recovery request of the storage system, determining disk error information in the disk error recovery request; Determining a recovery method corresponding to the faulty disk based on the faulty disk information; Using the recovery method to recover data from the faulty disk, and obtaining a data recovery result; The error disk information includes at least one of the following: the number of error disks, the type of error disk, the check group where the error disk belongs, and whether the target disk is included; the number of error disks is at least one; The recovery method is a method for recovering error disk data by using target encoding and decoding rules.
7. The method according to claim 6, characterized in that If the number of faulty disks is 1, determining a recovery method corresponding to the faulty disk according to the faulty disk information includes: According to the encoding and decoding rules corresponding to the error disk, a target decoding rule is determined.
8. The method according to claim 6, characterized in that If the number of faulty disks is 2, determining a recovery method corresponding to the faulty disks according to the faulty disk information includes: If the error disk does not include the target disk and satisfies one of the first condition, the second condition, the third condition, and the fourth condition, selecting the codec rule corresponding to the combination of the corresponding condition as the target codec rule; The first condition is that the two faulty disks include a global check disk and a first disk, and the first disk is any data disk or a local check disk; The first combination of codec rules corresponding to the first condition includes: a local codec rule excluding the first disc and a local codec rule including the first disc; The second condition is that the two faulty disks belong to different local parity groups and are data disks or local parity disks. The second combination of encoding and decoding rules corresponding to the second condition includes: local encoding and decoding rules corresponding to each local check group; The third condition is: the two faulty disks include any data disk and local check disk that belong to the same local check group; The third combination of encoding and decoding rules corresponding to the third condition includes: the first global encoding and decoding rule, and the local encoding and decoding rules corresponding to the arbitrary data disk and the local check disk; The fourth condition is: the two faulty disks include two data disks belonging to the same local parity group; The fourth combination of encoding and decoding rules corresponding to the fourth condition includes: a first target decoding rule for two data disks, the first target decoding rule is generated based on the second global encoding and decoding rule, and the second global encoding and decoding rule is generated by merging the first local encoding and decoding rule, the second local encoding and decoding rule and the first global encoding and decoding rule.
9. The method according to claim 6, characterized in that If the number of faulty disks is 2, determining a recovery method corresponding to the faulty disks according to the faulty disk information includes: If the error disk includes the target disk and satisfies one of the fifth, sixth, and seventh conditions, select the codec rule corresponding to the combination of the corresponding conditions as the target codec rule; The fifth condition is: the two faulty disks include a global check disk and a target disk, and the target disk is a data disk; The fifth combination of encoding and decoding rules corresponding to the fifth condition includes: a second target decoding rule for the global check disk and the target disk generated based on the first global encoding and decoding rule and the local encoding and decoding rule including the target disk; The sixth condition is: the two faulty disks include a global check disk and a target disk, and the target disk is a local check disk; The sixth combination of encoding and decoding rules corresponding to the sixth condition includes: a first global encoding and decoding rule and a local encoding and decoding rule corresponding to the target disk; The seventh condition is: the two faulty disks include a first disk and a target disk, the first disk is any data disk or a partial check disk, and the target disk is a data disk or a partial check disk; The seventh combination of codec rules corresponding to the seventh condition includes: a local codec rule that does not include the first disk and a local codec rule that includes the first disk.
10. The method according to claim 6, characterized in that If the number of faulty disks is 3, determining a recovery method corresponding to the faulty disks according to the faulty disk information includes: If the error disk does not include the target disk and one of the eighth, ninth, and tenth conditions is met, the codec rule corresponding to the combination of the corresponding conditions is selected as the target codec rule; The eighth condition is: the three faulty disks include two second disks belonging to the same local parity group and a third disk belonging to another local parity group; the second disks are data disks, and the third disk is an arbitrary disk; An eighth combination of encoding and decoding rules corresponding to the eighth condition includes: a local encoding and decoding rule corresponding to the third disk and a third target decoding rule for the two second disks, wherein the third target decoding rule is generated based on the first global encoding and decoding rule and the local encoding and decoding rule corresponding to the third disk; The ninth condition is that the three faulty disks include a data disk and a local parity disk belonging to the same local parity group, and a fourth disk belonging to another local parity group; the fourth disk is any disk; The ninth combination of encoding and decoding rules corresponding to the ninth condition includes: the local encoding and decoding rule corresponding to the fourth disk, the first global encoding and decoding rule, and the local encoding and decoding rules corresponding to the data disk and the local check disk; The tenth condition is: the three faulty disks include a global parity disk, and a fifth disk and a sixth disk from two local parity groups, respectively; the fifth disk is a local parity disk or a data disk, and the sixth disk is a local parity disk or a data disk; The tenth combination of encoding and decoding rules corresponding to the tenth condition includes: a fourth target decoding rule for the fifth disk, a fifth target decoding rule for the sixth disk, and the first global encoding and decoding rule, the first local encoding and decoding rule, or the second local encoding and decoding rule; the fourth target decoding rule and the fifth target decoding rule are generated based on the first global encoding and decoding rule, the first local encoding and decoding rule, and the second local encoding and decoding rule.
11. The method according to claim 6, characterized in that If the number of faulty disks is 3, determining a recovery method corresponding to the faulty disks according to the faulty disk information includes: If the error disk includes the target disk and the eleventh condition is satisfied, the encoding and decoding rule corresponding to the eleventh condition is selected as the target encoding and decoding rule; The eleventh condition is: the three faulty disks include the target disk, the seventh disk, and the global check disk; the seventh disk is a local check disk or a data disk; the target disk is a data disk or a local check disk; The eleventh combination of encoding and decoding rules corresponding to the eleventh condition includes: a sixth target decoding rule for the seventh disk, and a seventh target decoding rule for the global check disk and the target disk; The sixth target decoding rule is generated based on the third global encoding and decoding rule, and the third global encoding and decoding rule is generated based on the first local encoding and decoding rule and the second encoding and decoding rule; The seventh target decoding rule is generated based on the first global codec rule and the local codec rule including the target disk.
12. The method according to claim 6, characterized in that If the number of faulty disks is 3, determining a recovery method corresponding to the faulty disks according to the faulty disk information includes: If the faulty disk includes the target disk and the twelfth condition is met, based on the local parity group of the local parity disk and / or data disk in the faulty disk, determine the decoding rule corresponding to each faulty disk according to the first global encoding and decoding rule, the first local encoding and decoding rule, and the second local encoding and decoding rule; The twelfth condition is: the three faulty disks include the target disk, the eighth disk, and the ninth disk; the eighth disk is a local check disk or a data disk; the ninth disk is a local check disk or a data disk; the target disk is a data disk or a local check disk; the eighth disk and the ninth disk belong to different local check groups.
13. The method according to claim 6, characterized in that If the number of faulty disks is 3, determining a recovery method corresponding to the faulty disks according to the faulty disk information includes: If the error disk includes the target disk and the thirteenth condition is met, the encoding and decoding rule corresponding to the thirteenth condition is selected as the target encoding and decoding rule; The thirteenth condition is: the three faulty disks include the target disk and two tenth disks in the same local parity group, and the tenth disk is a data disk or a local parity disk; The thirteenth combination of encoding and decoding rules corresponding to the thirteenth condition includes: the local encoding and decoding rules corresponding to the target disk and the eighth target decoding rule for the two tenth disks, and the eighth target decoding rule is generated based on the first global encoding and decoding rule and the local encoding and decoding rule corresponding to the tenth disk.
14. A data processing device, characterized in that: The device comprises: A first processing module, configured to divide the data to be written into at least one data block in response to a data write request from the storage system; The second processing module is used to use 2N stripes to write the at least one data block to the disk k physical disks, 2N= k -1, k≥5; Wherein, the plate is placed in a left-handed and non-aligned manner, k The physical disks include: k -3 first physical disks, 2 second physical disks and a third physical disk; Each of the stripes is divided into a first local check group, a second local check group and a global check group; the global check group includes a global check disk, a first data disk part and a second data disk part; the first local check group includes a first local check disk, a first data disk part and a global check disk, the second local check group includes a second local check disk, a second data disk part and the global check disk, and one of the first local check group and the second local check group also includes a target disk that is written to the third physical disk; the global check disk is only written to the first physical disk or the second physical disk.
15. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 13.
16. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 13.
Citation Information
Cited By
Abnormal data processing method and device, storage medium and electronic equipment
CN120723520A
RAID data processing method and device, chip, electronic equipment, storage medium and computer program product
CN120723544A