Data recovery method, device, equipment, medium and computer program product

By determining the location of the object storage device in a distributed storage system, data recovery is used to use direct memory access or network data transmission mode to solve the problem of excessive resource consumption during the data recovery process in the existing technology, and to achieve more efficient Data recovery.

CN118585381BActive Publication Date: 2025-01-28JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411067545.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2025-01-28
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

During the data recovery process of existing distributed storage systems, the consumption of CPU, memory and network bandwidth resources is too high, increasing service latency and reducing cluster performance.

Method used

By determining whether the storage device and target object storage device is located at the same node, if the direct memory access method is used to write the object data into the controller memory of the target disk; Data recovery.

Benefits of technology

The use of host memory and CPUs is reduced, and data transmission is avoided by network cards, reducing the use of network bandwidth, thereby improving the speed and efficiency of data recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585381B_ABST
    Figure CN118585381B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a data recovery method, apparatus, device, medium and computer program product, which are applied to a source object storage device, including: determining whether the source object storage device and the target object storage device are located at the same node; if so, when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data into the controller memory of the target disk through direct memory access; if not, determining a first node corresponding to the source object storage device and a second node corresponding to the target object storage device, and when receiving the controller memory address of the target disk sent by the target object storage device, reading the object data based on the controller memory address of the target disk, and writing the object data into the controller memory of the target disk through the network data transmission method of the network card.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed storage technology, and in particular to a data recovery method, device, equipment, medium and computer program product. Background Art

[0002] Distributed storage systems are a key component in modern data centers and cloud computing environments, providing high availability, scalability, and fault tolerance by distributing data across multiple independent storage servers. These systems typically consist of high-performance storage hardware, such as all-SSD media and NVMe solid-state drives, and sophisticated distributed storage software, which is responsible for data distribution, management, and recovery. In practical applications, distributed storage clusters may encounter a variety of challenges, including hardware failures, unbalanced capacity, and insufficient capacity, which can trigger the data reconstruction process, i.e., data redistribution and recovery.

[0003] In the related art, in the data recovery process, especially in the replica storage pool configuration, such as a 3-replica storage pool, data recovery is performed in units of PG (Placement Group). When the members of a PG change, the system will identify the list of objects that need to be restored and restore the object data from the authoritative member (such as OSD.0) to the new member (such as OSD.1). This process involves multiple steps such as reading metadata from the database, reading data from the hard disk, building a recovery message, transmitting data over the network, parsing the data at the receiving end and writing it to the hard disk. However, this object-based recovery method will result in a large amount of CPU, memory and network bandwidth resources being consumed, thereby competing with the front-end business for system resources, increasing business latency, and reducing the overall performance of the cluster. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a data recovery method, device, equipment, medium and computer program product. The specific technical solutions are as follows:

[0005] In a first aspect of the present invention, a data recovery method is provided, which is applied to a source object storage device. The method comprises:

[0006] Determine whether the source object storage device and the target object storage device are located on the same node;

[0007] If yes, when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first object to be restored into the controller memory of the target disk by direct memory access;

[0008] If not, determine the first node corresponding to the source object storage device and the second node corresponding to the target object storage device. When the controller memory address of the target disk sent by the target object storage device is received, read the object data based on the controller memory address of the target disk, and write the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission method of the network card.

[0009] Optionally, after the step of: if yes, when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data into the controller memory of the target disk by direct memory access, and before the step of: if no, determining the first node corresponding to the source object storage device and the second node corresponding to the target object storage device, the method further includes:

[0010] When it is detected that the object data of the first to-be-recovered object is in a written state, sending first prompt information to the target object storage device so that the target object storage device allocates first disk-falling information of the object data through a preset allocator;

[0011] A central processing unit instruction is sent to the target object storage device, so that the target object storage device writes the controller memory data of the target disk according to the first disk writing information and the controller memory address of the object data.

[0012] Optionally, after the step of, when receiving the controller memory address of the target disk sent by the target object storage device, reading the object data based on the controller memory address of the target disk, and writing the object data into the controller memory of the target disk through the network data transmission mode of the network card, the method includes:

[0013] When it is detected that the object data of the second to-be-recovered object is in a written state, sending second prompt information to the target object storage device so that the target object storage device allocates second disk-written information of the object data through a preset allocator;

[0014] A central processing unit instruction is sent to the target object storage device, so that the target object storage device writes the controller memory data of the target disk according to the second disk writing information and the controller memory address of the object data.

[0015] Optionally, when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first object to be restored into the controller memory of the target disk by direct memory access includes:

[0016] Sending a first pre-recovery request message to a target object storage device, wherein the first pre-recovery request message includes first metadata information of a first object to be recovered, and requesting the target object storage device to pre-allocate a first controller memory address of a target disk for the first object to be recovered, so that the target object storage device parses the first metadata information and applies for a corresponding first controller memory space for the first object to be recovered through a controller memory management module;

[0017] Receiving a first controller memory address corresponding to the first controller memory space sent by the target object storage device;

[0018] The first object to be restored is read according to the first controller memory address and the first metadata information, and the object data corresponding to the first object to be restored is written into the controller memory of the target disk by driving to perform a point-to-point direct memory access operation.

[0019] Optionally, when it is detected that the object data of the first to-be-recovered object is in a written state, sending first prompt information to the target object storage device so that the target object storage device allocates the first disk-written information of the object data through a preset allocator includes:

[0020] When it is detected that the object data is in a written state, a first prompt message is sent to the target object storage device, wherein the first prompt message includes the name of the restored object and the controller memory address where the data has been written, so that the target object storage device applies for the first disk placement information of the object data for the target disk through a preset allocator according to the first prompt message.

[0021] Optionally, the sending a central processing unit instruction to the target object storage device so that the target object storage device writes the controller memory data of the target disk according to the first disk writing information and the controller memory address of the object data comprises:

[0022] Send a central processing unit instruction to the target object storage device, so that the target object storage device calls the hard disk controller of the corresponding target disk to write the controller memory data of the target disk according to the first disk writing information and the controller memory address of the object data.

[0023] Optionally, after the step of sending a central processing unit instruction to the target object storage device so that the target object storage device calls a hard disk controller of a corresponding target disk to write the controller memory data of the target disk to a disk according to the first disk writing information and the controller memory address of the object data, the method includes:

[0024] When detecting that the controller memory data is in a disk-written state, the target object storage device releases the controller memory space.

[0025] Optionally, after the step of releasing the controller memory space by the target object storage device when detecting that the controller memory data is in a disk-written state, the method includes:

[0026] Receive a first recovery completion confirmation message sent by the target object storage device.

[0027] Optionally, after the step of receiving a first recovery completion confirmation message sent by the target object storage device, the method includes:

[0028] After detecting that the first recovery completion confirmation message sent by the target object storage device is received, continue processing the next first object to be recovered.

[0029] Optionally, the determining the first node corresponding to the source object storage device and the second node corresponding to the target object storage device includes:

[0030] Determine whether the target object storage device is located at the first node, and the source object storage device is located at the first node;

[0031] If not, obtain the second node corresponding to the target object storage device.

[0032] Optionally, when receiving the controller memory address of the target disk sent by the target object storage device, reading the object data based on the controller memory address of the target disk, and writing the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission mode of the network card includes:

[0033] Sending a second pre-recovery request message to the target object storage device, the second pre-recovery request message including second metadata information of the second object to be recovered, and requesting the target object storage device to pre-allocate a second controller memory address of the target disk for the second object to be recovered, so that the target object storage device parses the second metadata information and applies for a corresponding second controller memory space for the second object to be recovered through a controller memory management module;

[0034] Receiving a second controller memory address corresponding to the second controller memory space sent by the target object storage device;

[0035] The object data corresponding to the second object to be recovered is read according to the second controller memory address and the second metadata information, and a network data transmission operation is performed through a network data transmission network card driver to write the object data corresponding to the second object to be recovered into the controller memory pre-allocated on the target disk.

[0036] Optionally, when it is detected that the object data of the second object to be recovered is in a written state, sending second prompt information to the target object storage device so that the target object storage device allocates the second disk write information of the object data through a preset allocator includes:

[0037] After the data is written, the source object storage device sends a recovery completion message to the target object storage device, which includes the name of the recovered object and the controller memory address of the written data;

[0038] After receiving the recovery completion message, the target object storage device applies for the specific location and size of the object data for the target disk through a preset allocator.

[0039] Optionally, the sending a central processing unit instruction to the target object storage device so that the target object storage device writes the controller memory data of the target disk according to the second disk writing information and the controller memory address of the object data comprises:

[0040] Send a central processing unit instruction to the target object storage device so that the target object storage device calls the hard disk controller of the corresponding target disk to write the controller memory data of the target disk according to the second disk writing information and the controller memory address of the object data of the second object to be recovered.

[0041] Optionally, after the step of sending a central processing unit instruction to the target object storage device so that the target object storage device calls a hard disk controller of a corresponding target disk to write the controller memory data of the target disk to a disk according to the second disk-writing information and a controller memory address of the object data of the second object to be recovered, the method includes:

[0042] When detecting that the controller memory data is in a disk-written state, the target object storage device releases the controller memory space.

[0043] Optionally, after the step of releasing the controller memory space by the target object storage device when detecting that the controller memory data is in a disk-written state, the method includes:

[0044] Receive a second recovery completion confirmation message sent by the target object storage device.

[0045] Optionally, after the step of receiving a second recovery completion confirmation message sent by the target object storage device, the method includes:

[0046] After detecting that the second recovery completion confirmation message sent by the target object storage device is received, continue processing the next second object to be recovered.

[0047] In a second aspect of the present invention, a data recovery method is provided, which is applied to a target object storage device. The method includes:

[0048] When the source object storage device and the target object storage device are in the same node, sending the controller memory address of the target disk to the source object storage device, so that the source object storage device writes the object data of the first object to be recovered into the controller memory of the target disk through direct memory access according to the controller memory address of the target disk;

[0049] When the source object storage device is in the first node and the target object storage device is in the second node, the controller memory address of the target disk is sent to the source object storage device of the first node, so that the source object storage device reads the object data based on the controller memory address of the target disk, and writes the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission method of the network card.

[0050] In a third aspect of the implementation of the present invention, there is also provided a data recovery device, which is applied to a source object storage device, and the device comprises:

[0051] A determination module, used to determine whether the source object storage device and the target object storage device are located in the same node;

[0052] A first data recovery module, configured to, when receiving the controller memory address of the target disk sent by the target object storage device, write the object data of the first object to be recovered into the controller memory of the target disk by direct memory access;

[0053] The second data recovery module is used to determine the first node corresponding to the source object storage device and the second node corresponding to the target object storage device. When receiving the controller memory address of the target disk sent by the target object storage device, the object data is read based on the controller memory address of the target disk, and the object data of the second object to be recovered is written into the controller memory of the target disk through the network data transmission method of the network card.

[0054] In a fourth aspect of the present invention, there is also provided a data recovery device, which is applied to a target object storage device, and the device comprises:

[0055] A first data recovery module is used for sending the controller memory address of the target disk to the source object storage device when the source object storage device and the target object storage device are in the same node, so that the source object storage device writes the object data of the first object to be recovered into the controller memory of the target disk through direct memory access according to the controller memory address of the target disk;

[0056] The second data recovery module is used to send the controller memory address of the target disk to the source object storage device of the first node when the source object storage device is in the first node and the target object storage device is in the second node, so that the source object storage device reads the object data based on the controller memory address of the target disk, and writes the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission method of the network card.

[0057] In a fifth aspect of the implementation of the present invention, there is also provided a communication device, comprising: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor;

[0058] The processor is used to read the program in the memory to implement the data recovery method as described in any one of the first aspect or the second aspect.

[0059] In the sixth aspect of the implementation of the present invention, a computer-readable storage medium is also provided, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to implement the data recovery method as described in either the first aspect or the second aspect.

[0060] In a seventh aspect of the implementation of the present invention, a computer program product is also provided, including a computer program / instruction, which, when executed by a processor, implements the data recovery method as described in any one of the first aspect or the second aspect.

[0061] The data recovery method provided by the embodiment of the present invention is applied to a source object storage device, and the method includes: determining whether the source object storage device and the target object storage device are located in the same node; if so, when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first object to be recovered into the controller memory of the target disk through a direct memory access method; if not, determining the first node corresponding to the source object storage device and the second node corresponding to the target object storage device, and when receiving the controller memory address of the target disk sent by the target object storage device, reading the object data based on the controller memory address of the target disk, and writing the object data of the second object to be recovered into the controller memory of the target disk through a network data transmission method of a network card, that is, in the embodiment of the present invention, the object data recovery process utilizes the direct memory access characteristics of the hard disk, the network data transmission characteristics of the network card, and the controller memory characteristics of the NVMe disk, allowing the data within and between nodes to be directly written into the controller memory of the disk without passing through the CPU and the host memory, and the combined use of these three characteristics greatly shortens the data transmission path, thereby reducing the delay of the storage operation and improving the speed of data recovery. The present invention reduces the usage of host memory and CPU in the recovery process, and the restored data transmission of the same-node object no longer passes through the network card, thereby reducing the usage of network bandwidth and providing the possibility for the reduction of the configuration of the distributed storage server. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0063] Figure 1 A flowchart of a data recovery method provided by an embodiment of the present invention;

[0064] Figure 2 A flowchart of another data recovery method provided by an embodiment of the present invention;

[0065] Figure 3 A flowchart of another data recovery method provided by an embodiment of the present invention;

[0066] Figure 4 is a flowchart of another data recovery method provided by an embodiment of the present invention;

[0067] Figure 5 It is a structural schematic diagram of a data recovery device provided by an embodiment of the present invention;

[0068] Figure 6 is a structural schematic diagram of another data recovery device provided by an embodiment of the present invention;

[0069] Figure 7 is a schematic diagram of a communication device provided by an embodiment of the present invention;

[0070] Figure 8 is a schematic diagram of the structure of an exemplary OSD provided by an embodiment of the present invention;

[0071] Fig. 9 is a schematic diagram of an exemplary object data transmission in a PCIE topology provided by an embodiment of the present invention;

[0072] Fig.10 This is a schematic diagram of an exemplary process of restoring object data between the same nodes provided by an embodiment of the present invention;

[0073] Fig.11 The present invention provides an exemplary process diagram of object data recovery between different nodes. DETAILED DESCRIPTION

[0074] To make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.

[0075] It should be noted that in the embodiments of the present application, some English abbreviations are involved, so they are explained.

[0076] Osd (Object-based Storage Device) is a storage node responsible for storing and retrieving data. A node has multiple osd processes, each osd is a process that mounts a data hard disk and can read and write data to the disk.

[0077] Monitor (MON), the main task is to maintain the consistency of the cluster view. When maintaining consistency, the Paxos algorithm (protocol) is used and instantiated into the database for subsequent access. In the storage architecture, Monitor is one of the key management nodes. They are the core components of the cluster, monitoring the health status of all node osd services, monitoring metadata and configuration, and ensuring the consistency of various parts of the cluster.

[0078] A storage pool is a logical partition in a distributed storage system and is a collection of PGs. It is divided into two types: a replica pool and an erasure pool. A replica pool means that the object data between PG members is the same.

[0079] PG (Placement Group) is a carrier for placing objects. Multiple PGs are created in a storage pool.

[0080] Object, the smallest unit of data storage, is distributed in each PG. A PG stores a large number of objects.

[0081] PCIe (Peripheral Component Interconnect Express, a computer bus standard) is a high-speed serial bus used to connect various devices on a computer motherboard. PCIe has high bandwidth and low latency, so it is widely used to connect high-performance devices such as graphics cards, expansion cards, and storage devices. PCIe enables the connection and communication between a computer and external devices by inserting an adapter card or device into the PCIe slot on the motherboard.

[0082] RC In the PCIe bus, Root Complex (RC) refers to the top-level function in the PCIe bus topology, which can be the host CPU or the south bridge chip, etc. The Root Complex is responsible for address mapping and forwarding on the PCIe bus, so that the various devices on the PCIe bus can communicate with each other correctly. When a new device is added to the PCIe bus, the Root Complex will automatically allocate address space and map all devices to the centrally managed main address space, so that the operating system and applications can directly access the PCIe device. In the PCIe architecture, each Root Complex has some PCIe ports, which can be connected to other PCIe devices to realize data transmission on the PCIe bus.

[0083] PCIe Switch cards provide expansion or aggregation capabilities and allow more devices to be connected to a PCle port. They act as packet routers, identifying which path a given packet needs to take based on the address or other routing information. It is a PCIe to PCIe bridge.

[0084] CMB (Controller Memory Buffer) is the NVMe disk controller memory, which maps the internal storage space of the SSD, such as DDR, to the physical address space of the Host through the BAR space of PCIe. It is a small memory buffer integrated on the SSD controller, which is used to store data transmission between the host system and the SSD. This means that data transmission can be carried out inside the controller without passing through the host system memory, thereby reducing the latency of data transmission. By using NVMe CMB, the performance and efficiency of the SSD can be improved. It can reduce the latency of data transmission and free up the host system memory resources for other tasks.

[0085] Allocator, that is, the preset allocator, in the embodiment of the present application, the preset allocator allocates storage space for each object, manages the free space in the file system, and dynamically allocates and releases storage space according to demand. The preset allocator tracks the available space in each storage pool and calculates the disk information that can store the object, that is, the location and size of the disk, based on the required size and the configuration policy of the file system.

[0086] It should be noted that, based on the data recovery method provided in the embodiment of the present application, the present application provides an OSD structure for executing the data recovery method in the present application, wherein OSD is an object storage device, and the source object storage device and the target object storage device involved in the present application are both set up with the above-mentioned structural structure.

[0087] Specifically, refer to Figure 8 , Figure 8 The object recovery message management module in is used to generate and process messages related to the object recovery process. A total of four new messages are added: pre-recovery request message, pre-recovery request reply message, recovery completion message, and recovery completion confirmation message. The pre-recovery request message contains the metadata of the object to be recovered. The message requests the return of the memory address of the object pre-written to the target disk CMB. The pre-recovery request reply message contains the memory address pre-written to the target disk CMB for the object to be recovered. The recovery completion message contains the name of the recovered object and the memory address of the target disk CMB, which is used to tell the target osd that the object data has been written to the target disk CMB memory. The target osd will apply for the offset and size (object size) of the object data to the disk through the Allocator allocator, and then call the NVMe user-mode driver to store the data in the CMB memory. The recovery completion confirmation message is used to tell the source osd that the object recovery is complete and the next object can be recovered.

[0088] The controller memory management module, namely the CMB memory management module, is used by the target osd to apply for the CMB memory address of the target disk after receiving the pre-recovery request message, so that the source osd can write object data to the CMB of the target disk through P2P DMA or RDMA. The applied memory cannot be used before it is released. When the object recovery is completed, the memory will be released.

[0089] The preset allocator, namely the Allocator, is a hard disk space allocation component for distributed storage. It allocates disk space in a bitmap manner. After the target osd receives the recovery completion message, it allocates physical space on the target disk for the object to be recovered, so that the object data on the target disk CMB memory can be stored on the disk.

[0090] The network data transmission network management module, namely the RDMA network management, is used to send and receive object data and object recovery messages, and provides two message interaction modes. The first is the unilateral mode, which is used for the transmission of object data. It is necessary to specify the CMB memory address written by the target osd. After the peer RDMA network card receives the object data, it directly writes it to the specified CMB memory address. The second is the bilateral mode, which is used for the interaction of object recovery process messages and does not require the specification of the CMB memory address.

[0091] Further, refer to Fig. 9 , Fig. 9 This is a schematic diagram of object data transmission in PCIE topology. Fig. 9 The circle 2 in the figure is a transmission diagram of object data in the PCIe topology in the object recovery process between osds on the same node. When the source osd.1 receives the CMB memory address of the target disk SSD_A sent by the target osd.0, the object data is directly written into the CMB memory of the target disk SSD_A through the source disk SSD_B through P2P DMA, without passing through the host CPU and host memory. After the data is written, the target osd.0 is notified. osd.0 allocates the address and size of the object data to the disk through the Allocator, and uses the central processor instruction to let the hard disk controller of the target disk SSD_A write the CMB memory data of the target disk SSD_A to the specified location according to the address, size and CMB address of the written data.

[0092] Fig. 9The circle 1 in the figure is a transmission diagram of object data in the PCIe topology during the object recovery process between osds on different nodes. When the source osd.1 on node 1 receives the CMB memory address of the target disk SSD_A sent by the target osd.0, the source osd.1 reads the object data and directly writes it into the CMB memory of the target disk SSD_A through the RDMA method of the network card, without passing through the target osd.0 host CPU and host memory. After the data is written, the target osd.0 is notified. osd.0 allocates the address and size of the object data to the disk through the Allocator, and uses the central processing unit instruction to let the hard disk controller of the target disk SSD_A write the CMB memory data of the target disk SSD_A to the specified location according to the address, size and CMB address of the written data.

[0093] Reference Figure 1 , shows a flow chart of steps of a data recovery method provided by an embodiment of the present invention, which is applied to a source object storage device, and the method may include:

[0094] Step 101, determining whether the source object storage device and the target object storage device are located on the same node;

[0095] It should be noted that in the embodiment of the present application, it is first necessary to determine whether the source object storage device and the target object storage device are located in the same node, and then execute the corresponding data recovery method based on whether they are located in the same node.

[0096] Step 102: If yes, then when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first object to be restored into the controller memory of the target disk by direct memory access;

[0097] It should be noted that, in the embodiment of the present application, the source object storage device and the target object storage device are located on the same node, and therefore, the object data recovery method between OSDs on the same node is executed.

[0098] During the object data recovery process, if the source osd and the target osd are located in the same node, the CMB of the NVMe disk is used as the memory medium, and the P2P DMA feature of NVMe is used as the data transmission technology within the node, combined with the newly designed recovery process to complete the object recovery.

[0099] It should be noted that in the embodiment of the present application, the direct memory access method refers to P2P DMA. P2P DMA (Peer-to-Peer Direct Memory Access) is a direct memory access (DMA) method. P2P DMA allows two NVMe devices to directly transmit data without the participation of the CPU. In the embodiment of the present application, by using P2P DMA, NVMe devices can directly read and write each other's CMB memory, thereby improving data transmission speed and reducing latency.

[0100] Step 103, if not, determine the first node corresponding to the source object storage device and the second node corresponding to the target object storage device, and when the controller memory address of the target disk sent by the target object storage device is received, read the object data based on the controller memory address of the target disk, and write the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission method of the network card.

[0101] If the source osd and the target osd are not in the same node, the CMB of the NVMe disk is used as the memory medium, and the RDMA feature of the network card is used as the data transmission technology between nodes, combined with the newly designed recovery process to complete the object recovery.

[0102] It should be noted that in the embodiment of the present application, the network data transmission method is RDMA (Remote Direct Memory Access), which is a high-performance, low-latency network data transmission technology that can directly transfer data from the memory of one computer to the memory of another computer without passing through the CPU, thereby reducing the time and complexity of CPU participation in transmission and improving the efficiency and throughput of data transmission. By combining NVME disk CMB memory technology, data can be written directly to the disk from a remote node.

[0103] By using RDMA and DMA technologies and the CMB characteristics of NVMe disks to complete object recovery, the system resources occupied by distributed storage object data recovery can be effectively reduced, and the speed of data recovery can be improved.

[0104] The data recovery method provided by the embodiment of the present invention is applied to a source object storage device, and the method includes: determining whether the source object storage device and the target object storage device are located in the same node; if so, when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first object to be recovered into the controller memory of the target disk through a direct memory access method; if not, determining the first node corresponding to the source object storage device and the second node corresponding to the target object storage device, and when receiving the controller memory address of the target disk sent by the target object storage device, reading the object data based on the controller memory address of the target disk, and writing the object data of the second object to be recovered into the controller memory of the target disk through a network data transmission method of a network card, that is, in the embodiment of the present invention, the object data recovery process utilizes the direct memory access characteristics of the hard disk, the network data transmission characteristics of the network card, and the controller memory characteristics of the NVMe disk, allowing the data within and between nodes to be directly written into the controller memory of the disk without passing through the CPU and the host memory, and the combined use of these three characteristics greatly shortens the data transmission path, thereby reducing the delay of the storage operation and improving the speed of data recovery. The present invention reduces the usage of host memory and CPU in the recovery process, and the restored data transmission of the same-node object no longer passes through the network card, thereby reducing the usage of network bandwidth and providing the possibility for the reduction of the configuration of the distributed storage server.

[0105] P2P is used to transfer data between OSDs in the node during object recovery. DMA mode, through which the object data can be quickly transmitted, reducing the network bandwidth and CPU usage; RDMA mode, which is used for partial transmission of object recovery data between nodes and OSDs, through which the object data between nodes can be quickly transmitted, so that the object recovery message does not contain the object data, reducing the use of the host CPU; after the data is transmitted through the above two transmission modes, the data is directly written to the CMB memory of the corresponding NVMe after arriving at the target OSD. Through this mode, the use of system memory can be greatly reduced, the number of object data copies is reduced, and the object recovery speed is increased; when the data is dropped from the CMB memory, the OSD process needs to allocate disk space using the bitmap method through the Allocator, and this method can efficiently allocate hard disk space for the object; CMB memory management provides a CMB memory application and release interface, which applies for CMB memory according to the object size, and releases CMB memory after the CMB data is dropped to the disk. Before the CMB memory is released, the applied memory cannot be applied again; when the source OSD performs data recovery, the nodes where the source OSD and the target OSD are located are calculated according to the meta information of the OSD, and whether they are the same node is marked in the recovery message, and the source OSD is used to decide whether to use DMA or RDMA for data transmission.

[0106] Reference Figure 2 , shows a flowchart of another data recovery method provided by an embodiment of the present invention, which is applied to a source object storage device. The method may include:

[0107] Step 201, determining whether the source object storage device and the target object storage device are located on the same node;

[0108] Step 202: If yes, then when receiving the controller memory address of the target disk sent by the target object storage device, write the object data of the first object to be restored into the controller memory of the target disk by direct memory access;

[0109] Further, in step 202, when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first object to be recovered into the controller memory of the target disk by direct memory access includes:

[0110] Sending a first pre-recovery request message to a target object storage device, wherein the first pre-recovery request message includes first metadata information of a first object to be recovered, and requesting the target object storage device to pre-allocate a first controller memory address of a target disk for the first object to be recovered, so that the target object storage device parses the first metadata information and applies for a corresponding first controller memory space for the first object to be recovered through a controller memory management module;

[0111] Receiving a first controller memory address corresponding to the first controller memory space sent by the target object storage device;

[0112] The first object to be restored is read according to the first controller memory address and the first metadata information, and the object data corresponding to the first object to be restored is written into the controller memory of the target disk by driving to perform a point-to-point direct memory access operation.

[0113] It should be noted that in the embodiment of the present application, in order to facilitate the understanding of the technical solution of the present application, the source osd.1 is the source object storage device, the target osd.0 is the target object storage device, SSD_B is the disk of the source osd.1, that is, the source disk, SSD_A is the disk of the target osd.0, that is, the target disk, and the first object to be recovered and the second object to be recovered described below can be the same or different objects to be recovered. The first and second are just the distinction for explaining data recovery for osds on different nodes, wherein the controller memory refers to the CMB memory, and the controller memory address is the CMB memory address.

[0114] Therefore, refer to Fig.10After the source osd.1 queries and determines that osd.0 and osd.1 are located on the same node, the source osd.1 sends a first pre-recovery request message to the target osd.0. The first pre-recovery request message includes the first metadata information of the object. At this time, the source osd.1 will request the target osd.0 to pre-allocate the CMB memory address of the target disk SSD_A to the object. The point-to-point direct memory access operation is P2P DMA.

[0115] When the target osd.0 receives the pre-recovery request message, it will parse the first metadata information based on the first metadata information in the first pre-recovery request message and write it into the database, and use the CMB memory management module in the OSD structure mentioned above to apply for CMB memory space of the object size, so that the source disk SSD_B can use DMA to write the object data into the CMB memory for object data recovery.

[0116] The target osd.0 sends the requested pre-allocated CMB memory address to the source osd.1 via a pre-recovery request reply message.

[0117] Source osd.1 parses the pre-allocated CMB memory address of the pre-recovery request reply message, reads the object data according to the object metadata information, calls the NVMe disk driver to perform the P2P DMA operation of SSD_B to SSD_A, and directly writes the object data into the pre-allocated CMB memory of SSD_A.

[0118] Step 203: When it is detected that the object data of the first object to be restored is in a written state, first prompt information is sent to the target object storage device, so that the target object storage device allocates first disk write information of the object data through a preset allocator;

[0119] Further, in step 203, when it is detected that the object data of the first to-be-recovered object is in a written state, sending first prompt information to the target object storage device so that the target object storage device allocates the first disk-written information of the object data through a preset allocator includes:

[0120] When it is detected that the object data of the first object to be recovered is in a written state, a first prompt message is sent to the target object storage device, wherein the first prompt message includes the first recovery object name and the controller memory address of the object data, so that the target object storage device applies for the first disk placement information of the object data for the target disk through a preset allocator according to the first prompt message.

[0121] It should be noted that in the embodiment of the present application, after waiting for the data to be written, the source osd.1 sends a first prompt message to the target osd.0, wherein the first prompt message is a recovery completion message, which includes the restored object name information and the pre-allocated CMB memory address of the object data that has been written.

[0122] After receiving the recovery completion message, the target osd.0 applies to the target SSD_A for the first disk placement information corresponding to the object data through the Allocator, where the first disk placement information is the location and size of the data placement.

[0123] Step 204: Send a central processing unit instruction to the target object storage device, so that the target object storage device writes the controller memory data of the target disk according to the first disk writing information and the controller memory address of the object data.

[0124] Further, in step 204, sending a central processing unit instruction to the target object storage device so that the target object storage device writes the controller memory data of the target disk according to the first disk writing information and the controller memory address of the object data includes:

[0125] Send a central processing unit instruction to the target object storage device, so that the target object storage device calls the hard disk controller of the corresponding target disk to write the controller memory data of the target disk according to the first disk writing information and the controller memory address of the object data.

[0126] It should be noted that, in the embodiment of the present application, the target osd.0 writes the object data of the pre-allocated CMB memory to the location where the application data is dropped on the disk by calling the SSD_A driver interface.

[0127] Further, after step 204, that is, after the step of sending a central processing unit instruction to the target object storage device so that the target object storage device calls the hard disk controller of the corresponding target disk to write the controller memory data of the target disk according to the first disk writing information and the controller memory address of the object data, the method includes:

[0128] When detecting that the controller memory data is in a disk-written state, the target object storage device releases the controller memory space;

[0129] Receiving a first recovery completion confirmation message sent by the target object storage device;

[0130] After detecting that the first recovery completion confirmation message sent by the target object storage device is received, continue processing the next first object to be recovered.

[0131] It should be noted that, in the embodiment of the present application, the target osd.0 uses the CMB memory management module to release the CMB memory;

[0132] The target osd.0 sends a recovery completion confirmation message to the source osd.1;

[0133] After receiving the recovery completion confirmation message, the source osd.1 proceeds to recover the next object.

[0134] The recovery completion confirmation message and the recovery completion message in these steps are both pre-set configurations in the module in the OSD structure in this application.

[0135] In the embodiment of the present invention, the object data recovery process utilizes the direct memory access characteristics of the hard disk, the network data transmission characteristics of the network card, and the controller memory characteristics of the NVMe disk, allowing the data within and between nodes to be directly written into the controller memory of the disk without passing through the CPU and host memory. The combined use of these three characteristics greatly shortens the data transmission path, thereby reducing the delay of storage operations and improving the speed of data recovery. The present invention reduces the use of host memory and CPU in the recovery process, and the data transmission of the recovery of the same node object no longer passes through the network card, reducing the use of network bandwidth, and providing the possibility for the reduction of distributed storage servers.

[0136] Reference Figure 3 , shows a flowchart of another data recovery method provided by an embodiment of the present invention, which is applied to a source object storage device. The method may include:

[0137] Step 301, determining whether the source object storage device and the target object storage device are located on the same node;

[0138] Step 302: If yes, then when receiving the controller memory address of the target disk sent by the target object storage device, write the object data of the first object to be restored into the controller memory of the target disk by direct memory access;

[0139] It should be noted that, in the embodiment of the present application, the above steps 301-302 refer to the previous discussion and will not be repeated here.

[0140] Step 303: if not, determine the first node corresponding to the source object storage device and the second node corresponding to the target object storage device, and when receiving the controller memory address of the target disk sent by the target object storage device, read the object data based on the controller memory address of the target disk, and write the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission method of the network card;

[0141] Further, in step 303, determining the first node corresponding to the source object storage device and the second node corresponding to the target object storage device includes:

[0142] Determine whether the target object storage device is located at the first node, and the source object storage device is located at the first node;

[0143] If not, obtain the second node corresponding to the target object storage device.

[0144] Further, when receiving the controller memory address of the target disk sent by the target object storage device, reading the object data based on the controller memory address of the target disk, and writing the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission method of the network card includes:

[0145] Sending a second pre-recovery request message to the target object storage device, the second pre-recovery request message including second metadata information of the second object to be recovered, and requesting the target object storage device to pre-allocate a second controller memory address of the target disk for the second object to be recovered, so that the target object storage device parses the second metadata information and applies for a corresponding second controller memory space for the second object to be recovered through a controller memory management module;

[0146] Receiving a second controller memory address corresponding to the second controller memory space sent by the target object storage device;

[0147] The object data corresponding to the second object to be recovered is read according to the second controller memory address and the second metadata information, and a network data transmission operation is performed through a network data transmission network card driver to write the object data corresponding to the second object to be recovered into the controller memory pre-allocated on the target disk.

[0148] It should be noted that in the embodiments of the present application, reference is made to Fig.11 , the source osd.1 query determines that osd.0 and osd.1 are located on different nodes;

[0149] The source osd.1 sends a second pre-recovery request message to the target osd.0, where the second pre-recovery request message includes second metadata information of the second object to be recovered, and requests the target osd.0 to pre-allocate the CMB memory address of the target disk SSD_A to the object;

[0150] The target osd.0 receives the second pre-recovery request message, parses the second metadata information and writes it into the database, and uses the CMB memory management module to apply for CMB memory space of the object size, so that the source disk SSD_B uses DMA to write the object data into the CMB memory for object data recovery;

[0151] The target osd.0 sends the requested pre-allocated CMB memory address to the source osd.1 via a pre-recovery request reply message;

[0152] Source osd.1 parses the pre-allocated CMB memory address of the pre-recovery request reply message, reads the object data according to the object metadata information, calls the RDMA network card driver, and directly writes the object data into the pre-allocated CMB memory of SSD_A using RDMA.

[0153] Step 304: When it is detected that the object data of the second object to be restored is in a written state, second prompt information is sent to the target object storage device, so that the target object storage device allocates second disk-written information of the object data through a preset allocator;

[0154] Further, step 304 may include: when it is detected that the object data of the second object to be recovered is in a written state, sending a second prompt message to the target object storage device, the second prompt message including the second recovery object name and the controller memory address of the object data, so that the target object storage device applies for the second disk placement information of the object data for the target disk through a preset allocator according to the second prompt message.

[0155] It should be noted that, in the embodiment of the present application, after waiting for the data to be written, the source osd.1 sends a recovery completion message to the target osd.0, the message including the name information of the recovered object and the pre-allocated CMB memory address of the object data that has been written;

[0156] After receiving the recovery completion message, the target osd.0 applies to the target SSD_A for the location and size of the object data through the Allocator.

[0157] Step 305: Send a central processing unit instruction to the target object storage device, so that the target object storage device writes the controller memory data of the target disk according to the second disk writing information and the controller memory address of the object data.

[0158] Further, step 305, that is, sending a central processing unit instruction to the target object storage device so that the target object storage device writes the controller memory data of the target disk according to the second disk-writing information and the controller memory address of the object data, includes:

[0159] Send a central processing unit instruction to the target object storage device so that the target object storage device calls the hard disk controller of the corresponding target disk to write the controller memory data of the target disk according to the second disk writing information and the controller memory address of the object data of the second object to be recovered.

[0160] It should be noted that, in the embodiment of the present application, the target osd.0 writes the object data of the pre-allocated CMB memory to the location where the application data is dropped on the disk by calling the SSD_A driver interface.

[0161] Further, after step 305, the method may include:

[0162] When detecting that the controller memory data is in a disk-written state, the target object storage device releases the controller memory space;

[0163] Receiving a second recovery completion confirmation message sent by the target object storage device;

[0164] After detecting that the second recovery completion confirmation message sent by the target object storage device is received, continue processing the next second object to be recovered.

[0165] It should be noted that in the embodiment of the present application, the target osd.0 uses the CMB memory management module to release the CMB memory; the target osd.0 sends a recovery completion confirmation message to the source osd.1; after receiving the recovery completion confirmation message, the source osd.1 performs the next object recovery.

[0166] In the embodiment of the present invention, the object data recovery process utilizes the direct memory access characteristics of the hard disk, the network data transmission characteristics of the network card, and the controller memory characteristics of the NVMe disk, allowing the data within and between nodes to be directly written into the controller memory of the disk without passing through the CPU and host memory. The combined use of these three characteristics greatly shortens the data transmission path, thereby reducing the delay of storage operations and improving the speed of data recovery. The present invention reduces the use of host memory and CPU in the recovery process, and the data transmission of the recovery of the same node object no longer passes through the network card, reducing the use of network bandwidth, and providing the possibility for the reduction of distributed storage servers.

[0167] Reference Figure 4 , also provides a data recovery method, applied to a target object storage device, the method comprising:

[0168] Step 401, when the source object storage device and the target object storage device are in the same node, sending the controller memory address of the target disk to the source object storage device, so that the source object storage device writes the object data of the first object to be recovered into the controller memory of the target disk through direct memory access according to the controller memory address of the target disk;

[0169] Step 402, when the source object storage device is in the first node and the target object storage device is in the second node, the controller memory address of the target disk is sent to the source object storage device of the first node, so that the source object storage device reads the object data based on the controller memory address of the target disk, and writes the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission method of the network card.

[0170] It should be noted that in the embodiments of the present application, the target object storage device is applied. For details, please refer to the previous discussion and will not be repeated here.

[0171] In the embodiment of the present invention, the object data recovery process utilizes the direct memory access characteristics of the hard disk, the network data transmission characteristics of the network card, and the controller memory characteristics of the NVMe disk, allowing the data within and between nodes to be directly written into the controller memory of the disk without passing through the CPU and host memory. The combined use of these three characteristics greatly shortens the data transmission path, thereby reducing the delay of storage operations and improving the speed of data recovery. The present invention reduces the use of host memory and CPU in the recovery process, and the data transmission of the recovery of the same node object no longer passes through the network card, reducing the use of network bandwidth, and providing the possibility for the reduction of distributed storage servers.

[0172] Reference Figure 5 , shows a schematic diagram of the structure of a data recovery device provided by an embodiment of the present invention, which is applied to a source object storage device, and the device includes:

[0173] A determination module 501 is used to determine whether the source object storage device and the target object storage device are located in the same node;

[0174] A first data recovery module 502 is configured to write the object data of the first object to be recovered into the controller memory of the target disk by direct memory access when receiving the controller memory address of the target disk sent by the target object storage device;

[0175] The second data recovery module 503 is used to determine the first node corresponding to the source object storage device and the second node corresponding to the target object storage device. When receiving the controller memory address of the target disk sent by the target object storage device, the object data is read based on the controller memory address of the target disk, and the object data of the second object to be recovered is written into the controller memory of the target disk through the network data transmission method of the network card.

[0176] In the embodiment of the present invention, the object data recovery process utilizes the direct memory access characteristics of the hard disk, the network data transmission characteristics of the network card, and the controller memory characteristics of the NVMe disk, allowing the data within and between nodes to be directly written into the controller memory of the disk without passing through the CPU and host memory. The combined use of these three characteristics greatly shortens the data transmission path, thereby reducing the delay of storage operations and improving the speed of data recovery. The present invention reduces the use of host memory and CPU in the recovery process, and the data transmission of the recovery of the same node object no longer passes through the network card, reducing the use of network bandwidth, and providing the possibility for the reduction of distributed storage servers.

[0177] Reference Figure 6 , shows a schematic diagram of the structure of a data recovery device provided by an embodiment of the present invention, which is applied to a target object storage device, and the device includes:

[0178] The first data recovery module 601 is used for sending the controller memory address of the target disk to the source object storage device when the source object storage device and the target object storage device are in the same node, so that the source object storage device writes the object data of the first object to be recovered into the controller memory of the target disk through direct memory access according to the controller memory address of the target disk;

[0179] The second data recovery module 602 is used to send the controller memory address of the target disk to the source object storage device of the first node when the source object storage device is in the first node and the target object storage device is in the second node, so that the source object storage device reads the object data based on the controller memory address of the target disk, and writes the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission method of the network card.

[0180] In the embodiment of the present invention, the object data recovery process utilizes the direct memory access characteristics of the hard disk, the network data transmission characteristics of the network card, and the controller memory characteristics of the NVMe disk, allowing the data within and between nodes to be directly written into the controller memory of the disk without passing through the CPU and host memory. The combined use of these three characteristics greatly shortens the data transmission path, thereby reducing the delay of storage operations and improving the speed of data recovery. The present invention reduces the use of host memory and CPU in the recovery process, and the data transmission of the recovery of the same node object no longer passes through the network card, reducing the use of network bandwidth, and providing the possibility for the reduction of distributed storage servers.

[0181] The embodiment of the present invention also provides a communication device, such as Figure 7As shown, it includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0182] Memory 703, used for storing computer programs;

[0183] The processor 701, when used to execute the program stored in the memory 703, can implement the following steps:

[0184] Determine whether the source object storage device and the target object storage device are located on the same node;

[0185] If yes, when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first object to be restored into the controller memory of the target disk by direct memory access;

[0186] If not, determine the first node corresponding to the source object storage device and the second node corresponding to the target object storage device. When the controller memory address of the target disk sent by the target object storage device is received, read the object data based on the controller memory address of the target disk, and write the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission method of the network card.

[0187] or,

[0188] When the source object storage device and the target object storage device are in the same node, sending the controller memory address of the target disk to the source object storage device, so that the source object storage device writes the object data of the first object to be recovered into the controller memory of the target disk through direct memory access according to the controller memory address of the target disk;

[0189] When the source object storage device is in the first node and the target object storage device is in the second node, the controller memory address of the target disk is sent to the source object storage device of the first node, so that the source object storage device reads the object data based on the controller memory address of the target disk, and writes the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission method of the network card.

[0190] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits together, which are all well known in the art, so this article will not further describe them. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor can be transmitted on a wired medium or on a wireless medium through an antenna. Further, the antenna also receives data and transmits the data to the processor. The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory can be used to store data used by the processor when performing operations.

[0191] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0192] The communication interface is used for communication between the above terminal and other devices.

[0193] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0194] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0195] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the data recovery method described in any one of the above embodiments.

[0196] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the data recovery method described in any one of the above embodiments.

[0197] 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 instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions 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 instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) 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 or data center that includes one or more available media integrated. The available medium may 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 drive Solid State Disk (SSD)), etc.

[0198] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0199] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0200] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A data recovery method, characterized in that: Applied to a source object storage device, the method comprises: Determine whether the source object storage device and the target object storage device are located on the same node; If yes, when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first object to be restored into the controller memory of the target disk by direct memory access; If not, determine the first node corresponding to the source object storage device and the second node corresponding to the target object storage device, and when receiving the controller memory address of the target disk sent by the target object storage device, read the object data based on the controller memory address of the target disk, and write the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission method of the network card; The direct memory access method includes P2P DMA; when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first object to be recovered into the controller memory of the target disk through the direct memory access method includes: Sending a first pre-recovery request message to a target object storage device, wherein the first pre-recovery request message includes first metadata information of a first object to be recovered, and requesting the target object storage device to pre-allocate a first controller memory address of a target disk for the first object to be recovered, so that the target object storage device parses the first metadata information and applies for a corresponding first controller memory space for the first object to be recovered through a controller memory management module; Receiving a first controller memory address corresponding to the first controller memory space sent by the target object storage device; Reading the first object to be restored according to the first controller memory address and the first metadata information, and writing object data corresponding to the first object to be restored into the controller memory of the target disk by driving a point-to-point direct memory access operation; The network data transmission mode is remote direct memory access, and when receiving the controller memory address of the target disk sent by the target object storage device, reading the object data based on the controller memory address of the target disk, and writing the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission mode of the network card includes: Sending a second pre-recovery request message to the target object storage device, the second pre-recovery request message including second metadata information of the second object to be recovered, and requesting the target object storage device to pre-allocate a second controller memory address of the target disk for the second object to be recovered, so that the target object storage device parses the second metadata information and applies for a corresponding second controller memory space for the second object to be recovered through a controller memory management module; Receiving a second controller memory address corresponding to the second controller memory space sent by the target object storage device; The object data corresponding to the second object to be recovered is read according to the second controller memory address and the second metadata information, and a network data transmission operation is performed through a network data transmission network card driver to write the object data corresponding to the second object to be recovered into the controller memory pre-allocated on the target disk.

2. The data recovery method according to claim 1, characterized in that: After the step of, if yes, then when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data into the controller memory of the target disk by direct memory access, and before the step of, if no, then determining the first node corresponding to the source object storage device and the second node corresponding to the target object storage device, the method further includes: When it is detected that the object data of the first to-be-recovered object is in a written state, sending first prompt information to the target object storage device so that the target object storage device allocates first disk-falling information of the object data through a preset allocator; A central processing unit instruction is sent to the target object storage device, so that the target object storage device writes the controller memory data of the target disk according to the first disk writing information and the controller memory address of the object data.

3. The data recovery method according to claim 1, characterized in that: After the step of, when receiving the controller memory address of the target disk sent by the target object storage device, reading the object data based on the controller memory address of the target disk, and writing the object data into the controller memory of the target disk through the network data transmission mode of the network card, the method includes: When it is detected that the object data of the second to-be-recovered object is in a written state, sending second prompt information to the target object storage device so that the target object storage device allocates second disk-written information of the object data through a preset allocator; A central processing unit instruction is sent to the target object storage device, so that the target object storage device writes the controller memory data of the target disk according to the second disk writing information and the controller memory address of the object data.

4. The data recovery method according to claim 2, characterized in that: When it is detected that the object data of the first to-be-recovered object is in a written state, sending first prompt information to the target object storage device so that the target object storage device allocates the first disk-written information of the object data through a preset allocator includes: When it is detected that the object data of the first object to be recovered is in a written state, a first prompt message is sent to the target object storage device, wherein the first prompt message includes the first recovery object name and the controller memory address of the object data, so that the target object storage device applies for the first disk placement information of the object data for the target disk through a preset allocator according to the first prompt message.

5. The data recovery method according to claim 4, characterized in that: The sending of a central processing unit instruction to the target object storage device so that the target object storage device writes the controller memory data of the target disk according to the first disk writing information and the controller memory address of the object data comprises: Send a central processing unit instruction to the target object storage device, so that the target object storage device calls the hard disk controller of the corresponding target disk to write the controller memory data of the target disk according to the first disk writing information and the controller memory address of the object data.

6. The data recovery method according to claim 5, characterized in that: After the step of sending a central processing unit instruction to the target object storage device so that the target object storage device calls the hard disk controller of the corresponding target disk to write the controller memory data of the target disk according to the first disk writing information and the controller memory address of the object data, the method includes: When detecting that the controller memory data is in a disk-written state, the target object storage device releases the controller memory space.

7. The data recovery method according to claim 6, characterized in that: After the step of releasing the controller memory space by the target object storage device when detecting that the controller memory data is in a disk-written state, the method includes: Receive a first recovery completion confirmation message sent by the target object storage device.

8. The data recovery method according to claim 7, characterized in that: After the step of receiving a first recovery completion confirmation message sent by the target object storage device, the method includes: After detecting that the first recovery completion confirmation message sent by the target object storage device is received, continue processing the next first object to be recovered.

9. The data recovery method according to claim 1, characterized in that: The determining of the first node corresponding to the source object storage device and the second node corresponding to the target object storage device comprises: Determine whether the target object storage device is located at the first node, and the source object storage device is located at the first node; If not, obtain the second node corresponding to the target object storage device.

10. The data recovery method according to claim 3, characterized in that: The second information of sending second prompt information to the target object storage device so that the target object storage device allocates the second disk write information of the object data through a preset allocator when detecting that the object data of the second object to be restored is in a written state includes: When it is detected that the object data of the second object to be recovered is in a written state, a second prompt message is sent to the target object storage device, wherein the second prompt message includes the second recovery object name and the controller memory address of the object data, so that the target object storage device applies for the second disk placement information of the object data for the target disk through a preset allocator according to the second prompt message.

11. The data recovery method according to claim 10, characterized in that: The sending of a central processing unit instruction to the target object storage device so that the target object storage device writes the controller memory data of the target disk according to the second disk-writing information and the controller memory address of the object data comprises: Send a central processing unit instruction to the target object storage device so that the target object storage device calls the hard disk controller of the corresponding target disk to write the controller memory data of the target disk according to the second disk writing information and the controller memory address of the object data of the second object to be recovered.

12. The data recovery method according to claim 11, characterized in that: After the step of sending a central processing unit instruction to the target object storage device so that the target object storage device calls the hard disk controller of the corresponding target disk to write the controller memory data of the target disk according to the second disk-writing information and the controller memory address of the object data of the second object to be recovered, the method includes: When detecting that the controller memory data is in a disk-written state, the target object storage device releases the controller memory space.

13. The data recovery method according to claim 12, characterized in that: After the step of releasing the controller memory space by the target object storage device when detecting that the controller memory data is in a disk-written state, the method includes: Receive a second recovery completion confirmation message sent by the target object storage device.

14. The data recovery method according to claim 13, characterized in that: After the step of receiving the second recovery completion confirmation message sent by the target object storage device, the method includes: After detecting that the second recovery completion confirmation message sent by the target object storage device is received, continue processing the next second object to be recovered.

15. A data recovery device, characterized in that: Applied to a source object storage device, the apparatus comprises: A determination module, used to determine whether the source object storage device and the target object storage device are located in the same node; A first data recovery module is configured to, when receiving the controller memory address of the target disk sent by the target object storage device, write the object data of the first object to be recovered into the controller memory of the target disk by direct memory access; A second data recovery module is used to determine a first node corresponding to the source object storage device and a second node corresponding to the target object storage device, and when receiving a controller memory address of a target disk sent by the target object storage device, read the object data based on the controller memory address of the target disk, and write the object data of the second object to be recovered into the controller memory of the target disk through a network data transmission method of a network card; The direct memory access method includes P2P DMA; when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first object to be recovered into the controller memory of the target disk through the direct memory access method includes: Sending a first pre-recovery request message to a target object storage device, wherein the first pre-recovery request message includes first metadata information of a first object to be recovered, and requesting the target object storage device to pre-allocate a first controller memory address of a target disk for the first object to be recovered, so that the target object storage device parses the first metadata information and applies for a corresponding first controller memory space for the first object to be recovered through a controller memory management module; Receiving a first controller memory address corresponding to the first controller memory space sent by the target object storage device; Reading the first object to be restored according to the first controller memory address and the first metadata information, and writing object data corresponding to the first object to be restored into the controller memory of the target disk by driving a point-to-point direct memory access operation; The network data transmission mode is remote direct memory access, and when receiving the controller memory address of the target disk sent by the target object storage device, reading the object data based on the controller memory address of the target disk, and writing the object data of the second object to be recovered into the controller memory of the target disk through the network data transmission mode of the network card includes: Sending a second pre-recovery request message to the target object storage device, the second pre-recovery request message including second metadata information of the second object to be recovered, and requesting the target object storage device to pre-allocate a second controller memory address of the target disk for the second object to be recovered, so that the target object storage device parses the second metadata information and applies for a corresponding second controller memory space for the second object to be recovered through a controller memory management module; Receiving a second controller memory address corresponding to the second controller memory space sent by the target object storage device; The object data corresponding to the second object to be recovered is read according to the second controller memory address and the second metadata information, and a network data transmission operation is performed through a network data transmission network card driver to write the object data corresponding to the second object to be recovered into the controller memory pre-allocated on the target disk.

16. A communication device, characterized in that: include: A transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; The processor is used to read the program in the memory to implement the data recovery method as described in any one of claims 1-14.

17. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the data recovery method as described in any one of claims 1 to 14 is implemented.

18. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the data recovery method as described in any one of claims 1-14 is implemented.

Citation Information

Patent Citations

  • RDMA (Remote Direct Memory Access)-based copy reading method and device, equipment and medium

    CN116431070A

  • Data transmission method and related device

    CN116569154A