Data storage method, and storage system, storage apparatus and storage device
By refining the fault domain partitioning and adopting incremental EC technology in the distributed storage system, the problems of low storage space utilization and write amplification are solved, achieving more efficient data storage and recovery.
Patent Information
- Application Number
- PCT/CN2024/136402
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-12
- Filing Date
- 2024-12-03
- Publication Date
- 2025-12-04
AI Technical Summary
In existing distributed storage systems, the granularity of fault domain division is too large, resulting in low storage space utilization and write amplification problems when small IO writes are performed.
The storage system is divided into multiple primary fault domains, and each primary fault domain is further divided into multiple secondary fault domains. Data blocks and parity blocks are stored in different secondary fault domains, and incremental EC technology is used to store incremental parity blocks and primary parity blocks in different memory spaces.
It improves storage space utilization, reduces write amplification, and enhances the reliability and efficiency of the storage system.
Smart Images

Figure CN2024136402_04122025_PF_FP_ABST
Abstract
Description
Data storage method, storage system, storage device and storage equipment
[0001] The present application claims priority from the Chinese patent application No. 202410285408.1 filed on March 12, 2024, and entitled "A data storage method, storage system, storage device and storage equipment", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the field of storage, in particular to a data storage method, storage system, storage device and storage equipment. BACKGROUND
[0003] Erasure coding (EC) technology mainly groups data shards, each group has data blocks and check blocks, and the check block is the generated partial redundant data. If a part of the data is damaged or lost, the redundant data can be used to reconstruct and repair the damaged data. This strategy not only has high reliability, but also has high storage space utilization (compared to the multi-copy mode), and is the best choice for balancing reliability and economy.
[0004] Fault domain is an area or component in a storage system that may fail, and the redundancy within the fault domain is a key method to help reduce the risk of failure. In the current distributed storage system, the EC algorithm usually takes nodes as the fault domain, where the node refers to a storage node in a frame in the distributed storage system, and the storage node includes a processor. The granularity of fault domain division is large, which makes the utilization rate of the storage space of the distributed storage system still low. SUMMARY
[0005] The embodiments of the present application provide a data storage method, storage system, storage device and storage equipment, which are used to improve the storage space utilization of the storage system.
[0006] In a first aspect, the present application provides a data storage method, which is applied in a storage system, the storage system is divided into a plurality of primary fault domains, each primary fault domain includes a plurality of storage devices, and the method comprises the following steps: dividing each primary fault domain into a plurality of secondary fault domains, each secondary fault domain includes part of the plurality of storage devices, and each secondary fault domain includes different part of the plurality of storage devices; dividing to-be-written data into a plurality of continuous data blocks, dividing the plurality of data blocks into a plurality of data block groups, and each data block group includes N data blocks; generating one or more primary check blocks according to the N data blocks included in each data block group, obtaining a plurality of groups of primary check blocks, storing different data blocks in each data block group into the storage devices included in different secondary fault domains, and after the storage of the data blocks in the plurality of groups of data block groups is completed, generating a secondary check block according to the plurality of groups of primary check blocks, and the secondary check block is a check block of the plurality of groups of data block groups. In the prior art, N data blocks can be stored in the plurality of primary fault domains, and by using the data storage method provided in the present application, a plurality of groups of data block groups can be stored, and each group of data block groups includes N data blocks. Therefore, compared with the prior art, the present application can store more data blocks, thereby improving the storage space utilization rate of the storage system.
[0007] In a possible implementation, the number of N is determined by the redundancy ratio of the primary fault domain. For example, when the redundancy ratio of the primary fault domain is 2+2, the number of N is 2, and when the redundancy ratio of the primary fault domain is 6+2, the number of N is 6.
[0008] In a possible implementation, the storage device includes a primary storage and a plurality of secondary storages. For example, the primary storage is a solid state storage (SSD), and the secondary storage is a hard disk drive (HDD). In the specific implementation process, different data blocks in each data block group are respectively stored into different SSDs included in different secondary fault domains. For example, the number of data blocks and / or check blocks stored in the same SSD is determined by the redundancy ratio of the primary fault domain. For example, when the redundancy ratio of the primary fault domain is 2+2, the number of data blocks stored in the same SSD does not exceed 2, and when the redundancy ratio of the primary fault domain is 6+3, the number of data blocks stored in the same SSD does not exceed 3. In the embodiment of the present application, the data blocks are first stored in the SSDs. Since the read / write rate of the SSD is greater than that of the HDD, the read / write efficiency of the storage system can be improved.
[0009] In a possible implementation, the number of the secondary check blocks is multiple, for example, the number of the secondary check blocks is 2, and the 2 secondary check blocks are respectively stored in the SSDs included in different secondary failure domains. Of course, the 2 secondary check blocks can also be respectively stored in the memories included in different first failure domains, and the read / write speed of the memories is greater than that of the SSDs. In the specific implementation, the selection can be made according to actual needs, which is not limited herein.
[0010] In a possible implementation, the number of the multiple data block groups is T, and the number of T is determined according to the redundancy ratio of the first failure domain and the redundancy ratio of the secondary failure domain. For example, the redundancy ratio of the first failure domain is 2+2, and the redundancy ratio of the secondary failure domain is 6+2, and T is 3; the redundancy ratio of the first failure domain is 6+2, and the redundancy ratio of the secondary failure domain is 12+2, and T is 2. When the number of the multiple data block groups satisfies T, it indicates that the first failure domain is full, and the secondary failure domain is also full. At this time, the secondary check block is generated according to the multiple first check blocks, so that the data can be recovered according to the secondary check block when the data in the multiple data block groups is lost.
[0011] In a possible implementation, after the 3 data block groups and the secondary check block are stored from the SSD to the HDD, the multiple first check blocks are deleted from the SSD. In the embodiment of the present application, different data recovery strategies can be adopted according to the state of the check block. For example, when the 3 data block groups and the secondary check block are not stored in the HDD, the data can be recovered through the multiple first check blocks, and when the 3 data block groups and the secondary check block are stored in the HDD, the data can be recovered through the secondary check block, thereby improving the reliability of the storage system.
[0012] In a second aspect, the embodiment of the present application further provides a data storage method, which is applied to a storage system. The size of the first data is an integer multiple of the size of the data block, that is, the first data can fill a stripe, and a first first check block is generated according to the first data. The size of the second data is less than the size of the data block, that is, the second data cannot fill a stripe, and an incremental check block is generated according to the second data. The first first check block is stored in a first memory space, and the second data is stored in a second memory space different from the first memory space. Since the first check block and the incremental check block are respectively stored in different memory spaces, the incremental check block can be processed when needed. For example, when the next incremental check block or the first check block is generated, the currently generated incremental check block can be deleted, and it is not limited to the next generated first check block, thereby reducing the occupation of the memory space by the incremental check block.
[0013] In a possible implementation, the method further includes: the size of the third data and the second data is an integer multiple of the size of a data block, that is, the third data and the second data can fill a stripe, and a second primary check block is generated according to the third data and the second data, and the second primary check block is stored in the first memory space. In the embodiment of the application, all the primary check blocks are stored in the first memory space, and the incremental check block is stored in the second memory space, so that the incremental check block can be deleted after the second primary check block is generated, thereby reducing the occupation of the memory space by the incremental check block.
[0014] In a possible implementation, the storage system includes a plurality of primary failure domains, wherein the first memory space and the second memory space are located in the same memory, the memory belongs to one of the plurality of primary failure domains, the primary failure domain includes a plurality of storage devices, the storage system includes storage devices with a read-write rate less than that of the memory, and the method further includes: dividing each primary failure domain into a plurality of secondary failure domains, each secondary failure domain including part of the plurality of storage devices, and each secondary failure domain including different part of the plurality of storage devices.
[0015] In a third aspect, the application also provides a data reading method, which is applied to a storage system, the storage system including a plurality of primary failure domains, each primary failure domain including a plurality of storage devices; the method including: receiving a read data request, the read data request carrying a storage address; determining whether a failure domain where to-be-read data corresponding to the storage address is located is faulty, if the primary failure domain where the to-be-read data is located is faulty, and a plurality of primary check blocks of the to-be-read data are deleted. If the plurality of primary check blocks are deleted, it indicates that the to-be-read data has been stored persistently in the storage devices included in the storage system, and in this case, a processor included in a non-faulty primary failure domain, denoted as processor A, takes over the plurality of storage devices included in the faulty primary failure domain, and at this time, the processor A reads the to-be-read data corresponding to the storage address from the storage devices included in the storage system.
[0016] In a possible implementation, the storage devices include primary storage and multiple secondary storage, taking the primary storage as an SSD and the secondary storage as an HDD as an example, the method further includes: a primary fault domain where the to-be-read data is located fails, and multiple groups of primary check blocks of the to-be-read data are not deleted, which indicates that the to-be-read data has not been stored persistently to the HDD, at this time, there are several different implementation manners for obtaining the to-be-read data, for example, a processor in a primary fault domain that does not fail can take over the SSD and the HDD included in the primary fault domain that fails, in this case, the to-be-read data corresponding to the storage address is read from the SSD included in the storage system by the processor in the primary fault domain that does not fail; as another example, the processor in the primary fault domain that does not fail can take over the HDD included in the primary fault domain that fails, in this case, the primary check blocks and the data blocks are read from the SSD included in the primary fault domain that does not fail by the processor in the primary fault domain that does not fail, and the to-be-read data is recovered according to the read primary check blocks and the data blocks.
[0017] In a possible implementation, each primary fault domain includes multiple secondary fault domains, each secondary fault domain includes part of the storage devices, and the part of the storage devices included in each secondary fault domain is different, the storage devices include primary storage and multiple secondary storage, taking the primary storage as an SSD and the secondary storage as an HDD as an example, the method further includes: a secondary fault domain where the to-be-read data is located fails, and multiple groups of primary check blocks of the to-be-read data are deleted, which indicates that the to-be-read data has been stored persistently to the HDD, at this time, the secondary check blocks and the data blocks are read from the HDD that does not fail, and the to-be-read data is recovered according to the read secondary check blocks and the data blocks.
[0018] In a fourth aspect, the present application further provides a storage system, including: multiple primary fault domains, wherein each primary fault domain includes multiple storage devices; a processor, configured to divide each primary fault domain into multiple secondary fault domains, each secondary fault domain includes part of the storage devices, and the part of the storage devices included in each secondary fault domain is different; divide to-be-written data into multiple data block groups, each data block group includes N data blocks, and N is an integer greater than zero; generate at least one primary check block according to the N data blocks in each data block group, to obtain multiple groups of primary check blocks; after storing different data blocks in each data block group to the storage devices included in different secondary fault domains respectively, generate a secondary check block according to the multiple groups of primary check blocks, wherein the secondary check block is a check block of the multiple groups of data blocks.
[0019] In a fifth aspect, the present application further provides a data storage device, which is applied to a storage system, the storage system comprising a plurality of primary fault domains, wherein each primary fault domain comprises a plurality of storage devices, and the data storage device comprises: a first division unit, configured to divide each primary fault domain into a plurality of secondary fault domains, each secondary fault domain comprising part of the plurality of storage devices, and each secondary fault domain comprising different part of the plurality of storage devices; a second division unit, configured to divide to-be-written data into a plurality of data block groups, each data block group comprising N data blocks, N being an integer greater than zero; a first generation unit, configured to generate at least one primary check block according to the N data blocks in each data block group, to obtain a plurality of groups of primary check blocks; and a second generation unit, configured to, after storing different data blocks in each data block group into different storage devices included in different secondary fault domains respectively, generate a secondary check block according to the plurality of groups of primary check blocks, wherein the secondary check block is a check block of the plurality of data block groups.
[0020] In a sixth aspect, the present application further provides a data storage device, which is applied to a storage system, the storage system comprising a plurality of primary fault domains, wherein each primary fault domain comprises a plurality of storage devices, and the data storage device comprises: an interface; a processor, configured to divide each primary fault domain into a plurality of secondary fault domains, each secondary fault domain comprising part of the plurality of storage devices, and each secondary fault domain comprising different part of the plurality of storage devices; divide to-be-written data into a plurality of data block groups, each data block group comprising N data blocks, N being an integer greater than zero; generate at least one primary check block according to the N data blocks in each data block group, to obtain a plurality of groups of primary check blocks; and, after storing different data blocks in each data block group into different storage devices included in different secondary fault domains respectively through the interface, generate a secondary check block according to the plurality of groups of primary check blocks, wherein the secondary check block is a check block of the plurality of data block groups.
[0021] In a seventh aspect, the present application further provides a data storage device, which is applied to a storage system, and comprises: an acquisition unit, configured to acquire a size of a data block; and a storage unit, configured to store a first primary check block generated according to first data in a first memory space, the first data having a size of an integer multiple of the size of the data block, and store an incremental check block generated according to second data in a second memory space, the second data having a size smaller than the size of the integer multiple of the data block, and the second memory space being different from the first memory space.
[0022] In an eighth aspect, the present application provides a data storage device, which is applied to a storage system and comprises an interface, a processor configured to acquire a size of a data block via the interface, store a first primary check block generated according to first data in a first memory space, the first data having a size of an integer multiple of the size of the data block, and store an incremental check block generated according to second data in a second memory space, the second data having a size smaller than the size of the integer multiple of the data block, the second memory space being different from the first memory space.
[0023] In a ninth aspect, the present application provides a computer readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the data storage method according to the first aspect and any possible implementation manner of the first aspect or the data storage method according to the second aspect and any possible implementation manner of the second aspect or the data reading method according to the third aspect and any possible implementation manner of the third aspect.
[0024] In a tenth aspect, the present application provides a computer program product which, when executed on a computer, causes the computer to perform the data storage method according to the first aspect and any possible implementation manner of the first aspect or the data storage method according to the second aspect and any possible implementation manner of the second aspect or the data reading method according to the third aspect and any possible implementation manner of the third aspect.
[0025] The advantages of the fourth aspect to the tenth aspect and the implementation manners thereof are the same as those of the data storage method according to the first aspect and any possible implementation manner of the first aspect or the data storage method according to the second aspect and any possible implementation manner of the second aspect or the data storage method according to the third aspect and any possible implementation manner of the third aspect. BRIEF DESCRIPTION OF DRAWINGS
[0026] FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;
[0027] FIGS. 2A and 2B are schematic diagrams of a division manner of a failure domain according to an embodiment of the present application;
[0028] FIG. 3 is a schematic diagram of a data storage manner according to an embodiment of the present application;
[0029] FIG. 4 is a schematic diagram of a data storage manner according to the prior art;
[0030] FIG. 5 is a schematic diagram of another data storage manner according to an embodiment of the present application;
[0031] FIG. 6 is a schematic diagram of a data reading manner according to an embodiment of the present application;
[0032] FIG. 7 is a structural schematic diagram of a data storage device according to an embodiment of the present application;
[0033] FIG. 8 is a structural schematic diagram of another data storage device according to an embodiment of the present application;
[0034] FIG. 9 is a structural schematic diagram of a data storage device according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical scheme and advantages of the present application more clear, the specific embodiments of the present application are described in further detail below with reference to the drawings.
[0036] Before introducing the data storage method provided by the present application, the system architecture to which the present application is applicable is introduced first, please refer to FIG. 1. The system architecture is a distributed system architecture, which includes a computing node cluster and a frame cluster. The computing node cluster includes one or more computing nodes 110, and the computing nodes 110 can communicate with each other. The computing node 110 is a computing device, such as a server or a desktop computer. Any computing node 110 can access any frame 100 in the frame cluster through a network, and the storage cluster can include multiple frames 100. One frame 100 can include one or more storage nodes. Here, one frame 100 includes two storage nodes, one storage node includes one processor, which is taken as an example for description, and the two processors are respectively identified as 101-1 and 101-2. One storage node also includes a network card 102 and multiple hard disks 103, wherein the network card 102 is used for communication with the computing node 110. The processor 101 is used for writing data into the hard disk 103 or reading data from the hard disk according to the read / write data request sent by the computing node 110.
[0037] The processor in FIG. 1 can be a central processing unit (CPU) that is configured to perform address translation and read / write data. In a specific implementation, each CPU can also be configured with a memory that is used to temporarily store data to be written to the hard disk or data to be read from the hard disk and sent to the computing node 110. The memory is continuously powered by a battery backup unit (BBU) to prevent data loss due to power failure. Alternatively, the processor can be a programmable electronic component, such as a data processing unit (DPU). The DPU has the versatility and programmability of a CPU, but is more specialized and can efficiently process network packets, storage requests, or analysis requests. The DPU is distinguished from the CPU by a greater degree of parallelism. Alternatively, the DPU in this embodiment can also be replaced by a graphics processing unit (GPU), an embedded neural-network processing unit (NPU), or other processing chips that can perform the above-mentioned operations instead of a CPU, and the present application does not make specific limitations.
[0038] In another embodiment, the functions of the processor can be offloaded to the network card 102. In other words, the storage node does not have a processor, but the network card 102 is used to complete data read / write, address translation, and other computing functions. At this time, the network card 102 is an intelligent network card. It can include a CPU and a memory. The CPU is used to perform address translation and read / write data. The memory is used to temporarily store data to be written to the hard disk or data to be read from the hard disk and sent to the computing node.
[0039] The hard disk 103 is used to store data and can be a solid state disk (SSD) or a hard disk drive (HDD). In the embodiment of the present application, a frame 100 includes two processors, i.e., processors 101-1 and 101-2. The processor 101-1 corresponds to two SSDs, which can be understood as being used to cache data blocks and / or check blocks that the processor needs to read from the HDD, or data blocks and / or check blocks that the processor needs to write to the HDD. Each SSD matches multiple HDDs, which can be understood as being used to persistently store the data blocks and / or check blocks cached on the SSD. The number of SSDs and the number of HDDs can be set according to actual needs, and the present application does not make limitations in the embodiment.
[0040] In the prior art, the fault domain is divided according to the processor. Please refer to FIG. 1, and take the first block as an example. The block includes two fault domains. Based on the two fault domains, a 2+2 EC can be formed, and the corresponding storage space utilization rate is 50%. Although the space utilization rate is improved compared with the copy mode, there is still room for improvement.
[0041] In a first aspect, the embodiments of the present application provide a data storage method. The data storage method is applied to a storage system. The storage system is divided into a plurality of primary fault domains. Each primary fault domain includes a plurality of storage devices. The storage device can be the hard disk 103 shown in FIG. 1. In the embodiments of the present application, each primary fault domain can be further divided into a plurality of secondary fault domains. The secondary fault domain includes part of the hard disks 103 in the plurality of hard disks 103.
[0042] The division mode of the secondary fault domain includes but is not limited to the following modes. The division is performed according to the SSD included in each primary fault domain, that is, each secondary fault domain includes one SSD. Alternatively, the division is performed according to the HDD included in each primary fault domain, that is, each secondary fault domain includes part of the HDD included in the primary fault domain. As an example, one processor corresponds to two SSDs, which are denoted as SSD1 and SSD2. SSD1 corresponds to four HDDs, and SSD2 corresponds to four HDDs. Then, one secondary fault domain includes SSD1 and the HDD corresponding to SSD1. One secondary fault domain includes SSD2 and the HDD corresponding to SSD2. Alternatively, one secondary fault domain includes part of the HDD in SSD1 and part of the HDD in SSD2. One secondary fault domain includes part of the HDD in SSD1 and part of the HDD in SSD2. For details, please refer to FIGS. 2A and 2B. Of course, the division can be performed according to other components in the primary fault domain as granularity, for example, the division is performed according to the storage space in the HDD as granularity.
[0043] Based on the system architecture shown in FIG. 1, take one of the blocks 100 as an example. The block 100 includes two primary fault domains. One primary fault domain includes the processor 101-1, SSD1, SSD2, and four HDDs corresponding to the SSDs. Each primary fault domain can be divided into two secondary fault domains. One secondary fault domain includes one SSD.
[0044] If an input / output (IO) request requires writing data of 2MB, which is divided into two data blocks, each data block is 1MB, which can fill a strip, then the IO that can write the data of the entire strip is called large IO; if an IO request requires writing data of 512KB, which cannot fill a strip, then such IO is called small IO. The strip is a method of dividing continuous data into data blocks of the same size, and writing each data block to an SSD corresponding to a different secondary fault domain.
[0045] After introducing the division of fault domains and different types of IO, how to write and read data in combination with the divided fault domains is introduced. The following introduces a specific example. For ease of description, the primary fault domain level EC is referred to as primary EC, the secondary fault domain level EC is referred to as secondary EC, the check block generated by the data block stored in the primary fault domain is referred to as primary check block, and the check block generated by the data block stored in the secondary fault domain is referred to as secondary check block. It is assumed that the primary EC adopts (N+M):1 redundancy ratio, and the secondary EC adopts (L+M):1 redundancy ratio, (N+M):1 means that N data blocks and M check blocks are randomly scattered and stored in different HDDs corresponding to different processors, (L+M):1 means that L data blocks and M check blocks are randomly scattered and stored in different HDDs corresponding to different SSDs, and each SSD stores M data blocks and / or check blocks, where M is an integer greater than zero. At this time, the hard disk pool (composed of HDDs corresponding to each SSD) allows M HDDs or 1 processor to fail.
[0046] The processor 101-1 receives the write data request sent by the computing node 110, and divides the received data to be written into continuous data blocks, and divides the continuous data blocks into a plurality of data block groups. Continue to use the above example, the number of processors is 2, the number of SSDs is 4, the redundancy ratio of the primary EC is (2+2):1, the number of data blocks N in a strip is 2, and the number of check blocks is 2, where the number of check blocks M can also be 1 or 3, or other integers greater than zero. Then when L=6, that is, there are 6 data blocks D1-D6, the 6 data blocks need to be divided into 3 groups, each group has 2 data blocks, which are D1-D2, D3-D4, and D5-D6. At least one primary check block is generated based on the N data blocks in a group, that is, based on the data blocks D1-D2, the primary check blocks C1-C2 are generated, based on the data blocks D3-D4, the primary check blocks C3-C4 are generated, and based on the data blocks D5-D6, the primary check blocks C5-C6 are generated.
[0047] After generating at least one primary check block according to each data block group, obtaining multiple groups of primary check blocks C1-C2, C3-C4, C5-C6, then the multiple groups of data blocks are respectively stored in the storage devices included in the secondary fault domain. In some optional embodiments, the storage devices include a primary memory and multiple secondary memories, wherein the read-write speed of the secondary memories is less than that of the primary memory, wherein the primary memory can be an SSD, and the secondary memory can be an HDD. For specific storage process, refer to FIG. 3. For ease of description, the four SSDs are denoted as SSD1, SSD2, SSD3 and SSD4.
[0048] First, data block D1 is written into an SSD1 under processor 101-1, data block D2 is written into SSD3 under controller 101-2, primary check block C1 is stored in the memory corresponding to controller 101-1, or SSD2 under controller 101-1, primary check block C2 is stored in the memory corresponding to controller 101-2, or SSD4 under controller 101-2. Data blocks D3-D4, primary check blocks C3-C4, data blocks D5-D6 and primary check blocks C5-C6 are also stored in the same way.
[0049] After all data blocks and primary check blocks are written, in some optional ways, processor 101-1 determines whether the number of multiple groups of data blocks is T, T is determined based on the primary EC redundancy ratio and the secondary EC redundancy ratio. As an example, the primary EC redundancy ratio is (2+2), and the secondary redundancy ratio is (6+2), then T is 3, and the number of data block groups written here is 3. Based on three groups of primary check blocks C1-C2, C3-C4, C5-C6, a new group of check blocks C7-C8 is generated. The new check blocks generated here are called secondary check blocks. Here, the number of secondary check blocks is 2. In some optional ways, the number of secondary check blocks can also be 1 or 3, or other integers greater than zero.
[0050] In the implementation process, the data blocks D1-D6 are temporarily buffered in the SSD, and then persistently stored in the HDD corresponding to the SSD. Specifically, the data block D1 is persistently stored in an HDD under the SSD1, and the data block D2 is persistively stored in an HDD under the SSD3. The data block D3 is persistently stored in an HDD under the SSD1, and the data block D4 is persistently stored in an HDD under the SSD3. The data block D5 is persistently stored in an HDD under the SSD2, and the data block D6 is persistently stored in an HDD under the SSD4. The second-level check block C7 is persistently stored in an HDD under the SSD2, and the second-level check block C8 is persistently stored in an HDD under the SSD4. In the implementation process, after the data blocks D1-D6 and the second-level check blocks C7-C8 in the plurality of data blocks are persistently stored from the SSD to the HDD, the processor 101-1 deletes the plurality of groups of first-level check blocks C1-C2, C3-C4, and C5-C6.
[0051] In the technical solution, compared with the fault domain division manner in the prior art, the division granularity of the fault domain is finer, and on the premise of subdividing the fault domain, the first-level fault domain 2+2EC redundancy and the second-level fault domain 6+2EC redundancy can be realized, so that the utilization rate of the storage space is increased to 75%, and compared with the division manner of the first-level fault domain, the utilization rate of the storage space is increased by 20%. For four processors and eight SSDs, the first-level fault domain 6+2EC redundancy and the second-level fault domain 12+2EC redundancy can be realized, so that the utilization rate of the storage space is increased to 85%; for six processors and twelve SSDs, the first-level fault domain 10+2EC redundancy and the second-level fault domain 18+2EC redundancy can be realized, so that the utilization rate of the storage space is increased to 90%.
[0052] The processor 101-1 receives the write data request sent by the computing node 110, and the data received by the processor 101-1 cannot fill one stripe. In the above introduction, such an IO is referred to as a small IO, and there are two processing methods for small IOs in the prior art, which are described below.
[0053] Method one, assuming that the small IO request writes 512K data, which cannot fill the entire stripe, then the remaining space of the stripe is filled in a zero-filling manner. However, this method will cause serious write amplification. The write amplification (WA) refers to the multiple relationship between the actual amount of data written by the SSD and the amount of data written by the user to the SSD. Here, the actual amount of data written by the SSD is 2M, and the amount of data written by the user to the SSD is 512K, and the write amplification value is 4. The smaller the write amplification value, the longer the service life of the solid state disk, and the larger the write amplification value, the shorter the service life of the solid state disk.
[0054] The second way, in order to solve the problem of the first way, the second way proposes incremental EC, that is, for each received small IO write request, the corresponding to be written data generates a group of corresponding check blocks, please refer to Figure 4, to write data block A1 for the first time, the size of data block A1 is 512K, based on data block A1 generates check block P1, Q1, write data block A2 for the second time, the size of data block A2 is 512K, based on data block A1 and data block A2 generates check block P2, Q2, write data block A3 for the third time, the size of data block A3 is 512K, based on data block A1, A2 and A3 generates check block P3, Q3, write data block A4 for the fourth time, the size of data block A4 is also 512K, at this time, based on data block A1, A2, A3 and A4 generates check block R1 and S1, since data block A1-A4 can write a full stripe, that is, a primary fault domain write is completed, at this time, check block R4 and S4 are called primary check blocks; Continue, write data block A5 for the fifth time, the size of data block A5 is 512K, generates check block P5, Q5, ……, write data block A8 for the eighth time, the size of data block A8 is 512K, at this time, a second full stripe can be written, that is, a second primary fault domain write is completed, at this time, check block R2 and S2 are called primary check blocks, ……, write data A12 for the twelfth time, the size of data A12 is 512K, at this time, a third full stripe can be written, that is, a third primary fault domain write is completed, at this time, check block R3 and S3 are called primary check blocks. In the specific implementation process, after generating check blocks P2 and Q2, check blocks P1 and Q1 can be deleted, after generating check blocks P3 and Q3, check blocks P2 and Q2 can be deleted, and correspondingly, after generating primary check blocks R1 and S1, check blocks P3 and Q3 can be deleted.In order to ensure that the switching can be read and written, only after all primary fault domains are full, the secondary check block is generated based on the primary check block, that is, the secondary check block R4, S4 is generated based on the primary check block R1, S1, R2, S2, R3, S3, and the primary check block R1, S1, R2, S2, R3, S3 can be deleted. In this case, the check blocks P5, Q5, P6, Q6, P7, Q7, P9, Q9, P10, Q10, P11, Q11 after R1, S1 and before R3, S3 cannot be deleted. Thus, a large number of check blocks will be stored in the memory corresponding to the processor, and the memory space is limited and cannot support the storage of a large number of temporary check blocks. Therefore, in the case that the memory space is not enough, the check blocks stored in the memory will be cached to the SSD. The check blocks cached to the SSD, such as P5, Q5, P6, Q6, P7, Q7, P9, Q9, P10, Q10, P11, Q11, are not always needed. After the generation of the secondary check block R4, S4, the check blocks P5, Q5, P6, Q6, P7, Q7, P9, Q9, P10, Q10, P11, Q11 will be deleted. Thus, the write amplification of the SSD will be caused.
[0055] In a second aspect, the application further provides a data storage method, which further solves the technical problem of write amplification caused by incremental EC in small IO writing.
[0056] In the implementation process, the processor 101-1 first acquires the size of the data block, which can be the size of a data block in a stripe, for example, 1 MB. The first primary check block generated according to the first data is stored in the first memory space shown in FIG. 1. The number of the first primary check block can be one or more. The size of the first data is an integer multiple of the size of the data block, that is, the first data can fill a stripe. The first data can be the data carried in a write request or the collection of data carried in multiple write requests. When the first data is the collection of data carried in multiple write requests, the data carried in the multiple write requests can be stored according to the data storage method provided below, or the data in the write request can be first stored in the cache, such as the SSD shown in FIG. 1. When the data carried in the multiple write requests is an integer multiple of the size of the data block, the first primary check block is generated based on the aggregated data.
[0057] Further, the incremental check blocks are generated according to the second data, the incremental check blocks are stored in the second memory space of the memory shown in Fig. 1, and the number of the incremental check blocks can be one or more. The second memory space is different from the first memory space. Since the generated primary check blocks and the incremental check blocks are stored in different memory spaces respectively, the incremental check blocks can be processed immediately, for example, the incremental check blocks can be deleted after the generation of the second primary check block or the next incremental check block, so as to reduce the occupation of the memory space by the incremental check blocks.
[0058] The following introduces the data storage process of the small IO in combination with the failure domain of the storage system shown in FIG. 1. The division manner of the failure domain has been introduced in the first aspect, and will not be repeated here. In an optional manner, the memories included in the storage system respectively belong to two primary failure domains, the number of the incremental check blocks is multiple, and the incremental check blocks are respectively stored in the second memory space of the memory included in the secondary failure domain. Please refer to FIG. 5. The processor 101-1 receives the write data request sent by the computing node 110, writes the data block A1, the size of the data block A1 is 512K, generates the incremental check blocks P1 and Q1 based on the data block A1; writes the data block A2 for the second time, the size of the data block A2 is 512K, generates the incremental check blocks P2 and Q2 based on the data blocks A1 and A2, and can delete the incremental check blocks P1 and Q1 after generating the incremental check blocks P2 and Q2; writes the data block A3 for the third time, the size of the data A3 is 512K, generates the incremental check blocks P3 and Q3 based on the data blocks A1, A2 and A3, and can delete the incremental check blocks P2 and Q2 after generating the incremental check blocks P3 and Q3; writes the data block A4 for the fourth time, the size of the data block A4 is 512K, which can fill up a primary failure domain at this time, generates a primary check block R1 and S1 based on the data blocks A1, A2, A3 and A4, and can delete the incremental check blocks P3 and Q3 after generating the primary check blocks R1 and S1; writes the data block A5 for the fifth time, the size of the data block A5 is 512K, generates the incremental check blocks P5 and Q5 based on the data block A5; writes the data block A6 for the sixth time, the size of the data block A6 is 512K, generates the incremental check blocks P6 and Q6 based on the data blocks A5 and A6, and in the embodiment of the present application, since the incremental check blocks and the primary check blocks are stored separately, that is, the incremental check blocks and the primary check blocks are stored in different memory spaces on the memory, and do not affect each other, which can be specifically referred to in FIG. 5, P1, P2, P3, P5, P6, P7, P9, P10, P11 and R1, R2, R3 are respectively stored in different memory spaces of the memory of the processor 101-1, and similarly, Q1, Q2, Q3, Q5, Q6, Q7, Q9, Q10, Q11 and S1, S2, S3 are respectively stored in different memory spaces of the memory of the processor 101-2. In this case, the incremental primary check blocks P5 and Q5 can be deleted after generating the incremental check blocks P6 and Q6, … the data A8 is written for the eighth time, the size of the data A8 is 512K, a primary check block R2 and S2 can be generated by filling up the second primary failure domain, and the same applies to the subsequent … the data block A12 is written for the twelfth time, the size of the data block A12 is 512K, a primary check block R3 and S3 can be generated by filling up the third primary failure domain, and after that, it is determined whether the number of the data written multiple times can be divided into the data block group number T or not, and the determination manner of T is the same as that in the first aspect, which will not be repeated here.After three primary fault domains are full, the requirement of T is met, and one group of secondary check blocks R4, S4 can be generated based on the three groups of primary check blocks R1, S1, R2, S2, R3, S3. The number of secondary check blocks is multiple, and in some optional manners, the number of secondary check blocks can be one or three or other integers greater than zero. In the specific implementation process, the data A1-A12 is first stored in different SSDs included in different secondary fault domains, and then stored in the SSDs. After the data A1-A12 is stored in the SSDs, the primary check blocks R1, S1, R2, S2, R3, S3 are deleted.
[0059] In the technical solution, since the incremental check block and the primary check block are stored in different storage spaces of the memory, the generated incremental check block can be deleted immediately, thereby reducing the memory space occupied by the incremental check block, and avoiding caching the incremental check block to the SSD, thereby causing the write amplification of the SSD. Therefore, by using the technical solution provided in the present application, the write amplification of the SSD can be reduced.
[0060] As mentioned above, the first data can also be the data carried in a write request, in which case, the whole process of the data storage method provided by the present application is described as follows. As an example, 2M data is written for the first time, which fills up a stripe, i.e. a primary fault domain, so that a primary check block R1, S1 can be generated directly; 512K data is written for the second time, based on which incremental check blocks P1, Q1 are generated; 512K data is written for the third time, based on which incremental check blocks P2, Q2 are generated according to the data written for the second time and the data written for the third time; since the incremental check blocks and the primary check blocks are stored in different storage spaces in the memory, the incremental check blocks P1, Q1 can be deleted after the incremental check blocks P2, Q2 are generated; 512K data is written for the fourth time, based on which incremental check blocks P3, Q3 are generated according to the data written for the first time, the data written for the second time and the data written for the fourth time; the incremental check blocks P2, Q2 can be deleted after the incremental check blocks P3, Q3 are generated; 512K data is written for the fifth time, at which time a stripe from the data written for the second time to the data written for the fifth time can be filled up, i.e. the writing of a primary fault domain is completed, and then primary check blocks R2, S2 are generated based on the data written for the four times; 2M data is written for the sixth time, which fills up a stripe, i.e. a primary fault domain, so that primary check blocks R3, S3 can be generated directly; after the third primary fault domain is filled up, the writing of a secondary fault domain is completed, and secondary check blocks R4, S4 can be generated according to the three groups of primary check blocks R1, S1, R2, S2 and R3, S3; after the secondary check blocks R3, S3 and all the data blocks are saved from the SSD to the HDD, the primary check blocks R1, S1, R2, S2 and R3, S3 can be deleted.
[0061] In a third aspect, the present application further provides a data reading method, which adopts different data recovery modes according to the fault condition of the fault domain where the data to be read is located and whether the primary fault domain check block is deleted. It should be noted that the correspondence between the storage address of the data block and the fault domain is stored in the processor 101-1 and / or the processor 101-2, i.e. the storage address of the data block is known, so that the correspondence can be used to determine whether the primary fault domain or the secondary fault domain where the data block is located is faulty.
[0062] In the following introduction, it is assumed that the received read data request is to read the data blocks D1-D6 stored in FIG. 3.
[0063] In a first case, the two primary fault domains and the four secondary fault domains included in the storage system are all not faulty, so that the processor 101-1 can read the data blocks D1-D6 from the corresponding HDDs.
[0064] The second case, please see Figure 6, the storage system includes one of the two primary failure domains or two of the four secondary failure domains.
[0065] 1. One of the two primary failure domains fails, in other words, processor 101-1 fails or processor 101-2 fails. Here, assume that processor 101-1 fails, processor 101-2 can take over the SSD of processor 101-1 and the HDD logically corresponding to the SSD in some cases, that is, the HDD logically corresponding to the SSD is used to store the data blocks and check blocks cached in the SSD. In some cases, processor 101-2 cannot take over the SSD of processor 101-1, but can take over the HDD corresponding to the SSD of processor 101-1. The following will be described respectively.
[0066] 1) Determine whether the primary check block corresponding to the data to be read D1-D6 is deleted. If not, proceed to step 2.
[0067] In the implementation process, after the data block or the secondary check block is stored from the SSD to the HDD corresponding to the SSD, the SSD will send an indication information to the processor to indicate the processor to delete the corresponding primary check block. Therefore, after processor 101-1 receives the read data request, it can determine whether the primary check block of the data to be read is deleted.
[0068] (1) Processor 101-2 can take over the SSD of processor 101-1 and the HDD corresponding to the SSD
[0069] As an example, processor 101-1 will read the primary check blocks C1-C6 and part of the data blocks D2, D4, D6 from the SSD taken over by processor 101-2 and its own SSD through processor 101-2, and recover the data blocks D1-D6 according to the primary check blocks C1-C6 and the data blocks D2, D4, D6.
[0070] As another example, processor 101-1 reads the data blocks D1-D6 from the SSD taken over by processor 101-2 and its own SSD through processor 101-2.
[0071] (2) Processor 101-2 cannot take over the SSD of processor 101-1, but can take over the HDD corresponding to the SSD
[0072] In this case, the primary check blocks C2, C4, C6 and the data blocks D2, D4, D6 are read from the SSD corresponding to processor 101-2 through processor 101-2, so that D1 can be recovered through D2 and C2, D3 can be recovered through D4 and C4, and D6 can be recovered through D6 and C6, thereby obtaining the data D1-D6.
[0073] 2) Primary check block deletion
[0074] The processor 101-1 reads the data blocks D1-D6 from the taken-over HDD and the HDD corresponding to the SSD of the processor 101-2 through the processor 101-2.
[0075] 2. Two of the four secondary fault domains fail, and it is assumed that two HDDs fail
[0076] If the primary check blocks C1-C6 are deleted, it indicates that the data blocks D1-D6 to be read and the secondary check blocks C7 and C8 have been permanently saved to the corresponding HDDs in the SSDs, and the processor 101-1 can read the data blocks D2, D3, D5, D6 and the secondary check blocks C7 and C8 from the non-failed HDDs, and recover the data blocks D1-D6 from the data blocks D2, D3, D5, D6 and the secondary check blocks C7 and C8.
[0077] In the specific implementation process, the processor 101-1 can also first read data from the corresponding memory after receiving the read data request sent by the computing node 110, then read data from the corresponding SSD, and finally read data from the non-failed HDD, and then recover the data to be read according to the read data.
[0078] As another example, the primary check blocks C1-C6 are not deleted, and the processing process in this case is the same as that in 1) above, and thus will not be described in detail here to avoid repetition.
[0079] In a fourth aspect, referring to FIG. 7, a data storage apparatus provided by an embodiment of the present application is provided, which is applied to a storage system or is a device in the storage system and can implement the function of the storage system in the method provided by the first aspect of the present application. The data storage apparatus can be a hardware structure, a software unit, or a hardware structure plus a software unit. The data storage apparatus can include a first division unit 701, a second division unit 702, a first generation unit 703, and a second generation unit 704, where the first division unit 701 is configured to perform the step of dividing each primary fault domain of the storage system into a plurality of secondary fault domains in FIG. 3; the second division unit 702 can perform the step of dividing data into a plurality of data block groups in FIG. 3, the first generation unit 703 can perform the step of generating at least one primary check block according to N data blocks included in each data block group to obtain a plurality of groups of primary check blocks in FIG. 3; and the second generation unit 704 can perform the step of generating secondary check blocks C7 and C8 according to the plurality of groups of primary check blocks in FIG. 3.
[0080] Wherein, all the related contents of the steps involved in the method embodiments provided by the first aspect can be cited to the function description of the corresponding functional units, which will not be described here again.
[0081] The division of units in the embodiments of the present application is illustrative, and is merely a logical functional division. In actual implementation, another division manner can be used. In addition, each functional unit in each embodiment of the present application can be integrated in one processor, or can be physically separated, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware, or in the form of a software functional unit.
[0082] In a fifth aspect, referring to FIG. 8, a data storage device is provided in an embodiment of the present application. The data storage device is applied in a storage system, or is a device in the storage system, and can implement the function of the storage system in the method of the second aspect provided in the embodiment of the present application. The data storage device can be a hardware structure, a software unit, or a hardware structure plus a software unit. The data storage device can include an acquisition unit 801 and a storage unit 802. The acquisition unit can perform the step of obtaining the size of one data block in FIG. 4. The storage unit 802 can perform the steps of storing the check blocks R1, S1, R2, S2, R3, S3 in one memory space, and storing the check blocks P1, Q1, P2, Q2, P3, Q3, P5, Q5, P6, Q6, P7, Q7, P9, Q9, P10, Q10, P11, Q11 in another memory space in FIG. 5.
[0083] The above-mentioned method embodiments provided in the second aspect involve all related contents of each step, which can be referred to the functional description of the corresponding functional unit, and will not be repeated here.
[0084] The division of units in the embodiments of the present application is illustrative, and is merely a logical functional division. In actual implementation, another division manner can be used. In addition, each functional unit in each embodiment of the present application can be integrated in one processor, or can be physically separated, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware, or in the form of a software functional unit.
[0085] In a sixth aspect, referring to FIG. 9, the present application further provides a data storage device. The data storage device is applied in a storage system, or is a device in the storage system. The data storage device can include an interface 901 and a processor 902. The processor 902 can be used to execute the data storage method shown in FIG. 3, or execute the data storage method shown in FIG. 5, to implement the function of the block shown in FIG. 1.
[0086] In a seventh aspect, the present application provides a computer readable storage medium, including instructions, which when executed on a computer, cause the computer to perform the data storage method according to the first aspect or the second aspect, or the data reading method according to the third aspect.
[0087] In an eighth aspect, the present application provides a computer program product, which when executed on a computer, cause the computer to perform the data storage method according to the first aspect or the second aspect, or the data reading method according to the third aspect.
[0088] The method provided by the embodiments of the present application can be implemented by software, hardware, firmware or any combination thereof, in whole or in part. When implemented by software, the method can be implemented in the form of a computer program product, entirely or partially. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the computer program instructions entirely or partially generate the processes or functions described in the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line) or wireless manner. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center and the like integrated with one or more available medium sets. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, digital video disc (DVD)) or a semiconductor medium, etc.
[0089] The above description is merely a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A data storage method, characterized by, The method is applied to a storage system including a plurality of primary fault domains, wherein each primary fault domain includes a plurality of storage devices, and the method includes: dividing each primary fault domain into a plurality of secondary fault domains, each secondary fault domain including part of the plurality of storage devices, and each secondary fault domain including different part of the plurality of storage devices; dividing to-be-written data into a plurality of data block groups, each data block group including N data blocks, N being an integer greater than zero; generating at least one primary check block according to the N data blocks in each data block group, to obtain a plurality of groups of primary check blocks; after storing different data blocks in each data block group into different storage devices included in different secondary fault domains, generating a secondary check block according to the plurality of groups of primary check blocks, wherein the secondary check block is a check block of the plurality of data block groups.
2. The method of claim 1, wherein the number of N is determined by a redundancy ratio of the primary fault domains.
3. The method of claim 1, wherein, The storage devices include a primary memory and a plurality of secondary memories, the read-write speed of the primary memory is higher than that of the plurality of secondary memories, and storing different data blocks in each data block group into different storage devices included in different secondary fault domains includes: storing different data blocks in each data block group into different primary memories included in different secondary fault domains.
4. The method of claim 3, wherein, The number of secondary check blocks is a plurality, and the method further includes: storing the secondary check blocks in different primary memories included in different secondary fault domains.
5. The method of claim 1, wherein, According to the plurality of groups of primary check blocks, generating a secondary check block includes: The number of the plurality of data block groups is T, wherein T is an integer greater than zero, and the number of T is determined by a redundancy ratio of the primary fault domains and a redundancy ratio of the secondary fault domains. According to the plurality of groups of primary check blocks, generating a secondary check block.
6. The method of claim 5, wherein, The method further includes: After storing the data blocks in the plurality of data block groups and the secondary check block from the primary memory to the secondary memory, deleting the plurality of groups of primary check blocks from the primary memory.
7. A data storage method characterized by, The method is applied to a storage system, including: obtaining the size of a data block; storing a first primary check block generated according to first data in a first memory space, the size of the first data being an integer multiple of the size of the data block; and storing an incremental check block generated according to second data in a second memory space, the size of the second data being smaller than the size of the integer multiple of the data block, and the second memory space being different from the first memory space.
8. The method of claim 7, wherein, The method further includes: generating a second primary check block according to third data and the second data, the sum of the size of the third data and the size of the second data being an integer multiple of the size of the data block; storing the second primary check block in the first memory space.
9. The method of claim 8, wherein, The method further includes: after storing the second primary check block in the first memory space, deleting the incremental check block.
10. The method of claim 7, wherein, The storage system comprises a plurality of primary fault domains, wherein the first memory space and the second memory space are located in the same memory, the memory belongs to one of the plurality of primary fault domains, the primary fault domain comprises a plurality of storage devices, the read-write speed of the storage devices included in the storage system is lower than the read-write speed of the memory, and the method further comprises: dividing each primary fault domain into a plurality of secondary fault domains, one secondary fault domain comprising part of the plurality of storage devices, and each secondary fault domain comprising different part of the plurality of storage devices; dividing the first data into a plurality of data blocks; storing the plurality of data blocks in the storage devices included in different secondary fault domains respectively.
11. A storage system, characterized by Comprise: a plurality of primary fault domains, wherein each primary fault domain comprises a plurality of storage devices; a processor configured to divide each primary fault domain into a plurality of secondary fault domains, each secondary fault domain comprising part of the plurality of storage devices, and each secondary fault domain comprising different part of the plurality of storage devices; divide the data to be written into a plurality of data block groups, each data block group comprising N data blocks, N being an integer greater than zero; generate at least one primary check block according to the N data blocks in each data block group to obtain a plurality of groups of primary check blocks; and after storing different data blocks in each data block group in the storage devices included in different secondary fault domains respectively, generate a secondary check block according to the plurality of groups of primary check blocks, wherein the secondary check block is a check block of the plurality of data block groups.
12. A data storage device, characterized by The data storage device is applied to a storage system, the storage system comprises a plurality of primary fault domains, wherein each primary fault domain comprises a plurality of storage devices, and comprises: a first division unit configured to divide each primary fault domain into a plurality of secondary fault domains, each secondary fault domain comprising part of the plurality of storage devices, and each secondary fault domain comprising different part of the plurality of storage devices; a second division unit configured to divide data to be written into a plurality of data block groups, each data block group comprising N data blocks, N being an integer greater than zero; a first generation unit configured to generate at least one primary check block according to the N data blocks in each data block group to obtain a plurality of groups of primary check blocks; a second generation unit configured to, after storing different data blocks in each data block group in the storage devices included in different secondary fault domains respectively, generate a secondary check block according to the plurality of groups of primary check blocks, wherein the secondary check block is a check block of the plurality of data block groups.
13. A data storage device, characterized by The data storage device is applied to a storage system, the storage system comprises a plurality of primary fault domains, wherein each primary fault domain comprises a plurality of storage devices, and comprises: an interface; The processor is configured to divide each primary fault domain into a plurality of secondary fault domains, each secondary fault domain including part of the plurality of storage devices, and each secondary fault domain including different part of the plurality of storage devices; divide the data to be written into a plurality of data block groups, each data block group including N data blocks, N being an integer greater than zero; generate at least one primary check block according to the N data blocks in each data block group to obtain a plurality of primary check blocks; and after storing different data blocks in each data block group into different storage devices included in different secondary fault domains through the interface, generate a secondary check block according to the plurality of primary check blocks, wherein the secondary check block is a check block of the plurality of data blocks.
14. A data storage device, characterized by The data storage device is applied to a storage system and includes: a storage unit configured to store a first primary check block generated according to first data in a first memory space, the first data having a size that is an integer multiple of the size of the data block; and a storage unit configured to store an incremental check block generated according to second data in a second memory space, the second data having a size smaller than the size of the integer multiple of the data block, and the second memory space being different from the first memory space. The data storage device is applied to a storage system and includes:
15. A data storage device, characterized by an interface; a processor configured to obtain the size of the data block through the interface, store a first primary check block generated according to first data in a first memory space, the first data having a size that is an integer multiple of the size of the data block, and store an incremental check block generated according to second data in a second memory space, the second data having a size smaller than the size of the integer multiple of the data block, and the second memory space being different from the first memory space. 16.A computer readable storage medium including instructions that, when executed on a computer, cause the computer to perform the data storage method according to any one of claims 1-6 or claims 7-10. 17.A computer program product that, when executed on a computer, causes the computer to perform the data storage method according to any one of claims 1-6 or claims 7-10.