Data recovery method and apparatus, device, non-volatile computer-readable storage medium, and computer program product

WO2026031990A1PCT designated stage Publication Date: 2026-02-12JINAN INSPUR DATA TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/109135
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-06
Filing Date
2025-07-17
Publication Date
2026-02-12

Smart Images

  • Figure CN2025109135_12022026_PF_FP_ABST
    Figure CN2025109135_12022026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data recovery method and apparatus, a device, a non-volatile computer-readable storage medium, and a computer program product. The method is applied to a source object storage device and comprises: determining whether the source object storage device and a target object storage device are located at a same node; when it is determined that the source object storage device and the target object storage device are located at the same node, upon receiving a controller memory address of a target disk sent by the target object storage device, writing object data into a controller memory of the target disk in a direct memory access mode; and when it is determined that the source object storage device and the target object storage device are not located at the same node, determining a first node corresponding to the source object storage device and a second node corresponding to the target object storage device, and upon receiving the controller memory address of the target disk sent by the target object storage device, reading the object data on the basis of the controller memory address of the target disk, and writing the object data into the controller memory of the target disk through a network data transmission mode of a network interface card.
Need to check novelty before this filing date? Find Prior Art

Description

Data recovery method, device, equipment, computer nonvolatile readable storage medium and computer program product

[0001] Cross-reference of related applications

[0002] The present application claims priority to the Chinese patent application No. 202411067545.4 filed on August 6, 2024, and entitled "Data recovery method, device, equipment, medium and computer program product", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0003] The present application relates to the technical field of distributed storage, in particular to a data recovery method, device, equipment, computer nonvolatile readable storage medium and computer program product. BACKGROUND

[0004] Distributed storage systems are key components in modern data centers and cloud computing environments, which provide high availability, scalability and fault tolerance by distributing data across multiple independent storage servers. These systems are usually composed of high-performance storage hardware, such as all-SSD (Solid State Disk) media and NVMe (Non-Volatile Memory Express) solid state disks, and complex distributed storage software, which is responsible for data distribution, management and recovery. In practical applications, distributed storage clusters may encounter various challenges, including hardware failures, capacity imbalances and capacity shortages, which will trigger data reconstruction processes, i.e., data redistribution and recovery.

[0005] In related technologies, during the data recovery process, especially under the configuration of a replica storage pool, 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 identifies the list of objects that need to be recovered and performs object data recovery from the authoritative member (e.g., Object Storage Device OSD.0) to the new member (e.g., OSD.1). This process involves multiple steps, such as reading metadata from the database, reading data from the hard disk, constructing a recovery message, transmitting data over the network, receiving and parsing data, and writing to the hard disk. However, this object-based recovery method consumes a large amount of CPU (Central Processing Unit), memory and network bandwidth resources, which competes with front-end business for system resources, increases business latency, and reduces the overall performance of the cluster. SUMMARY

[0006] The embodiment of the present application aims to provide a data recovery method, device, equipment, computer nonvolatile readable storage medium and computer program product, and optional technical solutions are as follows.

[0007] In the first aspect of the embodiment of the present application, a data recovery method is first provided, applied to a source object storage device, and the method comprises the following steps.

[0008] Judging whether the source object storage device and the target object storage device are located in the same node;

[0009] In the case where it is judged that the source object storage device and the target object storage device are located in the same node, when the controller memory address of the target disk sent by the target object storage device is received, the object data of the first object to be recovered is written into the controller memory of the target disk through a direct memory access mode;

[0010] In the case where it is judged that the source object storage device and the target object storage device are not located in the same node, the first node corresponding to the source object storage device and the second node corresponding to the target object storage device are determined, when the controller memory address of the target disk sent by the target object storage device is received, 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 a network data transmission mode of a network card.

[0011] In some embodiments, the direct memory access mode comprises a point-to-point direct memory access (P2P DMA).

[0012] In some embodiments, the network data transmission mode is a remote direct memory access.

[0013] In some embodiments, in the case where it is judged that the source object storage device and the target object storage device are located in the same node, after the step of writing the object data into the controller memory of the target disk through the direct memory access mode when the controller memory address of the target disk sent by the target object storage device is received, before the step of determining the first node corresponding to the source object storage device and the second node corresponding to the target object storage device in the case where it is judged that the source object storage device and the target object storage device are not located in the same node, the method further comprises the following steps.

[0014] In the case where it is detected that the object data of the first object to be recovered 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 landing information of the object data through a preset allocator;

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

[0016] In some embodiments, after the step of 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 when the controller memory address of the target disk sent by the target object storage device is received, the method comprises:

[0017] In the case of detecting 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 to enable the target object storage device to allocate second landing information of the object data through a preset allocator;

[0018] Sending a central processing unit instruction to the target object storage device to enable the target object storage device to land the controller memory data of the target disk according to the second landing information and the controller memory address of the object data.

[0019] In some embodiments, when the controller memory address of the target disk sent by the target object storage device is received, writing the object data of the first object to be recovered into the controller memory of the target disk through a direct memory access mode comprises:

[0020] Sending a first pre-recovery request message to the target object storage device, the first pre-recovery request message comprising first metadata information of the first object to be recovered, and requesting the target object storage device to pre-allocate a first controller memory address of the target disk for the first object to be recovered, to enable the target object storage device to parse the first metadata information and apply a corresponding first controller memory space for the first object to be recovered through a controller memory management module;

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

[0022] Reading the first object to be recovered according to the first controller memory address and the first metadata information, and writing the object data corresponding to the first object to be recovered into the controller memory of the target disk through a point-to-point direct memory access operation of a driver execution point.

[0023] In some embodiments, in the case of detecting that the object data of the first object to be recovered is in a written state, sending first prompt information to the target object storage device to enable the target object storage device to allocate first landing information of the object data through a preset allocator comprises:

[0024] In the case of detecting that the object data is in a written state, sending first prompt information to the target object storage device, the first prompt information comprising the name of the object to be recovered and the controller memory address of the written data, to enable the target object storage device to apply first landing information of the object data for the target disk through a preset allocator according to the first prompt information.

[0025] In some embodiments, the method further comprises:

[0026] sending the central processor instruction to the target object storage device to make the target object storage device call the hard disk controller of the corresponding target disk to flush the controller memory data of the target disk according to the first flush information and the controller memory address of the object data.

[0027] In some embodiments, after the step of sending the central processor instruction to the target object storage device to make the target object storage device call the hard disk controller of the corresponding target disk to flush the controller memory data of the target disk according to the first flush information and the controller memory address of the object data, the method further comprises:

[0028] releasing the controller memory space by the target object storage device in the case that the controller memory data is in the flushed state.

[0029] In some embodiments, after the step of releasing the controller memory space by the target object storage device in the case that the controller memory data is in the flushed state, the method further comprises:

[0030] receiving the first recovery completion confirmation message sent by the target object storage device.

[0031] In some embodiments, after the step of receiving the first recovery completion confirmation message sent by the target object storage device, the method further comprises:

[0032] continuing to process the next first object to be recovered after detecting that the first recovery completion confirmation message sent by the target object storage device is received.

[0033] In some embodiments, the method further comprises:

[0034] determining whether the target object storage device is in the first node and the source object storage device is in the first node.

[0035] acquiring the second node corresponding to the target object storage device in the case that the target object storage device is not in the first node.

[0036] In some embodiments, when the controller memory address of the target disk sent by the target object storage device is received, 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 comprises:

[0037] 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 to-be-recovered object and requesting the target object storage device to pre-allocate a second controller memory address of the target disk for the second to-be-recovered object, so that the target object storage device parses the second metadata information and applies a second controller memory space corresponding to the second to-be-recovered object through a controller memory management module;

[0038] receiving the second controller memory address corresponding to the second controller memory space sent by the target object storage device;

[0039] reading object data corresponding to the second to-be-recovered object according to the second controller memory address and the second metadata information, and performing a network data transmission operation through a network data transmission card driver to write the object data corresponding to the second to-be-recovered object into the controller memory pre-allocated by the target disk.

[0040] In some embodiments, in a case where it is detected that the object data of the second to-be-recovered object 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 landing disk information of the object data through a preset allocator, which includes:

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

[0042] After the target object storage device receives the recovery completion message, the target object storage device applies a specific position and size of the object data landing disk through a preset allocator.

[0043] In some embodiments, a central processing unit instruction is sent to the target object storage device, so that the target object storage device lands the controller memory data of the target disk according to the second landing disk information and the controller memory address of the object data, which includes:

[0044] A central processing unit instruction is sent to the target object storage device, so that the target object storage device calls a hard disk controller corresponding to the target disk to land the controller memory data of the target disk according to the second landing disk information and the controller memory address of the object data of the second to-be-recovered object.

[0045] In some embodiments, 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 corresponding to the target disk to land the controller memory data of the target disk according to the second landing disk information and the controller memory address of the object data of the second to-be-recovered object, the method includes:

[0046] In the case that the controller memory data is detected in the state of falling disk, the target object storage device releases the controller memory space.

[0047] In some embodiments, after the step of releasing the controller memory space of the target object storage device in the case that the controller memory data is detected in the state of falling disk, the method comprises:

[0048] Receiving the second recovery completion confirmation message sent by the target object storage device.

[0049] In some embodiments, after the step of receiving the second recovery completion confirmation message sent by the target object storage device, the method comprises:

[0050] After detecting the second recovery completion confirmation message sent by the target object storage device, the next second to-be-recovered object is processed.

[0051] In the second aspect of the present application, a data recovery method is also provided, which is applied to a target object storage device, and the method comprises:

[0052] When the source object storage device and the target object storage device are located in the same node, the controller memory address of the target disk is sent to the source object storage device, so that the source object storage device writes the object data of the first to-be-recovered object into the controller memory of the target disk through a direct memory access mode according to the controller memory address of the target disk.

[0053] When the source object storage device is located in a first node and the target object storage device is located in a second node, the controller memory address of the target disk is sent to the source object storage device in 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 to-be-recovered object into the controller memory of the target disk through a network data transmission mode of a network card.

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

[0055] The judging module is configured to judge whether the source object storage device and the target object storage device are located in the same node.

[0056] The first data recovery module is configured to, in the case that the source object storage device and the target object storage device are located in the same node, write the object data of the first to-be-recovered object into the controller memory of the target disk through a direct memory access mode when the controller memory address of the target disk sent by the target object storage device is received.

[0057] The second data recovery module is configured to determine a first node corresponding to the source object storage device and a second node corresponding to the target object storage device, read object data based on the controller memory address of the target disk when receiving the controller memory address of the target disk sent by the target object storage device, 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 mode of a network card.

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

[0059] The first data recovery module is configured to send 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 a direct memory access mode according to the controller memory address of the target disk.

[0060] The second data recovery module is configured to send the controller memory address of the target disk to the source object storage device in 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 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 a network data transmission mode of a network card.

[0061] In the fifth aspect of the present application, a communication device is also provided, which comprises a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor.

[0062] The processor is configured to read the program in the memory to implement the data recovery method of any one of the first aspect or the second aspect.

[0063] In the sixth aspect of the present application, a computer non-volatile readable storage medium is also provided, which stores instructions, and when the instructions are executed on a computer, the computer implements the data recovery method of any one of the first aspect or the second aspect.

[0064] In the seventh aspect of the present application, a computer program product is also provided, which comprises computer programs / instructions, and when the computer programs / instructions are executed by a processor, the data recovery method of any one of the first aspect or the second aspect is implemented.

[0065] The data recovery method provided in the embodiments of the present application is applied to a source object storage device, and the method comprises the following steps: determining whether the source object storage device and a target object storage device are located on the same node; in the case that it is determined that the source object storage device and the target object storage device are located on the same node, when a controller memory address of a target disk sent by the target object storage device is received, writing object data of a first object to be recovered into the controller memory of the target disk through a direct memory access mode; in the case that it is determined that the source object storage device and the target object storage device are not located on the same node, determining a first node corresponding to the source object storage device and a 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, reading the object data based on the controller memory address of the target disk, and writing object data of a second object to be recovered into the controller memory of the target disk through a network data transmission mode of a network card, that is, in the embodiments of the present application, the object data recovery process utilizes the direct memory access characteristics of a hard disk, the network data transmission characteristics of a network card, and the controller memory characteristics of an NVMe disk, allows the data in the node and between the nodes to be directly written into the controller memory of the disk without passing through the CPU and the host memory, and the combination of the three characteristics greatly shortens the data transmission path, thereby reducing the delay of the storage operation and improving the speed of data recovery. In the recovery process, the use of the host memory and the CPU is reduced, the data transmission of the recovery of the same node object no longer passes through the network card, the use of the network bandwidth is reduced, and the possibility of the downgrading of the distributed storage server is provided. BRIEF DESCRIPTION OF DRAWINGS

[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the embodiments or the related art description will be briefly introduced.

[0067] FIG. 1 is a step flowchart of a data recovery method provided in an embodiment of the present application;

[0068] FIG. 2 is a step flowchart of another data recovery method provided in an embodiment of the present application;

[0069] FIG. 3 is a step flowchart of another data recovery method provided in an embodiment of the present application;

[0070] FIG. 4 is a step flowchart of another data recovery method provided in an embodiment of the present application;

[0071] FIG. 5 is a structural schematic diagram of a data recovery device provided in an embodiment of the present application;

[0072] FIG. 6 is a structural schematic diagram of another data recovery device provided in an embodiment of the present application;

[0073] FIG. 7 is a schematic diagram of a communication device provided in an embodiment of the present application;

[0074] Fig. 8 is a structural schematic diagram of an exemplary OSD provided by an embodiment of the present application;

[0075] Fig. 9 is a schematic diagram of transmission of exemplary object data in a PCIe topology provided by an embodiment of the present application;

[0076] Fig. 10 is a schematic diagram of a process of recovery of object data between the same nodes provided by an embodiment of the present application;

[0077] Fig. 11 is a schematic diagram of a process of recovery of object data between different nodes provided by an embodiment of the present application. DETAILED DESCRIPTION

[0078] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below with reference to the drawings. However, those skilled in the art can understand that, in the embodiments of the present application, many technical details are presented in order to make the readers better understand the present application. However, the technical solutions claimed by the present application can be implemented even without these technical details and based on various changes and modifications of the following embodiments. 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 application, and the embodiments can be combined and referenced with each other without contradiction.

[0079] It should be noted that, in the embodiments of the present application, some English abbreviations are involved, and thus are described.

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

[0081] A Monitor (MON) is mainly responsible for maintaining the consistency of the cluster view, and uses the Paxos algorithm (protocol) in maintaining the consistency, and instantiates it into a 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 the cluster parts.

[0082] A storage pool is a logical partition in a distributed storage system, and is a collection of PGs. There are two types of storage pools, replica pool and erasure pool. Replica pool means that the object data among the members of PG is the same.

[0083] PG (Placement Group) is a carrier set as a placement object, and a storage pool creates multiple PGs.

[0084] Object, object, the smallest unit of data storage, distributed in various PGs, a PG holds a large number of objects.

[0085] PCIe (Peripheral Component Interconnect Express, computer bus standard) is a high-speed serial bus used to connect various devices on the motherboard. PCIe has high bandwidth and low latency, so it is widely used in graphics cards, expansion cards, storage devices and other high-performance devices. PCIe connects and communicates with external devices by inserting adapter cards or devices into PCIe slots on the motherboard.

[0086] RC (Root Complex) in the PCIe bus refers to the top-level function in the PCIe bus topology, which can be a host CPU or a south bridge chip, etc. Root Complex is responsible for address mapping and forwarding on the PCIe bus, so that each device on the PCIe bus can correctly communicate with each other. When a new device is added to the PCIe bus, Root Complex will automatically allocate address space and map all devices to a centrally managed main address space, so that the operating system and application program 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.

[0087] PCIe Swich (high-speed serial computer expansion bus standard switch) card provides expansion or aggregation capability and allows more devices to be connected to a PCle port, which acts as a packet router to identify which path a given packet needs to take based on address or other routing information. It is a kind of PCIe to PCIe bridge.

[0088] CMB (Controller Memory Buffer) is the NVMe disk controller memory, which is to map the internal storage space of SSD such as DDR (Double Data Rate Synchronous Dynamic Random-Access Memory) to the physical address space of the host through the BAR (Base Address Register) space mode of PCIe. It is a small memory buffer integrated on the solid state disk controller, used to store the data transmission between the host system and the solid state disk. This means that data transmission can be carried out within the controller, without going through the host system memory, thereby reducing the delay of data transmission. By using NVMe CMB, the performance and efficiency of the solid state disk can be improved. It can reduce the delay time of data transmission and release the host system memory resources for other tasks.

[0089] Allocator, i.e. the preset allocator, allocates storage space for each object in the embodiments of the present application, manages the free space in the file system, and dynamically allocates and releases storage space according to the demand. The preset allocator tracks the available space in each storage pool, and calculates the landing information of the object, i.e. the landing position and size, according to the size of the demand and the configuration strategy of the file system.

[0090] It should be noted that on the basis of the data recovery method provided in the embodiments of the present application, the present application provides a structure of OSD, which is used to execute the data recovery method in the present application, wherein the OSD, i.e. the object storage device, the source object storage device and the target object storage device involved in the present application are all provided with the above structure.

[0091] In some embodiments, referring to FIG. 8, the object recovery message management module in FIG. 8 is configured to generate and process messages related to the object recovery process, and 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, and this message requests the memory address of the object in the pre-write target disk CMB. The pre-recovery request reply message contains the memory address of the object to be recovered in the pre-write target disk CMB. The recovery completion message contains the object name 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 CMB memory of the target disk. The target osd will apply for the offset and size (object size) of the object data landing through the Allocator allocator, and then call the NVMe user mode driver to perform the landing operation of the CMB memory data. The recovery completion confirmation message is used to tell the source osd that the object recovery is complete, and the next object recovery can be performed.

[0092] The controller memory management module, i.e., the CMB memory management module, is configured to apply for the CMB memory address of the target disk for the source osd to write object data to the CMB of the target disk through P2P DMA (Peer-to-Peer Direct Memory Access) or RDMA (Remote Direct Memory Access) mode after the target osd receives the pre-recovery request message. The allocated memory cannot be used again before it is released. When the object recovery is complete, the memory is released.

[0093] The pre-set allocator, i.e., the Allocator allocator, is a component for allocating hard disk space for distributed storage, which uses bitmap (bitmap) method to allocate disk space, and is configured to allocate physical space for the object to be recovered on the target disk after the target osd receives the recovery completion message, for the object data on the CMB memory of the target disk to land.

[0094] The network data transmission network management module, i.e., the RDMA network management, is used to send and receive object data and object recovery messages, and provides two message interaction methods. The first method is a unilateral mode, which is used for object data transmission and needs to specify the CMB memory address written by the target osd. The opposite RDMA card receives the object data and directly writes it to the specified CMB memory address. The second method is a bilateral mode, which is used for object recovery process message interaction and does not need to specify the CMB memory address.

[0095] In some embodiments, referring to FIG. 9, which is a schematic diagram of object data transmission in a PCIe topology, the transmission of object data in the PCIe topology in the object recovery process between the same node osd is shown in circle 2 in FIG. 9. 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 by the source disk SSD_B through the P2P DMA mode without passing through the host CPU and the host memory. After the data is written, the target osd.0 is notified, and the target osd.0 allocates the address and size of the object data landing by the allocator, and instructs the target disk SSD_A hard disk controller to land the CMB memory data of the target disk SSD_A to the specified position according to the landing address, size and CMB address of the written data.

[0096] The transmission of object data in the PCIe topology in the object recovery process between different nodes osd is shown in circle 1 in FIG. 9. 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 object data is directly written into the CMB memory of the target disk SSD_A by the source osd.1 after reading the object data through the RDMA mode of the network card without passing through the target osd.0 host CPU and the host memory. After the data is written, the target osd.0 is notified, and the target osd.0 allocates the address and size of the object data landing by the allocator, and instructs the target disk SSD_A hard disk controller to land the CMB memory data of the target disk SSD_A to the specified position according to the landing address, size and CMB address of the written data.

[0097] Referring to FIG. 1, a step flowchart of a data recovery method provided by an embodiment of the present application is shown, which is applied to a source object storage device. The method can include:

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

[0099] 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 to execute the corresponding data recovery method according to whether they are located in the same node.

[0100] Step 102, in the case where it is determined that the source object storage device and the target object storage device are located in the same node, when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first to-be-recovered object into the controller memory of the target disk through the direct memory access mode;

[0101] It should be noted that in the embodiments of the present application, the source object storage device and the target object storage device are located in the same node, and therefore the same node osd object data recovery method is executed.

[0102] In 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, the P2P DMA feature of the NVMe is used as the data transmission technology within the node, and the newly designed recovery process is used to complete the object recovery.

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

[0104] Step 103, in the case where the source object storage device and the target object storage device are not located in the same node, determining a first node corresponding to the source object storage device and a 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, reading the object data based on the controller memory address of the target disk, and writing the object data of the second to-be-recovered object into the controller memory of the target disk through the network data transmission mode of the network card.

[0105] 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, the RDMA feature of the network card is used as the data transmission technology between nodes, and the newly designed recovery process is used to complete the object recovery.

[0106] It should be noted that in the embodiments of the present application, the network data transmission mode is RDMA, which is a high-performance, low-latency network data transmission technology. RDMA can directly transmit data from the memory of one computer to the memory of another computer without the participation of a CPU, thereby reducing the time and complexity of CPU participation in transmission and improving the efficiency and throughput of data transmission. By combining the CMB memory technology of the NVME disk, data can be directly written to the disk from a remote node.

[0107] By using the RDMA and DMA technologies and the CMB feature of the NVMe disk, the object recovery can be completed, which can effectively reduce the system resources occupied by the distributed storage object data recovery and improve the speed of data recovery.

[0108] The data recovery method provided in this application embodiment is applied to a source object storage device. The method includes: determining whether the source object storage device and the target object storage device are located on the same node; if the source object storage device and the target object storage device are located on the same node, when the controller memory address of the target disk sent by the target object storage device is received, the object data of the first object to be recovered is written into the controller memory of the target disk through direct memory access; if the source object storage device and the target object storage device are not located on the same node, the first node corresponding to the source object storage device and the second node corresponding to the target object storage device are determined; when the controller memory address of the target disk sent by the target object storage device is received, 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. That is, in this application embodiment, 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 data within and between nodes to be directly written into the controller memory of the disk without going through the CPU and host memory. The combined use of these three characteristics greatly shortens the data transmission path, thereby reducing the latency of storage operations and improving the speed of data recovery. This application reduces the use of host memory and CPU in the recovery process. Data transmission for the recovery of objects on the same node no longer passes through the network card, reducing network bandwidth usage and making it possible to reduce the configuration of distributed storage service servers.

[0109] The data part transmission in the object recovery between the in-node osds uses the P2P DMA mode, through which the object data transmission can be quickly completed, and the network bandwidth and CPU usage are reduced; the data part transmission in the object recovery between the inter-node osds uses the RDMA mode, through which the inter-node object data transmission can be quickly completed, so that the object data is not contained in the object recovery message, and the host CPU usage is reduced; after the data transmission through the above two transmission modes, the data is directly written into the CMB memory of the corresponding NVMe after reaching the target OSD, through which the system memory usage can be greatly reduced, the object data copy times are reduced, and the object recovery speed is increased; when the data falls into the disk from the CMB memory, the osd process needs to allocate the disk space by using the bitmap mode through the Allocator allocator, through which the hard disk space can be efficiently allocated for the object; the CMB memory management provides a CMB memory application and release interface, the CMB memory is applied according to the object size, the CMB data is released after falling into the disk, and the memory cannot be applied again before the CMB memory is released; when the source osd performs data recovery, the node where the source osd and the target osd are located is calculated according to the meta information of the osd, whether it is the same node is marked in the recovery message, and whether the DMA or the RDMA is used for data transmission is determined by the source osd.

[0110] Referring to FIG. 2, a step flowchart of another data recovery method provided by the embodiment of the application is shown, which is applied to a source object storage device, and the method can include:

[0111] Step 201, judging whether the source object storage device and the target object storage device are located in the same node;

[0112] Step 202, in the case that the source object storage device and the target object storage device are located in the same node, when receiving the controller memory address of the target disk sent by the target object storage device, writing the object data of the first to-be-recovered object into the controller memory of the target disk through a direct memory access mode;

[0113] In some embodiments, 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 to-be-recovered object into the controller memory of the target disk through a direct memory access mode includes:

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

[0115] receiving the first controller memory address corresponding to the first controller memory space sent by the target object storage device;

[0116] reading the first object to be recovered according to the first controller memory address and the first metadata information, and writing object data corresponding to the first object to be recovered into the controller memory of the target disk through the point-to-point direct memory access operation performed by the driver.

[0117] It should be noted that, in the embodiments of the present application, in order to facilitate understanding of the technical solutions of the present application, the source osd.1 is the source object storage device, the target osd.0 is the target object storage device, the SSD_B is the disk of the source osd.1, i.e., the source disk, the SSD_A is the disk of the target osd.0, i.e., the target disk, and the first object to be recovered and the second object to be recovered in the following description can be the same or different objects to be recovered. The first and second are only distinguished for data recovery of osds on different nodes. The controller memory refers to the CMB memory, and the controller memory address refers to the CMB memory address.

[0118] Therefore, referring to FIG. 10, after the source osd.1 determines that the osd.0 and the 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 requests the target osd.0 to allocate the CMB memory address of the target disk SSD_A for the object. The point-to-point direct memory access operation is P2P DMA.

[0119] When the target osd.0 receives the pre-recovery request message, it parses the first metadata information in the first pre-recovery request message and writes it into the database, and uses the CMB memory management module in the OSD structure mentioned in the foregoing to apply for the CMB memory space of the object size, so that the source disk SSD_B can use the DMA mode to write the object data into the CMB memory for object data recovery.

[0120] The target osd.0 sends the pre-allocated CMB memory address applied for to the source osd.1 through a pre-recovery request reply message.

[0121] The 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.

[0122] In step 203, in a case where it is detected that the object data of the first to-be-restored object 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 landing information of the object data through a preset allocator.

[0123] In some embodiments, in step 203, in a case where it is detected that the object data of the first to-be-restored object 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 landing information of the object data through a preset allocator.

[0124] In a case where it is detected that the object data of the first to-be-restored object is in a written state, first prompt information is sent to the target object storage device, the first prompt information including a first recovery object name and a controller memory address of the object data, so that the target object storage device applies for first landing information of the object data for a target disk through a preset allocator according to the first prompt information.

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

[0126] After receiving the recovery completion message, the target osd.0 applies for first landing information of the object data for the target SSD_A through the Allocator allocator, wherein the first landing information is a position and a size of the data landing.

[0127] In step 204, a central processor instruction is sent to the target object storage device, so that the target object storage device lands controller memory data of the target disk according to the first landing information and the controller memory address of the object data.

[0128] In some embodiments, in step 204, a central processor instruction is sent to the target object storage device, so that the target object storage device lands controller memory data of the target disk according to the first landing information and the controller memory address of the object data.

[0129] A central processor instruction is sent to the target object storage device, so that the target object storage device calls a hard disk controller of a corresponding target disk to land controller memory data of the target disk according to the first landing information and the controller memory address of the object data.

[0130] It should be noted that in the embodiments of the present application, the target osd.0 writes the object data of the pre-allocated CMB memory to the position of the applied data landing by calling the SSD_A drive interface.

[0131] In some embodiments, after step 204, that is, after sending the central processor instruction to the target object storage device to make the target object storage device call the hard disk controller of the corresponding target disk to write the controller memory data of the target disk according to the first writing information and the controller memory address of the object data, the method comprises:

[0132] In the case of detecting that the controller memory data is in the writing state, the target object storage device releases the controller memory space;

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

[0134] After detecting the first recovery completion confirmation message sent by the target object storage device, continue to process the next first object to be recovered.

[0135] It should be noted that in the embodiments of the present application, the target osd.0 releases the CMB memory using the CMB memory management module;

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

[0137] After receiving the recovery completion confirmation message, the source osd.1 performs the next object recovery.

[0138] The recovery completion confirmation message and the recovery completion message in these steps are all pre-configured configurations in the modules in the OSD structure in the present application.

[0139] In the embodiments of the present application, the object data recovery process utilizes the direct memory access feature of the hard disk, the network data transmission feature of the network card, and the controller memory feature of the NVMe disk, allowing the data to be directly written to the controller memory of the disk without passing through the CPU and the host memory within the node and between the nodes. The combination of these three features greatly shortens the data transmission path, thereby reducing the delay of the storage operation and improving the speed of data recovery. The present application reduces the use of host memory and CPU in the recovery process, and the data transmission for 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 downgrading of the distributed storage server.

[0140] Referring to FIG. 3, a step flowchart of another data recovery method provided by the embodiments of the present application is shown, which is applied to a source object storage device. The method can comprise:

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

[0142] At step 302, when the controller memory address of the target disk sent by the target object storage device is received, the object data of the first object to be recovered is written into the controller memory of the target disk by a direct memory access mode in a case where it is judged that the source object storage device and the target object storage device are located at the same node.

[0143] It should be noted that the above steps 301-302 are discussed in the preamble of the present application, and will not be repeated here.

[0144] At step 303, in a case where it is judged that the source object storage device and the target object storage device are not located at the same node, the first node corresponding to the source object storage device and the second node corresponding to the target object storage device are determined, and when the controller memory address of the target disk sent by the target object storage device is received, 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 by a network data transmission mode of a network card.

[0145] In some embodiments, 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 comprises:

[0146] Determining whether the target object storage device is located at the first node, and the source object storage device is located at the first node.

[0147] In a case where it is determined that the target object storage device is not located at the first node, the second node corresponding to the target object storage device is acquired.

[0148] In some embodiments, when the controller memory address of the target disk sent by the target object storage device is received, 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 by a network data transmission mode of a network card.

[0149] The second pre-recovery request message is sent to the target object storage device, the second pre-recovery request message comprises second metadata information of the second object to be recovered, and the target object storage device is requested 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 a second controller memory space corresponding to the second object to be recovered through a controller memory management module;

[0150] The second controller memory address corresponding to the second controller memory space sent by the target object storage device is received.

[0151] According to the second controller memory address and the second metadata information, the object data corresponding to the second to-be-recovered object is read, 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 to-be-recovered object into the controller memory pre-allocated in the target disk.

[0152] It should be noted that, in the embodiment of the present application, referring to FIG. 11, the source osd.1 queries to determine that the osd.0 and the osd.1 are located in different nodes;

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

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

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

[0156] The 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 the SSD_A by using the RDMA mode.

[0157] In step 304, in a case where it is detected that the object data of the second to-be-recovered object 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 landing information of the object data through a pre-set allocator;

[0158] In some embodiments, step 304 can include: in a case where it is detected that the object data of the second to-be-recovered object is in a written state, second prompt information is sent to the target object storage device, the second prompt information including a second recovery object name and a controller memory address of the object data, so that the target object storage device applies second landing information of the object data for the target disk according to the second prompt information through a pre-set allocator.

[0159] 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 object name information of the recovery and the pre-allocated CMB memory address of the written object data;

[0160] The target osd.0 receives the recovery completion message, and applies to the target SSD_A for the position and size of object data landing through the Allocator allocator.

[0161] In step 305, the central processing unit instruction is sent to the target object storage device, so that the target object storage device lands the controller memory data of the target disk according to the second landing information and the controller memory address of the object data.

[0162] In some embodiments, step 305, that is, sending the central processing unit instruction to the target object storage device so that the target object storage device lands the controller memory data of the target disk according to the second landing information and the controller memory address of the object data, includes:

[0163] The central processing unit instruction is sent to the target object storage device, so that the target object storage device calls the hard disk controller of the corresponding target disk to land the controller memory data of the target disk according to the second landing information and the controller memory address of the object data of the second to-be-recovered object.

[0164] 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 into the position of applying data landing by calling the SSD_A driving interface.

[0165] In some embodiments, after step 305, the method can include:

[0166] In the case of detecting that the controller memory data is in the landing state, the target object storage device releases the controller memory space;

[0167] The second recovery completion confirmation message sent by the target object storage device is received;

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

[0169] It should be noted that in the embodiment of the present application, the target osd.0 releases the CMB memory by using the CMB memory management module; the target osd.0 sends the recovery completion confirmation message to the source osd.1; and the source osd.1 receives the recovery completion confirmation message and then performs the next object recovery.

[0170] In the embodiment of the present application, the object data recovery process utilizes the direct memory access feature of the hard disk, the network data transmission feature of the network card, and the controller memory feature of the NVMe disk, allowing data within the node and between nodes to be directly written to the controller memory of the disk without passing through the CPU and the host memory. The combination of these three features greatly shortens the data transmission path, thereby reducing the delay of the storage operation and improving the speed of data recovery. The present application reduces the use of host memory and CPU in the recovery process, and the data transmission for 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 downgrading work of the distributed storage server.

[0171] Referring to FIG. 4, a data recovery method is also provided, applied to a target object storage device, the method comprising:

[0172] Step 401, when the source object storage device and the target object storage device are in the same node, the controller memory address of the target disk is sent 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 according to the controller memory address of the target disk through the direct memory access mode;

[0173] Step 402, when the source object storage device is in a first node and the target object storage device is in a 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 mode of the network card.

[0174] It should be noted that in the embodiment of the present application, applied to a target object storage device, in some embodiments, referring to the foregoing discussion, which will not be repeated here.

[0175] In the embodiment of the present application, the object data recovery process utilizes the direct memory access feature of the hard disk, the network data transmission feature of the network card, and the controller memory feature of the NVMe disk, allowing data within the node and between nodes to be directly written to the controller memory of the disk without passing through the CPU and the host memory. The combination of these three features greatly shortens the data transmission path, thereby reducing the delay of the storage operation and improving the speed of data recovery. The present application reduces the use of host memory and CPU in the recovery process, and the data transmission for 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 downgrading work of the distributed storage server.

[0176] Referring to FIG. 5, a structure schematic diagram of a data recovery device provided by the embodiment of the present application is shown, applied to a source object storage device, the device comprising:

[0177] The judging module 501 is configured to judge whether the source object storage device and the target object storage device are located in the same node.

[0178] The first data recovery module 502 is configured to, when the source object storage device and the target object storage device are located in the same node, write object data of a first to-be-recovered object into controller memory of a target disk by a direct memory access mode according to the controller memory address of the target disk sent by the target object storage device.

[0179] The second data recovery module 503 is configured to determine a first node corresponding to the source object storage device and a second node corresponding to the target object storage device, read object data based on the controller memory address of the target disk when the controller memory address of the target disk sent by the target object storage device is received, and write object data of a second to-be-recovered object into the controller memory of the target disk by a network data transmission mode of a network card.

[0180] In the embodiment of the application, the object data recovery process utilizes the direct memory access feature of the hard disk, the network data transmission feature of the network card, and the controller memory feature of the NVMe disk, allows data in the node 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 combination of the three features greatly shortens the data transmission path, thereby reducing the delay of the storage operation and improving the speed of data recovery. The application reduces the use of the host memory and the CPU in the recovery process, and the data transmission for the recovery of the same node object no longer passes through the network card, thereby reducing the use of the network bandwidth and providing the possibility for the downgrading work of the distributed storage server.

[0181] Referring to FIG. 6, a structural schematic diagram of a data recovery device provided by an embodiment of the application is shown, which is applied to a target object storage device, and the device comprises:

[0182] The first data recovery module 601 is configured to, when the source object storage device and the target object storage device are located in the same node, send the controller memory address of the target disk to the source object storage device, so that the source object storage device writes object data of a first to-be-recovered object into the controller memory of the target disk by a direct memory access mode according to the controller memory address of the target disk.

[0183] The second data recovery module 602 is configured to, when the source object storage device is located in a first node and the target object storage device is located in a second node, send the controller memory address of the target disk to the source object storage device in the first node, so that the source object storage device reads object data based on the controller memory address of the target disk and writes object data of a second to-be-recovered object into the controller memory of the target disk by a network data transmission mode of a network card.

[0184] In the embodiments of the present application, the object data recovery process utilizes the direct memory access feature of the hard disk, the network data transmission feature of the network card, and the controller memory feature of the NVMe disk, allows the data in the node and between the nodes to be directly written into the controller memory of the disk without passing through the CPU and the host memory, and the combination of the three features greatly shortens the data transmission path, thereby reducing the delay of the storage operation and improving the speed of data recovery. The present application reduces the use of the host memory and the CPU in the recovery process, and the data transmission for the recovery of the node object no longer passes through the network card, thereby reducing the use of the network bandwidth and providing the possibility for the downgrading work of the distributed storage server.

[0185] The embodiments of the present application also provide a communication device, as shown in Figure 7, comprising 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 complete mutual communication through the communication bus 704,

[0186] The memory 703 is configured to store a computer program;

[0187] The processor 701 is configured to execute the program stored in the memory 703, and can implement the following steps:

[0188] determining whether the source object storage device and the target object storage device are located in the same node;

[0189] In the case that the source object storage device and the target object storage device are located in the same node, when the controller memory address of the target disk sent by the target object storage device is received, the object data of the first object to be recovered is written into the controller memory of the target disk through the direct memory access mode;

[0190] In the case that the source object storage device and the target object storage device are not located in the same node, the first node corresponding to the source object storage device and the second node corresponding to the target object storage device are determined, when the controller memory address of the target disk sent by the target object storage device is received, 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 mode of the network card.

[0191] Or,

[0192] When the source object storage device and the target object storage device are located in the same node, the controller memory address of the target disk is sent 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 the direct memory access mode according to the controller memory address of the target disk;

[0193] When the source object storage device is at the first node and the target object storage device is at 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 to-be-restored object into the controller memory of the target disk through the network data transmission mode of the network card.

[0194] The memory and the processor are connected by a bus, which can 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, which are well known in the art, and thus will not be described herein. 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, which provide a unit for communicating with various other devices on a transmission medium. The data processed by the processor can be transmitted through a wired medium or transmitted on a wireless medium through an antenna, in some embodiments, 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 interface, voltage regulation, power management, and other control functions. The memory can be configured to store data used by the processor in performing operations.

[0195] 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 only one type of bus.

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

[0197] The memory can include a random access memory (RAM) and can also include a non-volatile memory, such as at least one disk memory. In some embodiments, the memory can also be at least one storage device located away from the aforementioned processor.

[0198] The processor described above can be a general processor, including a central processing unit, a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0199] In another embodiment provided by the present application, a computer readable storage medium is provided, which stores instructions. The computer readable storage medium can be a computer nonvolatile storage medium, and when the computer readable storage medium is run on a computer, the computer is enabled to execute the data recovery method in any of the above embodiments.

[0200] In another embodiment provided by the present application, a computer program product is provided, which contains instructions. When the computer program product is run on a computer, the computer is enabled to execute the data recovery method in any of the above embodiments.

[0201] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented 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, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer nonvolatile storage medium or transferred from one computer nonvolatile storage medium to another computer nonvolatile storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer nonvolatile storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available media sets. The available media can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD (Digital Versatile Disc)) or a semiconductor medium (such as an SSD) and the like.

[0202] It is to be noted that, as used in this specification and the appended claims, the singular forms "a," "an" and "the" include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to "a component" can include a combination of two or more components, and the term "an element" can include comparable reference to a plurality of elements. Also, as used in this specification and the appended claims, the term "or" as used in the context of "A / B" or "A / B / C" means any of the possibilities; for example, "A or B" means "A or B or both", and "A or B or C" means "A or B or C or any two or all three of A or B or C". Furthermore, to the extent that the terms "including", "includes", "having", "has", "with", or variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term "comprising". Moreover, unless otherwise specified, all compositions are described using conventional chemical terminology. For example, "alkyl" means a straight or branched chain alkyl radical, "aryl" means an aromatic radical, and "heteroalkyl" means an alkyl radical in which one or more carbon atoms are independently replaced with a heteroatom. As used herein, the term "about" means ±10% of the indicated value.

[0203] In some embodiments, identical and similar parts among various embodiments can be referred to each other, and each embodiment focuses on the difference from other embodiments. In particular, for system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the description of the method embodiments.

[0204] The above merely describes optional embodiments of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A data recovery method, characterized by, The method is applied to a source object storage device, and comprises the following steps: determining whether the source object storage device and a target object storage device are located in a same node; in a case where it is determined that the source object storage device and the target object storage device are located in the same node, when a controller memory address of a target disk sent by the target object storage device is received, writing object data of a first object to be recovered into the controller memory of the target disk through a direct memory access mode; in a case where it is determined that the source object storage device and the target object storage device are not located in the same node, determining a first node corresponding to the source object storage device and a 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, reading the object data based on the controller memory address of the target disk, and writing object data of a second object to be recovered into the controller memory of the target disk through a network data transmission mode of a network card.

2. The method of claim 1, wherein, The direct memory access mode comprises a point-to-point direct memory access (P2P DMA).

3. The method of claim 1, wherein, The network data transmission mode is a remote direct memory access.

4. The method of claim 1, wherein, After the step of, in a case where it is determined that the source object storage device and the target object storage device are located in the same node, when a controller memory address of a target disk sent by the target object storage device is received, writing object data into the controller memory of the target disk through a direct memory access mode, and before the step of, in a case where it is determined that the source object storage device and the target object storage device are not located in the same node, determining a first node corresponding to the source object storage device and a second node corresponding to the target object storage device, the method further comprises the following steps: in a case where it is detected that the object data of the first object to be recovered 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; sending a central processing unit instruction to the target object storage device, so that the target object storage device falls the controller memory data of the target disk according to the first disk-falling information and the controller memory address of the object data.

5. The method of claim 1, wherein, After the step of, when the controller memory address of the target disk sent by the target object storage device is received, 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 a network data transmission mode of a network card, the method comprises the following steps: in a case where 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 second disk-falling information of the object data through a preset allocator; sending a central processing unit instruction to the target object storage device, so that the target object storage device falls the controller memory data of the target disk according to the second disk-falling information and the controller memory address of the object data.

6. The method of claim 1, wherein, The writing of the object data of the first to-be-restored object into the controller memory of the target disk by direct memory access when the controller memory address of the target disk sent by the target object storage device is received comprises: sending a first pre-restoration request message to the target object storage device, the first pre-restoration request message comprising first metadata information of the first to-be-restored object, and requesting the target object storage device to pre-allocate a first controller memory address of a target disk for the first to-be-restored object, so that the target object storage device parses the first metadata information and applies a corresponding first controller memory space for the first to-be-restored object through a controller memory management module; receiving the first controller memory address corresponding to the first controller memory space sent by the target object storage device; reading the first to-be-restored object according to the first controller memory address and the first metadata information, and writing the object data corresponding to the first to-be-restored object into the controller memory of the target disk through a drive point-to-point direct memory access operation.

7. The method of claim 4, wherein, The sending of the first prompt information to the target object storage device when it is detected that the object data of the first to-be-restored object is in a written state, so that the target object storage device allocates first landing information of the object data through a pre-set allocator comprises: sending first prompt information to the target object storage device when it is detected that the object data of the first to-be-restored object is in a written state, the first prompt information comprising a first recovery object name and the controller memory address of the object data, so that the target object storage device applies first landing information of the object data for a target disk according to the first prompt information through a pre-set allocator.

8. The method of claim 7, wherein, The sending of the central processing unit instruction to the target object storage device, so that the target object storage device lands the controller memory data of the target disk according to the first landing information and the controller memory address of the object data comprises: 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 land the controller memory data of the target disk according to the first landing information and the controller memory address of the object data.

9. The method of claim 8, wherein, After the step of sending the 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 land the controller memory data of the target disk according to the first landing information and the controller memory address of the object data, the method comprises: releasing the controller memory space by the target object storage device when it is detected that the controller memory data is in a landed state.

10. The method of claim 9, wherein, After the step of releasing the controller memory space by the target object storage device when it is detected that the controller memory data is in a landed state, the method comprises: receiving a first recovery completion confirmation message sent by the target object storage device.

11. The method of claim 10, wherein, After the step of receiving the first recovery completion confirmation message sent by the target object storage device, the method comprises: After detecting that the first recovery completion confirmation message sent by the target object storage device is received, a next first object to be recovered is processed.

12. The method of claim 1, wherein, The determination of the first node corresponding to the source object storage device and the second node corresponding to the target object storage device comprises: Determining whether the target object storage device is in the first node, and the source object storage device is in the first node; In the case where it is determined that the target object storage device is not in the first node, the second node corresponding to the target object storage device is obtained.

13. The method of claim 1, wherein, When the controller memory address of the target disk sent by the target object storage device is received, 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 mode of the network card, comprising: Sending a second pre-recovery request message to the target object storage device, the second pre-recovery request message comprising 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 the second controller memory address corresponding to the second controller memory space sent by the target object storage device; According to the second controller memory address and the second metadata information, the object data corresponding to the second object to be recovered is read, and the network data transmission operation is executed through the network data transmission card driver to write the object data corresponding to the second object to be recovered into the controller memory pre-allocated by the target disk.

14. The method of claim 5, wherein, In the case where it is detected that the object data of the second object to be recovered 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 landing disk information of the object data through a preset allocator, comprising: In the case where it is detected that the object data of the second object to be recovered is in a written state, second prompt information is sent to the target object storage device, the second prompt information comprising a second recovery object name and the controller memory address of the object data, so that the target object storage device applies for second landing disk information of the object data for the target disk according to the second prompt information through a preset allocator.

15. The method of claim 14, wherein, The central processing unit instruction is sent to the target object storage device, so that the target object storage device lands the controller memory data of the target disk according to the second landing disk information and the controller memory address of the object data, comprising: The central processing unit instruction is sent to the target object storage device, so that the target object storage device calls the hard disk controller of the corresponding target disk to land the controller memory data of the target disk according to the second landing disk information and the controller memory address of the object data of the second object to be recovered.

16. The method of claim 15, wherein, After the step of sending the central processor instruction to the target object storage device to make the target object storage device call the hard disk controller of the corresponding target disk to write the controller memory data of the target disk according to the second writing disk information and the controller memory address of the object data of the second to-be-restored object, the method comprises: In the case where it is detected that the controller memory data is in the writing disk state, the target object storage device releases the controller memory space.

17. The method of claim 16, wherein, After the step of releasing the controller memory space in the case where it is detected that the controller memory data is in the writing disk state, the method comprises: Receiving the second recovery completion confirmation message sent by the target object storage device.

18. The method of claim 17, wherein, After the step of receiving the second recovery completion confirmation message sent by the target object storage device, the method comprises: After detecting the reception of the second recovery completion confirmation message sent by the target object storage device, the next second to-be-restored object is processed.

19. A data recovery method, characterized by, Applied to a target object storage device, the method comprises: When the source object storage device and the target object storage device are located in the same node, the controller memory address of the target disk is sent to the source object storage device to make the source object storage device write the object data of the first to-be-restored object into the controller memory of the target disk through the direct memory access mode according to the controller memory address of the target disk; When the source object storage device is located in a first node and the target object storage device is located in a second node, the controller memory address of the target disk sent by the source object storage device in the first node is used to make the source 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 to-be-restored object into the controller memory of the target disk through the network data transmission mode of the network card.

20. A data recovery apparatus, comprising: Applied to a source object storage device, the device comprises: A judgment module is configured to judge 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 it is judged that the source object storage device and the target object storage device are located in the same node, write the object data of the first to-be-restored object into the controller memory of the target disk through the direct memory access mode when the controller memory address of the target disk sent by the target object storage device is received; A second data recovery module is configured to determine a first node corresponding to the source object storage device and a second node corresponding to the target object storage device, and read the object data based on the controller memory address of the target disk when the controller memory address of the target disk sent by the target object storage device is received, and write the object data of the second to-be-restored object into the controller memory of the target disk through the network data transmission mode of the network card.

21. A data recovery apparatus, comprising: Applied to a target object storage device, the device comprises: The first data recovery module is configured to send a controller memory address of a target disk to the source object storage device when the source object storage device and the target object storage device are located in the same node, so that the source object storage device writes object data of a first object to be recovered into the controller memory of the target disk according to the controller memory address of the target disk through a direct memory access mode. The second data recovery module is configured to send a controller memory address of a target disk to the source object storage device when the source object storage device is located in a first node and the target object storage device is located in a 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 object data of a second object to be recovered into the controller memory of the target disk through a network data transmission mode of a network card.

22. A communications device, comprising: The computer program / instructions, when executed by the processor, implement the data recovery method according to any one of claims 1-18 or the data recovery method according to claim 19. The computer program / instructions, when executed by the processor, implement the data recovery method according to any one of claims 1-18 or the data recovery method according to claim 19. The computer program / instructions, when executed by the processor, implement the data recovery method according to any one of claims 1-18 or the data recovery method according to claim 19.

23. A computer non-volatile readable storage medium arranged to store a program, characterized in that, ​ 24. A computer program product comprising computer programs / instructions, characterized in that, ​

Citation Information

Patent Citations

  • Method and system for transmitting data between computing nodes and electronic equipment

    CN109828843A

  • Parameter updating method and platform system for large-scale distributed training cluster

    CN113297127A

  • Computing system, PCI device manager and initialization method thereof

    CN114138702A

  • File reading operation method and device of distributed storage system and medium

    CN115525218A

  • Data exchange network architecture applied to computing microsystem

    CN115801705A