Method, device and program product for data writing and data recovery
By writing the checksum seed data in the RAID storage system and comparing the checksums, the data recovery process is simplified, the problem of high data recovery complexity in the existing technology is solved, and the recovery efficiency is improved.
Patent Information
- Application Number
- CN201911054443.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-31
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2039-10-31
AI Technical Summary
The existing data recovery mechanisms based on redundant array of independent disks (RAID) storage systems are highly complex, resulting in long data recovery times and high consumption of computing resources, especially when multiple physical blocks are damaged.
When writing data, additional checksum seed data is written so that the checksum of each data block is a fixed value, and the recoverability of the data block is determined by comparing the checksum when data is read, simplifying the data recovery process.
It reduces the calculation and time overhead of data recovery and improves the efficiency of data recovery, especially in RAID systems with multiple parity blocks.
Smart Images

Figure CN112749039B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure generally relate to the field of data storage, and more particularly, to a method for data writing, a method for data recovery, an electronic device, and a computer program product. Background Art
[0002] In a storage system based on a redundant array of independent disks (RAID), the data of the logical blocks in the logical storage space are compressed and stored in the physical storage space. The physical storage space is divided into multiple stripes, each of which includes multiple physical blocks, specifically data blocks and check blocks. The data blocks are used to store the compressed data of the logical blocks, and the check blocks are used to store the check information for the data stored in the data blocks. A data block may store data in one or more logical blocks. During data storage, data corruption may occur, such as bit flipping in the data. The storage system provides some data recovery mechanisms to deal with such situations in order to recover the damaged data. However, the existing data recovery mechanisms have some shortcomings and need further improvement. Summary of the invention
[0003] Embodiments of the present disclosure relate to an improved solution for data writing and data recovery.
[0004] In a first aspect of the present disclosure, a method for data recovery is provided. The method includes: reading target data corresponding to a first logic block from a first data block of a stripe of a redundant array of independent disks (RAID) system, the target data being a compressed version of the data in the first logic block; reading data from a plurality of second data blocks of the stripe and reading first check information from a first check block of the stripe based on determining that the target data is erroneous; comparing corresponding checksums of the data read from the plurality of second data blocks with a first predetermined checksum and comparing the checksum of the first check information with a second predetermined checksum; and determining recoverability of the target data based on the comparison result.
[0005] In a second aspect of the present disclosure, a method for writing data is provided. The method includes: compressing the target data in the plurality of logical blocks by logical block according to determining that the target data in the plurality of logical blocks is to be written in a data block of a stripe of a redundant array of independent disks (RAID) system; determining checksum seed data based on the compressed target data so that the checksum of the compressed target data and the checksum seed data is a first predetermined checksum; and writing the compressed target data and the checksum seed data into the data block.
[0006] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processor; and at least one memory storing computer program instructions, the at least one memory and the computer program instructions being configured to, together with the at least one processor, cause the electronic device to perform an action. The action includes: reading target data corresponding to a first logic block from a first data block of a stripe of a redundant array of independent disks (RAID) system, the target data being a compressed version of the data in the first logic block; reading data from a plurality of second data blocks of the stripe and reading first check information from a first check block of the stripe based on determining that the target data is erroneous; comparing the corresponding checksums of the data read from the plurality of second data blocks with a first predetermined checksum and comparing the checksum of the first check information with a second predetermined checksum; and determining the recoverability of the target data based on the result of the comparison.
[0007] In a fourth aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processor; and at least one memory storing computer program instructions, wherein the at least one memory and the computer program instructions are configured to, together with the at least one processor, cause the electronic device to perform an action. The action includes: compressing the target data in the multiple logical blocks by logical blocks according to the target data in the multiple logical blocks to be written in the data block of the stripe of the redundant array of independent disks (RAID) system; determining checksum seed data based on the compressed target data so that the checksum of the compressed target data and the checksum seed data is a first predetermined checksum; and writing the compressed target data and the checksum seed data into the data block.
[0008] In a fifth aspect of the present disclosure, a computer program product is provided. The computer program product is tangibly stored on a non-volatile computer-readable medium and includes machine-executable instructions. When the machine-executable instructions are executed, a device is caused to perform the method according to the first aspect above.
[0009] In a sixth aspect of the present disclosure, a computer program product is provided. The computer program product is tangibly stored on a non-volatile computer-readable medium and includes machine-executable instructions. When the machine-executable instructions are executed, a device is caused to perform the method according to the second aspect above.
[0010] It should be understood that the contents described in the summary of the invention are not intended to limit 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 easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other purposes, features and advantages of the embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:
[0012] Figure 1 A block diagram illustrating an example storage system in which embodiments of the present disclosure may be implemented;
[0013] Figure 2 A schematic diagram showing an example structure of a logical address space and a physical storage space in a RAID according to an embodiment of the present disclosure;
[0014] Figure 3 A schematic diagram showing the mapping of logical blocks and physical blocks in a RAID according to an embodiment of the present disclosure is shown;
[0015] Figure 4 A flowchart of a process for writing data according to some embodiments of the present disclosure is shown;
[0016] Figure 5 An example of writing data into a data block of a stripe according to some embodiments of the present disclosure is shown;
[0017] Figure 6 A flowchart illustrating a process for data recovery according to some embodiments of the present disclosure is shown;
[0018] Figure 7 A flowchart of a process for determining recoverability of target data according to some embodiments of the present disclosure;
[0019] Figure 8 A schematic block diagram of a device that can be used to implement an embodiment of the present disclosure is shown.
[0020] The same or similar reference numerals are used throughout the drawings to designate the same or similar components. DETAILED DESCRIPTION
[0021] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments shown in the accompanying drawings. It should be understood that these specific embodiments are described only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way.
[0022] Figure 1 Schematic diagram of an exemplary storage system 100 in which embodiments of the present disclosure may be implemented. Figure 1 As shown, the storage system 100 includes a control node 110 and a hardware storage pool 120 .
[0023] The control node 110 may include, but is not limited to, any device with computing capabilities, such as a cloud computing device, a mainframe computer, a server, a personal computer, a desktop computer, a laptop computer, a tablet computer, and a personal digital assistant.
[0024] The hardware storage pool 120 includes a plurality of storage disks 122-1, 142-2, 142-3, ..., 142-N (N is an integer greater than or equal to 1), etc., for providing physical storage space of the storage system 100. For ease of discussion, these storage disks are sometimes collectively or individually referred to as storage disks 122. The storage disk 122 may include various types of devices with storage functions, including, but not limited to, a hard disk (HDD), a solid state disk (SSD), a removable disk, a compact disk (CD), a laser disk, an optical disk, a digital versatile disk (DVD), a floppy disk, a Blu-ray disk, a serial attached small computer system interface (SCSI) storage disk (SAS), a serial advanced technology attachment (SATA) storage disk, any other magnetic storage device, and any other optical storage device, or any combination thereof.
[0025] The control node 110 is used to control the hardware storage pool 120, including managing and configuring the physical storage resources in the hardware storage pool 120, determining the allocation of physical storage resources, and controlling the I / O access to the physical storage resources. The control node 110 may include corresponding logic for implementing the control of the hardware storage pool 120. The storage system 100 may provide storage based on the Redundant Array of Independent Disks (RAID) technology. Therefore, the storage system 100 may also be referred to as a RAID system 100, or a RAID-based storage system 100. In some embodiments, based on the RAID technology, the control node 110 may include a namespace logic 112, a mapper logic 114, a RAID logic 116, etc.
[0026] The RAID logic 116 in the control node 110 organizes the physical storage space of the storage disk 122 using the RAID algorithm. The RAID logic 116 provides a flat physical address space to the mapper logic 114. In a RAID-based storage system, various RAID algorithms can be used to organize the physical storage disk 122, including traditional RAID algorithms and the architecture currently known as RAID 2.0. In some embodiments, the storage disk 122 is divided into multiple disk extents or multiple disk slices. Such a division can be a logical division. The size of each disk extent can be fixed, and the specific size can depend on the size and division method of the storage disk 122. In some examples, the size of the disk extent can be gigabyte level. Of course, other disk extent sizes are also possible according to actual deployment needs.
[0027] In some dynamically allocated storage systems, all disks of the storage disk 122 are free when initially created. As data is written, when insufficient capacity is found, the RAID logic 116 will select multiple disks from different storage disks 122 using a certain algorithm and group these disks into a RAID block (sometimes also called an Uber) of the RAID logic. Such a RAID block can be considered a small RAID because the I / O access and management of the RAID block are similar to conventional RAID. Figure 2 Describes the structure of a RAID block. In some implementations, one or more RAID blocks may also be organized into a storage zone, sometimes referred to as a storage tier. A storage zone may be provided to a user as storage space for accessing and storing data.
[0028] Mapper logic 114 is a log-based logic. Mapper logic 114 is configured to manage the mapping between the physical storage address and the logical storage address of the storage disk 122 of the storage system 100. Mapper logic 114 provides a flat linear logical address space to namespace logic 112. In some implementations, the logical address space is composed of a large number of logical blocks (sometimes also referred to as logical pages). Each logical block can have a fixed size (e.g., 4KB size). Each logical block can be mapped to a corresponding physical block (sometimes also referred to as a physical page). Mapper logic 114 maintains the mapping between the logical address of each logical block and the physical address of the corresponding physical block.
[0029] The namespace logic 112 utilizes the logical address space provided by the mapper logic 114 and can provide storage volumes to the upstream (e.g., users). The namespace logic 112 can call the application program interface (API) of the mapper logic 114 to obtain a mapping of logical to physical addresses to access the corresponding logical blocks. When performing an I / O operation on the storage system 100, an I / O request from a user is received by the namespace logic 112 and sent to the mapper logic 114. The mapper logic 114 looks up the address of the physical block corresponding to the logical block targeted by the I / O request (the address of the storage space physically used for data storage), and initiates an I / O request to the RAID logic 116, so that the RAID logic 116 performs the actual I / O operation on the back-end storage disk 122.
[0030] It should be understood that Figure 1 Only units, modules or components related to the embodiments of the present disclosure in the storage system 100 are schematically shown. Figure 1 The components shown in the figure are only an example storage system management architecture. In other RAID-based storage systems, there may be other architecture divisions, other units, modules or components for other functions, etc. Therefore, the embodiments of the present disclosure are not limited to Figure 1The specific devices, units, modules or components depicted are generally applicable to any storage system based on RAID technology. Figure 1 The various components shown in FIG. 1 (except storage disk 122 ) may be implemented in a single or multiple computing devices.
[0031] RAID logic 116 is constructed in units of disks. In some dynamically allocated storage systems, when RAID logic 116 is initially created, all disks are free. As data is written, when it is found that the capacity of RAID is insufficient, RAID logic 116 will select multiple disks from different storage disks 122 according to a certain algorithm, and these disks are combined into a RAID block of RAID logic 116. Such a RAID block can be considered as a small RAID because the I / O access and management of the RAID block are similar to conventional RAID.
[0032] As described above, the mapper logic 114 provides the logical storage space to the upper layer (eg, the namespace logic 112 ), and maps the logical storage space to the physical storage space of the RAID logic 116 . Figure 2 An example logical-physical mapping 200 in the mapper logic 114 is shown. Figure 2 As shown, the logical address space 210 is formed by a plurality of logical blocks. Each logical block may have the same size, for example, each logical block may be 4KB in size. Of course, other sizes are also possible. In some implementations, the mapper logic 114 may utilize a B+ tree structure as a mapping tree 220 to point to a logical block in the logical address space 210 at the granularity of a logical block. Figure 2 An example three-level B+ tree structure mapping tree 220 is shown in FIG. It should be understood that tree structures at other levels or other types of data structures may also be used to implement mapping.
[0033] like Figure 2 As shown, the mapping tree 220 includes a root node 221, multiple intermediate nodes 222 and multiple leaf nodes 225, and each node 221, 222, 225 has multiple entries. Each entry includes a corresponding pointer for pointing to the next level entry. The entry in the leaf node 225 points to a logical block in the logical address space. In one example, each node may include 512 pointers, each pointer pointing to the next level entry or logical block. Of course, the number of pointers here is only an example, and other numbers of pointers are also feasible. In some implementations, multiple logical blocks of the logical address space (in Figure 2 214) form a larger unit virtual block, referred to as a virtual large block (VLB), such as VLB0 212-0, VLB 1 212-1, and so on (sometimes collectively or individually referred to as VLB 212 or virtual large block 212).
[0034] In the hardware storage pool 120, a plurality of disk areas 240-0, 240-1, 240-2, ..., 240-P (collectively or individually referred to as disk area 240) divided by the storage disk 120 constitute a RAID block 202. P may be an integer greater than or equal to 2. The P disk areas constituting the RAID block 202 may come from different storage disks 120. The RAID block 202 is divided into a plurality of physical large blocks (PLBs) 230-0, 230-1, 230-2, ..., 230-M (collectively or individually referred to as PLB 230). M may be an integer greater than or equal to 2.
[0035] VLB 212 is mapped to PLB 230 in RAID block 202. PLB 230 may be divided into multiple stripes, each stripe including multiple physical blocks. In particular, the data structure of VLB 212 has a mapping of logical blocks 214 to physical blocks in PLB 230. In some implementations, the size of logical block 214 may be the same as the size of physical block. Figure 3 The mapping of logical blocks to physical blocks and the structures in PLB 230 are described in more detail.
[0036] like Figure 3 As shown, the physical storage space of a PLB 230 in the RAID block 202 is divided into a plurality of stripes 310, and each stripe 310 may have the same size. The stripes 310 may also be sometimes referred to as physical large blocks (PLBs). Each stripe 310 may be composed of a plurality of physical blocks. In some examples, the physical blocks in the stripes 310 may be the same size as a single logical block in the VLB, for example, 4 KB. Therefore, the size of each stripe may be an integer multiple of the size of a single logical block, for example, an integer multiple of 4 KB.
[0037] The number and layout of physical blocks in each stripe 310 depend on the specific RAID type. Figure 3 In the example, 4+2RAID 6 type is used as an example for explanation. As shown in the figure, stripe 310 includes 6 physical blocks, namely data blocks 302-1, 302-2, 302-3 and 302-4 (collectively or individually referred to as data blocks 302), and check blocks 304-1 and 304-2 (collectively or individually referred to as check blocks 304). Data block 302 is used to store data, and check block 304 is used to store check information of multiple data blocks, so as to facilitate reconstruction of data in data block 302 after the data in it is damaged. Figure 3 In the NAS, the data blocks of each stripe are indicated by a tag beginning with "D", and the check blocks are indicated by a tag beginning with "P".
[0038] In a RAID 6 type system, each stripe 310 includes two check blocks (i.e., check blocks 304-1 and 304-2), so that data can be ensured not to be lost even if two blocks in the stripe 310 are damaged. Check blocks 304-1 and 304-2 are two independent check information blocks, and the check information of data blocks 302-1, 302-2, 302-3, and 302-4 can be calculated based on different check algorithms (e.g., different parity check algorithms). For example, the check information in check block 304-1 can be generated using an exclusive OR (XOR) algorithm, that is, obtained by performing an XOR operation on the data in data blocks 302-1, 302-2, 302-3, and 302-4. Check block 304-2 can use another different check algorithm to calculate the check information of the data block, for example, the "Galois Field" algorithm can be used to calculate the check information. Check block 304-1 is sometimes referred to as a P check block, and check block 304-2 is sometimes referred to as a Q check block.
[0039] The logical block 214 in each virtual block VLB 212 is mapped to the data block 302 of the stripe 310. That is, the data that the user wants to store in the logical block 214 is physically stored in the physical block in the physical storage space, that is, the data block in the stripe (because the check block stores the check information instead of the data). Usually, the data in the logical block 214 is compressed and stored in the data block 302. Therefore, although the size of the data block 302 may be set to the same size as the logical block 214 (for example, 4KB), the data in the logical block 214 may be reduced through compression, so one data block 302 may store the compressed data of two or more logical blocks 214. Figure 3 , for the sake of explanation, data storage in data block 302 is illustrated, and data block 302 includes compressed data "x", "y" and part of data "z" from three logical blocks. Another part of data "z" is stored in a data block of the next stripe of the same extent in PLB 230. That is, data of one logical block may be stored across physical blocks, which can improve physical space utilization.
[0040] The mapper logic 114 associates multiple VLBs with a single PLB 230 and stores metadata within the VLB for each logical block 214. Such metadata may include location metadata, such as the offset of the start position of the compressed data of the logical block 214 in the PLB 230, the length of the compressed data, the checksum of the original data in the logical block 214 before compression, the index of the PLB 230 in the RAID block 202, etc. The metadata may also indicate the compression algorithm applied to the data of the logical block 214.
[0041] It should be understood that Figure 3This is only a layout method for stripes based on RAID 6. Stripes of other types of RAID may have other layout methods. In some embodiments, in a RAID established based on other RAID types, each stripe may also have other numbers of physical blocks for storing check information. For example, in a RAID based on RAID 5, each stripe may include 4 data blocks and 1 check block. Such a stripe can ensure that data is not lost even if one physical block is damaged.
[0042] It will be understood that the embodiments of the present disclosure are not limited to the above-mentioned specific numerical values and specific data structures. In other embodiments, the size and division granularity of the above-mentioned logical address space and the size and division granularity of the physical address space can be set to any appropriate numerical values, and the mapper logic 114 can use other suitable data structures to maintain the mapping between logical addresses and physical addresses.
[0043] It should be understood that the above reference Figures 1 to 3 The RAID storage system described is only for a better understanding of the RAID structure. In actual use, different RAID systems may organize physical storage space and logical storage space in different ways. Generally speaking, a stripe is a component unit of RAID, and each stripe consists of multiple physical blocks, including data blocks for storing data and check blocks for storing check information. The data in the logical blocks of RAID is stored in physical blocks.
[0044] During data storage, data corruption may occur, such as bit flipping in the data. After reading data from the stripe, the control node (e.g., the mapper logic in the control node) attempts to decompress the read data. In this process, the decompression of the data may fail, or although the decompression is successful, the checksum of the decompressed data does not match the checksum for the logical block stored in the VLB. The occurrence of these two situations indicates that the data read is wrong. That is, data corruption occurs or the stripe is inconsistent.
[0045] Generally, in RAID, if data corruption is found, you can try to reconstruct the data. However, since the metadata of the VLB stores the checksum of the uncompressed data in the logical block, the control node does not have the checksum of the compressed data in the data block, making it difficult to accurately determine which data block in the stripe has an error.
[0046] In this case, the conventional solution is to attempt verification under various assumptions. For example, assume that the data / information stored in one or more data blocks and / or check blocks in the stripe is damaged, and then use the check information in the check block to reconstruct the data. Data is usually read in units of logical blocks. As mentioned above, when stored in physical space, the compressed data of the logical block may be stored across physical blocks, such as Figure 3 The data "z" in is divided into two data parts and stored in two data blocks of two stripes. In order to reconstruct such data, it is necessary to perform data reconstruction in two different stripes to determine the two data parts, and also to try to decompress each combination of the two data parts in order to obtain the data of the logical block. For the RAID 5 type, since there is only one parity block, the maximum number of attempts required is 3. Because in RAID 5, in order to be able to reconstruct data, it must be assumed that the parity information of the parity block is correct.
[0047] However, in a RAID with more parity blocks (or supporting two or more physical block damages), such as a RAID 6 with two parity blocks, the conventional method will lead to a very complicated trial process. Because in a RAID 6 with two parity blocks, each stripe supports two physical block damages, that is, when one data block and one parity block are damaged, the data can still be reconstructed using the other parity block. Therefore, the number of attempts is greater. Take a more complex data storage situation as an example, such as Figure 3 Data "z" stored across physical blocks. At this time, it is necessary to assume that errors occur in the first data part, the second data part, and both data parts of the data "z". For the case where an error occurs in the first data part of the data "z", it is necessary to further assume that damage occurs in a data block or a check block in a single stripe. Therefore, in the worst case, when only a single data part is assumed to have an error, it is necessary to try the width of the stripe times to recover the single data part (the width of the stripe refers to the number of physical blocks in the stripe). If both data parts stored across physical blocks are damaged, it is necessary to first try to reconstruct the single data parts separately. If all possible combinations are to be listed, the total number of attempts required is the product of the widths of the stripes.
[0048] Therefore, in order to recover the logical block data stored across physical blocks, the control node needs to try (width+2)*width times in the worst case. In each attempt, the data needs to be decompressed and compared with the checksum in the VLB. For 4+2RAID 6, it may be necessary to try decompression up to 48 times to detect the location of the error in the error stripe. For 16+2RAID 6 (that is, each stripe includes 16 data blocks and 2 check blocks), this number will reach 360 times. For data distributed only in a single data block, such as Figure 3 The data "x" and "y" in the image also need to be tried as many times as the width of the stripe.
[0049] Therefore, the complexity brought by such an attempt will consume more computing resources and prolong the time of data recovery. The inventors think that if the physical block (data block or check block) where the error occurs in the stripe can be determined more accurately, the complexity, resource consumption and time cost of data recovery can be greatly reduced.
[0050] According to the exemplary embodiment of the present disclosure, in order to improve the data recovery process of RAID, instead of directly calculating the checksum from the compressed data stored in the data blocks of the stripe, it is proposed to write the checksum seed data in the data blocks of the stripe so that the checksum of the checksum seed data and the checksum of the data to be stored in the data blocks are fixed, that is, a predetermined checksum. In this way, the data blocks of the stripe store not only the compressed data of multiple logical blocks, but also the checksum seed data.
[0051] When reading data, if it is found that the data corresponding to a logical block read from the data block of the stripe is wrong (for example, decompression fails or the checksum of the decompressed data does not match the pre-stored checksum), then the data is read from other data blocks of the stripe and the check information is read from the check block. The checksum of each data block in the other data blocks is compared with the predetermined checksum, and the checksum of the check block is compared with the predetermined checksum. Based on the comparison result, the control node can determine whether the target data can be recovered and how to recover it.
[0052] In this way, the data recovery process in the RAID can be simplified, especially the data recovery process of the RAID with multiple check blocks in the stripe, the calculation and time overhead of data recovery can be reduced, and the efficiency of data recovery can be improved.
[0053] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0054] Figure 4 4 is a flowchart of a process 400 for writing data according to an embodiment of the present disclosure. In some embodiments, the process 400 can be implemented as data writing for the storage system 100. For ease of description, reference will be made to Figures 1 to 3 However, it should be understood that although the example embodiments of the present disclosure are discussed based on RAID 6, process 400 may not be limited to Figures 1 to 3 The process 400 is not an application illustrated in FIG. 1 , but may be applied to any other suitable type of RAID. In some embodiments, the process 400 may be implemented by the control node 110 of the storage system 100 .
[0055] At 410, the control node 110 determines whether to write the target data in the plurality of logical blocks 214 to the data blocks 302 of the stripe 310 of the RAID system 100. The control node 110 may always detect data writing to the data blocks 302 in the stripe 310.
[0056] If it is determined that the target data is to be written to a certain data block 302 in the stripe 310, at 420, the control node 110 compresses the target data in the plurality of logical blocks 214 by logical block. The checksum of the target data in each logical block 214 before being compressed is stored as metadata for the logical block 214, for example, in a data structure of the VLB mapped to the PLB where the stripe is located. The control node 110 can compress the target data of the logical block 214 by various compression algorithms. Depending on the compression algorithm used and the specific type of the target data, the compression rate may be different.
[0057] In some embodiments, the compressed data of one of the multiple logical blocks 214 may be stored only partially in the current data block 302, while the other part is stored in the data block 302 in another stripe of the same disk area, for example, Figure 3 In other examples, after compression, the compressed target data in two or more logical blocks 214 may be completely written into one data block 302 .
[0058] At 430, the control node 110 determines the checksum seed data based on the compressed target data so that the checksum of the compressed target data and the checksum seed data is a predetermined checksum (referred to as the "first predetermined checksum" for ease of discussion). According to an example embodiment of the present disclosure, in order to improve the subsequent data recovery process, during the data writing process, checksum seed data is additionally written into each data block of the stripe. The checksum seed data is not a checksum calculated directly for the compressed target data to be stored in the data block 302. In an example embodiment of the present disclosure, the checksum seed data is to be calculated so that the checksum of the compressed target data and the checksum seed data is a fixed value, i.e., the first predetermined checksum. Various checksum calculation methods can be used to determine the checksum of the compressed target data and the checksum seed data.
[0059] The first predetermined checksum may be any checksum value. In some embodiments, storage space for storing checksum seed data may be reserved in the data block 302, for example, represented by a data size of 16 bytes or 32 bytes. The control node 110 may first set the initial value of the checksum seed data to 0. Then, based on the compressed target data to be written and the first predetermined checksum, the checksum seed data is determined. For example, in the case where the checksum is calculated based on a parity check, the checksum seed data may be determined by: Seed = CHECKSUM _VALUE ^D0^D1^…^Dx-1^Dx, where Seed represents the checksum seed data, CHECKSUM _VALUE represents the first predetermined checksum, and Di represents the data from the logic block 214 stored in the i-th data block 302. The checksum seed data in the data block 302 is used to calculate the first predetermined checksum.
[0060] At 440 , the control node 110 writes the compressed target data and the checksum seed data into the data block 302 .
[0061] In some embodiments, for each data block 302 in the plurality of data blocks 302 in the stripe 310, the control node 110 writes the compressed target data from the logic block 214 and the calculated checksum seed data by means of process 400. According to the above discussion, the checksum seed data written in each data block 302 may be different, but the checksum of all the data written in the data block 302 (including the compressed target data and the checksum seed data) is a fixed value, i.e., the first predetermined checksum.
[0062] By adding checksum information to each physical block of the stripe, indicating the checksum of the data / checksum information stored in the physical block, when a data error is found, the physical block where the error occurred can be located by first verifying whether the checksum of the data / checksum information in each physical block is correct, without the need for various enumerations. This can be explained in detail by the data recovery process discussed below.
[0063] When considering the checksum seed data, one question is how to place it in the data block. The inventors have found that adding the checksum generated based on the data directly to the physical block will face many problems. The first question is where to write the checksum in the physical block. Because the size of the data of each logical block after compression is not fixed, the compressed data of some logical blocks may cross the boundaries of the data blocks. If the checksum is added to the end of the data block, the data of a certain logical block that crosses the data block may be split into two parts, for example, Figure 3In the example, if the checksum of the data stored in the data block 302-2 is placed at the end of the data block 302-2, the data "z" is divided into two sections in the corresponding disk area. When the control node wants to read the data "z", it needs to first read the data of the two sections and put them into a continuous storage space of the memory before decompressing the data. Therefore, this will bring additional data movement overhead for I / O access.
[0064] In some embodiments, the checksum seed data may be stored between the boundaries of the compressed target data in two logical blocks 214. After compression, the compressed target data of each logical block 214 may be written into the data block 302 one by one. In some embodiments, the size of the data block 302 may be greater than or equal to the size of the logical block 214, so after compression, the data in two or more logical blocks 214 may be placed into the data block 302, so it is feasible to place the checksum seed data between two logical blocks 214. Such a placement of the checksum seed data helps improve subsequent data reading work.
[0065] Figure 5 FIG. 2 shows an example of writing data into each data block 302 of a stripe 310 according to some embodiments of the present disclosure. Figure 5 As shown, in addition to storing compressed data from the logical blocks, each data block 302-1, 302-2, 302-3 and 302-4 also stores corresponding checksum seed data 502-1 (represented as "s1"), 502-2 (represented as "s2"), 502-3 (represented as "s3"), 502-4 (represented as "s4"), collectively or individually referred to as checksum seed data 502.
[0066] During data storage, the check block 304 in the stripe 310 may also be damaged, resulting in errors in the check information stored therein. If the wrong check information is used to reconstruct the data, data errors may also occur. Therefore, it is expected that the check block 304 also has a corresponding checksum. In some embodiments, for the check block that uses XOR operation to determine the check information, such as the P check block 304-1 in the stripe of RAID 6 type, the check information stored therein is obtained by performing an XOR operation on the data stored in the multiple data blocks 302. Therefore, due to the calculation and writing of the checksum seed data, the checksum of each data block 302 in the stripe 310 is a fixed value, so the checksum of the check information stored in the P check block 304-1 will be related to the number of multiple data blocks in the stripe 310, and is therefore also a fixed value, that is, the second predetermined checksum. Specifically, when the number of multiple data blocks 302 is an even number, the second predetermined checksum of the P check block 304-1 is zero. When the number of the plurality of data blocks is an odd number, the second predetermined checksum of the P check block 304-1 is the same as the first predetermined checksum, i.e., is also a fixed value. Typically, in many RAID systems, the number of data blocks in the stripe is set to an even number, so the second checksum of the P check block will be zero.
[0067] After writing data in the stripe 310, during the data reading process, if the data is found to be corrupted, the checksum seed data can be used to improve the data recovery process. Figure 6 To explain. Figure 6 600 is a flowchart of a process 600 for data recovery according to some embodiments of the present disclosure. In some embodiments, the process 600 can be implemented as data recovery for the storage system 100. For ease of description, reference will be made to Figures 1 to 3 As well as the storage system architecture in the figure and the detailed structure of the RAID therein. However, it should be understood that although the exemplary embodiments of the present disclosure are discussed based on RAID 6, the process 600 may not be limited to Figures 1 to 3 The process 600 is not an application illustrated in the embodiment, but may be applied to any other suitable type of RAID. In some embodiments, the process 600 may be implemented by the control node 110 of the storage system 100.
[0068] At 610, the control node 110 reads target data corresponding to the logical block 214 from the data block 302 of the stripe 310 of the RAID system 100. For ease of discussion, the data block 302 from which the target data is expected to be read is referred to as the first data block 302, and the logical block 214 corresponding to the target data is referred to as the first logical block 214. The target data stored in the first data block 302 is typically a compressed version of the data in the first logical block 214.
[0069] At 620, the control node 110 determines whether the read target data is erroneous, that is, whether data corruption or strip inconsistency occurs. The target data may be erroneous due to bit flipping during storage. Such data errors may cause the control node 110 to fail to decompress the read target data, or determine after decompression that the checksum of the decompressed target data does not match the checksum pre-stored for the first logical block 214. Each time the data is read, the control node 110 can read the data of one or more logical blocks 214, but since the control node 110 stores the checksum of the uncompressed original data corresponding to each logical block 214, the control node 110 can determine whether the data in each logical block 214 is erroneous at this time.
[0070] If no data error is found, then this data reading will be successfully completed. If the target data is found to be erroneous, the control node 110 needs to start a data recovery process to try to recover the erroneous target data. Therefore, after determining that the target data is erroneous, at 630, the control node 110 reads data from multiple other data blocks 302 of the current stripe 310 and reads check information from the check block 304. For the convenience of the specification, the other data blocks except the first data block are referred to as second data blocks, and the check block to be read is referred to as the first check block 304, and the check information therein is referred to as first check information.
[0071] At 640, the control node 110 compares the corresponding checksums of the data read from the plurality of second data blocks 302 with the first predetermined checksum and compares the checksum of the first check information with the second predetermined checksum. Figure 4 Description, during the data writing process, additional checksum seed data is calculated for each data block and the calculated checksum seed data is written into the corresponding data block, so as to ensure that the checksum of all data read from the data block is the first predetermined checksum. Since such checksum seed data is added to the data block, the checksum in the check block may also be a fixed value, especially a check block that determines the check information based on performing an XOR operation on the data in the data block, such as the P check block 304-1. Note that since the check algorithm sampled by the Q check block 304-2 is not the XOR algorithm, the checksum of the Q check block 304-2 may be unknown. Therefore, the first check block that the control node 110 only reads is the P check block 304-1 based on the XOR operation in the stripe 310.
[0072] At 650, the control node 110 determines the recoverability of the target data based on the comparison result. Since the correct checksum (i.e., the first predetermined checksum) of each data block 302 and the correct checksum (i.e., the second predetermined checksum) of the check block 304 are known in advance, by comparing the checksum based on the data / information in the data block 302 and the check block 304 with the corresponding correct checksum, it is easier to determine which data block and / or data in the check block is erroneous (e.g., determined by the mismatch of the checksum). In the case of different comparison results, the control node 110 can determine whether the data in the first data block 302 can be recovered and how to recover it.
[0073] Figure 7 1 is a flowchart of a process 700 for determining recoverability of target data according to some embodiments of the present disclosure. As shown, at 705, the control node 110 determines the number of mismatched checksums after the comparison at 640 of the process 600.
[0074] If it is determined that there is no mismatched checksum, that is, the corresponding checksum of the data read from the plurality of second data blocks 302 matches the first predetermined checksum and the checksum of the first check information also matches the second predetermined checksum, this means that a data error may occur only in the first data block 302 in the stripe 310, and the first check information of the first check block 304 is also correct. In this case, at 710, the control node 110 reconstructs the data stored in the first data block 302 using the first check information and the data read from the plurality of second data blocks 302.
[0075] If it is determined that there is a checksum mismatch after the comparison, then at 715, the control node 110 determines whether there is a checksum mismatch in the second data block 302 or a checksum mismatch in the first check block 304, that is, it is determined whether the checksum of the data read from one of the plurality of second data blocks 302 does not match the first predetermined checksum or the checksum of the first check information does not match the second predetermined checksum. If it is determined that the checksum of the second data block 302 does not match, this means that the checksum of the data read from other data blocks 302 in the plurality of second data blocks 302 matches the first predetermined checksum, and the checksum of the first check information also matches the second predetermined checksum. In this case, at 720, the control node 110 reconstructs the data stored in the first data block 302 using the first check information, the second check information in the second check block 304, and the data read from the other second data blocks 302 except the checksum mismatch. In this case, although the second check information of the second check block 304 is used, the second check information used is actually not verified by the checksum, and its correctness cannot be guaranteed. However, the reconstructed data can be checked again in the next round of checking, which will be discussed further below.
[0076] If it is determined that there is a checksum mismatch after the comparison, then at 715, the control node 110 determines that there is a checksum mismatch in the first check block 304, which means that the corresponding checksums of the data read from the plurality of second data blocks match the first predetermined checksum, but the first check information is definitely wrong and cannot be used. In this case, at 725, the control node 110 uses the second check information of the second check block 304 and the data read from other data blocks in the plurality of second data blocks 302 to reconstruct the data stored in the first data block 302. Similarly, in this case, although the second check information of the second check block 304 is used, the second check information used is actually not verified by the checksum and its correctness cannot be guaranteed. However, the reconstructed data can also be checked again in the next round of inspection, which will be discussed further below.
[0077] At 730, the control node 110 determines the target data corresponding to the first logic block 214 from the reconstructed data. Since the information used to reconstruct the data may not be guaranteed to be accurate in the data reconstruction process of different paths (for example, at operations 720 and 725), further verification is required to determine that the reconstructed data is correct. The data reconstructed at 710 has a greater probability of being correct because the verification information and data used have passed their respective verification and verification, but the secondary verification can also further ensure its accuracy. Of course, in some embodiments, the data reconstructed at 710 may not be verified by steps 740 to 750.
[0078] Specifically, at 735, the control node 110 decompresses the target data to obtain the decompressed target data. Then, at 740, the control node 110 compares the checksum of the decompressed target data with the expected checksum for the first logical block 214. The expected checksum is calculated and stored before the original data in the first logical block 214 is decompressed in the data writing phase, for example, stored in the data structure of the VLB 212.
[0079] At 745, the control node 110 determines whether the checksum of the decompressed target data matches the expected checksum for the first logical block 214. If it is determined that the checksum does not match, the control node 110 determines that the target data has been successfully recovered at 750. If it is determined that the checksum does not match, the control node 110 determines that the target data cannot be successfully recovered at 755.
[0080] In some embodiments, in addition to verifying the target data corresponding to the currently read first logical block 214 , all other data in the first data block 302 reconstructed at 710 , 720 , and 725 of the process 700 may also be verified by logical block.
[0081] In some embodiments, if the control node 110 determines at 705 that there are two or more checksum mismatches, such mismatches may be that the checksum of the data in one or more second data blocks 302 does not match the first predetermined checksum, and / or the checksum of the first check information of the first check block 304 does not match the second predetermined checksum. In this case, the control node 110 will also directly determine at 755 that the target data cannot be successfully recovered.
[0082] According to process 700, it can be seen that the data recovery process is simplified, and whether the target data can be recovered and how to recover it can be determined through fewer times of judgment, reconstruction and decompression.
[0083] Figure 8 Schematically shows a block diagram of a device 800 that can be used to implement an embodiment of the present disclosure. The device 800 can be implemented as Figure 1 or may be included in the control node 110 .
[0084] like Figure 8 As shown in FIG. 8 , the device 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only storage device (ROM) 802 or loaded from a storage unit 808 to a random access storage device (RAM) 803. In RAM 803, various programs and data required for the operation of the device 800 can also be stored. CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0085] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0086] The various processes and processing described above, such as process 400, process 600, and / or process 700, may be performed by processing unit 801. For example, in some embodiments, process 400, process 600, and / or process 700 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by CPU 801, one or more steps of process 400, process 600, and / or process 700 described above may be performed.
[0087] As used herein, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included herein.
[0088] As used herein, the term "determine" encompasses a wide variety of actions. For example, "determine" may include computing, calculating, processing, deriving, investigating, searching (e.g., searching in a table, a database, or another data structure), ascertaining, etc. In addition, "determine" may include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory), etc. In addition, "determine" may include resolving, selecting, choosing, establishing, etc.
[0089] It should be noted that the embodiments of the present disclosure may be implemented by hardware, software, or a combination of software and hardware. The hardware portion may be implemented using dedicated logic; the software portion may be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will appreciate that the above-mentioned devices and methods may be implemented using computer executable instructions and / or contained in a processor control code, such as a programmable memory or a data carrier such as an optical or electronic signal carrier, providing such code.
[0090] In addition, although the operation of the method of the present disclosure is described in a particular order in the accompanying drawings, this does not require or imply that these operations must be performed in this particular order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flow chart can change the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution. It should also be noted that the features and functions of two or more devices according to the present disclosure can be embodied in one device. Conversely, the features and functions of a device described above can be further divided into being embodied by multiple devices.
[0091] Although the present disclosure has been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the specific embodiments disclosed. The present disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. A method for data recovery, include: Reading target data corresponding to a first logic block from a first data block of a stripe of a redundant array of independent disks RAID system, the target data being a compressed version of the data in the first logic block; According to determining that the target data is erroneous, reading data from a plurality of second data blocks of the stripe and reading first check information from a first check block of the stripe; comparing respective checksums of data read from the plurality of second data blocks with a first predetermined checksum and comparing the checksum of the first check information with a second predetermined checksum, wherein the first predetermined checksum is associated with the target data and checksum seed data, and the second predetermined checksum is associated with the number of data blocks; as well as The recoverability of the target data is determined based on a result of the comparison.
2. The method according to claim 1, wherein determining the recoverability of the target data include: reconstructing data stored in the first data block using the first check information and the data read from the plurality of second data blocks based on determining that corresponding check sums of the data read from the plurality of second data blocks match the first predetermined check sum and the check sum of the first check information matches the second predetermined check sum; as well as The target data corresponding to the first logic block is determined from the reconstructed data.
3. The method according to claim 1, wherein the stripe further comprises at least a second check block, the second check block storing second check information and determining the recoverability of the target data include: reconstructing data stored in the first data block using the first verification information, the second verification information, and data read from other data blocks in the plurality of second data blocks based on determining that a checksum of data read from only one data block in the plurality of second data blocks does not match the first predetermined checksum and the checksum of the first verification information matches the second predetermined checksum; as well as The target data corresponding to the first logic block is determined from the reconstructed data.
4. The method according to claim 3, wherein determining the recoverability of the target data further comprises: include: reconstructing data stored in the first data block using the second check information and data read from other data blocks in the plurality of second data blocks based on determining that corresponding checksums of data read from the plurality of second data blocks match the first predetermined checksum and the checksum of the first check information does not match the second predetermined checksum; as well as The target data corresponding to the first logic block is determined from the reconstructed data.
5. The method according to claim 3, wherein determining the recoverability of the target data include: Based on determining that a result of the comparison indicates that two or more checksums do not match, it is determined that the target data cannot be recovered.
6. The method according to claim 1, wherein determining the recoverability of the target data further comprises: include: After the target data in the first data block is reconstructed, decompressing the target data; comparing a checksum of the decompressed target data with an expected checksum for the first logical block; Determining that the target data has been successfully recovered based on determining that the checksum of the decompressed target data matches the expected checksum; and Based on determining that the checksum of the decompressed target data does not match the checksum for the first logical block, it is determined that the target data cannot be recovered.
7. The method of claim 1, wherein each of the plurality of second data blocks stores compressed data from a plurality of second logical blocks and the checksum seed data, the checksum seed data being stored between boundaries of compressed target data in two of the plurality of logical blocks.
8. The method according to claim 1, wherein the first check information is obtained by performing an exclusive OR operation on the data stored in the first data block and the plurality of second data blocks, and When the number of the multiple data blocks is an even number, the second checksum of the check block is zero, and when the number of the multiple data blocks is an odd number, the second checksum of the check block is the same as the first predetermined checksum.
9. The method of claim 1, wherein the RAID system is a RAID6 type storage system, and the stripe includes two parity blocks.
10. A method for writing data, include: Compressing the target data in the plurality of logical blocks by logical blocks according to the determination that the target data in the plurality of logical blocks is to be written in the data blocks of the stripe of the redundant array of independent disks RAID system; determining checksum seed data based on the compressed target data so that a checksum of the compressed target data and the checksum seed data is a first predetermined checksum; as well as The compressed target data and the checksum seed data are written into the data block.
11. The method according to claim 10, wherein the compressed target data and the checksum seed data are written into the data block. include: The checksum seed data is stored between boundaries of compressed target data in two logical blocks among the plurality of logical blocks.
12. The method according to claim 10, wherein the stripe comprises a plurality of data blocks for storing data, the data block is included in the plurality of data blocks, and the checksum of the data stored in the plurality of data blocks is the first predetermined checksum, and The stripe includes multiple check blocks, and the check information stored in a first check block among the multiple check blocks is obtained by performing an XOR operation on the data stored in the multiple data blocks, and the checksum of the check information is a second predetermined checksum, which is determined based on the number of the multiple data blocks.
13. The method of claim 12, wherein when the number of the plurality of data blocks is an even number, the second predetermined checksum is zero, and when the number of the plurality of data blocks is an odd number, the second predetermined checksum is the same as the first predetermined checksum.
14. The method of claim 10, wherein the RAID system is a RAID6 type storage system, and the stripe includes two parity blocks.
15. An electronic device, include: at least one processor; as well as At least one memory storing computer program instructions, the at least one memory and the computer program instructions being configured to, together with the at least one processor, cause the electronic device to perform actions, the actions comprising: Reading target data corresponding to a first logic block from a first data block of a stripe of a redundant array of independent disks RAID system, the target data being a compressed version of the data in the first logic block; According to determining that the target data is erroneous, reading data from a plurality of second data blocks of the stripe and reading first check information from a first check block of the stripe; comparing respective checksums of data read from the plurality of second data blocks with a first predetermined checksum and comparing the checksum of the first check information with a second predetermined checksum, wherein the first predetermined checksum is associated with the target data and checksum seed data, and the second predetermined checksum is associated with the number of data blocks; and The recoverability of the target data is determined based on a result of the comparison.
16. The electronic device according to claim 15, wherein determining the recoverability of the target data include: reconstructing data stored in the first data block using the first check information and the data read from the plurality of second data blocks based on determining that corresponding check sums of the data read from the plurality of second data blocks match the first predetermined check sum and the check sum of the first check information matches the second predetermined check sum; as well as The target data corresponding to the first logic block is determined from the reconstructed data.
17. The electronic device according to claim 15, wherein the stripe further comprises at least a second check block, the second check block storing second check information and determining the recoverability of the target data include: reconstructing data stored in the first data block using the first verification information, the second verification information, and data read from other data blocks in the plurality of second data blocks based on determining that a checksum of data read from only one data block in the plurality of second data blocks does not match the first predetermined checksum and the checksum of the first verification information matches the second predetermined checksum; as well as The target data corresponding to the first logic block is determined from the reconstructed data.
18. The electronic device according to claim 17, wherein determining the recoverability of the target data further comprises: include: reconstructing data stored in the first data block using the second check information and data read from other data blocks in the plurality of second data blocks based on determining that corresponding checksums of data read from the plurality of second data blocks match the first predetermined checksum and the checksum of the first check information does not match the second predetermined checksum; as well as The target data corresponding to the first logic block is determined from the reconstructed data.
19. The electronic device according to claim 17, wherein determining the recoverability of the target data include: Based on determining that a result of the comparison indicates that two or more checksums do not match, it is determined that the target data cannot be recovered.
20. The electronic device according to claim 15, wherein determining the recoverability of the target data further comprises: include: After the target data in the first data block is reconstructed, decompressing the target data; comparing a checksum of the decompressed target data with an expected checksum for the first logical block; Determining that the target data has been successfully recovered based on determining that the checksum of the decompressed target data matches the expected checksum; and Based on determining that the checksum of the decompressed target data does not match the checksum for the first logical block, it is determined that the target data cannot be recovered.
21. An electronic device according to claim 15, wherein each of the plurality of second data blocks stores compressed data from a plurality of second logical blocks and the checksum seed data, and the checksum seed data is stored between boundaries of compressed target data in two logical blocks among the plurality of logical blocks.
22. The electronic device according to claim 15, wherein the first verification information is obtained by performing an exclusive OR operation on the data stored in the first data block and the plurality of second data blocks, and When the number of the multiple data blocks is an even number, the second checksum of the check block is zero, and when the number of the multiple data blocks is an odd number, the second checksum of the check block is the same as the first predetermined checksum.
23. The electronic device of claim 15, wherein the RAID system is a RAID6 type storage system, and the stripe includes two parity blocks.
24. An electronic device, include: at least one processor; as well as At least one memory storing computer program instructions, the at least one memory and the computer program instructions being configured to, together with the at least one processor, cause the electronic device to perform actions, the actions comprising: Compressing the target data in the plurality of logical blocks by logical blocks according to the determination that the target data in the plurality of logical blocks is to be written in the data blocks of the stripe of the redundant array of independent disks RAID system; determining checksum seed data based on the compressed target data so that a checksum of the compressed target data and the checksum seed data is a first predetermined checksum; and The compressed target data and the checksum seed data are written into the data block.
25. The electronic device according to claim 24, wherein the compressed target data and the checksum seed data are written into the data block. include: The checksum seed data is stored between boundaries of compressed target data in two logical blocks among the plurality of logical blocks.
26. The electronic device according to claim 24, wherein the stripe comprises a plurality of data blocks for storing data, the data block is included in the plurality of data blocks, and the checksum of the data stored in the plurality of data blocks is the first predetermined checksum, and The stripe includes multiple check blocks, and the check information stored in a first check block among the multiple check blocks is obtained by performing an XOR operation on the data stored in the multiple data blocks, and the checksum of the check information is a second predetermined checksum, which is determined based on the number of the multiple data blocks.
27. The electronic device according to claim 26, wherein when the number of the plurality of data blocks is an even number, the second predetermined checksum is zero, and when the number of the plurality of data blocks is an odd number, the second predetermined checksum is the same as the first predetermined checksum.
28. The electronic device of claim 24, wherein the RAID system is a RAID6 type storage system, and the stripe includes two parity blocks.
29. A computer program product tangibly stored on a non-transitory computer readable medium and comprising machine executable instructions which, when executed, cause a device to perform the method of any one of claims 1 to 9.
30. A computer program product tangibly stored on a non-transitory computer readable medium and comprising machine executable instructions which, when executed, cause a device to perform the method of any one of claims 10 to 14.
