Data processing method and storage system

By directly writing data in the storage system and calculating the verification data when the threshold is reached, the problem of low writing data in the prior art is solved, and fast response and efficient storage are achieved.

CN119917336APending Publication Date: 2025-05-02CHENGDU HUAWEI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311444715.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

When writing data, existing storage systems need to accumulate a certain amount of data before calculating the verification data, resulting in low data efficiency.

Method used

By writing data directly into stripes in the storage system, and using the data copy in the first storage node to calculate the verification data when the data reaches a certain threshold, and writing the verification data into the stripes, avoiding the writing until the verification data is calculated.

Benefits of technology

It improves the efficiency of writing data, can quickly respond to write requests, improves user experience, and reduces the storage capacity requirement for the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917336A_ABST
    Figure CN119917336A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and a storage system, and relates to the technical field of storage, in the method, the storage system can directly write data into stripes, accumulate copies of the data, calculate verification data of the copies of the data after the copies of the data are accumulated to a certain amount, and write the verification data into the stripes, so that the data processing efficiency is improved. As the data is not written into the strips after a certain amount of data is written, the data writing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage technology, and in particular to a data processing method and a storage system. Background Art

[0002] In order to ensure the reliability of stored data, the storage system can use the erasure coding (EC) verification mechanism to store data. The main idea of ​​the EC verification mechanism to store data is to store the verification data of the data when storing data. In the case of partial data loss, the lost data can be restored by using the non-lost part of the data and the verification data.

[0003] Under this mechanism, after the client initiates a write request to store the data to be written, the storage system will cache the data to be written and also back up the data to be written. The storage system accumulates the data to be written until the data to be written reaches a certain amount, and then calculates the verification data. After calculating the verification data, the data to be written and the verification data of the size of a stripe are obtained. The storage system will write the data to be written and the verification data into the stripe. The stripes are distributed in multiple persistent storage devices in the storage system. Writing the data to be written and the verification data into the stripe can be regarded as writing to the disk, and then the storage system can delete the backup of the data to be written. Under this mechanism, since the storage system needs to accumulate a certain amount of data before starting to write the data to the disk, the efficiency of writing data is low. Summary of the invention

[0004] The embodiments of the present application provide a data processing method and a storage system for improving the efficiency of writing data.

[0005] In a first aspect, an embodiment of the present application provides a data processing method, which can be executed by a storage system, and the storage system can include a first storage node and multiple second storage nodes, wherein any storage node can be a device or apparatus with a data storage function, for example, any storage node can be a computational storage drive (CSD), or can be a data processor (or data processing unit) (DPU), or can also be a DPU and a persistent memory, etc., and the persistent memory can be, for example, a solid state disk (SSD). CSD can have computing and storage functions. The method includes: receiving a first write request, the first write request is used to request writing of first data; writing a first copy of the first data into a first stripe, and writing a second copy of the first data into a first storage node, wherein the first stripe is distributed in multiple second storage nodes; receiving other write requests, the other write requests are used to request writing of other data; writing a first copy of the other data into the first stripe, and storing a second copy of the other data in the first storage node; if the data amount of the first data and the other data reaches a first threshold, generating verification data of the first data and the other data according to the second copy of the first data and the second copy of the other data; and writing the verification data into the first stripe.

[0006] It should be understood that the other write request may be one or more write requests. When the other write request is one write request, the other data may be regarded as data requested to be written by the one write request. When the other write request is multiple write requests, the other data may be regarded as data requested to be written respectively in the multiple write requests. Optionally, the first threshold is the amount of data that can be stored in at least one data unit, and at least one data unit is a stripe unit for storing data in multiple stripe units of the first stripe. For example, the first stripe includes (N+M) stripe units, N stripe units are used to store data (that is, N stripe units are data units), and M stripe units are used to store verification data (that is, M stripe units are verification units). Then the first threshold may be the sum of the sizes of the N stripe units, and N and M are both positive integers.

[0007] In an embodiment of the present application, after receiving a write request, the storage system can directly write the data to the stripe. After the data reaches a certain threshold, the copy of the data in the first storage node can be used to calculate the verification data, and the verification data can be written to the stripe. There is no need to calculate the verification data before writing the data and the verification data to the stripe. Therefore, the embodiment of the present application can improve the efficiency of writing data, and can also quickly respond to write requests, which can help improve the user experience.

[0008] In one possible implementation, the first stripe includes multiple stripe units, and the multiple stripe units include at least one data unit for storing data; the first part of the data in the first copy of the first data is stored in the first data unit of the at least one data unit; the method also includes: if the first data unit fails, storing the data identical to the first part of the data in the second copy of the first data in other data stripes; replacing the first data stripe with other data stripes.

[0009] In the above implementation, the second copy of the first data of the first storage node can be used to restore the failed data unit, thereby improving the reliability of the data writing process.

[0010] In a possible implementation manner, after storing the check data in the first stripe, the method further includes: deleting the second copy of the first data in the first storage node.

[0011] In the above implementation, after the first stripe is filled, the storage space of the first storage node can be released in time to improve the utilization of the storage space of the first storage node, and the amount of redundant data stored during data storage can also be reduced to reduce write amplification.

[0012] In one possible implementation, before storing the second copy of other data in the first storage node, the method also includes: receiving a first read request, the first read request being used to request reading of first data; responding to the first read request, reading data in a first striped data stripe to obtain a first copy of the first data.

[0013] In the above implementation, since the data is directly written into the stripe, when the first stripe is not fully written, the data can be directly read from the stripe to respond to the user's read request.

[0014] In a possible implementation, the method further includes: storing a third copy of the first data in a third storage node of the storage system.

[0015] In the above implementation, a third copy of the data may also be stored to improve the possibility of recovering data in the event of a failure, and to further ensure the reliability of the written data.

[0016] In one possible implementation, before storing the second copy of the second data in the first storage node, the method further includes: if the first storage node and / or the third storage node fails, determining a fourth copy of the first data, and storing the fourth copy of the first data in other storage nodes, where the other storage nodes refer to storage nodes in the storage system other than the first storage node and the third storage node.

[0017] It should be understood that, in the case of a failure of the first storage node, the fourth copy of the first data may be obtained from the third storage node or the first stripe. Alternatively, in the case of a failure of the third storage node, the fourth copy of the first data may be obtained from the first storage node or the first stripe. Alternatively, in the case of a failure of both the first storage node and the third storage node, the fourth copy of the first data may be obtained from the first stripe, and so on.

[0018] In the above implementation, when the first storage node and / or the third storage node fails, a copy of the first data can be obtained by using a non-failed storage node in the storage system to achieve data recovery and ensure the reliability of write data.

[0019] In a second aspect, an embodiment of the present application provides a storage system, the system comprising a first storage node and multiple second storage nodes, wherein: the first storage node is used to receive a first write request, the first write request is used to request the writing of first data; the multiple second storage nodes are used to write a first copy of the first data into a first stripe, and the first storage node is also used to write a second copy of the first data into the first storage node, the first stripe is distributed among the multiple second storage nodes; the first storage node is also used to receive other write requests, the other write requests are used to request the writing of other data; the multiple second storage nodes are also used to write part or all of the first copy of the other data into a data unit of a stripe unit distributed with the first stripe, and the first storage node is also used to write a second copy of the other data into the first storage node; if the amount of the first data and the other data reaches a first threshold, the first storage node generates verification data of the first data and the other data based on the second copy of the first data and the second copy of the other data; the multiple second storage nodes are used to write the verification data into the first stripe.

[0020] In a possible implementation, the first threshold is an amount of data that can be stored in at least one data unit, and the at least one data unit is a stripe unit for storing data among a plurality of stripe units of the first stripe.

[0021] In one possible implementation, the first stripe includes multiple stripe units, and the multiple stripe units include at least one data unit for storing data; the first part of the data in the first copy of the first data is stored in the first data unit of the at least one data unit; the first storage node is also used for: before storing the second copy of other data in the first storage node, if the first data unit fails, the data in the second copy of the first data that is identical to the first part of the data is stored in other data stripes, and the first data stripe is replaced by the other data stripe.

[0022] In a possible implementation manner, the first storage node is further configured to: after storing the verification data in the first stripe, delete the second copy of the first data in the first storage node.

[0023] In a possible implementation, any second storage node among the multiple second storage nodes is also used to: receive a first read request, where the first read request is used to request to read first data; respond to the first read request, read data in a first striped data stripe, and obtain a first copy of the first data.

[0024] In one possible implementation, the first storage node belongs to one of the multiple second storage nodes, and the first storage node distributes at least one check unit in the first stripe, and the at least one check unit stores part or all of the check data in the check data, or the first storage node distributes at least one data unit in the first stripe, and the at least one data unit stores part or all of the data in the first copy of the first data. In another possible implementation, the first storage node does not belong to the multiple second storage nodes.

[0025] In a possible implementation, the first storage node includes a computing storage disk CSD; or, the first storage node includes a data processor DPU and a persistent memory; or the first storage node includes a DPU. It should be understood that this is an example of a possible form of the first storage node, and does not actually limit the implementation form of the first storage node.

[0026] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which is used to store computer programs or instructions. When the computer-readable storage medium is executed, it implements the method described in any one of the above-mentioned first aspect and possible implementation methods.

[0027] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, implements the method described in any one of the first aspect and possible implementations.

[0028] Regarding the beneficial effects of any technical solution in the second to fourth aspects above, reference may be made to the beneficial effects discussion of the corresponding technical solution in the first aspect, and the repeated parts will not be listed here. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 This is a schematic diagram of the principle of multi-copy storage;

[0030] Figure 2 A schematic diagram of the principle of EC verification mechanism storage;

[0031] Figure 3 A schematic diagram of a scenario provided for an embodiment of the present application;

[0032] Figure 4 A schematic diagram of a storage system deployment provided in an embodiment of the present application;

[0033] Figure 5 A schematic diagram of another storage system deployment provided by an embodiment of the present application;

[0034] Figure 6 A schematic diagram of the architecture of a CSD provided in an embodiment of the present application;

[0035] Figure 7 A schematic diagram of the structure of a CSD provided in an embodiment of the present application;

[0036] Figure 8 A schematic diagram of the structure of another CSD provided in an embodiment of the present application;

[0037] Fig. 9 A schematic diagram of the structure of another CSD provided in an embodiment of the present application;

[0038] Fig.10 A schematic diagram of another storage system deployment provided in an embodiment of the present application;

[0039] Fig.11 A schematic diagram of another storage system deployment provided in an embodiment of the present application;

[0040] Fig.12 A schematic diagram of a data processing method provided in an embodiment of the present application;

[0041] Fig.13 A schematic diagram of a data writing process provided in an embodiment of the present application;

[0042] Fig.14 A schematic diagram of a fault recovery process provided by an embodiment of the present application;

[0043] Fig.15 A schematic diagram of another fault recovery process provided in an embodiment of the present application;

[0044] Fig.16 A schematic diagram of another data processing method provided in an embodiment of the present application;

[0045] Fig.17 A schematic diagram of another data writing process provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0047] To facilitate understanding, some terms involved in the embodiments of the present application are introduced below.

[0048] 1. Striping, including multiple striping units (units), which can also be called stripes or stripe units. Any two striping units in the multiple striping units are of the same size. Some of the striping units in the multiple striping units are used to store data, which can also be called data units, data stripes or data stripe units, etc. Another part of the striping units in the multiple striping units is used to store verification data corresponding to the data, which can also be called verification units, verification stripes or verification stripe units, etc. The verification data corresponding to the data can be calculated using an EC verification algorithm. The EC verification algorithm includes an array erasure code algorithm, a Reed-Solomon (RS) erasure code algorithm or a low-density parity check code (LDPC) erasure code algorithm. When data in a data unit is lost, the verification data in the verification unit and the data in the data unit where the data is not lost can be used to restore the data in the data stripe where the data loss occurs.

[0049] A stripe can be mapped (corresponded) to the physical storage space of multiple hard disks or multiple storage nodes. In other words, a stripe is obtained by mapping the physical storage space of multiple hard disks or multiple storage nodes. In other words, the physical storage space that can be used by a stripe is actually provided by multiple hard disks or multiple storage nodes.

[0050] For example, a hard disk or a storage node included in a storage system can be divided into several physical blocks (chunks), and the physical blocks corresponding to multiple hard disks or multiple storage nodes can be mapped into logical blocks, and these logical blocks can form a storage pool. Multiple logical blocks from multiple hard disks or multiple storage nodes can be regarded as a logical block group, and this logical block group can include one or more stripes.

[0051] For the convenience of description, if a stripe is not full, the stripe can also be called an active stripe. If a stripe unit in a stripe is not full, the stripe unit can be called an active stripe unit. If a data unit is not full, the data unit can be called an active data unit or an active data stripe, etc.

[0052] 2. Log storage space can be used to store data, for example, it can support writing data in an append write or replace write mode. The embodiment of the present application uses the log storage space supporting the append write mode to write data as an example. The log storage space can be a logical storage space provided by the storage system. The storage system receives the data and writes the data into the log storage space in an append write mode.

[0053] When the storage system writes data to a hard disk or a storage node, the metadata of the log storage space can be used to record how much data has been written to the hard disk or storage node. When the storage system writes data to a hard disk or a storage node through a cache, the metadata of the log can be used to record how much data has been written to the cache. The metadata of the log is used to record relevant information about the log storage space. For example, the metadata of the log records the total length of the log storage space and the length of the data written to the log storage space. The length of the data written to the log storage space can be the actual written length of the log storage space. In one scenario, if the storage system writes data directly to the hard disk or storage node, the actual written length is the length of the data that the storage system has written to the hard disk or storage node. In another scenario, if the storage system writes data to the hard disk or storage node through a cache, the actual written length can be the length of the data that the storage system has written to the cache.

[0054] It should be understood that since the log storage space is a logical storage space, the data content in the log storage space is actually stored in the physical storage space of the cache or hard disk or storage node. Therefore, there is a mapping relationship between the log storage space and the storage space of the cache, or there is a mapping relationship between the log storage space and the storage space of the hard disk or storage node.

[0055] It should be understood that one hard disk or storage node may correspond to multiple log storage spaces, and the storage space of the hard disk or storage node is equal to the sum of the multiple log storage spaces.

[0056] In practical applications, the log storage space can be identified by the same identity document (ID), for example. The log storage space in the storage system can be managed by a device cluster management module of the storage system, which can be integrated into any storage node in the storage system or a separate management node. For example, one or more stripes distributed on multiple hard disks or multiple storage nodes can correspond to the log storage space with the same ID.

[0057] In the embodiments of the present application, the number of nouns, unless otherwise specified, means "singular noun or plural noun", that is, "one or more". "At least one" means one or more, and "plural" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. For example, A / B means: A or B. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c means: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0058] Combine the following Figure 1 The schematic diagram of the principle of multi-copy storage is shown to introduce multi-copy storage.

[0059] like Figure 1 As shown, the central processing unit (CPU) in the storage system can cache data (such as data 1 and data 2), and store multiple copies of data 1 and data 2 in storage device 1, storage device 2, and storage device 3 in the storage system, respectively. Figure 1 In the example, storage device 1, storage device 2, and storage device 3 all store a copy of data 1 and a copy of data 2. Figure 2 Where m represents the number of storage devices used to store data copies, and n represents the number of storage devices used to store data. Both m and n are positive integers, for example, m is 2, and n is 1.

[0060] Under the multi-copy storage mechanism, the storage system can respond to the user's write request immediately after replicating "m" copies, and the computing power requirement of the storage system is low. After the storage device fails, it can quickly recover using the copies of other storage devices. However, multi-copy storage requires a large capacity of the storage system. Since there is only one copy of the data to be written, and the actual amount of data written under the multi-copy storage mechanism is (1+m), the write amplification under this storage mechanism is (1+m), which makes the network bandwidth requirement high under this storage mechanism. Write amplification refers to the ratio of the actual amount of data written to the amount of data to be written.

[0061] In order to reduce the disadvantages of multiple copies of storage, an EC verification mechanism storage is proposed. Figure 2 A schematic diagram of the storage principle of an EC verification mechanism is shown for introduction.

[0062] like Figure 2 As shown, the CPU in the storage system can cache data (such as data 1, data 2, data 3, data 4, and data 5). After determining that data 1, data 2, data 3, data 4, and data 5 fill up the data units in the stripe unit included in the stripe, the check data of data 1, data 2, data 3, data 4, and data 5 are calculated. The CPU writes part of data 1, data 2, and data 3 into the data unit of storage device 3, another part of data 3 and a part of data 4 into the data unit of storage device 4, and another part of data 4 and data 5 into the data unit in storage device 5, and writes a part of the check data, check data P, and another part of the check data, check data Q, into the check units in storage device 1 and storage device 2, respectively. Figure 2 Here, m represents the number of storage devices used to store verification data, and n represents the number of storage devices used to store data.

[0063] Under the EC verification mechanism storage, since there is only one copy of the data to be written, and the actual amount of data written under the multi-copy storage mechanism is (1+m / n), the write amplification under this storage mechanism is (1+m / n), thus reducing the demand for network bandwidth. However, the CPU needs to accumulate a certain amount of data before calculating the verification data, and only after calculating the verification data will the verification data and data be written to the storage device, which results in low efficiency in writing data and a long time to respond to users.

[0064] In view of this, an embodiment of the present application provides a data processing method, in which, during the process of writing data, the data is directly written to the stripe, and the data in the active stripe is protected based on the method of replicating multiple copies. Once the data accumulates to a certain amount, the verification data can be calculated and the verification stripe data can be written to the active stripe, which is equivalent to storing the data based on the EC verification mechanism in the end. In this method, the data is directly written to the stripe, instead of waiting until the verification data is calculated before writing the data to the stripe, so the efficiency of writing data can be improved, and the final data is stored in the manner of EC verification mechanism storage, so that the write amplification of the data is actually the same as the write amplification under the EC verification mechanism storage, which can reduce the write amplification compared to multi-copy storage, and also reduce the storage capacity requirements of the storage system. In this way, the method realizes the respective advantages of multi-copy storage and EC verification mechanism storage, and reduces the respective disadvantages of multi-copy storage and EC verification mechanism storage.

[0065] The method provided in the embodiment of the present application can be applied to any scenario involving writing data. The following examples introduce the scenarios in which the method provided in the embodiment of the present application can be applied.

[0066] Please refer to Figure 3 , is a schematic diagram of a scenario provided in an embodiment of the present application. or Figure 3It can be understood as a schematic diagram of the architecture of a storage system, for example, it can be regarded as a schematic diagram of the architecture of a distributed storage system. Figure 3 As shown, the scenario includes a user device and multiple storage nodes in the storage system. It should be understood that Figure 3 The example in which multiple storage nodes include 6 storage nodes is taken. In fact, there is no limit to the number of storage nodes included in the storage system.

[0067] Exemplarily, a user can read and write data in a storage system through an application, and a device running the application can be regarded as a user device, which can be a physical machine or a virtual machine, such as a fixed device, a mobile device, a handheld device, a wearable device, a vehicle-mounted device, or a personal computer. The user device includes a CPU, and the CPU of the user device can be used to initiate a write request or a read request to the storage system. Accordingly, multiple storage nodes of the storage system can provide data read and write services for users.

[0068] Each of the multiple storage nodes may have a data storage function and / or a computing function. When multiple storage nodes provide data write services to users, if the storage node implements the data storage function and the computing function (such as a storage node for storing a copy of data and computing the verification data of the data), the storage node may be referred to as the first storage node, or as a master. If the storage node implements the storage function (for example, a persistent storage function, such as for persistent storage of data and verification data corresponding to the data), the storage node may be referred to as the second storage node or as a slave. If the storage node implements the storage function (for example, a temporary storage function, such as for storing a copy of data), the storage node may be referred to as a third storage node, a data copy storage node, or a data copy node, etc.

[0069] It should be understood that when a storage node among the multiple storage nodes is used as a first storage node, it may also have the function of a second storage node, or when any storage node is used as a third storage node, it may also have the function of a second storage node, and the embodiments of the present application do not limit this. In other words, any storage node among the multiple storage nodes may be both a first storage node and a second storage node, or both a third storage node and a first storage node, and this is not specifically limited.

[0070] Exemplarily, the plurality of storage nodes may include a plurality of second storage nodes, and the plurality of second storage nodes may specifically write data and verification data into the stripe. K1 second storage nodes among the plurality of second storage nodes may write data into the data unit of K1 second storage nodes (e.g. Figure 3 The data unit 0, data unit 1, data unit 2 and data unit 3 shown in FIG. 1 , and the K2 second storage nodes can write the verification data into the verification units of the K2 second storage nodes as shown in FIG. Figure 3 In the verification unit P and the verification unit Q shown in the figure, K1 and K2 are positive integers. The K1 second storage nodes can also be called data slaves, and the K2 second storage nodes can be called parity slaves.

[0071] It is understandable that the striped data unit can be mapped through the physical storage space of K1 second storage nodes. The striped verification unit is mapped through the physical storage space of K2 second storage nodes. The K2 second storage nodes can also be regarded as verification slave devices. Among them, the type of storage medium used by the K1 second storage nodes to provide the physical storage space for mapping the striped data unit can be arbitrary, such as SSD and / or Flash, etc., and there is no specific limitation on this. Similarly, the type of storage medium used by the K2 second storage nodes to provide the physical storage space for mapping the striped verification unit can be arbitrary, such as solid state disk (SSD) and / or Flash, etc., and there is no specific limitation on this.

[0072] The structures of any two storage nodes among the multiple storage nodes involved in the embodiments of the present application may be the same or different, and there is no specific limitation on this.

[0073] In one possible implementation, some or all of the multiple storage nodes (such as the first storage node, the second storage node, and the third storage node) can be implemented by a computational storage drive (CSD). CSD can be regarded as a micro server or a lightweight disk frame CSD. Compared with a general hard disk, CSD has computing capabilities in addition to data storage capabilities. Figure 4 A deployment diagram of a storage system is shown for introduction. Figure 4 It can also be seen as a schematic diagram of the architecture of a distributed storage system. Figure 4 As shown, the scenario includes a user device and multiple CSDs (such as Figure 4 The user device may include a CPU, and the CPU of the user device initiates a write request or a read request, etc.

[0074] Figure 4Any CSD among the multiple CSDs in the system can communicate with the user device through any network card among the multiple network cards, and any network card among the multiple network cards can be deployed on one of the multiple CSDs, for example, any network card is detachably arranged on one of the multiple CSDs (such as inserted), or any network card can be integrated and arranged on one of the multiple CSDs (that is, the CSD can include the network card). Any network card can be a network interface controller (NIC), for example, a smart NIC.

[0075] When multiple CSDs provide data writing services for user devices, CSD0 to CSD4 may write data into one or more stripes (eg, Figure 4 Since the stripes in CSD0 to CSD4 are used for persistent storage of data, CSD0 to CSD4 can be regarded as an example of a second storage node.

[0076] Exemplarily, CSD0 to CSD3 can write data into the data unit of the stripe, that is, CSD0 to CSD3 can be regarded as an example of K1 second storage nodes, and CSD4 can write the verification data of the data into the verification unit of the stripe, that is, CSD4 can be regarded as an example of K2 second storage nodes. In addition, CSD4 can also be used to store a copy of the data, that is, CSD4 can also be regarded as an example of the third storage node. CSD5 can be used to calculate the verification data of the data, that is, CSD5 can be regarded as an example of the first storage node.

[0077] Figure 4 In the example, multiple CSDs communicate directly with user devices through network cards. In addition, multiple CSDs can also communicate with user devices through network cards and switches in sequence. For example, any CSD among multiple CSDs can communicate with the network card in the user device through the switch through the network card deployed on the CSD. Due to the addition of the switch, in this case, the user device does not need to perceive the specific information of the CSD, and the user device's request is routed to the corresponding CSD through the switch. For details, please refer to Figure 5 A deployment diagram of a storage system is shown. Figure 5 It can also be seen as an architectural diagram of a distributed storage system. Figure 5 The diagram shows a user device, multiple switches and multiple CSDs (eg Figure 5 Optionally, any two CSDs among the plurality of CSDs may communicate with each other via a switch.

[0078] When multiple CSDs provide data writing services for user devices, CSD0 to CSD5 can write data into one or more stripes. Since the stripes in CSD0 to CSD5 are used for persistent storage of data, CSD0 to CSD5 can be regarded as an example of multiple second storage nodes.

[0079] Exemplarily, CSD0 to CSD3 can write data into the data unit of the stripe, that is, CSD0 to CSD3 can be regarded as an example of K1 second storage nodes, and CSD4 and CSD5 can write the verification data of the data into the verification unit of the stripe, that is, CSD4 and CSD5 can be regarded as an example of K2 second storage nodes. In addition, CSD4 can also be used to store a copy of the data, that is, CSD4 can also be regarded as an example of the third storage node. CSD5 can also be used to calculate the verification data of the data, that is, CSD5 can also be regarded as an example of the first storage node.

[0080] As discussed above, the CSD in the embodiment of the present application can be used as an example of a storage node, which is used to store data and / or calculate verification data of data, etc. For example, please refer to Figure 6 , is a schematic diagram of the architecture of a CSD provided in an embodiment of the present application. The CSD includes a computing unit, a persistent storage unit and a temporary storage unit. Optionally, the CSD also includes a network communication unit.

[0081] The computing unit is used to implement a computing function, such as verification data for computing data, and the computing unit is, for example, a field programmable gate array (FPGA) or a CPU. The persistent storage unit is used to implement a part of the storage function, and the persistent storage unit can be used to persistently store data, such as flash and / or SSD. The temporary storage unit can be used to implement a part of the storage function, such as caching data, and the temporary storage unit includes, for example, RAM. The network communication unit can be used to implement a communication function, such as for the CSD to communicate with the outside, and the network communication unit is, for example, a network card.

[0082] Exemplarily, when writing data, the computing unit may write the data into a persistent storage unit and cache a copy (or backup) of the data in a temporary storage unit. When the data cached in the temporary storage unit reaches a certain threshold, the computing unit may use the copy (or backup) of the data cached in the temporary storage unit to calculate verification data of the data and write the verification data into the persistent storage unit.

[0083] It should be understood that the computing unit, the persistent storage unit, the temporary storage unit and the network communication unit may be implemented in a variety of ways, and the embodiments of the present application do not limit the specific implementation methods of these units.

[0084] Combine the following Figures 7 to 9 The structural diagram of the CSD shown in FIG. 1 is a schematic diagram of the CSD involved in the above-mentioned embodiment of the present application (such as Figure 6 The possible structures of the CSD involved are introduced as examples.

[0085] Figure 7 The CSD shown is an example in which the computing unit includes an FPGA. In addition to the FPGA, the CSD also includes an internal memory and an external memory. The external memory here can be understood as a memory that is not arranged on the same printed circuit board (PCB) as the FPGA. The external memory includes, for example, SSD, RAM, and Flash, etc., and the external memory can be used as an example of a persistent storage unit. The internal memory includes, for example, a random-access memory (RAM), which can be used as an example of a temporary storage unit. The FPGA can be connected to the external memory via a bridge. Figure 7 The RAM involved includes static RAM (SRAM) and dynamic RAM (DRAM).

[0086] Exemplarily, in the process of writing data, FPGA can be used to calculate verification data, etc. The internal memory can be used to cache a copy of the data, and when the FPGA determines that the data in the internal memory has reached a certain amount of data, the verification data of the data can be written to the external memory. In addition to storing the verification data of the data, the external memory can also store data persistently, etc.

[0087] and Figure 7 The difference is, Figure 8 The SSD, RAM, Flash and other memories can be embedded with the FPGA on the same PCB. Figure 8 The functions of FPGA and various memories can be referred to in Figure 7 The functions of FPGA and various memories are described here, and the repeated parts will not be listed again.

[0088] Fig. 9 The CSD shown includes a CPU and some memories, such as RAM and Flash, etc. The CPU can be used as an example of a computing unit and can also be used to calculate verification data, etc. The RAM can be used as an example of a temporary storage unit, and the Flash can be used as an example of a persistent storage unit. Fig. 9 The CPU in the system can be used to calculate the verification data of the data, etc. Fig. 9 The functions of the various memories involved can be referred to separately Figure 7 The functions of the memory in are described here, and the repeated parts will not be listed again.

[0089] In another possible implementation, the first storage node among the multiple storage nodes may include a data processor (or data processing unit, DPU), the second storage node may include a persistent memory, and the third storage node may include a temporary memory. The temporary memory is, for example, RAM. The DPU is used to control the writing of data into the temporary memory and / or the persistent memory. The persistent memory may be, for example, a hard disk. Fig.10 or Fig.11 The deployment diagram of the storage system is shown in the figure.

[0090] The storage system includes a user device and multiple storage nodes. Fig.10 The first storage node may include a CPU, the second storage node may include a persistent memory, and the third storage node may include a temporary memory. It should be understood that Fig.10 Six persistent memories are shown, but there is no actual limit on the number of persistent memories.

[0091] The user device can access multiple persistent memories and temporary memories through the DPU. The DPU can communicate with the CPU in the user device through the peripheral component interconnect express (PCIe). The DPU can communicate with multiple persistent memories through a network (such as a data center (DC) network).

[0092] The DPU is used to write data into the corresponding persistent memory and read the corresponding data from the persistent memory. Any of the multiple persistent memories can be a device or hard disk with storage function, etc. Any persistent memory can be implemented, for example, as an SSD or a standard just a bunch of flash / drives (JBOF / D), etc. The embodiments of the present application do not limit the specific form of the persistent memory.

[0093] Fig.10 Some or all of the multiple persistent memories in the DPU may include one or more stripes. When providing data services for user equipment, the DPU may write data into the stripes.

[0094] For example, the DPU can calculate check data for the data and cache copies of the data. Some or all of the multiple persistent memories can be used to persistently store the data. Temporary memories can be used to cache copies of the data.

[0095] Fig.10The CPU and DPU can communicate via PCIe. In fact, the DPU can also communicate with the CPU via a network, such as a wireless network. Fig.11 As shown, any one of the multiple CPUs can communicate with any one of the multiple DPUs through the network. Fig.11 Six persistent memories are shown, but the number of persistent memories is not actually limited. Multiple user devices can access multiple persistent memories through any DPU in the multiple DPUs. The multiple DPUs can form a DPU pool.

[0096] Fig.11 Some or all of the multiple persistent memories in the DPU may include one or more stripes. When providing data services for user equipment, the DPU may write data into the stripes.

[0097] For example, the DPU may calculate check data for the data and cache a copy of the data. Alternatively, the DPU may calculate check data for the data and cache a copy of the data in at least one persistent memory. Some or all of the multiple persistent memories may be used to persistently store the data. Temporary memories may be used to cache a copy of the data.

[0098] It should be understood that the above is an example of a scenario to which the embodiment of the present application can be applied, and does not actually limit the scenario to which the embodiment of the present application can be applied. The method provided by the embodiment of the present application is described below in conjunction with the accompanying drawings.

[0099] In the drawings corresponding to the various embodiments of the present application, all steps indicated by dotted lines are optional steps.

[0100] The user equipment involved in each embodiment of the present application is, for example, Figure 3 , Figure 4 , Figure 5 , Fig.10 or Fig.11 Any user equipment involved. The first storage node involved in each embodiment of the present application can be, for example, Figure 3 The first storage node involved may be Figure 4 The CSD5 involved, or Figures 5 to 9 Any CSD involved may be Fig.10 or Fig.11 The DPU involved may be Fig.10 or Fig.11 The DPU and at least one persistent memory involved. Any second storage node among the multiple second storage nodes involved in various embodiments of the present application may be, for example, Figure 3 Any second storage node among the multiple second storage nodes involved may be Figure 4Any CSD from CSD0 to CSD3 involved, or Figures 5 to 9 Any CSD involved may be Fig.10 or Fig.11 Any persistent storage involved may be Fig.11 The DPU and at least one persistent memory involved, etc.

[0101] The third storage node involved in each embodiment of the present application may be, for example, Figure 3 Any third storage node among the at least one third storage node involved may be Figure 4 The CSD4 involved, or Figures 5 to 9 Any CSD involved may be Fig.10 or Fig.11 Any persistent storage involved may be Fig.11 The DPU involved and a persistent storage, etc., K1 second storage nodes can be Figure 3 The K1 second storage nodes and K2 second storage nodes involved may be Figure 3 The first stripe involved in each embodiment of the present application may be Figure 3 , Figure 4 , Figure 5 or Fig.10 or Fig.11 The embodiments of the present application do not specifically limit any of the sub-items involved.

[0102] It should be understood that if the technical solutions provided in the various embodiments of the present application are applied to other storage systems, the names and / or functions of the nodes may change, and there is no limitation on this.

[0103] Please refer to Fig.12 , which is a flow chart of a data processing method provided in an embodiment of the present application. Fig.12 The steps S1201 to S1220 are illustrated and are introduced below respectively.

[0104] In the first stage, the storage system writes the first copy of the first data into the first stripe. For details, refer to the process from S1201 to S1207 below.

[0105] S1201: A user device sends a first write request to a first storage node. Correspondingly, the first storage node receives the first write request from the user device.

[0106] For example, the user device may directly send the first write request to the first storage node, or may also send the first write request to the first storage node through a switch. The first write request is used to request to write the first data. Optionally, the first write request includes the first data, and / or address information of the first data, etc.

[0107] S1202: The first storage node sends a first pull request to K1 second storage nodes respectively. Correspondingly, the K1 second storage nodes receive the first pull request from the first storage node respectively.

[0108] The K1 second storage nodes may be storage nodes including the data unit of the first stripe among the plurality of second storage nodes. The first pull request is used to request that the first copy of the first data be written into the first stripe. The first pull request may include the size of the data of the first copy of the first data that each second storage node among the K1 second storage nodes needs to write, and the first address information of the first data, the first address information indicating the address of the K1 second storage nodes for obtaining the first data.

[0109] The first storage node may also create a log storage space, which may be used to record information during data processing, or the storage system may have previously created a log storage space, and the first storage node may directly obtain the ID of the log storage space, etc. The first storage node may carry the log ID and the first offset of the log storage space in the first pull request. The log ID is used to uniquely indicate the log storage space, and the first offset indicates the location in the log storage space for storing the first data, such as the location in the first stripe for storing the first data. The log ID and the first offset are equivalent to uniquely identifying the first data in the storage system.

[0110] The above S1202 may be a way to trigger K1 second storage nodes to write the first copy of the first data. For example, the first storage node may also directly send the first copy of the first data to the K1 second storage nodes. In this case, there is no need to execute step S1202, that is, step S1202 is an optional step. Fig.12 Indicated by dotted line.

[0111] S1203. K1 second storage nodes store a first copy of the first data.

[0112] After receiving the first pull request, the K1 second storage nodes may respond to the first pull request and write the corresponding data in the first copy of the first data into the data unit of the first stripe of the K1 second storage nodes. It should be understood that the first data may be written into the data units of some or all of the K1 second storage nodes, and this is not specifically limited.

[0113] In the case where the first write request includes the first data, K1 second storage nodes may obtain the first copy of the first data from the first storage node. It should be understood that each of the K1 second storage nodes may be used to store part of the data in the first copy of the first data, so each second storage node can obtain the part of the data it needs to store. For example, the K1 second storage nodes include a second storage node A and a second storage node B, the first data includes a data block D1 and a data block D2, the second storage node A is used to store a copy of the data block D1, then the second storage node A can only obtain a copy of the data block D1, and the second storage node B is used to store a copy of the data block D2, then the second storage node B can only obtain a copy of the data block D2. Alternatively, the first pull request indicates that the address information of the first data is the address used by the user device to store the first data, then the K1 second storage nodes can also obtain the first copy of the first data from the user device.

[0114] Optionally, the K1 second storage nodes may write the first data into the data units of the K1 second storage nodes. Alternatively, the K1 second storage nodes may write the first copy of the first data into the cache and then write it into the data units of the K1 second storage nodes.

[0115] After the K1 second storage nodes store the first copy of the first data, each of the K1 second storage nodes may also record first information indicating a mapping relationship between a log ID, a first offset, and an address of data in the first copy of the first data stored in each second storage node. The address of the first data in each second storage node is used to indicate which part of the data of the first copy of the first data is stored at which location on each second storage node.

[0116] In the following, it is taken as an example that CSD0 to CSD4 are multiple second storage nodes, the first storage node is CSD5, and the third storage node is CSD6. Fig.13 The data writing process shown in FIG. 1 is used to introduce the data writing process involved in the embodiment of the present application. Fig.13 As shown, CSD5 may send a first pull request to CSD0, CSD1, and CSD2 respectively, and the data units in CSD0, CSD1, and CSD2 are used to store the first copy of the first data. Fig.13 As shown, the first data is written into the data units in CSD0, CSD1 and CSD2, but the data unit in CSD2 is not full because the data amount of the first data is insufficient.

[0117] S1204. The first storage node stores a second copy of the first data.

[0118] The first storage node may obtain the second copy of the first data from the user device and store the second copy of the first data. Alternatively, the first storage node may also obtain the second copy of the first data from K1 second storage nodes and store the second copy of the first data. In this way, when some or all of the K1 second storage nodes fail, the first storage node may perform fault recovery based on the second copy of the first data, thereby improving the reliability of data storage. On the other hand, it is convenient for the first storage node to accumulate data and subsequently calculate the verification data of the data.

[0119] When storing the second copy of the first data, the first storage node may store the second copy of the first data in a continuous storage space without additional mapping, and there is no limitation on this. Of course, the type of storage medium used to store the second copy of the first data in the first storage node may be of various types, and there is no limitation on this, for example, it may be a RAM (such as SRAM or DRAM) in the first storage node.

[0120] Continue to refer to Fig.13 In the example shown, CSD5 may also store a second copy of the first data.

[0121] S1205. The first storage node sends a second pull request to the third storage node. Correspondingly, the third storage node receives the second pull request from the first storage node. The second pull request is used to request that the third copy of the first data be written to the third storage node. The content of the second pull request can refer to the content of the first pull request above, and is not listed here.

[0122] The above S1205 may be a way to trigger the third storage node to write the third copy of the first data. For example, the first storage node may also directly send the third copy of the first data to the third storage node. In this case, there is no need to execute step S1205, that is, step S1205 is an optional step. Fig.12 Indicated by dotted line.

[0123] S1206. The third storage node stores a third copy of the first data.

[0124] The third storage node may obtain the third copy of the first data from the first storage node, or may obtain the third copy of the first data from K1 second storage nodes, and store the third copy of the first data. For example, the first storage node may store the third copy of the first data in a RAM (such as SRAM or DRAM) in the third storage node, etc., which is not limited.

[0125] In S1205-S1206, the third storage node may also store another copy of the first data, which is more conducive to fault recovery and improves the reliability of data writing. Of course, the third storage node does not need to store the third copy of the first data. In other words, S1205-S1206 are optional steps. Fig.12 Indicated by dotted line.

[0126] Continue to refer to Fig.13 In the example shown, CSD5 may request CSD6 to store the third copy of the first data, so CSD6 stores the third copy of the first data.

[0127] S1207: The first storage node sends a first feedback message to the user equipment. Accordingly, the user equipment receives the first feedback message from the first storage node. The first feedback message indicates that the writing of the first data is completed, which can be regarded as feedback for the first write request.

[0128] The first feedback information may further include a log ID and a first offset, so that a subsequent user device can initiate a read request corresponding to the first data to the storage system based on the log ID and the first offset.

[0129] After S1207, the user device may be supported to read the first data. For example, the user device may initiate a first read request (for example, may be sent to any second storage node among the plurality of second storage nodes), and the first read request is used to request to read the first data. Optionally, the first read request may carry a log ID and a first offset.

[0130] Any second storage node may read data corresponding to the first data from multiple second storage nodes based on the log ID and the first offset to obtain a first copy of the first data, and feed back the first copy of the first data to the user device.

[0131] Optionally, the above S1207 is an optional step. Fig.12 Indicated by dotted line.

[0132] In the second stage, the storage system writes the first copy of other data into the first stripe. For details, please refer to the process from S1208 to S1214 below.

[0133] S1208. The user device sends another write request to the first storage node. Correspondingly, the first storage node receives another write request from the user device. Another write request is used to request to write other data. Another write request refers to at least one write request other than the first write request. In the embodiment of the present application, another write request is taken as an example to introduce.

[0134] The user equipment sending other write requests and the contents of the other write requests can refer to the user equipment sending the first write request and the contents of the first write request in S1201 above, and the repeated parts will not be repeated.

[0135] S1209: The first storage node sends a third pull request to some or all of the K1 second storage nodes. Correspondingly, some or all of the K1 second storage nodes respectively receive the third pull request from the first storage node.

[0136] Some or all of the K1 second storage nodes may be second storage nodes in which the data units of the first stripe corresponding to the K1 second storage nodes have not been fully collected. For example, the first data only occupies part of the data units in one of the K1 second storage nodes, which means that the data units of the first stripe corresponding to any of the K1 second storage nodes are not fully collected. Therefore, the first storage node may send a third pull request to all of the K1 second storage nodes. Or, for example, the first data only occupies the data units in a part of the second storage nodes in the K1 second storage nodes. In other words, the data units in another part of the K1 second storage nodes have not yet stored data. Therefore, the first storage node may send a third pull request to another part of the K1 second storage nodes.

[0137] The third pull request is used to request that the first copy of other data be written into the corresponding data units of some or all of the K1 second storage nodes. The third pull request may include the size of the data of the first copy of other data that each of the K1 second storage nodes needs to write, and the first address information of the other data. In addition, the content of the third pull request may include a log ID and a second offset, and the second offset indicates the location in the log storage space for storing other data, such as the location in the first stripe for storing other data.

[0138] Optionally, the above S1209 is an optional step. Fig.12 Indicated by dotted line.

[0139] S1210, some or all of the K1 second storage nodes store the first copy of other data. This is equivalent to writing other data into the first stripe, specifically writing other data into the data unit of the first stripe. The way in which some or all of the K1 second storage nodes obtain the first copy of other data can refer to the content of obtaining the first copy of the first data in the previous text, which is not listed here. Optionally, the K1 second storage nodes can write other data into the data units of the K1 second storage nodes. Alternatively, the K1 second storage nodes can write the first copy of other data into the cache, and then write it into the data units of the K1 second storage nodes. It should be understood that each of the K1 second storage nodes may be used to store part of the data in the first copy of other data, so each second storage node can obtain the part of the data it needs to store.

[0140] After some or all of the K1 second storage nodes store the first copy of other data, each of the second storage nodes in the storage of some or all of the K1 second storage nodes may also record second information indicating a mapping relationship between a log ID, a second offset, and the address of the data in the first copy of other data stored by each second storage node. The address of the other data in each second storage node is used to indicate which part of the data of the first copy of other data is stored at which location on each second storage node.

[0141] Continue to refer to Fig.13 In the example shown, CSD5 may send a third pull request to CSD2, and CSD2 may store a first copy of the other data in response.

[0142] S1211. The first storage node stores a second copy of other data.

[0143] The manner in which the first storage node obtains the first copy of other data can refer to the content of obtaining the first copy of the first data in the previous text, which is not listed here.

[0144] For example, continue to refer to Fig.13 , CSD5 also stores a second copy of other data.

[0145] S1212, the first storage node sends a fourth pull request to the third storage node. Correspondingly, the third storage node receives the fourth pull request from the first storage node. The fourth pull request is used to request that a third copy of other data be written to the third storage node. The content of the fourth pull request can refer to the content of the first pull request above, and is not listed here.

[0146] Optionally, the above S1212 is an optional step. Fig.12Indicated by dotted line.

[0147] S1213: The third storage node stores a third copy of other data. The content of the third storage node storing the third copy of other data can refer to the content of the third storage node storing the third copy of the first data, which is not listed here.

[0148] For example, continue to refer to Fig.13 , CDS5 may request CSD6 to store a second copy of the other data, so CSD6 stores the second copy of the other data.

[0149] S1214. The first storage node sends a second feedback message to the user device. Accordingly, the user device receives the second feedback message from the first storage node. The second feedback message indicates that the writing of other data is completed, which can be regarded as feedback for other write requests. The second feedback message may include a log ID and a second offset.

[0150] In the third stage, the storage system writes the verification data into the first stripe. For details, please refer to the contents of S1215 to S1220 below.

[0151] S1215. If the data volume of the second copy of the first data and the second copies of other data reaches a first threshold, the first storage node determines verification data.

[0152] When the first storage node determines that the sum of the data volume of the second copy of the first data and the data volume of the second copies of other data has reached the first threshold, the verification data of the second copy of the first data and the second copies of other data can be calculated. The first threshold can be, for example, the storage space that can be provided by all data units of the first stripe, or can also be understood as the sum of the sizes of the data stripes included in the first stripe. For example, the first stripe includes 6 stripe units, and the 6 stripe units include 4 data units and 2 verification units, and each stripe unit can store 128KB of data, then the first threshold can be 4*128=512Kb.

[0153] It should be understood that other write requests may be one or more write requests, that is, after the first write request, multiple or one write request may be received, and as long as the sum of the data requested to be written by these write requests and the data requested by the first write request reaches a first threshold, the verification data of the first data and the other data can be determined, but the number of requests included in the other write requests is not limited.

[0154] S1216: The first storage node sends a fifth pull request to the K2 second storage nodes. Correspondingly, the K2 second storage nodes receive the fifth pull request from the first storage node.

[0155] The fifth pull request is used to request that the verification data be written into the corresponding verification unit of each second storage node in the K2 second storage nodes. The fifth pull request may include the size of the verification data to be written to each second storage node in the K2 second storage nodes, and the address information of the verification data, etc. In addition, the fifth pull request also includes a log ID and a third offset. The third offset indicates the location in the log storage space for storing the verification data, for example, the location in the first stripe for storing the verification data. The log ID and the third offset are equivalent to uniquely identifying the verification data in the storage system.

[0156] Optionally, the above S1216 is an optional step. Fig.12 Indicated by dotted line.

[0157] S1217. K2 second storage nodes store verification data.

[0158] After receiving the fifth pull request, the K2 second storage nodes may pull the data in the verification data to be stored from the first storage node, and write the data in the verification data to be stored into the corresponding verification unit. This is equivalent to filling up the first stripe.

[0159] After the K2 second storage nodes store the verification data, each of the K2 second storage nodes may also record third information indicating a mapping relationship between a log ID, a third offset, and an address at which each second storage node stores the data in the verification data. The address of the first data at each second storage node is used to indicate which part of the verification data is stored at which location on each second storage node.

[0160] In another possible implementation, if the first storage node and / or the third storage node also has the function of the second storage node, then in S1217, K2 second storage nodes store verification data, which also includes the first storage node storing part or all of the verification data, and / or the third storage node storing part or all of the verification data.

[0161] For example, continue to refer to Fig.13 , CSD5 may request CSD3 and CSD4 to store verification data, so CSD3 and CSD4 store corresponding verification data.

[0162] In a possible implementation, the storage system also supports fault recovery. Several possible fault recovery situations are introduced below.

[0163] The first failure recovery scenario:

[0164] If at least one of the K1 second storage nodes fails, or at least one data unit (for the sake of convenience of description, referred to as the first data unit) corresponding to at least one of the K1 second storage nodes fails, for the sake of convenience of description, all the data corresponding to the first data stored in the first data unit in an embodiment of the present application can be referred to as the first part of data. For example, the first data includes data block D1 and data block D2, and the first data unit stores the first copy of data block D1. Then the first part of data is the first copy of data block D1. Then the first storage node can obtain a copy of the first part of data and write the copy of the first part of data into the second data unit. The second data unit can be distributed on storage nodes in the storage system other than the at least one failed second storage node. In this case, it is equivalent to the first data unit in the first stripe being replaced by the second data unit.

[0165] Among them, the first storage node can directly obtain a copy of the first part of the data based on the second copy of the first data, or can obtain a copy of the first part of the data based on the third copy of the first data in the third storage node, and there is no limitation on this.

[0166] For example, see Fig.14 , is a schematic diagram of a fault recovery process provided in an embodiment of the present application. Fig.14 In the example, the plurality of second storage nodes include CSD0 to CSD4, the first storage node is CSD5, and the third storage node is CSD6. Fig.14 The storage system also includes CSD7. The data units in CSD0 to CSD2 are used to store data. The check units in CSD3 and CSD4 are used to store check data. In the event that CSD1 fails, or the data unit of CSD1 fails, the first storage node can determine a copy of the first portion of data and write the copy of the first portion of data into the data unit of CSD7. In this case, the first stripe is equivalent to including the data units in CSD0, CSD2 and CSD7, and the check units in CSD3 and CSD4.

[0167] Second failure recovery scenario:

[0168] If at least one of the K2 second storage nodes fails, or a part of the verification units of the first stripe (for the convenience of description, referred to as the first verification unit) fails, for the convenience of description, all the verification data corresponding to the verification data stored in the first verification unit in the embodiment of the present application can be referred to as the first part of the verification data. For example, the verification data includes the verification data block E1 and the verification data block E2, and the first data unit stores the first copy of the verification data block E1, then the first part of the verification data is the first copy of the verification data block E1. The first storage node can obtain a copy of the first part of the verification data and write the copy of the first part of the verification data to the second verification unit. The second verification unit can be distributed on the storage nodes in the storage system except for the at least one failed second storage node. In this case, it is equivalent to replacing the first verification unit with the second verification unit. In this case, it may be forced to fill with full stripe data to complete the recovery.

[0169] Among them, the first storage node can calculate the verification data based on the data in the data unit of the first stripe, and obtain the first part of the verification data, or the first storage node can also calculate the verification data based on the second copy of the first data and obtain the first part of the verification data, or the first storage node can also calculate the verification data based on the third copy of the first data and obtain the first part of the verification data.

[0170] For example, see Fig.15 , is a schematic diagram of another fault recovery process provided in an embodiment of the present application. Fig.15 In the example, the plurality of second storage nodes include CSD0 to CSD4, the first storage node is CSD5, and the third storage node is CSD6. Fig.15 The storage system also includes CSD8 and CSD9. The data units in CSD0 to CSD2 are used to store data. The check units in CSD3 and CSD4 are used to store check data.

[0171] In the case that CSD3 and CSD4 fail, or the data units of CSD3 and CSD4 fail, the first storage node can calculate the check data based on the data in CSD0 to CSD2, and split the check data and store it in the check units corresponding to CSD8 and the check units corresponding to CSD9. In this case, the first stripe is equivalent to including the data units in CSD0, CSD1 and CSD2, and the check units in CSD8 and CSD9.

[0172] S1218. The first storage node deletes the second copy of the first data and the second copies of other data.

[0173] Since the first data and other data, as well as the verification data, have all been written into the first stripe, the first storage node can delete the second copy of the first data and the second copy of the other data stored therein, so as to release the space of the first storage node in a timely manner, so that the first storage node can provide storage space for subsequent data writing processes.

[0174] S1219: The first storage node sends a processing request to the third storage node. Correspondingly, the third storage node receives the processing request from the first storage node. The processing request is used to request deletion of the third copy of the first data and the third copies of other data.

[0175] S1220: The third storage node deletes the third copy of the first data and the third copies of other data, so as to release the storage space of the third storage node in a timely manner, so that the third storage node can provide storage space for subsequent data writing processes.

[0176] For example, continue to refer to Fig.13 , the first data, other data and verification data are all written into the first stripe, and CSD5 deletes the second copy of the first data and the second copy of the other data, and CSD6 deletes the third copy of the first data and the third copy of the other data.

[0177] Optionally, the above S1218-S1220 are optional steps. Fig.12 Indicated by dotted line.

[0178] To further illustrate the data processing method provided by the embodiment of the present application, the following takes the first storage node as CSD3, K1 first storage nodes as CSD0 to CSD2, K2 second storage nodes as CSD3 and CSD4, and the third storage node as CSD4 as an example, and Fig.16 The data processing process involved in the embodiment of the present application is introduced by taking the communication between CSD and user equipment through a network card and a switch as an example.

[0179] Please refer to Fig.16 , which is a schematic diagram of a data processing process provided in an embodiment of the present application. Fig.16 The steps S1601 to S1614 are illustrated and are introduced below respectively.

[0180] S1601, CSD3 receives other write requests from the user device. The content of other write requests can be referred to in the previous text. Fig.12 The content of other write requests involved.

[0181] S1602, CSD3 sends a third pull request to CSD0 to CSD2 respectively. Optionally, the third pull request may include a log ID and an offset of the log storage space.

[0182] S1603 , CSD0 to CSD2 pull the first copy of other data from the user device into its SRAM.

[0183] S1604, CSD0 to CSD2 write part of the first copy of other data into their respective Flash or DRAM, and record the second information in the log storage space. In this way, CSD0 to CSD2 write other data into the first stripe.

[0184] S1605, CSD3 reads the second copy of other data from the SRAMs of CSD0 to CSD2 and pulls it into the SRAM of CSD3, and sends a fourth pull request to CSD4. The content of the fourth pull request can be referred to in the previous text. Fig.12 content.

[0185] S1606 , CSD4 pulls the third copy of other data read from the SRAM in data CSD0 to CSD2 into its DRAM.

[0186] S1607. CSD4 completes the fourth pull request of CSD3.

[0187] S1608: CSD4 sends a second feedback message to the user equipment, which is equivalent to completing the user's command.

[0188] Optionally, CSD4 may request CSD0 to CSD2 to delete the first copies of other data stored in their respective SRAMs. CSD0 to CSD2 calculate the number of copies that have been copied and automatically release the SRAM.

[0189] The above S1601 to S1608 can be regarded as the foreground operation part.

[0190] S1609: If the second copy of the first data and the second copies of other data reach a first threshold, calculate verification data.

[0191] S1610, CSD4 stores a portion of the verification data in its Flash, records the fourth information, releases the second copy of the first data and other data, and may also send a fifth pull request to CSD3. The fourth information may be regarded as the fourth information in the previous text. Fig.12 The fourth information indicates a mapping relationship between the log ID, the third offset, and the address of the check data on CSD4.

[0192] S1611, CSD3 pulls another part of the verification data from the SRAM of CSD4.

[0193] S1612, CSD3 stores another part of the verification data in the Flash, records the fifth information in the log storage space, and releases the third copy of the first data and other data. The fifth information can be regarded as the above Fig.12 The fifth information indicates a mapping relationship between the log ID, the third offset, and the address of the check data on CSD3.

[0194] S1613. CSD3 completes the fifth pull request of CSD4.

[0195] S1614. After determining that another part of the verification data in CSD3 is stored, CSD4 releases the calculated verification data.

[0196] The above S1609 to S1614 can be regarded as the background operation part.

[0197] For example, see Fig.17 , is a schematic diagram of a data writing process provided in an embodiment of the present application. Fig.17 In the example, CSD0 to CSD4 are multiple second storage nodes, the first storage node is CSD3, the third storage node is CSD4, and the first stripe is mapped from the physical storage space provided by the flash of CSD0 to CSD4.

[0198] CSD3 may send a third pull request to CSD0, CSD1, and CSD2 respectively, and the data units in CSD0, CSD1, and CSD2 are used to store the first copy of other data. In addition, the data units in CSD0, CSD1, and CSD2 also store the first copy of the first data. In addition, the RAM (such as SRAM) of CSD3 also stores the second copy of other data of the first data, and the RAM (such as DMRA) of CSD4 stores the third copy of the first data and other data.

[0199] CSD3 determines that the first data and other data reach the first threshold, and therefore calculates the check data of the first data and other data, and writes the check data into the check units of CSD3 and CSD4. CSD3 may delete the second copy of other data of the first data, and CSD4 may delete the third copy of other data of the first data.

[0200] The present application embodiment provides a storage system, which may include a first storage node and a plurality of second storage nodes, and the first storage node and the plurality of second storage nodes may cooperate to implement the data processing method involved in the foregoing, such as the foregoing Fig.12 or Fig.16 The data processing method involved. The content of the first storage node can refer to Fig.12 or Fig.16The contents of the first storage node involved and the contents of the plurality of second storage nodes can be referred to in the previous text. Fig.12 or Fig.16 The contents of the multiple second storage nodes involved are not listed again where they are repeated. Optionally, the storage system also includes a third storage node. The contents of the third storage node can be found in the previous text. Fig.12 or Fig.16 The contents of the third storage node involved will not be listed again where they are repeated.

[0201] The present application embodiment provides a computer-readable storage medium for storing a computer program or instruction. When the computer-readable storage medium is executed, the data processing method described above is implemented. For example, Fig.12 or Fig.16 The data processing method involved. The computer-readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).

[0202] The present application embodiment provides a computer program product including instructions, which, when executed on a computer, implements the data processing method described above. For example, Fig.12 or Fig.16 The data processing method involved. The computer program product may be a software or program product containing instructions that can be run on a computing device or stored in any available medium.

[0203] The method steps in the embodiments of the present application can be implemented by hardware, or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a register, a hard disk, a mobile hard disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a base station or a terminal. Of course, the processor and the storage medium can also be present in a base station or a terminal as discrete components.

[0204] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it 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 programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction may 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 program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc; it may also be a semiconductor medium, for example, a solid-state hard disk. The computer-readable storage medium may be a volatile or nonvolatile storage medium, or may include both volatile and nonvolatile types of storage media.

[0205] In the various embodiments of the present application, unless otherwise specified or provided for in any logical conflict, the terms and / or descriptions between the different embodiments are consistent and may be referenced to each other, and the technical features in the different embodiments may be combined to form new embodiments according to their inherent logical relationships.

[0206] It is understood that the various numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic.

Claims

1. A data processing method, characterized in that: include: receiving a first write request, wherein the first write request is used to request writing of first data; Writing a first copy of the first data into a first stripe, and writing a second copy of the first data into a first storage node, wherein the first stripe is distributed in a plurality of second storage nodes; receiving other write requests, where the other write requests are used to request writing of other data; Writing a first copy of the other data into the first stripe, and storing a second copy of the other data in the first storage node; If the data amounts of the first data and the other data reach a first threshold, generating verification data of the first data and the other data according to the second copy of the first data and the second copy of the other data; The verification data is written into the first stripe.

2. The method according to claim 1, characterized in that The first threshold is an amount of data that can be stored in at least one data unit, and the at least one data unit is a stripe unit for storing data among a plurality of stripe units of the first stripe.

3. The method according to claim 1 or 2, characterized in that: The first stripe includes a plurality of stripe units, and the plurality of stripe units include at least one data unit for storing data; a first portion of data in the first copy of the first data is stored in a first data unit of the at least one data unit; Before storing the second copy of the other data in the first storage node, the method further includes: If the first data unit fails, storing the data identical to the first part of data in the second copy of the first data into other data stripes; The first data stripe is replaced by the other data stripe.

4. The method according to any one of claims 1 to 3, characterized in that: After storing the verification data in the first stripe, the method further includes: The second copy of the first data in the first storage node is deleted.

5. The method according to any one of claims 1 to 4, characterized in that: Before storing the second copy of the other data in the first storage node, the method further includes: receiving a first read request, where the first read request is used to request to read the first data; In response to the first read request, data in the data stripe of the first stripe is read to obtain a first copy of the first data.

6. A storage system, characterized in that: The system comprises a first storage node and a plurality of second storage nodes, wherein: The first storage node is used to receive a first write request, where the first write request is used to request to write first data; The plurality of second storage nodes are used to write a first copy of the first data into a first stripe, and the first storage node is also used to write a second copy of the first data into the first storage node, and the first stripe is distributed among the plurality of second storage nodes; The first storage node is further used to receive other write requests, where the other write requests are used to request to write other data; The plurality of second storage nodes are further used to write part or all of the first copy of the other data into a data unit of the stripe unit having the first stripe distributed therein, and the first storage node is further used to write the second copy of the other data into the first storage node; If the data amounts of the first data and the other data reach a first threshold, the first storage node generates verification data of the first data and the other data according to the second copy of the first data and the second copy of the other data; The multiple second storage nodes are used to write the verification data into the first stripe.

7. The system according to claim 6, characterized in that The first threshold is an amount of data that can be stored in at least one data unit, and the at least one data unit is a stripe unit for storing data among a plurality of stripe units of the first stripe.

8. The system according to claim 6 or 7, characterized in that: The first stripe includes a plurality of stripe units, and the plurality of stripe units include at least one data unit for storing data; a first portion of data in a first copy of the first data is stored in a first data unit of the at least one data unit; and the first storage node is further used for: Before storing the second copy of the other data in the first storage node, if the first data unit fails, the data in the second copy of the first data that is identical to the first part of the data is stored in other data stripes, wherein the first data stripe is replaced by the other data stripe.

9. The system according to any one of claims 6 to 8, characterized in that: The first storage node is further used for: After storing the verification data in the first stripe, deleting the second copy of the first data in the first storage node.

10. The system according to any one of claims 6 to 9, characterized in that: Any second storage node among the plurality of second storage nodes is further configured to: receiving a first read request, where the first read request is used to request to read the first data; In response to the first read request, data in the data stripe of the first stripe is read to obtain a first copy of the first data.

11. The system according to any one of claims 6 to 10, characterized in that: The first storage node belongs to one storage node among the plurality of second storage nodes, and the first storage node distributes at least one check unit in the first stripe, wherein the at least one check unit stores part or all of the check data.

12. The system according to any one of claims 6 to 11, characterized in that: The first storage node includes a computational storage disk CSD; or, The first storage node includes a data processor DPU and a persistent memory.

13. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 5.

14. A computer-readable storage medium, characterized in that: The storage medium stores a computer program or instruction, and when the computer program or instruction is executed by the communication device, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Data processing method and storage system

    EP4797098A1