Data storage method, and storage system, storage apparatus and storage device

By refining fault domain division in distributed storage systems and adopting incremental EC technology, the problems of low storage space utilization and write amplification are solved, achieving more efficient data storage and recovery.

WO2025189839A1PCT designated stage Publication Date: 2025-09-18HUAWEI TECH CO LTD

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-09-18

AI Technical Summary

Technical Problem

In existing distributed storage systems, the granularity of fault domain division is large, resulting in low storage space utilization and easily causing write amplification problems when small IO writes.

Method used

The storage system is divided into multiple first-level fault domains, and each first-level fault domain is further divided into multiple second-level fault domains. Data blocks and check blocks are stored in different second-level fault domains respectively. Incremental EC technology is used to store incremental check blocks and first-level check blocks in different memory spaces.

Benefits of technology

It improves the utilization of storage space, reduces write amplification, and enhances the reliability and read/write efficiency of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024136402_18092025_PF_FP_ABST
    Figure CN2024136402_18092025_PF_FP_ABST
Patent Text Reader

Abstract

A data storage method, and a storage system, a storage apparatus and a storage device, which are used for improving the utilization rate of a storage space of the storage system. The data storage method comprises: dividing each primary fault domain into a plurality of secondary fault domains, wherein each secondary fault domain comprises some storage apparatuses among a plurality of storage apparatuses, and the storage apparatuses comprised in each secondary fault domain are different from those comprised in one another; dividing data to be written into a plurality of data block groups, wherein each data block group comprises N data blocks, and N is an integer greater than 0; generating at least one primary parity block on the basis of the N data blocks in each data block group, so as to obtain a plurality of groups of primary parity blocks; and respectively storing, in storage apparatuses included in different second fault domains, different data blocks in each data block group, and then generating secondary parity blocks on the basis of the plurality of groups of primary parity blocks, wherein the secondary parity blocks are parity blocks for a plurality of groups of data blocks.
Need to check novelty before this filing date? Find Prior Art

Description

Data storage method, storage system, storage device and storage equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 12, 2024, with application number 202410285408.1 and application name “A data storage method, storage system, storage device and storage equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of storage, and in particular to a data storage method, a storage system, a storage device, and a storage equipment. Background Art

[0003] Erasure Coding (EC) technology primarily groups data shards. Each group consists of a data block and a check block, where the check block is partially redundant data. If 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 provides high data reliability but also significantly higher storage space utilization (compared to multiple replicas), making it the optimal choice for balancing reliability and cost-effectiveness.

[0004] A fault domain is an area or component in a storage system where failures may occur. Redundancy within a fault domain is a key method for mitigating failure risks. In current distributed storage systems, EC algorithms typically use nodes as fault domains. A node here refers to a storage node within a distributed storage system, which includes a processor. This high granularity in fault domain division results in low storage space utilization in distributed storage systems. Summary of the Invention

[0005] The embodiments of the present application provide a data storage method, a storage system, a storage device, and a storage equipment for improving 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, wherein the storage system is divided into multiple first-level fault domains, and each first-level fault domain includes multiple storage devices. The method includes: dividing each first-level fault domain into multiple second-level fault domains, each second-level fault domain includes some storage devices in the multiple storage devices, and the part of the storage devices included in each second-level fault domain is different; dividing the data to be written into multiple continuous data blocks, and dividing the multiple data blocks into multiple data block groups, each data block group including N data blocks; generating one or more first-level check blocks based on the N data blocks included in each data block group to obtain multiple groups of first-level check blocks, storing different data blocks in each data block group in storage devices included in different second-level fault domains, and after the storage of the data blocks in the multiple groups of data block groups is completed, generating second-level check blocks based on the multiple groups of first-level check blocks, and the second-level check blocks are check blocks of the multiple groups of data block groups. The data storage method provided in the prior art can store N data blocks in multiple first-level fault domains. The data storage method provided in the present application can store multiple groups of data blocks, and one 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 of the storage system.

[0007] In one possible implementation, the number N is determined by the redundancy ratio of the first-level fault domain. For example, if the redundancy ratio of the first-level fault domain is 2+2, then the number N is 2; if the redundancy ratio of the first-level fault domain is 6+2, then the number N is 6.

[0008] In one possible implementation, a storage device includes a primary memory and multiple secondary memories. Taking the primary memory being a solid-state memory SSD and the secondary memory being a mechanical hard disk HDD as an example, in a specific implementation process, different data blocks in each data block group are respectively stored in SSDs contained in different secondary fault domains, wherein 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. As an example, if 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. If 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 an embodiment of the present application, the data blocks are first stored in the SSD. Since the read and write rate of the SSD is greater than the read and write rate of the HDD, this can improve the read and write efficiency of the storage system.

[0009] In one possible implementation, there are multiple secondary parity blocks. For example, if there are two secondary parity blocks, the two secondary parity blocks are stored in SSDs within different secondary fault domains. Alternatively, the two secondary parity blocks can be stored in memories within different first fault domains, where the read and write speed of the memories is greater than that of the SSDs. This can be selected based on actual needs during implementation and is not a limitation here.

[0010] In one possible implementation, the number of multiple data block groups is T, and the number T is determined by the redundancy ratio of the primary fault domain and the redundancy ratio of the secondary fault domain. For example, the redundancy ratio of the primary fault domain is 2+2, and the redundancy ratio of the secondary fault domain is 6+2, then T is 3; the redundancy ratio of the primary fault domain is 6+2, and the redundancy ratio of the secondary fault domain is 12+2, then T=2. When the number of multiple data block groups meets T, it indicates that the primary fault domain is full, and the writing of the secondary fault domain is completed. At this time, the secondary check blocks are generated according to the multiple groups of primary check blocks, so that when the data in the multiple data block groups is lost, it can be restored according to the secondary check blocks.

[0011] In one possible implementation, after the three data block groups and the secondary parity blocks are stored from the SSD to the HDD, the multiple groups of primary parity blocks are deleted from the SSD. In the embodiment of the present application, different data recovery strategies can be adopted according to the status of the parity blocks. For example, when the three data block groups and the secondary parity blocks are not stored to the HDD, data recovery can be performed using the multiple groups of primary parity blocks. When the three data block groups and the secondary parity blocks are stored to the HDD, data recovery can be performed using the secondary parity blocks, thereby improving the reliability of the storage system.

[0012] On the second aspect, an embodiment of the present application also provides a data storage method, which is applied to a storage system. If 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, a first level check block is generated based on the first data, and the size of the second data is smaller than the size of the data block, that is, the second data cannot fill a stripe, an incremental check block is generated based on the second data, wherein the first level 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 level check block and the incremental check block are stored in different memory spaces, the incremental check block can be processed when needed. For example, when generating the next incremental check block or the first level check block, the currently generated incremental check block can be deleted instead of being limited to the next generated first level check block, thereby reducing the memory space occupied by the incremental check block.

[0013] In one possible implementation, the method further includes: if the sum of the sizes of the third data and the second data is an integer multiple of the sizes of data blocks, that is, the third data and the second data can fill a stripe, generating a second first-level check block based on the third data and the second data, and storing the second first-level check block in the first memory space. In an embodiment of the present application, all first-level check blocks are stored in the first memory space, and incremental check blocks are stored in the second memory space. In this way, after the second first-level check block is generated, the incremental check block can be deleted, thereby reducing the memory space occupied by the incremental check block.

[0014] In one possible implementation, a storage system includes multiple first-level fault domains, wherein a first memory space and a second memory space are located in the same memory, which belongs to one of the multiple first-level fault domains. The first-level fault domain includes multiple storage devices, and the read and write rates of the storage devices included in the storage system are lower than the read and write rates of the memory. The method also includes: dividing each first-level fault domain into multiple second-level fault domains, each second-level fault domain includes some storage devices among the multiple storage devices, and the some storage devices included in each second-level fault domain are different; dividing the first data into multiple data blocks, and storing the multiple data blocks in the storage devices included in different second-level fault domains.

[0015] On the third aspect, the present application also provides a data reading method, which is applied to a storage system, wherein the storage system includes multiple first-level fault domains, and each first-level fault domain includes multiple storage devices; the method includes: receiving a read data request, wherein the read data request carries a storage address; determining whether a fault occurs in the fault domain where the data to be read corresponding to the storage address is located, and if a fault occurs in the first-level fault domain where the data to be read is located, and multiple groups of first-level check blocks of the data to be read are deleted. If multiple groups of first-level check blocks are deleted, it indicates that the data to be read has been persistently stored in the storage device included in the storage system. In this case, the processor included in the first-level fault domain that has not failed, denoted as processor A, will take over the multiple storage devices included in the first-level fault domain that has failed. At this time, the data to be read corresponding to the storage address is read from the storage device included in the storage system through processor A.

[0016] In one possible implementation, the storage device includes a primary memory and multiple secondary memories. Taking the primary memory as an SSD and the secondary memory as an HDD as an example, the method further includes: if a primary fault domain where the data to be read is located fails, and the multiple groups of primary check blocks of the data to be read have not been deleted, it means that the data to be read has not been persistently stored in the HDD. At this time, there are several different implementation methods for obtaining the data to be read. As an example, a processor of a primary fault domain that has not failed can take over the SSD and HDD included in the primary fault domain that has failed. In this case, the data to be read corresponding to the storage address from the SSD included in the storage system is read by the processor in the primary fault domain that has not failed; as another example, a processor of a primary fault domain that has not failed can take over the HDD included in the primary fault domain that has failed. In this case, the primary check blocks and data blocks are read from the SSD included in the primary fault domain that has not failed, and the data to be read is recovered based on the read primary check blocks and data blocks;

[0017] In one possible implementation, each primary fault domain includes multiple secondary fault domains, each secondary fault domain includes some storage devices among the multiple storage devices, the some storage devices included in each secondary fault domain are different, the storage devices include a primary memory and multiple secondary memories, taking the primary memory being an SSD and the secondary memory being an HDD as an example, the method further includes: a failure occurs in the secondary fault domain where the data to be read is located, and multiple groups of primary check blocks of the data to be read are deleted, the deletion of multiple groups of primary check blocks of the data to be read means that the data to be read has been persistently stored in the HDD, and at this time, the secondary check blocks and data blocks are read from the HDD that has not failed; and the data to be read is restored based on the read secondary check blocks and data blocks.

[0018] In a fourth aspect, the present application also provides a storage system, comprising: multiple first-level fault domains, wherein each first-level fault domain includes multiple storage devices; a processor, used to divide each first-level fault domain into multiple second-level fault domains, each second-level fault domain includes some storage devices in the multiple storage devices, and the part of the storage devices included in each second-level fault domain is different; dividing the data to be written into multiple data block groups, each data block group includes N data blocks, and N is an integer greater than zero; generating at least one first-level check block based on the N data blocks in each data block group to obtain multiple groups of first-level check blocks; after storing different data blocks in each data block group in storage devices contained in different second-level fault domains, generating second-level check blocks based on the multiple groups of first-level check blocks, wherein the second-level check blocks are check blocks of the multiple groups of data blocks.

[0019] In a fifth aspect, the present application also provides a data storage device, which is applied to a storage system, wherein the storage system includes multiple first-level fault domains, wherein each first-level fault domain includes multiple storage devices, including: a first partitioning unit, used to divide each first-level fault domain into multiple second-level fault domains, each second-level fault domain includes some storage devices in the multiple storage devices, and the part of the storage devices included in each second-level fault domain is different; a second partitioning unit, used to divide the data to be written into multiple data block groups, each data block group includes N data blocks, and N is an integer greater than zero; a first generation unit, used to generate at least one first-level check block based on the N data blocks in each data block group to obtain multiple groups of first-level check blocks; a second generation unit, used to store different data blocks in each data block group in storage devices contained in different second-level fault domains, and then generate second-level check blocks based on the multiple groups of first-level check blocks, wherein the second-level check blocks are check blocks of the multiple groups of data blocks.

[0020] In a sixth aspect, the present application also provides a data storage device, which is applied to a storage system, wherein the storage system includes multiple first-level fault domains, wherein each first-level fault domain includes multiple storage devices, including: an interface; a processor, used to divide each first-level fault domain into multiple second-level fault domains, each second-level fault domain includes some storage devices in the multiple storage devices, and the part of the storage devices included in each second-level fault domain is different; dividing the data to be written into multiple data block groups, each data block group includes N data blocks, and N is an integer greater than zero; generating at least one first-level check block based on the N data blocks in each data block group to obtain multiple groups of first-level check blocks; after storing different data blocks in each data block group in different storage devices contained in different second-level fault domains through the interface, generating second-level check blocks based on the multiple groups of first-level check blocks, wherein the second-level check blocks are check blocks of the multiple groups of data blocks.

[0021] In the seventh aspect, the present application also provides a data storage device, which is applied to a storage system and includes: an acquisition unit for acquiring the size of a data block; a storage unit for storing a first-level check block generated based on first data in a first memory space, where the size of the first data is an integer multiple of the size of the data block; and storing an incremental check block generated based on second data in a second memory space, where the size of the second data is smaller than the size of the integer multiple of the data block, and the second memory space is different from the first memory space.

[0022] In an eighth aspect, the present application also provides a data storage device, which is applied to a storage system and includes: an interface; a processor, which obtains the size of a data block through the interface; stores a first-level check block generated based on first data in a first memory space, wherein the size of the first data is an integer multiple of the size of the data block; and stores an incremental check block generated based on second data in a second memory space, wherein the size of the second data is smaller than the size of the integer multiple of the data block, and the second memory space is different from the first memory space.

[0023] In the ninth aspect, the present application also provides a computer-readable storage medium comprising instructions, which, when executed on a computer, enables the computer to execute the data storage method as described in the first aspect and any possible implementation of the first aspect, or the data storage method as described in the second aspect and any possible implementation of the second aspect, or the data reading method as described in the third aspect and any possible implementation of the third aspect.

[0024] In the tenth aspect, the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the data storage method as described in the first aspect and any possible implementation of the first aspect, or the data storage method as described in the second aspect and any possible implementation of the second aspect, or the data reading method as described in the third aspect and any possible implementation of the third aspect.

[0025] The beneficial effects of the above-mentioned fourth to tenth aspects and their implementation methods can refer to the description of the beneficial effects of the data storage method and its implementation method of the first aspect, the data storage method and its implementation method of the second aspect, or the data storage method and its implementation method of the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] FIG1 is a schematic diagram of a system architecture provided by an embodiment of the present application;

[0027] 2A-2B are schematic diagrams of a fault domain division method provided in an embodiment of the present application;

[0028] FIG3 is a schematic diagram of a data storage method provided in an embodiment of the present application;

[0029] FIG4 is a schematic diagram of a data storage method provided in the prior art;

[0030] FIG5 is a schematic diagram of another data storage method provided in an embodiment of the present application;

[0031] FIG6 is a schematic diagram of a data reading method provided in an embodiment of the present application;

[0032] FIG7 is a schematic structural diagram of a data storage device provided in an embodiment of the present application;

[0033] FIG8 is a schematic structural diagram of another data storage device provided in an embodiment of the present application;

[0034] FIG9 is a schematic structural diagram of a data storage device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the objectives, technical solutions and advantages of this application clearer, the specific embodiments of this application are further described in detail below with reference to the accompanying drawings.

[0036] Before introducing a data storage method provided by the present application, the system architecture to which the present application is adapted is first introduced. Please refer to Figure 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 each computing node 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 the network. The storage cluster may include multiple frames 100. A frame 100 may include one or more storage nodes. Here, a frame 100 includes two storage nodes, and a storage node includes a processor. For ease of description, the two processors are identified as 101-1 and 101-2 respectively. A storage node also includes a network card 102 and multiple hard disks 103, wherein the network card 102 is used to communicate with the computing node 110. The processor 101 is used to write data to the hard disk 103 or read data from the hard disk according to the read / write data request sent by the computing node 110.

[0037] The processor in Figure 1 can be a central processing unit (CPU), which is used to perform operations such as address translation and reading and writing data. In the specific implementation process, each CPU can also be configured with a memory, which is used to temporarily store data to be written to the hard disk or data read from the hard disk to be sent to the computing node 110. The memory is continuously powered by a battery backup unit (BBU) to prevent data loss in the event of a power failure. In another case, the processor is a programmable electronic component, such as a data processing unit (DPU). The DPU has the versatility and programmability of the CPU, but is more specialized and can run efficiently on network data packets, storage requests, or analysis requests. The DPU is distinguished from the CPU by a greater degree of parallelism. Optionally, the DPU here can also be replaced with a processing chip such as a graphics processing unit (GPU), an embedded neural network processing unit (NPU), or other other hardware that can replace the CPU to perform the above-mentioned corresponding operations, which is not specifically limited in this application.

[0038] In another embodiment, the processor's functions can be offloaded to the network card 102. In other words, the storage node does not have a processor, but instead the network card 102 performs data reading and writing, address translation, and other computing functions. In this case, the network card 102 is a smart network card. It can include a CPU and memory. The CPU is used to perform operations such as address translation and reading and writing data. The memory is used to temporarily store data to be written to the hard disk or read from the hard disk to be 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 mechanical hard disk (HDD). In an embodiment of the present application, a frame 100 includes two processors, namely processors 101-1 and 101-2. The processor 101-1 corresponds to two SSDs. It can be understood that the two SSDs are used to cache data blocks and / or check blocks that the processor needs to read from the HDD, or the data blocks and / or check blocks that the processor needs to write to the HDD. Each SSD matches multiple HDDs. It can be understood that multiple HDDs are usually used to persistently store data blocks and / or check blocks cached on the SSD. The number of SSDs and the number of HDDs here can be set according to actual needs and are not limited in the embodiment of the present application.

[0040] In the existing technology, fault domains are divided according to processors. Please refer to Figure 1 again. Taking the first box as an example, the box includes two fault domains. Based on these two fault domains, a 2+2 EC can be formed. The corresponding storage space utilization rate is 50%. Although the space utilization rate is higher than that of the replica mode, there is still room for improvement.

[0041] In a first aspect, embodiments of the present application provide a data storage method, which is applied to a storage system. The storage system is divided into multiple primary failure domains, each of which includes multiple storage devices, such as hard disks 103 shown in FIG1 . In embodiments of the present application, each primary failure domain can be further divided into multiple secondary failure domains, each of which includes some of the multiple hard disks 103.

[0042] The division of the secondary fault domain includes, but is not limited to: division based on the SSDs included in each primary fault domain, that is, each secondary fault domain includes one SSD, or division based on the HDDs included in each primary fault domain, that is, each secondary fault domain includes some of the HDDs included in the primary fault domain. As an example, a processor corresponds to two SSDs, represented as SSD1 and SSD2, respectively. SSD1 corresponds to four HDDs, and SSD2 corresponds to four HDDs. Then, one secondary fault domain includes SSD1 and the HDDs corresponding to SSD1, one secondary fault domain includes SSD2 and the HDDs corresponding to SSD2, or one secondary fault domain includes some of the HDDs in SSD1 and some of the HDDs in SSD2, and one secondary fault domain includes some of the HDDs in SSD1 and some of the HDDs in SSD2. For details, please refer to Figures 2A and 2B. Of course, it is also possible to divide the domain based on the granularity of other components within the primary fault domain, for example, dividing the domain based on the storage space in the HDD.

[0043] Based on the system architecture shown in Figure 1, taking one of the boxes 100 as an example, the box 100 includes two first-level fault domains. A first-level fault domain includes a processor 101-1, SSD1, SSD2, and four HDDs corresponding to each SSD. Each first-level fault domain can be divided into two second-level fault domains, and a second-level fault domain includes one SSD.

[0044] If an input / output (IO) request requires writing 2MB of data, divided into two 1MB blocks, which can fill a stripe, then the IO request that can write the entire stripe is called a large IO. If an IO request requires writing 512KB of data, which cannot fill a stripe, then such an IO is called a small IO. Striping is a method of dividing continuous data into blocks of equal size and writing each block to the SSD corresponding to a different secondary failure domain.

[0045] After explaining the division of fault domains and the different types of I / O, we will now explain how to write and read data based on the division of fault domains. The following examples illustrate this. For ease of description, the primary fault domain-level EC is referred to as the primary EC, the secondary fault domain-level EC is referred to as the secondary EC, the parity blocks generated from data blocks stored in the primary fault domain are referred to as primary parity blocks, and the parity blocks generated from data blocks stored in the secondary fault domain are referred to as secondary parity blocks. Assume that the primary EC uses an (N+M):1 redundancy ratio and the secondary EC uses a (L+M):1 redundancy ratio. (N+M):1 means that N data blocks and M parity blocks are randomly distributed and stored in different HDDs corresponding to different processors, while (L+M):1 means that L data blocks and M parity blocks are randomly distributed and stored in different HDDs corresponding to different SSDs, with each SSD storing M data blocks and / or parity blocks. M is an integer greater than zero. In this case, the disk pool (consisting of the HDDs corresponding to each SSD) can tolerate the failure of M HDDs or one processor.

[0046] Processor 101-1 receives a write data request from compute node 110. Processor 101-1 divides the received data to be written into consecutive data blocks, and then divides the consecutive data blocks into multiple data block groups. Continuing with the above example, if there are 2 processors, 4 SSDs, and a level 1 EC redundancy ratio of (2+2):1, then the number of data blocks N in a stripe is 2, and the number of parity blocks is 2. The number of parity blocks M can also be 1, 3, or another integer greater than zero. When L = 6, there are 6 data blocks D1-D6. These 6 data blocks need to be divided into 3 groups, each containing 2 data blocks: D1-D2, D3-D4, and D5-D6. At least one level 1 parity block is generated based on the N data blocks in each group. Specifically, based on data blocks D1-D2, level 1 parity blocks C1-C2 are generated; based on data blocks D3-D4, level 1 parity blocks C3-C4 are generated; and based on data blocks D5-D6, level 1 parity blocks C5-C6 are generated.

[0047] After generating at least one primary parity block for each data block group, resulting in multiple groups of primary parity blocks C1-C2, C3-C4, and C5-C6, the multiple groups of data blocks are stored in storage devices included in the secondary fault domain. In some optional embodiments, the storage devices include primary storage and multiple secondary storage devices, where the read and write rates of the secondary storage devices are lower than those of the primary storage devices. The primary storage devices may be SSDs, and the secondary storage devices may be HDDs. For a detailed storage process, see Figure 3. For ease of description, the four SSDs are designated as SSD1, SSD2, SSD3, and SSD4.

[0048] First, data block D1 is written to SSD1 under processor 101-1, data block D2 is written to SSD3 under controller 101-2, and the first-level check block C1 is stored in the memory corresponding to controller 101-1, or in SSD2 under controller 101-1. The first-level check block C2 is stored in the memory corresponding to controller 101-2, or in SSD4 under controller 101-2. Data blocks D3~D4, first-level check blocks C3~C4, data blocks D5~D6, and first-level check blocks C5~C6 are stored in the same way.

[0049] After all data blocks and first-level check blocks are written, in some optional methods, the processor 101-1 will determine whether the number of multiple data block groups is T. T is determined based on the first-level EC redundancy ratio and the second-level EC redundancy ratio. As an example, the first-level EC redundancy ratio is (2+2) and the second-level redundancy ratio is (6+2), then T is 3, and the number of data block groups written here is 3. Based on the three groups of first-level check blocks C1~C2, C3~C4, C5~C6, a new group of check blocks C7~C8 is generated. The newly generated check blocks are referred to as second-level check blocks here. Here, the number of second-level check blocks is 2. In some optional methods, the number of second-level check blocks can also be 1 or 3, or other integers greater than zero.

[0050] In a specific implementation, data blocks D1-D6 are temporarily cached in an SSD and then persistently stored in the HDD corresponding to the SSD. Specifically, data block D1 is persistently stored in an HDD under SSD1, and data block D2 is persistently stored in an HDD under SSD3. Data block D3 is persistently stored in an HDD under SSD1, and data block D4 is persistently stored in an HDD under SSD3. Data block D5 is persistently stored in an HDD under SSD2, and data block D6 is persistently stored in an HDD under SSD4. Secondary check block C7 is persistently stored in an HDD under SSD2, and secondary check block C8 is persistently stored in an HDD under SSD4. In a specific implementation, after persistently storing data blocks D1-D6 and secondary check blocks C7-C8 from the SSD to the HDD, processor 101-1 deletes the multiple groups of first-level check blocks C1-C2, C3-C4, and C5-C6.

[0051] Compared to the existing fault domain division method, this technical solution achieves finer granularity. With finer fault domain division, it can achieve 2+2EC redundancy for the primary fault domain and 6+2EC redundancy for the secondary fault domain, increasing storage space utilization to 75%. This is a 20% increase compared to the primary fault domain division method. For four processors and eight SSDs, it can achieve 6+2EC redundancy for the primary fault domain and 12+2EC redundancy for the secondary fault domain, increasing storage space utilization to 85%. For six processors and 12 SSDs, it can achieve 10+2EC redundancy for the primary fault domain and 18+2EC redundancy for the secondary fault domain, increasing storage space utilization to 90%.

[0052] Processor 101 - 1 receives a write data request sent by computing node 110 . The data received by processor 101 - 1 cannot fill a stripe. As mentioned in the above introduction, such IO is called small IO. There are currently two processing methods for small IO in the existing technology, which are described below.

[0053] Method 1: Assuming a small I / O request writes 512KB of data, which cannot fill the entire stripe, the remaining space in the stripe is padded with zeros. However, this method will cause severe write amplification. Write amplification (WA) refers to the ratio of the amount of data actually written to the SSD to the amount of data written by the user. Here, the actual amount of data written to the SSD is 2MB, while the amount of data written by the user to the SSD is 512KB, resulting in a WA value of 4. The smaller the WA value, the longer the SSD's service life, while the larger the WA value, the shorter the SSD's service life.

[0054] Method 2: In order to solve the write amplification problem in Method 1, this method proposes incremental EC, that is, each time a small IO write request is received, a set of corresponding check blocks is generated for the data to be written. Please refer to Figure 4. For the first time, data block A1 is written. The size of data block A1 is 512K. Check blocks P1 and Q1 are generated based on data block A1. The second time, data block A2 is written. The size of data block A2 is 512K. Check blocks P2 and Q2 are generated based on data block A1 and data block A2. The third time, data block A3 is written. The size of data block A3 is 512K. Check blocks P3 and Q3 are generated based on data blocks A1, A2 and A3. The fourth time, data block A4 is written. The size of data block A4 is also 512K. At this time, based on data blocks A1, A2, A3 and A4 generates parity blocks R1 and S1. Since data blocks A1-A4 can fill a stripe, a first-level fault domain write is completed. At this time, parity blocks R4 and S4 are called first-level parity blocks. Continuing, data block A5 is written for the fifth time. The size of data block A5 is 512K, and parity blocks P5 and Q5 are generated. ... Until the eighth time data block A8 is written. The size of data block A8 is 512K. At this time, the second stripe can be filled, and the second first-level fault domain write is completed. At this time, parity blocks R2 and S2 are called first-level parity blocks. ... Until the twelfth time data A12 is written. The size of data A12 is 512K. At this time, the third stripe can be filled, and the third first-level fault domain write is completed. At this time, parity blocks R3 and S3 are called first-level parity blocks. In the specific implementation process, after the check blocks P2 and Q2 are generated, the check blocks P1 and Q1 can be deleted. After the check blocks P3 and Q3 are generated, the check blocks P2 and Q2 can be deleted. Correspondingly, after the first-level check blocks R1 and S1 are generated, the check blocks P3 and Q3 can be deleted.To ensure that the data can be read and written after the switch, only after all the first-level fault domains are filled, the second-level check blocks are generated based on the first-level check blocks, that is, after the second-level check blocks R4 and S4 are generated based on the first-level check blocks R1, S1, R2, S2, R3 and S3, the first-level check blocks R1, S1, R2, S2, R3 and S3 can be deleted. In this case, the check blocks P5, Q5, P6, Q6, P7, Q7, P9, Q9, P10, Q10, P11 and Q11 after R1 and S1 and before R3 and S3 cannot be deleted. In this way, a large number of check blocks will be stored in the memory corresponding to the processor. The memory space is limited and cannot support the storage of a large number of temporary check blocks. In the case of insufficient memory space, the check blocks stored in the memory will be cached in the SSD. The check blocks cached in the SSD, such as P5, Q5, P6, Q6, P7, Q7, P9, Q9, P10, Q10, P11, Q11, are not always needed. After the secondary check blocks R4 and S4 are generated, the check blocks P5, Q5, P6, Q6, P7, Q7, P9, Q9, P10, Q10, P11, Q11 will be deleted, which will still cause write amplification of the SSD.

[0055] On the second aspect, the present application also provides a data storage method to further solve the technical problem that the use of incremental EC during small IO writing will lead to write amplification.

[0056] During the specific implementation process, the processor 101-1 first obtains the size of the data block, which can be the size of a data block in a stripe, for example, it can be 1MB. The first-level check block generated according to the first data is stored in the first memory space shown in Figure 1. The number of the first-level check blocks can be one or more, and the size of the first data is an integer multiple of the size of the data blocks, that is, the first data can fill a stripe, wherein the first data can be the data carried in a single write request, or it can be a collection of data carried in multiple write requests. When the first data is a 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 stored in the cache first, such as in the SSD shown in Figure 1. When the data carried in the multiple write requests is an integer multiple of the size of the data blocks, the first-level check block is generated based on the aggregated data.

[0057] Furthermore, incremental check blocks are generated based on the second data. The incremental check blocks are stored in a second memory space of the memory shown in FIG1 . The number of incremental check blocks can be one or more. The second memory space is different from the first memory space. Since the generated first-level check blocks and incremental check blocks are stored in different memory spaces, the incremental check blocks can be processed immediately. For example, after the second first-level check block is generated or after the next incremental check block is generated, the incremental check block can be deleted to reduce the memory space occupied by the incremental check blocks.

[0058] The data storage process of small IO is introduced below in conjunction with the fault domain of the storage system shown in Figure 1, wherein the division method of the fault domain has been introduced in the first aspect and will not be repeated here. In an optional manner, the memory included in the storage system belongs to two first-level fault domains respectively, the number of incremental check blocks is multiple, and the incremental check blocks are stored in the second memory space of the memory included in the second-level fault domain. Please refer to Figure 5. When the processor 101-1 receives the write data request sent by the computing node 110, it writes the data block A1. The size of the data block A1 is 512K. The incremental check blocks P1 and Q1 are generated based on the data block A1; the data block A2 is written for the second time. The size of the data block A2 is 512K. The incremental check blocks P2 and Q2 are generated based on the data blocks A1 and A2. After the incremental check blocks P2 and Q2 are generated, the incremental check blocks P1 and Q1 can be deleted; the data block A3 is written for the third time. The size of the data A3 is 512K. The incremental check blocks P3 and Q3 are generated based on the data blocks A1, A2 and A3. After the incremental check blocks After the check blocks P3 and Q3, the incremental check blocks P2 and Q2 can be deleted; the data block A4 is written for the fourth time. The size of the data block A4 is 512K. At this time, a first-level fault domain can be fully written. A first-level check block R1 and S1 are generated based on the data blocks A1, A2, A3 and A4. After the first-level check blocks R1 and S1 are generated, the incremental check blocks P3 and Q3 can be deleted. The data block A5 is written for the fifth time. The size of the data block A5 is 512K. The incremental check blocks P5 and Q5 are generated based on the data block A5. The data block A6 is written for the sixth time. The size of the data block A6 is 512K. The incremental check blocks P5 and Q5 are generated based on the data blocks A5 and A6. Check blocks P6 and Q6. In the embodiment of the present application, since the incremental check block and the first-level check block are stored separately, that is, the incremental check block and the first-level check block are stored in different memory spaces on the memory, they do not affect each other. For details, please refer to Figure 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. 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, after generating the incremental check blocks P6 and Q6, the incremental first-level check blocks P5 and Q5 can be deleted, ... the eighth time data A8 is written, the size of data A8 is 512K, which can fill the second first-level fault domain, and generate a first-level check block R2, S2, and so on, ... the twelfth time data block A12 is written, the size of data block A12 is 512K, which can fill the third first-level fault domain, and generate a first-level check block R3, S3. After that, determine whether the number of data block groups that the data written multiple times can be divided into is T. The method for determining T is the same as the method for determining T in the first aspect, and will not be repeated here.After the three primary fault domains are fully written and the requirement T is met, a set of secondary check blocks R4 and S4 can be generated based on the three sets of check blocks R1, S1, R2, S2, R3, and S3 of the primary fault domains. Here, the number of secondary check blocks is multiple. In some optional methods, the number of secondary check blocks can be one, three, or other integers greater than zero. In the specific implementation process, data A1-A12 is first stored in different SSDs included in different secondary fault domains, and then persistently stored from the SSDs to the HDDs. After the data A1-A12 is persistently stored from the SSDs to the different HDDs included in the SSDs, the primary check blocks R1, S1, R2, S2, R3, and S3 are deleted.

[0059] In this technical solution, because the incremental check blocks and the primary check blocks are stored in different memory spaces, the generated incremental check blocks can be deleted immediately, thereby reducing the memory space occupied by the incremental check blocks and avoiding caching the incremental check blocks in the SSD, which would cause SSD write amplification. Therefore, the technical solution provided by this application can reduce write amplification on the SSD.

[0060] As mentioned above, the first data can also be the data carried in a write request. In this case, the entire process of the data storage method provided by the present application is described below. As an example, the first time 2M of data is written, a stripe is filled, that is, a first-level fault domain can be filled, and the first-level check blocks R1 and S1 can be directly generated. The second time 512K of data is written, and incremental check blocks P1 and Q1 are generated based on the data; the third time 512K of data is written, and incremental check blocks P2 and Q2 are generated based on the data written for the second time and the data written this time. Since the incremental check blocks and the first-level check blocks are stored in different storage spaces in the memory, the incremental check blocks P1 and Q1 can be deleted after the incremental check blocks P2 and Q2 are generated; the fourth time 512K of data is written, and incremental check blocks P3 and Q3 are generated based on the data written for the first time, the data written for the second time, and the data written this time. After the incremental check blocks P3 and Q3 are generated, the incremental check block P2 can be deleted. , Q2; the fifth time data is written is 512K. At this time, the data from the second write to the current write can fill a stripe, that is, the write of a first-level fault domain is completed, and then the first-level check blocks R2 and S2 are generated based on the data written four times; the sixth time data is written is 2M, which fills a stripe, that is, it can fill a first-level fault domain, and the first-level check blocks R3 and S3 can be directly generated. After the third first-level fault domain is full, the write of a second-level fault domain is completed. The second-level check blocks R4 and S4 can be generated according to the three groups of first-level check blocks R1, S1, R2, S2, R3, and S3. After the second-level check blocks R3 and S3 and all data blocks are permanently saved from the SSD to the HDD, the first-level check blocks R1, S1, R2, S2, R3, and S3 can be deleted.

[0061] Thirdly, the present application also provides a data reading method that employs different data recovery methods based on the fault condition of the fault domain where the data to be read is located and whether the check block in the primary fault domain has been deleted. It should be noted that a correspondence between the storage address of a data block and the fault domain is stored in processor 101-1 and / or processor 101-2. In other words, knowing the storage address of a data block allows determining whether a fault has occurred in the primary or secondary fault domain where the data block is located through this correspondence.

[0062] In the following description, it is taken as an example that the received read data request is to read the data blocks D1 to D6 stored in FIG. 3 .

[0063] In the first case, none of the two primary fault domains and four secondary fault domains included in the storage system fails, and the processor 101 - 1 only needs to read the data blocks D1 to D6 from the corresponding HDDs.

[0064] In the second case, see FIG6 , one of the two primary fault domains or two of the four secondary fault domains included in the storage system fails.

[0065] 1. One of the two first-level fault domains fails. In other words, processor 101-1 fails or processor 101-2 fails. Here, assuming 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 / or check blocks cached in the SSD. In some cases, it cannot take over the SSD of processor 101-1, but can take over the HDD corresponding to the SSD of processor 101-1. The details are explained below.

[0066] 1) Determine whether the primary check blocks corresponding to the data to be read D1 to D6 are deleted, if not deleted.

[0067] In a specific implementation, after a data block or a secondary parity block is stored from the SSD to the HDD corresponding to the SSD, the SSD sends an instruction to the processor to delete the corresponding primary parity block. Therefore, after receiving a read data request, processor 101-1 can determine whether the primary parity block of the data to be read has been 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 first-level check blocks C1~C6 and some data blocks D2, D4, and D6 from the taken-over SSD and its own SSD through processor 101-2, and restore data blocks D1~D6 based on the first-level check blocks C1~C6 and data blocks D2, D4, and D6.

[0070] As another example, the processor 101 - 1 reads data blocks D1 - D6 from the taken-over SSD and its own SSD through the 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, processor 101-2 reads the first-level check blocks C2, C4, C6, and data blocks D2, D4, D6 from the SSD corresponding to processor 101-2, so that D1 can be restored through D2 and C2, D3 can be restored through D4 and C4, and D6 can be restored through D6 and C6, thereby obtaining data D1 to D6.

[0073] 2) First-level check block deletion

[0074] The processor 101 - 1 reads data blocks D1 to D6 from the HDD taken over by the processor 101 - 2 and the HDD of the SSD corresponding to the processor 101 - 2 .

[0075] 2. Two of the four secondary fault domains fail. Suppose two HDDs fail.

[0076] If the first-level check blocks C1 to C6 are deleted, it means that the data blocks D1 to D6 to be read and the second-level check blocks C7 and C8 have been permanently saved in the corresponding HDD from the SSD where they are located. Processing 101-1 can read data blocks D2, D3, D5, D6 and second-level check blocks C7 and C8 from the HDD that has not failed, and restore data blocks D1 to D6 through data blocks D2, D3, D5, D6 and second-level check blocks C7 and C8.

[0077] In the specific implementation process, after receiving the read data request sent by the computing node 110, the processor 101-1 may first read the data from the corresponding memory, then read the data from the corresponding SSD, and finally read the data from the HDD that has not failed, and then restore the data to be read based on the read data.

[0078] As another example, the first-level check blocks C1 to C6 are not deleted. This situation is the same as the processing process in 1) above, and will not be described in detail here to avoid redundancy.

[0079] In the fourth aspect, please refer to Figure 7, which is a data storage device provided in an embodiment of the present application. The data storage device is applied to a storage system, or is a device in a storage system, and can realize the function of the storage system in the method of the first 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 may include a first partitioning unit 701, a second partitioning unit 702, a first generation unit 703, and a second generation unit 704, wherein the first partitioning unit 701 is used to execute the step of dividing each first-level fault domain of the storage system into multiple second-level fault domains in Figure 3; the second partitioning unit 702 can execute the step of dividing the data into multiple data block groups in Figure 3, the first generation unit 703 can execute the step of generating at least one first-level check block according to the N data blocks included in each data block group in Figure 3 to obtain multiple groups of first-level check blocks; the second generation unit 704 can execute the step of generating second-level check blocks C7 and C8 according to multiple groups of first-level check blocks in Figure 3.

[0080] Among them, all relevant contents of each step involved in the method embodiment provided in the first aspect above can be referred to the functional description of the corresponding functional unit and will not be repeated here.

[0081] The division of units in the embodiments of the present application is illustrative and is merely a logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of the present application may be integrated into a single processor, or may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0082] In the fifth aspect, please refer to Figure 8, which is a data storage device provided in an embodiment of the present application. The data storage device is applied to a storage system, or is a device in a 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 may include an acquisition unit 801 and a storage unit 802, wherein the acquisition unit can perform the step of determining the size of a data block in Figure 4; the storage unit 802 can perform the step of storing the check blocks R1, S1, R2, S2, R3, and S3 in a memory space and storing the check blocks P1, Q1, P2, Q2, P3, Q3, P5, Q5, P6, Q6, P7, Q7, P9, Q9, P10, Q10, P11, and Q11 in another memory space.

[0083] Among them, all relevant contents of each step involved in the method embodiment provided in the second aspect above 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, other division methods may be used. Furthermore, the functional units in the various embodiments of the present application may be integrated into a single processor, or may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0085] In the sixth aspect, please refer to Figure 9. The present application also provides a data storage device, which is applied to a storage system or a device in a storage system. The data storage device may include an interface 901 and a processor 902, wherein the processor 902 can be used to execute the data storage method shown in Figure 3 or the data storage method shown in Figure 5 to implement the function of the box shown in Figure 1.

[0086] In the seventh aspect, the present application also provides a computer-readable storage medium, comprising instructions, which, when executed on a computer, enables the computer to execute the data storage method described in the first aspect, the second aspect, or the data reading method described in the third aspect.

[0087] In an eighth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the data storage method described in the first aspect or the second aspect or the data reading method described in the third aspect.

[0088] The methods provided in the embodiments of the present application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiments of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium, etc.

[0089] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A data storage method, characterized in that: The method is applied to a storage system, wherein the storage system includes multiple primary fault domains, wherein each primary fault domain includes multiple storage devices, and the method includes: Dividing each primary fault domain into multiple secondary fault domains, each secondary fault domain including a portion of the multiple storage devices, and each secondary fault domain including a different portion of the storage devices; Divide the data to be written into multiple data block groups, each data block group includes N data blocks, where N is an integer greater than zero; Generate at least one first-level check block according to the N data blocks in each data block group, to obtain multiple groups of first-level check blocks; After storing different data blocks in each data block group in storage devices included in different second fault domains, secondary check blocks are generated based on the multiple groups of primary check blocks, wherein the secondary check blocks are check blocks of the multiple groups of data blocks.

2. The method according to claim 1, characterized in that The number N is determined by the redundancy ratio of the primary failure domain.

3. The method according to claim 1, characterized in that The storage device includes a primary memory and multiple secondary memories, the read and write rate of the primary memory is higher than the read and write rate of the multiple secondary memories, and different data blocks in each data block group are stored in storage devices included in different secondary fault domains, including: Different data blocks in each data block group are stored in the primary storage included in different secondary fault domains.

4. The method according to claim 3, characterized in that There are multiple secondary check blocks, and the method further includes: The secondary check blocks are respectively stored in the primary memories included in different secondary fault domains.

5. The method according to claim 1, wherein Generating a secondary check block according to the plurality of groups of primary check blocks includes: The number of the plurality of data block groups is T, where T is an integer greater than zero, and the number T is determined by the redundancy ratio of the primary fault domain and the redundancy ratio of the secondary fault domain; A second-level check block is generated according to the multiple groups of first-level check blocks.

6. The method according to claim 5, characterized in that The method further comprises: After storing the data blocks in the plurality of data block groups and the secondary check blocks from the primary memory to the secondary memory, the plurality of groups of primary check blocks are deleted from the primary memory.

7. A data storage method, characterized in that: The method is applied to a storage system and includes: Get the size of the data block; storing a first level check block generated according to the first data in a first memory space, wherein the size of the first data is an integer multiple of the size of the data block; and An incremental check block generated according to second data is stored in a second memory space, wherein a size of the second data is smaller than a size of the integer multiple of the data blocks, and the second memory space is different from the first memory space.

8. The method according to claim 7, characterized in that The method further comprises: generating a second level check block according to the third data and the second data, wherein the sum of the size of the third data and the size of the second data is an integer multiple of the size of the data block; The second-level check block is stored in the first memory space.

9. The method according to claim 8, characterized in that The method further comprises: After storing the second-level check block in the first memory space, deleting the incremental check block.

10. The method according to claim 7, characterized in that The storage system includes multiple first-level 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 multiple first-level fault domains, the first-level fault domain includes multiple storage devices, and the storage devices included in the storage system have a read and write rate lower than the read and write rate of the memory. The method further includes: Dividing each primary fault domain into multiple secondary fault domains, where each secondary fault domain includes a portion of the multiple storage devices, and each secondary fault domain includes a different portion of the storage devices; dividing the first data into a plurality of data blocks; The multiple data blocks are respectively stored in storage devices included in different secondary failure domains.

11. A storage system, characterized in that: include: a plurality of first-level fault domains, wherein each first-level fault domain includes a plurality of storage devices; A processor is configured to divide each primary fault domain into a plurality of secondary fault domains, each secondary fault domain including a portion of the plurality of storage devices, and each secondary fault domain including a different portion of the storage devices; divide the data to be written into a plurality of data block groups, each data block group including N data blocks, where N is an integer greater than zero; generate at least one primary check block based on 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 storage devices included in different secondary fault domains, generate a secondary check block based on the plurality of groups of primary check blocks, wherein the secondary check block is a check block for the plurality of groups of data blocks.

12. A data storage device, characterized in that: The data storage device is applied to a storage system, wherein the storage system includes multiple first-level fault domains, wherein each first-level fault domain includes multiple storage devices, including: a first partitioning unit, configured to partition each primary fault domain into a plurality of secondary fault domains, each secondary fault domain including a portion of the plurality of storage devices, and each secondary fault domain including a different portion of the storage devices; a second dividing unit, configured to divide the data to be written into a plurality of data block groups, each data block group including N data blocks, where N is an integer greater than zero; A first generating unit is configured to generate at least one first-level check block according to the N data blocks in each data block group, to obtain multiple groups of first-level check blocks; The second generation unit is used to store different data blocks in each data block group in storage devices included in different secondary fault domains, and then generate secondary check blocks according to the multiple groups of primary check blocks, wherein the secondary check blocks are check blocks of the multiple groups of data blocks.

13. A data storage device, characterized in that The data storage device is used in a storage system, wherein the storage system includes multiple first-level fault domains, wherein each first-level fault domain includes multiple storage devices, including: interface; A processor is used to divide each primary fault domain into multiple secondary fault domains, each secondary fault domain includes some storage devices among the multiple storage devices, and the partial storage devices included in each secondary fault domain are different; divide the data to be written 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 based on 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 in different storage devices included in different secondary fault domains through the interface, generate secondary check blocks based on the multiple groups of primary check blocks, wherein the secondary check blocks are check blocks of the multiple groups of data blocks.

14. A data storage device, characterized in that The data storage device is applied to a storage system and includes: An acquisition unit, used to acquire the size of a data block; a storage unit, configured to store a first level check block generated according to first data in a first memory space, wherein a size of the first data is an integer multiple of a size of the data block; and An incremental check block generated according to second data is stored in a second memory space, wherein a size of the second data is smaller than a size of the integer multiple of the data blocks, and the second memory space is different from the first memory space.

15. A data storage device, characterized in that The data storage device is applied to a storage system and includes: interface; The processor obtains the size of the data block through the interface; stores a first-level check block generated based on the first data in a first memory space, where the size of the first data is an integer multiple of the size of the data block; and stores an incremental check block generated based on the second data in a second memory space, where the size of the second data is smaller than the integer multiple of the size of the data block, and the second memory space is different from the first memory space. 16 . A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to execute the data storage method according to claim 1 or any one of claims 7 to 10.

17. A computer program product, when running on a computer, enables the computer to execute the data storage method according to any one of claims 1 to 6 or claims 7 to 10.

Citation Information

Patent Citations

  • Data recovery method and equipment

    CN108170555A

  • Data storage method, device and system

    CN112015583A

  • Memory key value erasure code-oriented hybrid data updating method and storage system

    CN114138526A

  • Method and system for reducing erasure code data update storage and repair overhead

    CN116049128A

  • Changing error correction configuration

    CN117194095A

Cited By

  • Disk array data writing method and device, electronic equipment and storage medium

    CN120994144A