Data recovery method and system, computing device cluster and storage medium

By using service processing units and network processing units in storage nodes to share data recovery tasks, the problem of data recovery process occupies resources in the erasure coding mode is solved, and the system's resource utilization rate and efficiency are improved.

CN119105906APending Publication Date: 2024-12-10HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311638822.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-06-08
Filing Date
2023-12-01
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

In distributed storage systems, the data recovery process in the erasure coding mode occupies a lot of CPU computing power and memory resources, affecting the processing of other data services.

Method used

Two processing units are set up in the storage node, a service processing unit and a network processing unit. The service processing unit is used to monitor and generate data recovery tasks. The network processing unit is responsible for data acquisition and calculation, and uses the computing resources of the network processing unit to perform data. Recover to avoid occupancy of excessive business processing unit resources.

Benefits of technology

Effectively utilizing the computing resources of the network processing unit reduces the resource consumption of the service processing unit during the data recovery process, enables it to handle other tasks, and improves the system's resource utilization and data recovery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105906A_ABST
    Figure CN119105906A_ABST
Patent Text Reader

Abstract

The invention discloses a data recovery method and system, a computing device cluster and a storage medium, relates to the technical field of storage and is used for improving data recovery efficiency. The method comprises the following steps: a first network processing unit of a target storage node sends a data acquisition request comprising an address of a target cache region in the target storage node to at least one source storage node; a second network processing unit in the at least one source storage node receives the data acquisition request and writes data fragments stored in the at least one source storage node into a target cache region; a first service processing unit of the target storage node sends a data recovery instruction to a first network processing unit when determining that the number of the data fragments in the target cache region meets the fragment number required for calculating the target data fragments; and in response to the data recovery instruction, the first network processing unit calculates a target data fragment based on the data fragment in the target cache region.
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 recovery method, system, computing device cluster and storage medium. Background Art

[0002] A distributed storage system includes multiple storage nodes for storing data, wherein the system usually adopts a data protection strategy to prevent data loss due to system failure. Commonly used data protection strategies include replica mode and erasure code (EC) mode. Replica mode means backing up the same data on multiple storage nodes, that is, when a storage node fails and cannot obtain data, the data can be obtained through the same data backed up in other storage nodes. EC mode means that a complete data is dispersed into multiple data blocks, and the multiple data blocks are encoded to obtain encoded data blocks and check codes. The complete data can be calculated based on the encoded data blocks and check codes, wherein each data block and check code can be stored as a data fragment of the complete data on different storage nodes. When the data fragments stored in some storage nodes cannot be obtained due to failure, they can be restored through the data fragments in other storage nodes. Currently, the system sends data recovery tasks to storage nodes to instruct the storage nodes to recover data. However, in EC mode, storage nodes are required to obtain data shards and calculate the data shards that need to be recovered. This process will generate a large central processing unit (CPU) computing power overhead and memory overhead. When the data recovery process occupies too many resources, it will affect the storage node's completion of other data services. Summary of the invention

[0003] The embodiments of the present application provide a data recovery method, system, computing device cluster and storage medium, in which data recovery tasks are performed by two processing units in the storage device, the two processing units are respectively a business processing unit and a network processing unit, wherein the business processing unit is used to process control instructions, and the network processing unit is used to perform data calculation and transmission based on the instructions of the business processing unit. Based on this approach, it is helpful to divide independent computing resources for task management, thereby avoiding the transmission and calculation of data occupying too many resources and affecting the processing of other tasks.

[0004] In a first aspect, a data recovery method is provided, which is applied to a distributed storage system, the distributed storage system comprising a target storage node and at least one source storage node, the target storage node comprising a first business processing unit and a first network processing unit, the at least one source storage node being used to store data using erasure code (EC) encoding, and each of the at least one source storage node comprising a second network processing unit, the method comprising: the first network processing unit sending a data acquisition request to at least one source storage node, the data acquisition request being used to acquire data slices stored in at least one source storage node, the data acquisition request comprising an address of a target cache area for storing data slices in the target storage node; the second network processing unit in the at least one source storage node receiving the data acquisition request and writing the data slices stored in the at least one source storage node into the target cache area; the first business processing unit sending a data recovery instruction to the first network processing unit when determining that the number of data slices in the target cache area meets the number of slices required for calculating the target data slices; the first network processing unit responds to the data recovery instruction by using EC decoding to calculate the target data slices based on the data slices in the target cache area.

[0005] In the EC scenario, when the CPU in the storage node processes the data recovery process, the CPU needs to obtain data shards and perform calculations based on the data shards to achieve data recovery. This process will consume more CPU computing power and occupy more memory resources. However, using the above method provided by the present application, there are two processing units in the storage unit to perform data recovery. The business processing unit is used to monitor and generate data recovery tasks, and the network processing unit obtains data and performs data recovery based on the instructions issued by the business processing unit. This method makes full use of the computing resources of the network processing unit, avoids occupying too many computing resources of the business processing unit during the data recovery process, and allows the resources of the business processing unit to be used to process other tasks.

[0006] In one possible implementation, before the first network processing unit sends a data acquisition request to at least one source storage node, the method also includes: the first business processing unit obtains a data recovery indication message, the data recovery indication message is used to instruct the target storage node to recover the target data shard, the data recovery indication message includes a storage address of a data shard used to calculate the target data shard in at least one source storage node; the first business processing unit generates a data acquisition request and sends a data acquisition instruction to the first network processing unit, the data acquisition instruction is used to instruct the first network processing unit to send a data acquisition request.

[0007] This possible implementation provides a trigger condition for the target storage node to execute the data recovery method. The target storage node starts data recovery according to the data recovery instruction message, and the business processing unit creates a data acquisition request, and the network processing unit sends a message according to the instruction of the business processing unit, which helps to improve the feasibility of the solution.

[0008] In a possible implementation, before the first business processing unit generates a data acquisition request, the method further includes: the first business processing unit applies for a target cache area for each data slice in each source storage node.

[0009] In this possible implementation, the business processing unit pre-creates a target cache area for the remote device to write data, which helps to reduce the computing resources consumed by sending data to the target storage node and copying data internally, thereby improving data transmission efficiency.

[0010] In one possible implementation, a second network processing unit in at least one source storage node receives a data acquisition request and writes data slices stored in at least one source storage node into a target cache area, including: the second network processing unit forwards the data acquisition request to a second business processing unit; the second business processing unit parses the data acquisition request to obtain an address of the target cache area; the second business processing unit sends a data processing instruction to the second network processing unit; the second network processing unit acquires the data slice based on the data processing instruction, and writes the data slice into the target cache area.

[0011] This possible implementation provides a processing process for data acquisition requests in the source storage node, wherein the business processing unit is used to parse and issue instructions, and the network processing unit is used to perform data read and write operations based on the instructions. This method allows the business processing unit to not participate in the actual data transmission process and the read and write process, reducing resource overhead.

[0012] In one possible implementation, after the first business processing unit obtains the data recovery indication message, the method also includes: the first business processing unit creates a target recovery task in a task queue, the target recovery task is used to indicate the recovery of the target data shard, and the task queue is used to record the data recovery task currently executed by the target storage node.

[0013] This possible implementation provides a method for implementing the business processing unit management task, which helps to monitor the running status of tasks in the storage node and perceive and process them in a timely manner.

[0014] In a possible implementation, the method also includes: the first business processing unit determines the task status of the target recovery task; if the task status is normal, the first business processing unit sends a data write instruction to the first network processing unit; the first network processing unit writes the target data shard to the disk according to the data write instruction.

[0015] This possible implementation method provides a specific implementation method for writing data to a disk, wherein the network processing unit executes data writing based on the instructions of the business processing unit, which helps to reduce the consumption of resources of the business processing unit.

[0016] In a possible implementation, the first business processing unit determines the task status of the target recovery task, including: the first business processing unit queries whether the target recovery task exists in the task queue, and if so, it indicates that the task status is normal.

[0017] This possible implementation provides a business processing unit to monitor the task status of the data recovery task in the storage node, which helps to respond in time when the task status changes.

[0018] In one possible implementation, the first service processing unit is a service processing unit SPU, the first network processing unit and the second network processing unit are network processing units NPU, and the target storage node and at least one source storage node perform data transmission based on remote direct data access RDMA technology.

[0019] In a second aspect, a storage device is provided, which includes a business processor and a network processor; the network processor is used to send a data acquisition request to at least one source storage node, the data acquisition request is used to obtain data slices stored in the at least one source storage node, and the data acquisition request includes an address for at least one source storage node to write the data slices into a target cache area in a target storage node; the business processor is used to send a data recovery instruction to the network processor when it is determined that the number of data slices in the target cache area meets the number of slices required for calculating the target data slices; the network processor is also used to respond to the data recovery instruction, use EC decoding based on the data slices in the target cache area, and calculate the target data slices.

[0020] In a third aspect, a storage device is provided for executing the action of the target storage node in any one of the methods provided in the first aspect, wherein the storage device includes a plurality of functional units, and the actions executed by each functional unit are implemented by hardware or by executing corresponding software through hardware. For example, the storage device may include: a business processing unit and a network processing unit, wherein the network processing unit is used to send a data acquisition request to at least one source storage node, wherein the data acquisition request is used to acquire data slices stored in at least one source storage node, wherein the data acquisition request includes an address for at least one source storage node to write data slices into a target cache area in the target storage node; the business processing unit is used to send a data recovery instruction to the network processing unit when determining that the number of data slices in the target cache area meets the number of slices required for calculating the target data slices; and the network processing unit is further used to calculate the target data slices based on the data slices in the target cache area using EC decoding in response to the data recovery instruction.

[0021] In a fourth aspect, a distributed storage system is provided, which includes a target storage node and at least one source storage node, the target storage node includes a first network processing unit and a first business processing unit, at least one source storage node is used to store data using erasure code EC encoding, and each of the at least one source storage node includes a second network processing unit. The system specifically includes: a first network processing unit, used to send a data acquisition request to at least one source storage node, the data acquisition request is used to acquire data slices stored in at least one source storage node, and the data acquisition request includes an address for at least one source storage node to write the data slices into a target cache area in the target storage node; a second network processing unit in at least one source storage node is used to receive the data acquisition request and write the data slices stored in at least one source storage node into the target cache area; a first business processing unit is used to send a data recovery instruction to the first network processing unit when it is determined that the number of data slices in the target cache area meets the number of slices required to calculate the target data slices; the first network processing unit is also used to respond to the data recovery instruction and use EC decoding to calculate the target data slices based on the data slices in the target cache area.

[0022] In a fifth aspect, a computing device cluster is provided. The computing device cluster includes at least one computing device, each computing device includes a processor and a memory; the memory in the at least one computing device is used to store computer program instructions; the processor in the at least one computing device calls the computer program instructions stored in the memory to execute any one of the methods provided in the first aspect.

[0023] In a sixth aspect, a chip is provided, comprising: a processor and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the processor; the processor is used to run the code instructions to execute any one of the methods provided in the first aspect.

[0024] In a seventh aspect, a computer-readable storage medium is provided, comprising computer program instructions, which, when executed on a computing device, causes the computing device to execute any one of the methods provided in the first aspect.

[0025] In an eighth aspect, a computer program product is provided, comprising computer program instructions, which, when executed on a computing device, cause the computing device to execute any one of the methods provided in the first aspect.

[0026] The technical effects brought about by any implementation method in the second to eighth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of the architecture of a distributed storage system provided in an embodiment of the present application;

[0028] Figure 2 A schematic diagram of the hardware structure of a computing device 20 provided in an embodiment of the present application;

[0029] Figure 3 A schematic diagram of the composition of a storage node provided in an embodiment of the present application;

[0030] Figure 4 A flowchart of a data recovery method provided in an embodiment of the present application;

[0031] Figure 5 A flowchart of another data recovery method provided in an embodiment of the present application;

[0032] Figure 6 A schematic diagram of a distributed storage system scenario using the EC mode provided in an embodiment of the present application;

[0033] Figure 7 A flowchart of another data recovery method provided in an embodiment of the present application;

[0034] Figure 8 A flowchart of another data recovery method provided in an embodiment of the present application;

[0035] Fig. 9 A schematic diagram of a scenario of a data recovery method provided in an embodiment of the present application;

[0036] Fig.10A schematic diagram of a distributed storage system scenario using a multi-copy mode provided in an embodiment of the present application;

[0037] Fig.11 A flowchart of another data recovery method provided in an embodiment of the present application;

[0038] Fig.12 A schematic diagram of the composition of a distributed storage system provided in an embodiment of the present application;

[0039] Fig.13 A schematic diagram of the composition of a computing device provided in an embodiment of the present application;

[0040] Fig.14 A schematic diagram of the composition of a computing device cluster provided in an embodiment of the present application;

[0041] Fig.15 A schematic diagram of a connection method between computing devices in a computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0043] Unless otherwise defined, all scientific and technological terms used herein have the same meaning as those known to those of ordinary skill in the art. In the embodiments of the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B, which may represent: A exists alone, A and B exist at the same time, and B exists alone, wherein A and B may be singular or plural. The character " / " generally indicates that the associated objects before and after are a kind of "or" relationship. "At least one of the following (individuals)" or its similar expressions refers to any combination of these items, including any combination of single items (individuals) or plural items (individuals). For example, at least one of a, b or c (individuals) may represent: a, b, c, a and b, a and c, b and c or a, b and c, wherein a, b and c may be single or multiple. In addition, in the embodiments of the present application, the words "first", "second" and the like do not limit the quantity and order.

[0044] In addition, in the embodiments of the present application, directional terms such as "upper" and "lower" are defined relative to the orientation of the components in the drawings. It should be understood that these directional terms are relative concepts. They are used for relative description and clarification, and they may change accordingly according to changes in the orientation of the components in the drawings.

[0045] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0046] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0047] like Figure 1 As shown, it is a schematic diagram of the architecture of a distributed storage system. The distributed storage system 10 is composed of a client node 101, a management node 102 and multiple storage nodes 103. Among them, the client node 101 can also be called a client, which is used to send read and write requests to the storage node to read or write data files. The management node 102 is responsible for managing the metadata of each storage node, processing the requests of the client nodes, and maintaining the stable operation of the system. The storage node 103 is used to realize the persistent storage of data files and feedback the corresponding data after obtaining the data request.

[0048] In terms of hardware implementation, the above nodes can be Figure 2 The computing device shown is implemented as Figure 2 FIG. 2 is a schematic diagram of the hardware structure of a computing device 20 provided in an embodiment of the present application. The computing device 20 can be used to implement the functions of each of the above nodes.

[0049] Figure 2 The computing device 20 shown may include: a processor 201, a memory 202, a disk 203, a network card 204, and a bus 205. The processor 201 and the memory 202 form a control unit of the computing device 20, which is used to implement the computing service of the computing device 20. The processor 201, the memory 202, the disk 203, and the network card 204 may be connected via a bus 205.

[0050] The processor 201 includes one or more CPUs, and may also be other general-purpose processors, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0051] As an example, in Figure 2 In the figure, the processor 201 may include CPU 0 and CPU 1. A CPU has one or more CPU cores. The figure is only used as an example, and in actual applications, more or fewer CPUs and CPU cores may be included.

[0052] Memory 202 refers to an internal memory that directly exchanges data with the processor. It can read and write data at any time and at a very fast speed. It serves as a temporary data storage for the operating system or other running programs. Memory includes at least two types of memory. For example, memory can be either random access memory or read only memory (ROM). For example, random access memory is dynamic random access memory (DRAM) or storage class memory (SCM). DRAM is a semiconductor memory, and like most random access memories (RAM), it is a volatile memory device. SCM is a composite storage technology that combines the characteristics of traditional storage devices and memory. Storage class memory can provide faster read and write speeds than hard disks, but is slower than DRAM in access speed and cheaper than DRAM in cost. However, DRAM and SCM are only exemplary descriptions in this embodiment, and memory can also include other random access memories, such as static random access memory (SRAM). As for the read-only memory, for example, it can be a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), etc. In addition, the memory 202 can also be a dual in-line memory module or a dual-line memory module (DIMM), that is, a module composed of a dynamic random access memory (DRAM), or a solid state disk (SSD). In actual applications, multiple memories 202 and different types of memories 202 can be configured in the computing node 20. This embodiment does not limit the number and type of memory 202. In addition, the memory 202 can be configured to have a power-saving function. The power-saving function means that when the system loses power and then powers on again, the data stored in the memory 202 will not be lost. The memory with a power-saving function is called a non-volatile memory.

[0053] Disk 203 is used to store data, including floppy disks and hard disks. Hard disks specifically include solid-state hard disks and mechanical hard disks (such as shingled magnetic recording hard disks). In an embodiment of the present application, each storage node may include one or more hard disks for persistent storage of data.

[0054] The network card 204 is used to connect the computing device 20 to other devices through a communication network. Figure 1 As shown, each node communicates with other nodes in the network through a network card. The network card 204 has a unique address in the network, and the communication network can be Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The network card 204 can also be called a communication interface, including a receiving unit for receiving data and a sending unit for sending data.

[0055] Among them, the network card 204 includes a processor and a memory for realizing the sending and receiving of data. For example, data is usually transmitted in parallel through the bus 205 in the computing device 20, and is usually transmitted in serial form in the network. The processor and memory in the network card need to perform serial-to-parallel conversion on the data sent or received. When sending data, the processor 201 copies the data in the memory 202 to the memory in the network card, and the processor in the network card processes the data before sending it. When receiving data, the data is first stored in the memory of the network card, and then the processor 201 copies the data in the memory of the network card to the memory 202 for the processor 201 to read.

[0056] The bus 205 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, a high-speed peripheral component interconnect (PCIe) bus, or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 2 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0057] It should be pointed out that Figure 2 The structure shown in the figure does not constitute a limitation on the computing device 20, except Figure 2 In addition to the components shown, computing device 20 may include more or fewer components than shown, or combine certain components, or arrange components differently.

[0058] Combined with the above Figure 1Each node described in the above may include a processor, a memory, and a network card in a computing device that implements the corresponding functions of a client node or a management node, wherein the processor is used to process or generate data read and write requests, and temporarily store the relevant data in the memory. When the amount of data in the memory reaches a certain threshold, the processor sends the data in the memory to the storage node through the network card for persistent storage. For a computing device that implements the corresponding functions of a storage node, it includes a processor, a memory, and a hard disk, wherein the processor and the memory are used to implement simple computing functions to help read and write data in the hard disk.

[0059] It is understandable that, functionally, due to Figure 1 The main functions of the client node 101 and the management node 102 in the example are computing services. When storing data, remote storage (such as hard disks in storage nodes) can be used to achieve persistent storage. Therefore, it has fewer local storages such as hard disks than the storage node 103, thereby saving costs and space. However, this does not mean that the client node 101 and the management node 102 cannot have local storage. In actual implementation, the client node 101 and the management node 102 can also have a small number of hard disks built in, or a small number of external hard disks.

[0060] The client node 101 and the management node 102 may be computing devices such as servers, desktop computers, etc. The storage node 103 may be computing devices such as servers running databases and managing large amounts of data.

[0061] As described in the background technology, when the EC mode is used to store data in the system, multiple storage nodes store data blocks and check codes respectively. Complete data can be calculated based on the data blocks and check codes. The data blocks and check codes can be collectively referred to as data shards of the complete data. When a data shard in a storage node cannot be obtained, the system can recover the lost data shard through other storage nodes or newly added storage nodes.

[0062] In order to reduce the computing resources occupied by the data recovery process in the storage node, the present application proposes a data recovery method, which is applied to a distributed storage system, wherein the storage node in the distributed storage system includes two processing units, namely a service process unit (SPU) and a network processing unit (NPU). Figure 3 , which is a schematic diagram of the composition of a storage node provided in an embodiment of the present application.

[0063] Figure 3The storage node 30 shown may include an SPU 301 , an NPU 302 , a disk 303 and a bus 304 . The SPU 301 , the NPU 302 and the disk 303 may be connected via the bus 304 .

[0064] In the storage node 30, the SPU 301 is the main processing unit in the storage node 30, and is used to implement the relevant functions of the control layer. For example, the SPU 301 is used to process or generate data requests and issue instructions to the NPU 302. The SPU 301 specifically includes a processor and a memory to implement the above functions. The detailed description of the processor and the memory can be referred to Figure 2 Related description of the processor 201 and the memory 202 in the control unit.

[0065] As an auxiliary processing unit in the storage node 30, the NPU 302 is used to implement relevant functions at the data level, including data stored in the storage node 30 and data transmission with other nodes. For example, the NPU 302 processes the data stored in the disk 303 according to the relevant instructions of the SPU 301. The NPU 302 is also used to implement the communication between the storage node 30 and other devices, for example, the NPU 302 sends messages to other nodes or receives messages according to the instructions of the SPU 301. The NPU 302 specifically includes a processor and a memory to implement the above functions.

[0066] In addition, the storage node 30 also includes a disk 303 for storing data and a bus 304 for communication between various components. Figure 2 Description of disks and buses in .

[0067] It should be noted that Figure 2 The computing device shown and Figure 3 The storage node shown may be a server or a terminal device. In some optional examples, Figure 3 The NPU in the storage node shown may be arranged in the network card of the storage node, for example Figure 2 In the network card shown, the NPU in the network card performs functions such as reading and writing data in the disk to reduce the computing power loss of the CPU in the storage node. It is worth noting that when the network card in the storage node includes an NPU and the NPU can be used to offload the data management function of the CPU in the storage node, the network card can also be called a smart network card (smart network interface controller, SNIC) set in the storage node. In some feasible situations, the smart network card is connected to the storage node in a pluggable manner, and can also be connected to the storage node through a PCIe bus interface. This application does not limit the hardware connection method between the smart network card and the storage node.

[0068] It should be noted that in Figure 3 In the embodiment, the SPU and the NPU are deployed in the storage node as independent components. The specific hardware form may be an independent chip. In actual applications, the SPU and the NPU may also be different processing units deployed in the same chip, and there is no restriction on this.

[0069] Based on the above Figure 3 The storage nodes shown are Figure 4 As shown, it is a flow chart of a data recovery method provided by an embodiment of the present application. The data migration method is applied to a distributed storage system, and the distributed storage system includes a target storage node for recovering data and at least one source storage node, wherein the target storage node includes a first SPU and a first NPU, and each of the at least one source storage node includes a second NPU, and at least one source storage node is used to store data using EC encoding. The method specifically includes the following steps S401-S404.

[0070] Step S401: A first NPU sends a data acquisition request to at least one source storage node.

[0071] The data acquisition request is used to acquire data slices stored in at least one source storage node.

[0072] Optionally, before step S401, Figure 5 As shown, the method also includes the following steps S501-S503.

[0073] Step S501: The first SPU obtains a data recovery indication message.

[0074] The data recovery indication message is used to instruct the target storage node to recover the target data slice.

[0075] Combination Figure 1 In the distributed storage system shown, usually, the management node 102 determines the target storage node and sends a data recovery indication message to the target storage node. The target storage node can be any available storage node. When the disk storing the target data slice fails, the storage node managing the disk can also be used as the target storage node to perform data recovery and store the calculated target data slice in other available disks. There is no restriction on this.

[0076] It is understandable that the NPU is used as a communication unit in the storage node for sending and receiving messages. In practical applications, the NPU is set in the network card of the storage node, and the network card has a unique address in the network, and the address is used to indicate the storage node. The data recovery indication message is received by the first NPU and forwarded to the first SPU.

[0077] Step S502: The first SPU generates a data acquisition request based on the data recovery indication message.

[0078] The data recovery indication message includes a storage address of a data slice in at least one source storage node for calculating a target data slice, and the first SPU generates a corresponding data acquisition request for each data slice.

[0079] Among them, the data acquisition request encapsulates the address of the network card to which the first NPU belongs and the address of the network card to which the second NPU belongs, and is used for multiple second NPUs to identify the address of the network card to which the second NPU belongs in the data request, so as to receive the data request and feedback the target data segment according to the address of the network card to which the first NPU belongs.

[0080] Step S503: The first SPU sends a data acquisition instruction to the first NPU.

[0081] In response to the data acquisition instruction, the first NPU executes the above step S401 and sends a data acquisition request.

[0082] In a distributed storage system, when EC mode is used to store data, a piece of data is divided into M data blocks, and N check codes can be calculated from the M data blocks. Each data block and check code will be stored in an independent storage node, that is, the system includes at least M+N storage nodes. Among them, when X storage nodes fail and data cannot be obtained, the lost data can be calculated by obtaining the data blocks and check codes in M+NX storage nodes, X≤N, and M, N, and X are all integers greater than zero.

[0083] For example, Figure 6 The figure shows a distributed storage system scenario diagram using the EC mode. Figure 6 In the example, M is 4 and N is 2. The four data blocks are data block 1, data block 2, data block 3 and data block 4, and the two check codes are check code 1 and check code 2. The following calculation rules exist:

[0084] Data block 1 + data block 2 + data block 3 + data block 4 = check code 1;

[0085] Data block 1+2×data block 2+3×data block 3+4×data block 4=check code 2;

[0086] The above 6 data shards (4 data blocks and 2 check codes) are stored in storage nodes a-storage nodes f respectively. When X data blocks or check codes cannot be obtained, the lost data can be recovered through the data shards in the remaining storage nodes, where X≤N, so X is at most 2. For example, assuming that X is 2, the target data shard is data block 1 and check code 1, the above data recovery indication message will include the storage addresses of data blocks 2, 3, 4 and check code 2 in storage nodes b, c, d and f respectively. The first SPU generates a corresponding data acquisition request based on the data recovery indication message, and instructs the first NPU to send the data acquisition request to storage nodes b, c, d and f respectively.

[0087] It should be noted that when multiple data shards need to be restored for the same data, the data can be restored by the same storage node, and the restored data shards can be distributed to different nodes for storage. Alternatively, different storage nodes can be used to restore the data separately, and the restored data shards can be stored.

[0088] It should be noted that, in practical applications, the above M+N values ​​used to represent the combination of data blocks and check codes are Figure 5 The 4+2 shown also includes multiple combinations such as 2+1 and 8+2. Accordingly, the number of storage nodes deployed in the system is different, and the combination can be flexibly selected based on the actual deployment cost.

[0089] Step S402: The second NPU in at least one source storage node receives a data acquisition request, and writes the data slices stored in at least one source storage node into a target cache area.

[0090] The target cache is a specific memory area in the target source storage node for caching data slices. Specifically, after the first SPU receives the data recovery indication message, the first SPU applies for a target cache for each data slice in the source storage node, and writes the address of each target cache into the corresponding data acquisition request, so that the second NPU writes the data slice into the corresponding target cache. The size of the target cache can be set based on the size of the data slice indicated in the data recovery message.

[0091] This method helps reduce the number of copies of data shards within the target storage node. Figure 2 In the computing device shown, when the network card receives data, the CPU needs to copy the data in the network card to the memory, and the CPU reads it; Figure 3In the storage device shown, the SPU and the local NPU respectively have memories for caching data. The SPU pre-applies for a specific target cache area for the data slices in the local memory, and sends it to the local NPU and to the NPU of the remote device through the local NPU, so that both the local NPU and the NPU of the remote device can access the target cache area. In this way, the NPU of the remote device can write the data slices directly into the target cache area, so that the SPU can read it directly without the need for the local NPU to receive it and then copy it to the memory of the SPU, thereby saving communication resources.

[0092] Exemplarily, the second NPU can implement the above step S402 based on remote direct memory access (RDMA) technology. RDMA is a network communication technology used to enable a remote device to directly access the memory of a local device, such as a network card of a remote device directly sending data to a designated memory of a local device, such as a second NPU directly sending data slices to a target cache area of ​​the first SPU.

[0093] It should be noted that, in actual applications, the above steps are not limited to being implemented using RDMA technology, and remote NPU access to a specified memory may also be implemented based on a transmission control protocol (TCP) or the like.

[0094] Optionally, each source storage node further includes a second SPU, and the second NPU forwards the data acquisition request to the second SPU to obtain the address of the target cache area. Specifically, the following steps S11 to S13 are included.

[0095] Step S11: The second SPU receives a data acquisition request forwarded by the second NPU.

[0096] Step S12: The second SPU parses the data acquisition request and obtains the address of the target buffer area.

[0097] Step S13: The second SPU sends a data processing instruction to the second NPU.

[0098] In response to the data acquisition instruction, the second NPU acquires the data slices and writes the data slices into the target cache area.

[0099] In a possible implementation, the data acquisition request also includes an identifier or storage address for indicating the data slice. The first SPU sends the identifier or storage address of the parsed data slice to the second NPU. The second NPU searches for the data slice in the local disk based on the identifier of the data slice, or the second NPU reads the data slice in the local disk according to the storage address of the data slice.

[0100] The second NPU obtains the data slices, which specifically includes: the second NPU reads the data slices into the memory of the second NPU. The second NPU writes the data slices in the memory into the target cache area.

[0101] Through the above steps S11 to S13, the SPU in the source storage node parses the data acquisition request sent by the target storage node, and sends the data shards and target cache information to the NPU, which executes the reading and writing process of the data shards. In this way, the SPU does not participate in the actual data transmission process, which helps to reduce the computing power consumption of the SPU and improve the data transmission efficiency. In the existing data reading and writing process, for example Figure 2 In the computing device shown, the CPU reads the data from the disk into the memory, and then copies it to the memory of the network card. The network card executes the data transmission. This process requires the CPU to copy multiple times, which will consume more computing power.

[0102] Step S403: When the first SPU determines that the number of data slices in the target buffer area meets the number of slices required for calculating the target data slices, the first SPU sends a data recovery instruction to the first NPU.

[0103] Specifically, Figure 7 As shown, the process includes the following steps S403a and S403b.

[0104] S403a: The first SPU determines whether the data of the data slice in the target buffer area satisfies the slice data required for calculating the target data slice.

[0105] If yes, then execute step S403b to send a data recovery instruction to the first NPU. If no, then continue to wait.

[0106] As mentioned earlier, in EC mode, a certain number of data shards are required to perform calculations.

[0107] In combination with the above example, the complete data includes 6 data slices. When any one or two data slices are lost, the lost data slices can be calculated by the remaining 4 data slices. In other words, when the first SPU needs to determine that the number of data slices in the target cache is 4, it sends a data recovery instruction to the first NPU.

[0108] It can be understood that in the above example, when a target data shard needs to be calculated, usually, considering that the sizes of the data shards in each source storage node are the same or different and the communication distances between each source storage node and the target storage node are the same or different, the first NPU sends a data acquisition request to the source storage nodes where the remaining 5 data shards are located, and when the number of shards received is 4, the first SPU can send a data recovery instruction to the first NPU to calculate the target data shard, without waiting for the remaining unreceived data shards.

[0109] Step S404: The first NPU calculates a target data slice based on the data slices in the target cache area in response to the data recovery instruction.

[0110] Exemplarily, the data recovery instruction also includes a calculation rule for calculating the target data slices, and the first NPU performs calculation based on the calculation rule and the data slices in the target cache area.

[0111] Currently in the EC scenario, when the CPU in the storage node processes the data recovery process, the CPU needs to obtain the data shards and perform calculations based on the data shards to achieve data recovery. This process will consume more CPU computing power and occupy more memory resources. However, using the above method provided in the embodiment of the present application, there are two processing units in the storage unit to perform data recovery. The business processing unit is used to monitor and generate data recovery tasks, and the network processing unit obtains data and performs data recovery based on the instructions issued by the business processing unit. This method makes full use of the computing resources of the network processing unit, avoids occupying too many computing resources of the business processing unit during the data recovery process, and allows the resources of the business processing unit to be used to process other tasks.

[0112] Optionally, after the above step S501, the method further includes: the first SPU creates a target recovery task in a task queue, the target recovery task is used to indicate the recovery of the target data slice, and the task queue is used to record the data recovery task currently executed by the target storage node.

[0113] It is understandable that the SPU in the storage node is also used to monitor the running status of the data recovery task in the storage node.

[0114] Optionally, the method further comprises: Figure 8 Steps S405 to S408 are shown.

[0115] Step S405: The first SPU determines whether the task status of the target recovery task is normal.

[0116] If yes, execute step S406-step S407; if no, execute step S408.

[0117] Step S406: The first SPU sends a data write instruction to the first NPU.

[0118] Step S407: The first NPU writes the target data slice to the disk in response to the data write instruction.

[0119] Optionally, the data write instruction may include an address where the target data slice is stored in the disk, and the first NPU stores the target data slice according to the data write instruction.

[0120] Step S408: The first SPU releases the target buffer area.

[0121] It is understandable that the target recovery task may be interrupted. For example, the management node in the storage system sends an indication message of task interruption to the target storage node. In response to the indication message, the first SPU needs to stop executing the target recovery task. In one example, the first SPU deletes the target recovery task in the task queue. Accordingly, step S405 specifically includes: the first SPU searches the task queue for whether there is a target recovery task. If so, it indicates that the task status is normal; if not, it indicates that the task status is abnormal.

[0122] Through the above method, the NPU in the storage node can not only communicate with other storage nodes, but also write data to the disk, so that the data processing process in the storage node is all executed by the NPU, giving full play to the NPU's data processing capabilities and releasing the resources consumed by the SPU to participate in data processing.

[0123] Optionally, when the first SPU determines that the task status is abnormal, it can also instruct the first NPU to delete the target data. That is, when the data migration task is interrupted, the first SPU instructs the first NPU to delete the received data slices or the calculated target data slices without performing the disk removal action.

[0124] like Fig. 9As shown, it is a scenario diagram of a data recovery method provided by an embodiment of the present application. Among them, it includes storage node 1, storage node 2 and storage node 3. In combination with the above embodiment, each storage node includes SPU and NPU, wherein SPU is used to send control commands to NPU to implement read and write operations, and the SPUs of each storage node are used to determine the specific tasks of data recovery, such as push data and pull data. Push data refers to pushing local data to other nodes, and pull data refers to obtaining data from other nodes to the local. NPU is used to perform read and write operations on the disk and transmit data streams according to the control instructions issued by SPU. Among them, in the data migration task, the business state machine layer is formed between SPUs, and the stateless replication layer is formed between NPUs. The business state machine layer is mainly used to manage task status, such as the creation and deletion of tasks, and the stateless replication layer is mainly used to handle actual data transmission and processing without perceiving the above task status.

[0125] In the above scenario, it helps to give full play to the NPU's ability to process data and the SPU's ability to perceive business, reduce the flow of data in the software layer, reduce the cost of data migration, and enable the SPU to use more software resources to process business. In addition, the data recovery method can evolve and upgrade independently at the business state machine layer without affecting the NPU in the stateless replication layer, improving system compatibility.

[0126] In a distributed storage system, data can also be stored in a multi-copy mode. As mentioned above, the multi-copy mode means creating multiple copies of data, each copy is stored in a storage node, so that when the data in a storage node cannot be obtained, the data can be restored through the copies in other storage nodes. Fig.10 As shown, it is a schematic diagram of a distributed storage system scenario that applies a multi-copy mode. Among them, the distributed storage system includes storage node A, storage node B and storage node C, which store data copy 1, data copy 2 and data copy 3 respectively, and the data copies stored in each storage node are the same. When a storage node fails and cannot read the data therein, the data can be obtained through storage node B or storage node C. The present application also provides a data recovery method, which is applied to a distributed storage system that adopts a multi-copy mode, and the distributed storage system includes a target storage node and a source storage node, the target storage node includes a first SPU and a first NPU, and the source storage node includes a second NPU. As Fig.11 As shown, the following steps S1101-S1105 are included.

[0127] Step S1101: The first SPU obtains a data recovery indication message.

[0128] The data recovery indication message is used to instruct the target storage node to obtain a data copy from the source storage node.

[0129] Step S1102: The first SPU generates a data request in response to the data recovery indication message.

[0130] Step S1103: The first SPU sends a data acquisition instruction to the first NPU.

[0131] Step S1104: The first NPU sends a data acquisition request to the second NPU in response to the data acquisition instruction.

[0132] Step S1105: The second NPU receives the data acquisition request and writes the data copy stored in the source storage node into the target cache area.

[0133] For the related description of the data request, data acquisition instruction, target cache area, etc., please refer to the related description of the above steps S401 to S404, which will not be repeated here.

[0134] The source storage node also includes a second SPU, and step S1105 specifically includes the second NPU forwarding the data acquisition request to the second SPU, the second SPU parsing the data acquisition request, and sending the storage address of the data copy and the address of the target cache area to be written to the second NPU through a data processing instruction, and the second NPU reads the data copy and writes it to the target cache area. This method helps to fully utilize the data processing capability of the second NPU, execute the data reading process and the remote data writing process, so that the second SPU does not need to participate in the actual data transmission process, saving resources.

[0135] It is understandable that in a multi-copy scenario, the storage node completes data recovery through the SPU and NPU. This process can also be understood as a data migration process. Through the interaction between the SPU and NPU, data can be transmitted between the NPUs without occupying too many SPU resources.

[0136] In addition, the data migration process can also be applied to other scenarios. When the distributed storage system is expanded or reduced, such as adjusting the number of storage nodes or the number of hard disks in the storage nodes, data rebalancing (catchup and rebalance, CRB) is required. Among them, data rebalancing can be understood as adjusting the distribution of data in the disks of each storage node so that the system as a whole achieves a load balancing effect. Specifically, data rebalancing can be achieved by migrating data between storage nodes in the system. For example, the management node sends a data migration task to the storage node, and the storage nodes migrate according to the data indicated by the task to achieve data rebalancing.

[0137] In the data migration process, the storage nodes are divided into primary nodes and backup nodes. The primary node is the node with complete data, for example Fig.11 The source storage node in the ,standby node is the node that needs to obtain complete data from other nodes, ,for example Fig.11 The data migration task may specifically be a data replication task, for example, a copy of the data in the primary node is established in the standby node, and the data in the primary node after replication may be retained or deleted, which may be specifically instructed by the management node or by the management node through other storage nodes, and the specific processing method may be selected and implemented in combination with the actual application scenario.

[0138] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the method. It is understandable that in order to realize the above functions, the storage node includes at least one of the hardware structure and software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0139] The embodiment of the present application can divide the storage node into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0140] The present application also provides a distributed storage system, such as Fig.12 As shown, the distributed storage system 120 includes a target storage node and at least one source storage node, the target storage node includes a first network processing unit 1201 and a first business processing unit 1202, at least one source storage node is used to store data using erasure code EC encoding, and each of the at least one source storage node includes a second network processing unit 1203. The system specifically includes:

[0141] A first network processing unit 1201 is configured to send a data acquisition request to at least one source storage node, where the data acquisition request is used to acquire data slices stored in the at least one source storage node, and the data acquisition request includes an address of a target cache area in a target storage node for the at least one source storage node to write the data slices;

[0142] The second network processing unit 1203 in at least one source storage node is used to receive a data acquisition request and write the data slice stored in at least one source storage node into a target cache area;

[0143] The first business processing unit 1202 is configured to send a data recovery instruction to the first network processing unit when it is determined that the number of data shards in the target buffer area meets the number of shards required for calculating the target data shards;

[0144] The first network processing unit 1201 is further configured to respond to the data recovery instruction and obtain the target data slices by using EC decoding based on the data slices in the target buffer area.

[0145] In one example, the first business processing unit 1202 is also used to obtain a data recovery indication message, which is used to instruct the target storage node to recover the target data shard, and the data recovery indication message includes a storage address of a data shard used to calculate the target data shard in at least one source storage node; the first business processing unit 1202 is also used to generate a data acquisition request and send a data acquisition instruction to the first network processing unit 1201, and the data acquisition instruction is used to instruct the first network processing unit 1201 to send a data acquisition request.

[0146] In one example, the first business processing unit 1202 is further used to apply for a target cache area for a data slice in each source storage node.

[0147] In one example, each source storage node also includes a second business processing unit 1204 and a second network processing unit 1203, which are specifically used to forward data acquisition requests to the second business processing unit 1204; the second business processing unit 1204 is specifically used to parse the data acquisition request and obtain the address of the target cache area; the second business processing unit 1204 is also used to send data processing instructions to the second network processing unit 1203; the second network processing unit 1203 is also used to obtain data fragments based on the data processing instructions and write the data fragments into the target cache area.

[0148] In one example, the first business processing unit 1202 is further used to create a target recovery task in a task queue, where the target recovery task is used to indicate the recovery of a target data slice, and the task queue is used to record the data recovery task currently executed by the target storage node.

[0149] In one example, the first business processing unit 1202 is also used to determine the task status of the target recovery task; when the task status is normal, a data write instruction is sent to the first network processing unit 1201; the first network processing unit 1201 is also used to write the target data shard to the disk according to the data write instruction.

[0150] In an example, the first business processing unit 1202 is specifically used to query whether there is a target recovery task in the task queue. If so, it indicates that the task status is normal.

[0151] In one example, the first service processing unit 1202 is a service processing unit SPU, the first network processing unit 1201 and the second network processing unit 1203 are network processing units NPU, and the target storage node and at least one source storage node perform data transmission based on remote direct data access RDMA technology.

[0152] For the explanation of the relevant contents and description of the beneficial effects in the distributed storage system provided above, reference may be made to the corresponding embodiments above, which will not be repeated here.

[0153] The first network processing unit 1201, the first service processing unit 1202, the second network processing unit 1203, and the second service processing unit 1204 can all be implemented by software or by hardware. As an example, the implementation of the first network processing unit 1201 is described below. Similarly, the implementation of the first service processing unit 1202, the second network processing unit 1203, and the second service processing unit 1204 can refer to the implementation of the first network processing unit 1201.

[0154] As an example of a software functional unit, the first network processing unit 1201 may include code running on a computing instance. The computing instance may be at least one of a physical host (computing device), a virtual machine, a container, and other computing devices. Furthermore, the computing device may be one or more. For example, the first network processing unit 1201 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application may be distributed in the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with similar geographical locations. Typically, a region may include multiple AZs.

[0155] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same VPC or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway must be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0156] As an example of a hardware functional unit, the first network processing unit 1201 may include at least one computing device, such as a server, etc. Alternatively, the first network processing unit 1201 may also be a device implemented using ASIC or PLD, etc. The PLD may be implemented using CPLD, FPGA, GAL or any combination thereof.

[0157] The multiple computing devices included in the first network processing unit 1201 can be distributed in the same region or in different regions. The multiple computing devices included in the first network processing unit can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the first network processing unit can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0158] The present application also provides a computing device 100. Fig.13 As shown, the computing device 100 includes: a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other through the bus 102. The computing device 100 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 100.

[0159] The bus 102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.13 The bus 104 is represented by only one line, but does not mean that there is only one bus or one type of bus. The bus 104 may include a path for transmitting information between various components of the computing device 100 (eg, the memory 106, the processor 104, and the communication interface 108).

[0160] The processor 104 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0161] The memory 106 may include a volatile memory, such as a random access memory (RAM). The processor 104 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0162] The memory 106 stores executable program codes, and the processor 104 executes the executable program codes to respectively implement the functions of the first network processing unit, the first service processing unit, and the second network processing unit, thereby implementing the data recovery method. That is, the memory 106 stores instructions for executing the data recovery method.

[0163] Alternatively, the memory 106 stores executable codes, and the processor 104 executes the executable codes to respectively implement the functions of the first network processing unit, the first service processing unit, and the second network processing unit, thereby implementing the data recovery method. That is, the memory 106 stores instructions for executing the data recovery method.

[0164] The communication interface 103 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 100 and other devices or a communication network.

[0165] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0166] like Fig.14 As shown, the computing device cluster includes at least one computing device 100. The memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the data recovery method.

[0167] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the data recovery method. In other words, the combination of one or more computing devices 100 may jointly execute instructions for executing the data recovery method.

[0168] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the first network processing unit. That is, the instructions stored in the memory 106 in different computing devices 100 can implement the functions of one or more modules in the first network processing unit, the first business processing unit and the second network processing unit.

[0169] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.15 A possible implementation is shown. Fig.15 As shown, two computing devices 100A and 100B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 106 in the computing device 100A stores instructions for executing the functions of the first network processing unit and the first business processing unit. At the same time, the memory 106 in the computing device 100B stores instructions for executing the functions of the second network processing unit.

[0170] Fig.15 The connection method between the computing device clusters shown may be based on the consideration that the data recovery method provided in the present application requires the storage of a large amount of data, and therefore the functions implemented by the second network processing unit may be handed over to the computing device 100B for execution.

[0171] It should be understood that Fig.15 The functions of the computing device 100A shown in FIG. 1 may also be completed by multiple computing devices 100. Similarly, the functions of the computing device 100B may also be completed by multiple computing devices 100.

[0172] The present application embodiment also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similar to that of Fig.14 and Fig.15 The connection mode of the computing device cluster is different in that the memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the data recovery method.

[0173] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the data recovery method. In other words, the combination of one or more computing devices 100 may jointly execute instructions for executing the data recovery method.

[0174] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster may store different instructions for executing part of the functions of the distributed storage system. That is, the instructions stored in the memory 106 in different computing devices 100 may implement the functions of one or more devices in the first network processing unit, the first service processing unit, and the second network processing unit.

[0175] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the data recovery method.

[0176] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can 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 can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the data recovery method.

[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data recovery method, characterized in that: The method is applied to a distributed storage system, the distributed storage system includes a target storage node and at least one source storage node, the target storage node includes a first service processing unit and a first network processing unit, the at least one source storage node is used to store data using erasure code EC encoding, each of the at least one source storage node includes a second network processing unit, and the method includes: The first network processing unit sends a data acquisition request to the at least one source storage node, the data acquisition request is used to acquire the data slices stored in the at least one source storage node, and the data acquisition request includes an address of a target cache area for storing the data slices in the target storage node; The second network processing unit in the at least one source storage node receives the data acquisition request, and writes the data slice stored in the at least one source storage node into the target cache area; When the first service processing unit determines that the number of data shards in the target buffer area meets the number of shards required for calculating the target data shards, the first service processing unit sends a data recovery instruction to the first network processing unit; In response to the data recovery instruction, the first network processing unit uses EC decoding to calculate the target data slice based on the data slices in the target buffer area.

2. The method according to claim 1, characterized in that Before the first network processing unit sends the data acquisition request to the at least one source storage node, the method further includes: The first business processing unit obtains a data recovery indication message, where the data recovery indication message is used to instruct the target storage node to recover the target data shard, and the data recovery indication message includes a storage address of a data shard used to calculate the target data shard in the at least one source storage node; The first service processing unit generates the data acquisition request and sends a data acquisition instruction to the first network processing unit, where the data acquisition instruction is used to instruct the first network processing unit to send the data acquisition request.

3. The method according to claim 2, characterized in that Before the first service processing unit generates the data acquisition request, the method further includes: The first business processing unit applies for a target cache area for the data slices in each source storage node.

4. The method according to claim 3, characterized in that Each source storage node also includes a second service processing unit, and the second network processing unit in at least one source storage node receives the data acquisition request and writes the data slice stored in the at least one source storage node into the target cache area, including: The second network processing unit forwards the data acquisition request to the second service processing unit; The second business processing unit parses the data acquisition request to obtain the address of the target buffer area; The second service processing unit sends a data processing instruction to the second network processing unit; The second network processing unit obtains the data slice based on the data processing instruction, and writes the data slice into the target cache area.

5. The method according to any one of claims 2 to 4, characterized in that: After the first service processing unit obtains the data recovery indication message, the method further includes: The first business processing unit creates a target recovery task in a task queue, where the target recovery task is used to indicate the recovery of the target data slice, and the task queue is used to record the data recovery task currently executed by the target storage node.

6. The method according to claim 5, characterized in that The method further comprises: The first business processing unit determines the task status of the target recovery task; If the task status is normal, the first service processing unit sends a data write instruction to the first network processing unit; The first network processing unit writes the target data slice to the disk according to the data writing instruction.

7. The method according to claim 6, characterized in that The first business processing unit determines the task status of the target recovery task, including: The first business processing unit queries the task queue to see whether the target recovery task exists. If so, it indicates that the task status is normal.

8. The method according to any one of claims 1 to 7, characterized in that: The first service processing unit is a service processing unit SPU, the first network processing unit and the second network processing unit are network processing units NPU, and the target storage node and the at least one source storage node perform data transmission based on remote direct data access RDMA technology.

9. A distributed storage system, characterized in that: The distributed storage system includes a target storage node and at least one source storage node, the target storage node includes a first service processing unit and a first network processing unit, the at least one source storage node is used to store data using erasure code EC encoding, each of the at least one source storage node includes a second network processing unit, and the system includes: The first network processing unit is used to send a data acquisition request to at least one source storage node, wherein the data acquisition request is used to acquire the data slices stored in the at least one source storage node, and the data acquisition request includes an address for the at least one source storage node to write the data slices into a target cache area in the target storage node; The second network processing unit in the at least one source storage node is configured to receive the data acquisition request and write the data slices stored in the at least one source storage node into the target cache area; The first service processing unit is configured to send a data recovery instruction to the first network processing unit when it is determined that the number of data shards in the target buffer area meets the number of shards required for calculating the target data shards; The first network processing unit is used to respond to the data recovery instruction and use EC decoding to calculate the target data slice based on the data slices in the target buffer area.

10. The distributed storage system according to claim 9, characterized in that: Before the first network processing unit sends the data acquisition request to the at least one source storage node, the first service processing unit is further configured to: Obtaining a data recovery instruction message, the data recovery instruction message is used to instruct the target storage node to recover the target data shard, the data recovery instruction message includes a storage address of a data shard used to calculate the target data shard in the at least one source storage node; Generate the data acquisition request, and send a data acquisition instruction to the first network processing unit, where the data acquisition instruction is used to instruct the first network processing unit to send the data acquisition request.

11. The distributed storage system according to claim 10, characterized in that: Before the first service processing unit generates the data acquisition request, the first service processing unit is further configured to: Apply for a target cache area for the data slices in each source storage node.

12. The distributed storage system according to any one of claims 9 to 11, characterized in that: Each source storage node also includes a second service processing unit, and the second network processing unit in at least one source storage node receives the data acquisition request and writes the data slice stored in the at least one source storage node into the target cache area, including: The second network processing unit is specifically configured to forward the data acquisition request to the second service processing unit; The second business processing unit is specifically used to parse the data acquisition request to obtain the address of the target buffer area; The second service processing unit is further used to send a data processing instruction to the second network processing unit; The second network processing unit is further used to obtain the data slice based on the data processing instruction and write the data slice into the target cache area.

13. The distributed storage system according to any one of claims 10 to 12, characterized in that: After the first service processing unit obtains the data recovery indication message, the first service processing unit is further configured to: A target recovery task is created in a task queue, where the target recovery task is used to indicate the recovery of the target data shard, and the task queue is used to record the data recovery task currently executed by the target storage node.

14. The distributed storage system according to claim 13, characterized in that: The first business processing unit is further used to determine the task status of the target recovery task; The first service processing unit is further configured to send a data write instruction to the first network processing unit when the task status is normal; The first network processing unit is further configured to write the target data slice into the disk according to the data writing instruction.

15. The distributed storage system according to claim 14, characterized in that: The first business processing unit determines the task status of the target recovery task, including: The first business processing unit is specifically used to query whether the target recovery task exists in the task queue. If so, it indicates that the task status is normal.

16. The distributed storage system according to any one of claims 9 to 15, characterized in that: The first service processing unit is a service processing unit SPU, the first network processing unit and the second network processing unit are network processing units NPU, and the target storage node and the at least one source storage node perform data transmission based on remote direct data access RDMA technology.

17. A computing device cluster, characterized in that: The computing device cluster includes at least one computing device, each computing device includes a processor and a memory; the memory in the at least one computing device is used to store computer program instructions; the processor in the at least one computing device calls the computer program instructions stored in the memory to execute any one of the methods described in claims 1-8.

18. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device, the computing device performs the method according to any one of claims 1 to 8.

19. A computer program product comprising instructions, characterized in that The method comprises computer program instructions, which, when executed by a computing device, cause the computing device to perform the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Data processing method and device, electronic equipment, storage medium and product

    CN120743621A

  • A data processing method and device, electronic equipment, storage medium and product

    CN120743621B