Data disk mounting method, system and device, computer equipment and storage medium

By receiving remote process call requests, creating a virtual storage controller and automatically mapping the data input and output channels of the data disk to the network card, the problem of low efficiency of traditional data disk mount methods is solved and efficient data disk mount is achieved.

CN120179185AInactive Publication Date: 2025-06-20CHINA TELECOM CLOUD TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510664415.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-06-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional data disk mount method is inefficient in cloud host airport scenarios, especially when processing multiple data disks, it requires multiple command interactions, which takes a long time.

Method used

By receiving remote procedure call requests sent by the client, creating and configuring a virtual storage controller, and using the preset callback function to call the channel mapping interface, map the data disk to the data input and output channel of the network card, realizing the mounting of the data disk. After the creation of the virtual storage controller is completed, this method automatically performs mapping operations, reducing the number of interactions between the client and the server.

Benefits of technology

It significantly reduces the data disk mount time and improves the mount efficiency. Especially in multi-disk mount scenarios, the mount of multiple data disks can be completed through one or a small number of remote process call requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179185A_ABST
    Figure CN120179185A_ABST
Patent Text Reader

Abstract

The invention relates to a data disk mounting method, system and device, computer equipment and a storage medium. The method comprises the steps that a remote procedure calling request sent by a client side is received, the remote calling request carries mounting information of a data disk, a virtual storage controller corresponding to the data disk is established and configured based on the mounting information of the data disk, a channel mapping interface is called based on a preset callback function, and the virtual storage controller is used for storing the data disk. And mapping a data disk corresponding to the virtual storage controller to a data input / output channel of the network card. According to the data disk mounting method and device, the number of times of interaction between the client and the server can be reduced, the time for analyzing the command is saved, the data disk mounting time is reduced, and the data disk mounting efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of big data technologies, and in particular, to a method, system, device, computer device, storage medium, and computer program product for mounting data disks. Background Art

[0002] With the diversification of network services, the data traffic has grown rapidly. In cloud service systems for processing big data, some tasks of the CPU cores are usually offloaded to network cards to save the computing overhead of the CPU.

[0003] In traditional technologies, the network forwarding function and some storage functions are usually offloaded to network cards. Taking the storage function as an example, the client needs to send multiple commands to establish a data path between the client and the network card to support subsequent data reading and writing operations of the client.

[0004] However, the data storage requirements in the cloud host scenario are relatively complex, and it may be necessary to support the mounting of hundreds or even more disks. During the data disk mounting process, multiple commands need to be parsed and processed, which takes a relatively long time. Therefore, the mounting efficiency of traditional data disk mounting methods is low. Summary of the Invention

[0005] Based on this, to address the above technical problems, it is necessary to provide a data disk mounting method, device, computer device, computer-readable storage medium, and computer program product that can improve the data disk mounting efficiency.

[0006] In a first aspect, this application provides a data disk mounting method. The method includes:

[0007] Receiving a Remote Procedure Call (RPC) request sent by a client, where the remote call request carries mounting information of a data disk;

[0008] Based on the mounting information of the data disk, creating and configuring a virtual storage controller corresponding to the data disk;

[0009] Based on a preset callback function to call a channel mapping interface, mapping the data disk corresponding to the virtual storage controller to a data input / output channel of a network card.

[0010] In this embodiment, different from the traditional solution where the client needs to send at least two remote procedure call requests to achieve the data disk mounting operation, in this application, the client only needs to send one remote procedure call request. The remote call request carries the mounting information of the data disk. After receiving the request, the server creates and configures a virtual storage controller corresponding to the data disk based on the mounting information of the data disk. After the creation of the virtual storage controller is completed in this application, the server will automatically call the channel mapping interface based on a preset callback function to map the data disk corresponding to the virtual storage controller to the data input / output channel of the network card, achieving the mounting of the data disk without external intervention. In this way, the number of interactions between the client and the server is reduced, the time for analyzing commands is saved, the data disk mounting time is thus reduced, and the data disk mounting efficiency is improved.

[0011] In one embodiment, the remote call request carries a database address parameter, and the method further includes:

[0012] Based on the database address parameter, link to a database storing the mounting information of multiple data disks, and query the mounting information of multiple data disks from the database;

[0013] The creating, based on the mounting information of the data disk, a virtual storage controller corresponding to the data disk includes:

[0014] Based on the mounting information of multiple data disks, create virtual storage controllers corresponding to each data disk respectively.

[0015] In this embodiment, different from the traditional multi-disk mounting method where the client may need to send a mounting request for each data disk separately, and the server also needs to process these requests one by one, which involves a large amount of network transmission and repetitive operations in the middle, and the data disk mounting efficiency is relatively low. In this embodiment, by encapsulating the database address parameter in one RPC request and adding a new RPC command for performing query operations, the server can obtain the mounting information of multiple data disks from the database at one time and create storage controllers in batches, reducing the number of interactions between the client and the server, reducing the network transmission overhead and the processing burden of the server, and thus significantly improving the multi-disk mounting efficiency.

[0016] In one embodiment, the remote call request carries the mounting information of multiple data disks, and the creating, based on the mounting information of the data disk, a virtual storage controller corresponding to the data disk includes:

[0017] Based on the mounting information of multiple data disks, create virtual storage controllers corresponding to each data disk respectively.

[0018] In this embodiment, by carrying the mounting information of multiple data disks in a remote call request, the server can receive and process the mounting tasks of multiple data disks at one time, reducing the number of interactions between the client and the server, thereby improving the efficiency of multi-disk mounting. Different from the multi-disk mounting of the traditional solution, this application only requires one or a small number of request and response interactions, greatly shortening the data disk mounting time. Moreover, by centrally processing the mounting information of multiple data disks, it can better handle the increasing demand for data disk mounting. Only need to encapsulate the mounting information of the new data disk into the RPC request, without large-scale modification of the system architecture, so it can also improve the efficiency of multi-data disk mounting.

[0019] In one embodiment, the step of mapping the data disk corresponding to the virtual storage controller to the data input / output channel of the network card by calling the channel mapping interface based on a preset callback function includes:

[0020] For each data disk, call the channel mapping interface based on a preset callback function to map the data disk corresponding to the virtual storage controller to the data input / output channel of the network card.

[0021] In this embodiment, when multiple data disks need to be mounted, only need to call the single-disk mounting process in sequence to mount each data disk. Since the single-disk mounting process is relatively simple, performing single-disk mounting in sequence can decompose the complex multi-disk mounting task into multiple simple single-disk mounting operations. Moreover, if a problem occurs with a certain data disk during the mounting process, it will only affect the mounting of that data disk, rather than affecting the mounting and normal use of other data disks, which can improve the stability of the multi-data disk mounting process.

[0022] In one embodiment, the step of mapping the data disk corresponding to the virtual storage controller to the data input / output channel of the network card by calling the channel mapping interface based on a preset callback function includes:

[0023] Call the channel mapping interface based on a preset callback function to associate the data disk corresponding to the virtual storage controller with the block network device of the network card, and determine the data input / output channel between the data disk and the network card.

[0024] In this embodiment, by directly associating with a specific channel of the block network device through the channel mapping interface, the operations of the traditional kernel file system and the block network device layer can be bypassed, reducing the overhead in the data transmission process and improving the speed and efficiency of data transmission.

[0025] In a second aspect, the present application also provides a data disk mounting system. The system includes a client and a server connected to each other:

[0026] The client is used to send a remote procedure call request to the storage performance development server, and the remote call request carries the mounting information of the data disk.

[0027] The server is used to map the data disk to the data input / output channel of the network card based on the data disk mounting method in any one of the above data disk mounting method embodiments.

[0028] In a third aspect, the present application further provides a data disk mounting device, which includes:

[0029] A request receiving module, configured to receive a remote procedure call request sent by a client, where the remote call request carries the mounting information of the data disk.

[0030] A controller creation module, configured to create and configure a virtual storage controller corresponding to the data disk based on the mounting information of the data disk.

[0031] A data disk mounting module, configured to call a channel mapping interface based on a preset callback function, and map the data disk corresponding to the virtual storage controller to the data input / output channel of the network card.

[0032] In a fourth aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps in the above data disk mounting method embodiments are implemented.

[0033] In a fifth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above data disk mounting method embodiments are implemented.

[0034] In a sixth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in the above data disk mounting method embodiments are implemented.

[0035] The above data disk mounting method, system, device, computer equipment, storage medium and computer program product are different from the traditional solution where the client needs to send at least two remote procedure call requests to achieve the data disk mounting operation. In this application, the client only needs to send one remote procedure call request, and the remote call request carries the mounting information of the data disk. After receiving the request, the server creates and configures a virtual storage controller corresponding to the data disk based on the mounting information of the data disk. After the creation of the virtual storage controller is completed in this application, the server will automatically call the channel mapping interface based on a preset callback function to map the data disk corresponding to the virtual storage controller to the data input / output channel of the network card, achieving the mounting of the data disk without external intervention. In this way, the interaction times between the client and the server are reduced, the time for analyzing commands is saved, the data disk mounting time is thus reduced, and the data disk mounting efficiency is improved. Brief Description of the Drawings

[0036] Figure 1 It is an application environment diagram of the data disk mounting method in an embodiment;

[0037] Figure 2 It is a schematic flowchart of the data disk mounting method in an embodiment;

[0038] Figure 3 It is a schematic flowchart of the data disk mounting method in another embodiment;

[0039] Figure 4 It is a schematic flowchart of the data disk mounting method in yet another embodiment;

[0040] Figure 5 It is a schematic flowchart of the data disk mounting method in a detailed embodiment;

[0041] Figure 6 It is a schematic flowchart of the general single data disk mounting method in an embodiment;

[0042] Figure 7 It is a schematic flowchart of the single data disk mounting method in an embodiment;

[0043] Figure 8 It is a schematic flowchart of the multiple data disk mounting method in an embodiment;

[0044] Figure 9 It is a structural block diagram of the data disk mounting system in an embodiment;

[0045] Figure 10 It is a structural block diagram of the data disk mounting device in an embodiment;

[0046] Figure 11 It is an internal structure diagram of the computer equipment in an embodiment. Detailed implementation manners

[0047] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the content of the present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] The data disk mounting method provided by the embodiment of the present application can be applied to an application environment as Figure 1 shown. Among them, the client 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or can be placed in the cloud or other network servers. The data storage system stores pre-registered callback functions.

[0049] Specifically, it can be that an operator sends a remote procedure call request carrying the mounting information of the data disk to the server 104 through the client 102. After receiving the remote procedure call request, the server 104 creates and configures a virtual storage controller corresponding to the data disk based on the mounting information of the data disk, and the server 104 calls the channel mapping interface based on a preset callback function to map the data disk corresponding to the virtual storage controller to the data input / output channel of the network card.

[0050] Among them, the client 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0051] In one embodiment, as Figure 2 shown, a data disk mounting method is provided. Taking the method applied to the Figure 1 server 104 as an example, the method includes the following steps:

[0052] S100, receiving a remote procedure call request sent by a client.

[0053] Remote Procedure Call (RPC) is a computer communication protocol that allows a program running on one computer to call a subroutine on another computer. That is, it allows programs running on different computers to call each other's functions or methods as if they were calling local functions. In this embodiment, the client interacts with the server through a Remote Procedure Call request (hereinafter referred to as an RPC request), remotely causing the server to create a virtual storage controller. The mounting information of the data disk includes, but is not limited to, information such as the data disk identifier, the data disk location, and the configuration file of the virtual storage controller.

[0054] Exemplarily, based on its own storage data requirements, the client encapsulates the mounting information of the data disk (such as the data disk type, capacity, identifier, etc.) in an RPC request and then sends it to the server. The server can continuously listen for requests or commands sent by the client through the network interface. After receiving the RPC request sent by the client, it parses the RPC request to extract the mounting information of the data disk for subsequent operations.

[0055] S300, create and configure a virtual storage controller corresponding to the data disk based on the mounting information of the data disk.

[0056] Among them, the virtual storage controller refers to an entity that simulates the functions of a physical virtual storage controller at the software level and can manage storage devices, such as overall controlling the read and write operations of data. It should be noted that creating a virtual storage controller here means establishing a bridge between the server and the hardware controller. At the software level, "creating a virtual storage controller" means that the server can abstractly manage the hardware controller, that is, encapsulate the complex hardware details of the hardware controller to form a unified and concise interface. The client only needs to operate on the hardware controller through this concise interface, and the actual operations behind these interfaces are coordinated by the software system on the server with the hardware controller. Those skilled in the art should understand.

[0057] Continuing with the above steps, the client can send a create controller command to the server through an RPC request. After the server parses the mount information of the data disk, it will execute the create controller command to create a virtual storage controller at the software level, allocate necessary system resources (such as memory, CPU time slices, etc.) for the virtual storage controller, and perform corresponding configurations according to the mount information of the data disk. Among them, the hardware component corresponding to the virtual storage controller can be an NVME (Non-Volatile Memory Express) controller. The NVME controller is a hardware component used to implement the NVMe (Non-Volatile Memory Express) protocol, mainly used to manage and control non-volatile storage devices such as solid-state drives (SSDs, Solid - State Drives). The NVMe protocol is designed for high-speed flash storage devices on the PCIe (Peripheral Component Interconnect Express) bus, aiming to overcome the limitations of the traditional AHCI (Advanced Host Controller Interface) protocol on the SATA (Serial Advanced Technology Attachment) interface and provide higher performance and lower latency.

[0058] S500, based on a preset callback function, calls the channel mapping interface to map the data disk corresponding to the virtual storage controller to the data input and output channel of the network card.

[0059] Among them, a callback function is a function passed as a parameter to another function and is called when a specific event occurs or a certain operation is completed, that is, a function is handed over to another function for execution and is called under the correct triggering conditions. The channel mapping interface refers to an interface that maps a data disk to a specific channel, which can be used to manage and map storage resources and is part of a mechanism or data structure for managing internal resource allocation and mapping of storage devices. Invoking the channel mapping interface can establish a connection between the data input / output channels of the data disk and the network card to achieve data input / output. Exemplarily, the channel mapping interface can be a map slot interface or other interfaces that can establish data input / output channels between the data disk and the network card, which are not limited herein. The network card includes but is not limited to traditional network cards and intelligent network cards, where an intelligent network card refers to a network card integrated with network processing and storage acceleration functions and can share some of the work of the CPU (Central Processing Unit). Therefore, the network card in this application can be an intelligent network card or other types of network cards that can allocate some of the CPU's work, which are not limited herein.

[0060] Exemplarily, in this embodiment and the following embodiments, the channel mapping interface is taken as the map slot interface and the network card is taken as the intelligent network card for explanation. Specifically, when it is necessary to offload some of the storage functions of the CPU to the intelligent network card, the client can send a create controller command to the server through an RPC request. The server will execute the create controller operation according to the data disk mounting information sent by the client and return the operation result to the client. After the client confirms that the virtual storage controller has been created, it calls the RPC request again to perform a map slot operation on the created virtual storage controller. After the server receives the RPC request sent by the client again, it establishes a data input / output channel between the intelligent network card and the data disk through the map slot interface.

[0061] However, since it takes 0.5 seconds for the client to use the RPC service, and the server takes about 90 milliseconds to execute the function call specifically, a large amount of time for mounting the data disk is consumed in the process of the client starting the RPC service and establishing a connection with the server. Therefore, the time for mounting the data disk can be reduced by reducing the number of RPC calls between the client and the server. Specifically, the client can request the server to complete two operations in one RPC request. One is to create a virtual storage controller, and the other is to execute the map slot operation. After the server creates the virtual storage controller, it meets the call condition of the callback function. The client does not need to send another RPC request, and the server will automatically call the callback function to execute the map slot operation in the RPC request, that is, call the map slot interface to map and associate the data disk corresponding to the virtual storage controller with a specific channel of the smart network card, so as to build a data input and output channel for the data disk. In this way, the interaction times between the client and the server can be reduced, and the time for mounting the data disk is greatly reduced.

[0062] In the above data disk mounting method, in this embodiment, different from the traditional solution where the client needs to send at least two remote procedure call requests to implement the data disk mounting operation, in this application, the client only needs to send one remote procedure call request. The remote call request carries the mounting information of the data disk. After the server receives this request, based on the mounting information of the data disk, it creates and configures a virtual storage controller corresponding to the data disk. After the creation of the virtual storage controller in this application is completed, the server will automatically call the channel mapping interface based on the preset callback function to map the data disk corresponding to the virtual storage controller to the data input and output channel of the network card, realizing the mounting of the data disk without external intervention. In this way, the interaction times between the client and the server are reduced, the time for analyzing commands is saved, and thus the time for mounting the data disk is reduced, and the efficiency of mounting the data disk is improved.

[0063] In one embodiment, as Figure 3 shown, the remote call request carries the database address parameter, and the method further includes:

[0064] S200, based on the database address parameter, link to the database storing the mounting information of multiple data disks, and query the mounting information of multiple data disks from the database.

[0065] S300 includes:

[0066] S310, based on the mounting information of multiple data disks, create virtual storage controllers corresponding to each data disk respectively.

[0067] Among them, the database address parameter is applicable to locate the database identifier storing the mounting information of multiple data disks, which can be the network address of the database, the database name, etc. Based on the database address parameter, the server can accurately link to the corresponding database.

[0068] Specifically, when the client has a requirement to mount multiple data disks, it can carry the database address parameter in the RPC request sent to the server, and encapsulate a new RPC command in the RPC request. This RPC command is used to instruct the server to query the mounting information of multiple data disks based on the database address parameter. Exemplarily, after receiving the RPC request, the server parses the RPC request, extracts the database address parameter, and based on the parsed database address parameter, links to the database storing the disaster information of multiple data disks. After successful linking, the server will perform a query operation in the database and query the mounting information of multiple data disks from the database. Further, for each data disk, the server will respectively create a virtual storage controller corresponding to each data disk according to its mounting information, allocate necessary system resources for each virtual storage controller, and perform corresponding configurations according to the characteristics of the data disk.

[0069] In this embodiment, different from the traditional multi-disk mounting method that may require the client to send a mounting request for each data disk separately, and the server also needs to process these requests one by one, which involves a large amount of network transmission and repeated operations in the middle, and the data disk mounting efficiency is relatively low. In this embodiment, by encapsulating the database address parameter and adding a new RPC command for performing a query operation in one RPC request, the server can obtain the mounting information of multiple data disks from the database at one time and batch-create storage controllers, reducing the number of interactions between the client and the server, reducing the network transmission overhead and the processing burden of the server, thereby significantly improving the multi-disk mounting efficiency.

[0070] In one embodiment, the remote call request carries the mounting information of multiple data disks, and S300 includes: respectively creating virtual storage controllers corresponding to each data disk based on the mounting information of multiple data disks.

[0071] Specifically, when the client has multiple data disks to be mounted, it can also encapsulate the mounting information of multiple data disks in one RPC request and send the RPC request to the server. After receiving the RPC request sent by the client, the server will also parse the RPC request and extract the mounting information of multiple data disks. The server respectively creates and configures corresponding virtual and storage controllers for each data disk according to the mounting information of each data disk.

[0072] It should be noted that when the number of data disks to be mounted is small, the multi-disk mounting method in this embodiment can be adopted. When the number of data disks to be mounted is large, the mounting information of the corresponding multiple data disks is also relatively large. Therefore, the multi-disk mounting can be implemented by the database query-based method in the above embodiment, which can save time and improve the data disk mounting efficiency.

[0073] In this embodiment, by carrying the mounting information of multiple data disks in a single remote call request, the server can receive and process the mounting tasks of multiple data disks at one time, reducing the number of interactions between the client and the server, thereby improving the efficiency of multi-disk mounting. Different from the multi-disk mounting of traditional solutions, this application only requires one or a small number of request and response interactions, greatly shortening the data disk mounting time. Moreover, by centrally processing the mounting information of multiple data disks, it can better handle the increasing demand for data disk mounting. It only needs to encapsulate the mounting information of the new data disk into the RPC request, without large-scale modification of the system architecture, so it can also improve the efficiency of multi-data disk mounting.

[0074] In one embodiment, as Figure 4 shown, S500 includes:

[0075] S510, for each data disk, based on a preset callback function, call the channel mapping interface to map the data disk corresponding to the virtual storage controller to the data input / output channel of the network card.

[0076] Continuing from the above embodiment, when multi-disk mounting is required, the server will process each data disk to be mapped one by one. For example, if there are 100 data disks waiting to be mounted, the server can start from the first data disk and map each data disk to the data input / output channel of the smart network card in sequence. For example, the server traverses each data disk. For each traversed data disk, after the corresponding virtual storage controller is created and configured, the server will trigger a preset callback function. After the callback function is triggered, it will call the map slot interface, and pass the relevant information of the virtual storage controller corresponding to the data disk and the specific channel information of the smart network card as parameters to the map slot interface. The map slot interface maps and associates the data disk with the specific channel based on this information to obtain the data input / output channel between the data disk and the smart network card.

[0077] In this embodiment, when multiple data disks need to be mounted, it is only necessary to sequentially call the single-disk mounting process to mount each data disk. Since the single-disk mounting process is relatively simple, sequentially performing single-disk mounting can decompose the complex multi-disk mounting task into multiple simple single-disk mounting operations. Moreover, if a problem occurs with a certain data disk during the mounting process, it will only affect the mounting of that data disk, rather than the mounting and normal use of other data disks, which can improve the stability of the multi-data-disk mounting process.

[0078] In one embodiment, as Figure 5 shown, S500 includes:

[0079] S520, based on a preset callback function, call the channel mapping interface to associate the data disk corresponding to the virtual storage controller with the block network device of the network card, and determine the data input / output channel between the data disk and the network card.

[0080] Specifically, the block network (blk net) device is a device on the intelligent network card used to process block data transmission, providing a bridge for data transmission between the data disk and the data input / output channel of the intelligent network card. After the virtual storage controller is created and configured, the server will trigger a preset callback function. After the callback function is triggered, it will call the map slot interface, and through the map slot interface, perform a map association operation with a specific channel of the block network device in the fpga (Field - Programmable Gate Array) of the intelligent network card to complete the construction of the data input / output channel between the data disk and the intelligent network card.

[0081] In this embodiment, by directly associating with a specific channel of the block network device through the channel mapping interface, the operations of the traditional kernel file system and the block network device layer can be bypassed, reducing the overhead in the data transmission process and improving the speed and efficiency of data transmission.

[0082] To make a clearer description of the data disk mounting method provided in this application, the following combines Figure 5 and One a detailed embodiment for explanation. The detailed embodiment includes the following steps:

[0083] S100, receive a remote procedure call request sent by the client.

[0084] S200, based on the database address parameter, link to the database storing the mounting information of multiple data disks, and query the mounting information of multiple data disks from the database.

[0085] S310, based on the mounting information of multiple data disks, respectively create virtual storage controllers corresponding to each data disk.

[0086] S520 calls the channel mapping interface based on a preset callback function to associate the data disk corresponding to the virtual storage controller with the block network device of the network card, and determines the data input / output channels between the data disk and the network card.

[0087] Specifically, the server in this embodiment can be an SPDK Server (Software for Persistent Memory and Fast Storage Devices Kernel, software for persistent memory and fast storage device kernels). Among them, SPDK is a highly optimized software library designed specifically for fast storage devices and persistent memory, especially for NVMe SSDs (Non-Volatile Memory Express, non-volatile memory specification, Solid - State Drives solid-state drives). The main goal of SPDK is to directly access storage devices in user space, bypassing the traditional kernel file system and block device layer, thereby reducing latency and improving I / O (data input / data output) performance. Generally speaking, at least two RPC commands are required to mount a single data disk in the SPDK components, and at least 2N (N is the number of disks) RPC commands are required to mount multiple data disks. After testing, it is found that a single RPC command takes about 0.5s. When the number of data disks is relatively large, in the scenario of restarting the service and restoring disk mounting, multiple RPC commands corresponding to disk mounting operations need to be executed to complete the restoration of disk mounting, and the multiple executions of RPC commands take a long time, resulting in a long data input / output disconnection time for the front-end customers and affecting the customer experience.

[0088] For the above data disk mounting process, since the main time-consuming point lies in the interaction between the client and the server through RPC requests, in this embodiment, by modifying the RPC requests and pre-registering callback functions, multiple RPC commands are encapsulated into one RPC request. Through one RPC request interaction between the client and the server, multi-data disk mounting is realized, saving the disk mounting time and improving the customer experience.

[0089] When the client needs to mount a single data disk, the general data disk mounting process is as Figure 6 shown. The client needs to send at least two RPC requests to implement the single-disk mounting operation. The data disk mounting process in this embodiment is as Figure 7 shown. The client only needs to send one RPC request, and the server can implement the disk mounting operation based on the callback function. When the client needs to mount multiple data disks, the data disk mounting process in this embodiment is as Figure 8As shown in the figure, the multi-disk mounting operation is realized by sequentially calling the single-disk mounting process. The number of RPC requests for multi-disk mounting is optimized from 2N (N is the number of data disks) to one RPC request, which greatly reduces the data disk mounting time. Taking a test case where an SPDK server mounts 254 data disks as an example, the general disk mounting method takes more than 200 seconds, while the disk mounting method of this embodiment only takes about 25 seconds to complete the mounting of all data disks, and the mounting time is significantly reduced.

[0090] In this embodiment, by pre-registering callback functions, the multiple RPC requests are simplified into one RPC request. The single-disk mounting is realized in one RPC interaction between the client and the server, which optimizes the mounting process of a single data disk. Moreover, by encapsulating multiple RPC commands in one RPC request, the server is allowed to obtain multi-disk mounting information by querying the database, realizing the function of mounting multiple data disks in a single RPC request, optimizing the number of RPC interactions between the client and the server in multi-disk mounting, saving the multi-disk mounting time, and improving the data disk mounting efficiency.

[0091] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps does not have a strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same time, but can be executed at different times. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0092] In one embodiment, as Figure 9 shown, a data disk mounting system 800 is provided, including a client 102 and a server 104 that are connected to each other. The client 102 is used to send a remote procedure call request to the storage performance development server, and the remote call request carries the mounting information of the data disk. The server 104 is used to map the data disk to the data input / output channel of the network card based on the data disk mounting method in any one of the above data disk mounting method embodiments.

[0093] It should be noted that the implementation solutions for solving problems provided by the above system are similar to the implementation solutions described in the above method, and will not be elaborated here.

[0094] Based on the same inventive concept, an embodiment of the present application further provides a data disk mounting device for implementing the data disk mounting method involved above. The implementation solutions provided by this device to solve problems are similar to those described in the above method. Therefore, the specific limitations in one or more embodiments of the data disk mounting device provided below can refer to the limitations on the data disk mounting method in the above text, and will not be repeated here.

[0095] In one embodiment, as Figure 10 shown, a data disk mounting device 900 is provided, including: a request receiving module 910, a controller creating module 920, and a data disk mounting module 930, where:

[0096] The request receiving module 910 is configured to receive a remote procedure call request sent by a client, and the remote call request carries the mounting information of the data disk.

[0097] The controller creating module 920 is configured to create and configure a virtual storage controller corresponding to the data disk based on the mounting information of the data disk.

[0098] The data disk mounting module 930 is configured to call a channel mapping interface based on a preset callback function, and map the data disk corresponding to the virtual storage controller to the data input / output channel of the network card.

[0099] In one embodiment, the remote call request carries a database address parameter, and the data disk mounting device 900 is further configured to link to a database storing the mounting information of multiple data disks based on the database address parameter, query the mounting information of multiple data disks from the database, and the controller creating module 920 is configured to create virtual storage controllers corresponding to each data disk respectively based on the mounting information of multiple data disks.

[0100] In one embodiment, the remote call request carries the mounting information of multiple data disks, and the controller creating module 920 is configured to create virtual storage controllers corresponding to each data disk respectively based on the mounting information of multiple data disks.

[0101] In one embodiment, the data disk mounting module 930 is further configured to, for each data disk, call a channel mapping interface based on a preset callback function, and map the data disk corresponding to the virtual storage controller to the data input / output channel of the network card.

[0102] In one embodiment, the data disk mounting module 930 is further configured to call a channel mapping interface based on a preset callback function, associate the data disk corresponding to the virtual storage controller with the block network device of the network card, and determine the data input / output channel between the data disk and the network card.

[0103] Each module in the above data disk mounting device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or independent of the processor, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0104] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 11 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as callback functions. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a data disk mounting method.

[0105] Those skilled in the art can understand that Figure 11 the structure shown in

[0106] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0107] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, it implements the steps in the above data disk mounting method embodiment.

[0108] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, it implements the steps in the above data disk mounting method embodiment.

[0109] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been permitted by the user or fully permitted by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards in the relevant regions.

[0110] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, etc., without limitation.

[0111] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.

[0112] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A method for mounting a data disk, characterized in that, The method includes: Receiving a remote procedure call request sent by a client, where the remote call request carries the mounting information of a data disk; Based on the mounting information of the data disk, creating and configuring a virtual storage controller corresponding to the data disk; Based on a preset callback function, calling a channel mapping interface to map the data disk corresponding to the virtual storage controller to the data input / output channel of a network card.

2. The method according to claim 1, characterized in that, The remote call request carries a database address parameter, and the method further includes: Based on the database address parameter, linking to a database storing the mounting information of multiple data disks, and querying out the mounting information of multiple data disks from the database; The creating, based on the mounting information of the data disk, a virtual storage controller corresponding to the data disk includes: Based on the mounting information of multiple data disks, respectively creating virtual storage controllers corresponding to each data disk.

3. The method according to claim 1, characterized in that, The remote call request carries the mounting information of multiple data disks, and the creating, based on the mounting information of the data disk, a virtual storage controller corresponding to the data disk includes: Based on the mounting information of multiple data disks, respectively creating virtual storage controllers corresponding to each data disk.

4. The method according to claim 2 or 3, characterized in that, The calling, based on a preset callback function, a channel mapping interface to map the data disk corresponding to the virtual storage controller to the data input / output channel of a network card includes: For each data disk, based on a preset callback function, calling a channel mapping interface to map the data disk corresponding to the virtual storage controller to the data input / output channel of a network card.

5. The method according to claim 1, characterized in that, The calling, based on a preset callback function, a channel mapping interface to map the data disk corresponding to the virtual storage controller to the data input / output channel of a network card includes: Based on a preset callback function, calling a channel mapping interface to associate the data disk corresponding to the virtual storage controller with the block network device of the network card, and determining the data input / output channel between the data disk and the network card.

6. A data disk mounting system, characterized in that, The system includes a client and a server connected to each other; The client is used to send a remote procedure call request to the storage performance development server, and the remote call request carries the mounting information of a data disk; The server is used to map the data disk to the data input / output channel of a network card based on the data disk mounting method according to any one of claims 1 to 5.

7. A data disk mounting device, characterized in that, The device includes: A request receiving module, configured to receive a remote procedure call request sent by a client, where the remote call request carries the mounting information of a data disk; A controller creating module, configured to create and configure a virtual storage controller corresponding to the data disk based on the mounting information of the data disk; A data disk mounting module, configured to map the data disk corresponding to the virtual storage controller to the data input / output channel of a network card based on a preset callback function by calling a channel mapping interface.

8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium, having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Storage block device identification device and system and storage block device read-write method

    CN112015352A

  • Method for mounting and unloading cloud hard disk based on OpenStack cloud platform

    CN112463248A

  • Storage gateway based on SPDK and implementation method thereof

    CN113242175A

  • Bare metal opening method and device based on intelligent network card, equipment and storage medium

    CN116527686A

  • Management method and device for Ceph volume of SPDK type of Openstack cloud platform, equipment and storage medium

    CN119179438A