Control method and device of cloud storage device, storage medium and electronic device

By obtaining the identification of the physical server in the cloud platform and setting the target configuration, the problem of the cloud platform not supporting the physical server to mount the block equipment of the storage cluster is solved, and the function of the physical server to mount the block equipment of the storage cluster through the network is realized.

CN114385068BActive Publication Date: 2025-05-13TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011121044.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-19
Publication Date
2025-05-13
Estimated Expiration
2040-10-19

AI Technical Summary

Technical Problem

The cloud platform does not support physical servers to mount block devices in the storage cluster, resulting in the inability to mount block devices in the storage cluster through the network.

Method used

By obtaining the mount request on the first node device, obtaining the identification of the physical server, and sending the mount request to the second node device, requesting to set the target configuration to allow the physical server to communicate with the third node device, thereby mounting the cloud storage device to the physical server.

Benefits of technology

It realizes that the physical server can mount block devices using storage clusters through network methods, solving the problem that the cloud platform does not support the physical server to mount block devices of the storage clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114385068B_ABST
    Figure CN114385068B_ABST
Patent Text Reader

Abstract

The present invention discloses a control method and device for a cloud storage device, a storage medium and an electronic device, which can be applied to cloud storage in the field of cloud technology. The method includes: obtaining a first mount request on a first node device; obtaining an identification of a physical server from a first server through a first client on the first node device; sending a second mount request to a second node device on the first node device, the second mount request carrying the identification of the physical server; in the case of obtaining a mount response sent by the second node device, calling the first server through the first client on the first node device to perform a first communication between the first server and a third node device, and mounting the target cloud storage device on the physical server through the first communication. The present invention solves the technical problem that the cloud platform does not support physical servers mounting block devices of storage clusters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a control method and device for a cloud storage device, a storage medium, and an electronic device. Background Art

[0002] In the field of cloud technology, cloud storage usually uses distributed systems in cloud platforms to provide block storage services. Block storage can be used by mounting virtual machines, and data can be written to the storage cluster through the mounted block storage. When using virtual machines, multiple block devices can be applied for through the storage cluster and mounted to the virtual machine according to storage requirements.

[0003] As businesses continue to change, some businesses may need to run on bare metal, that is, physical servers. When using physical servers, since the storage on the physical servers is a real physical block device, it is currently not possible to mount the block devices of the storage cluster through the network.

[0004] Regarding the technical problem in related technologies that the cloud platform does not support physical servers mounting block devices of storage clusters, there is currently no effective solution. Summary of the invention

[0005] The embodiments of the present invention provide a control method and apparatus for a cloud storage device, a storage medium, and an electronic device, so as to at least solve the technical problem that a cloud platform does not support a physical server mounting a block device of a storage cluster.

[0006] According to one aspect of an embodiment of the present invention, a method for controlling a cloud storage device is provided, comprising: obtaining a first mount request on a first node device, wherein the first mount request is used to request that the cloud storage device be mounted to a physical server; obtaining an identifier of the physical server from the first server through a first client on the first node device, wherein the first client is set on the first node device, and the first server is set on the physical server; sending a second mount request to a second node device on the first node device, wherein the second mount request carries the identifier of the physical server, and the second mount request is used to request the second node device to mount the physical server for the second node device through a third node device. The physical server sets a first target configuration, and the first target configuration is used to allow the physical server to communicate with the third node device, and the third node device is connected to a group of cloud storage devices; when the mount response sent by the second node device is obtained, the first server is called through the first client on the first node device to perform a first communication between the first server and the third node device, and the target cloud storage device is mounted on the physical server through the first communication, wherein the mount response is used to indicate that the third node device has set the first target configuration for the physical server, and the target cloud storage device is a cloud storage device in the group of cloud storage devices.

[0007] According to another aspect of an embodiment of the present invention, a control device for a cloud storage device is also provided, including: a first acquisition module, used to acquire a first mount request on a first node device, wherein the first mount request is used to request to mount the cloud storage device to a physical server; a second acquisition module, used to acquire an identifier of the physical server from the first server through a first client on the first node device, wherein the first client is set on the first node device, and the first server is set on the physical server; a sending module, used to send a second mount request to the second node device on the first node device, wherein the second mount request carries the identifier of the physical server, and the second mount request is used to request the second node device to acquire the identifier of the physical server through the first client. The three-node device sets a first target configuration for the above-mentioned physical server, and the above-mentioned first target configuration is used to allow the above-mentioned physical server to communicate with the above-mentioned third-node device, and the above-mentioned third-node device is connected to a group of cloud storage devices; a calling module is used to call the above-mentioned first server through the above-mentioned first client on the above-mentioned first node device when the mounting response sent by the above-mentioned second node device is obtained, so as to perform a first communication between the above-mentioned first server and the above-mentioned third-node device, and mount the target cloud storage device on the above-mentioned physical server through the above-mentioned first communication, wherein the above-mentioned mounting response is used to indicate that the above-mentioned third-node device has set the above-mentioned first target configuration for the above-mentioned physical server, and the above-mentioned target cloud storage device is a cloud storage device in the above-mentioned group of cloud storage devices.

[0008] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned control method of the cloud storage device when running.

[0009] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the control method of the cloud storage device through the computer program.

[0010] In an embodiment of the present invention, a first mount request for requesting to mount a cloud storage device to a physical server is obtained on a first node device, and the first node device obtains the identification of the physical server from the first server set on the physical server through a first client; a second mount request carrying the identification of the physical server is sent to a second node device on the first node device, and the second mount request is used to request the second node device to set a first target configuration for the physical server through a third node device, and the first target configuration is used to allow the physical server to communicate with the third node device, and the third node device is connected to a group of cloud storage devices; in the case of obtaining a mount response sent by the second node device, the first server is called on the first node device through the first client to perform a first communication between the first server and the third node device, and the target cloud storage device is mounted on the physical server through the first communication, wherein the mount response is used to indicate that the third node device has set the first target configuration for the physical server, and the target cloud storage device is a cloud storage device in a group of cloud storage devices. Thus, the technical effect that the physical server can mount the block device of the storage cluster through the network is achieved, thereby solving the technical problem that the cloud platform does not support the physical server mounting the block device of the storage cluster. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0012] Figure 1 is a schematic diagram of an application environment of an optional cloud storage device control method according to an embodiment of the present invention;

[0013] Figure 2 is a flow chart of a method for controlling a cloud storage device according to an embodiment of the present invention;

[0014] Figure 3 is a schematic diagram of an optional bare metal cloud hard disk management framework according to an embodiment of the present invention;

[0015] Figure 4 is a schematic diagram of an optional physical server mounting process according to an embodiment of the present invention;

[0016] Figure 5 is a schematic diagram of an optional volume control panel according to an embodiment of the present invention;

[0017] Figure 6 is a schematic diagram of a data plane of an optional physical server cloud hard disk according to an embodiment of the present invention;

[0018] Figure 7is an optional schematic diagram of creating a worker thread according to an embodiment of the present invention;

[0019] Figure 8 is a schematic structural diagram of an optional control device of a cloud storage device according to an embodiment of the present invention;

[0020] Fig. 9 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0023] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.

[0024] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.

[0025] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0026] The following is an explanation of the nouns involved in this application:

[0027] A private cloud is a cloud infrastructure and software and hardware resources created within a firewall so that departments within an organization or enterprise can share resources within the data center. In addition to hardware resources, creating a private cloud generally also requires cloud equipment (IaaS, Infrastructure as a Service) software. Private cloud computing also includes three levels: cloud hardware, cloud platform, and cloud services. The difference is that cloud hardware is the user's own personal computer or server, not the data center of the cloud computing vendor. The purpose of cloud computing vendors building data centers is to provide public cloud services to millions of users, so they need to have tens of millions of servers. Private cloud computing only serves friends and family for individuals, and only serves employees, customers, and suppliers of the enterprise for enterprises. Therefore, an individual or enterprise's own personal computer or server is sufficient to provide cloud services.

[0028] Public Cloud usually refers to a cloud provided by a third-party provider for users to use. Public Cloud is generally available through the Internet and may be free or low-cost. The core attribute of Public Cloud is shared resource services. There are many instances of this cloud, which can provide services throughout the open public network today.

[0029] Hybrid Cloud combines public cloud and private cloud, and is the main model and development direction of cloud computing in recent years. Private cloud is mainly for enterprise users. For security reasons, enterprises are more willing to store data in private cloud, but at the same time hope to obtain computing resources of public cloud. In this case, hybrid cloud is increasingly adopted, which mixes and matches public cloud and private cloud to obtain the best effect. This personalized solution achieves the purpose of saving money and security.

[0030] OpenStack: Open source IaaS management platform.

[0031] TStack: A cloud computing product developed based on the open source OpenStack software. It is a basic software for implementing private cloud or hybrid cloud.

[0032] Cinder: A component in Openstack that provides block storage, mainly used as disk for virtual machines.

[0033] Ceph: An open source distributed storage system that can provide object, block, and file storage services at the same time.

[0034] Nova: A component in Openstack that manages the life cycle of virtual machines, such as creation, deletion, startup, and migration.

[0035] Iscsi: Internet Small Computer System Interface is a storage technology based on the Internet and SCSI-3 protocol.

[0036] Ironic: A component in Openstack that manages the life cycle of physical servers. It is used to manage physical machines, such as installing operating systems on physical machines, and powering them on and off.

[0037] Rbd: The full name is rados block device, which is a block device service provided by Ceph.

[0038] Data flow and control flow: Storage is generally divided into data flow and control flow. Among them, data flow mainly involves reading and writing block device data, and control flow mainly involves creating, deleting, mounting and unmounting virtual machines, etc. of block devices.

[0039] Data flow: read or write data in Ceph's Rbd blocks.

[0040] According to one aspect of an embodiment of the present invention, a method for controlling a cloud storage device is provided. Optionally, as an optional implementation, the method for controlling a cloud storage device may be, but is not limited to, applied to: Figure 1 in the environment shown. Figure 1 The system architecture shown may include four layers: business layer, cloud gateway layer, basic cloud layer and storage layer. The business layer is mainly for users. Users can apply for resources at the business layer, and administrators can monitor the use of the platform at the business layer. The cloud gateway layer is used to provide a unified platform resource interface for the platform. The basic cloud layer is mainly used to provide Iaas services for the platform. The storage layer is mainly used to provide block storage services. Specifically, the following system architecture can be used as an example for explanation. The system architecture includes:

[0041] The first layer is the business layer: it mainly includes the user platform that users can directly operate. The user platform includes a display interface, through which users can apply for resources. The operation and maintenance platform can be a management platform, through which administrators can perform a series of management operations, such as host migration, etc. The monitoring platform is a platform that monitors the usage of all resources of the entire platform.

[0042] The second layer is the cloud gateway layer: it mainly includes venus, IP system and Rbac, among which venus is used to provide a unified original platform resource interface, the IP system is used to manage network resources such as the Internet Protocol (IP for short), and Rbac is used for authentication.

[0043] The third layer is the basic cloud layer: it is mainly used to provide Iaas services for the open source Openstack cloud platform. Among them, Nova is used to manage the life cycle of virtual machines, Cinder is used to manage the life cycle of volumes, and Ironic is used to manage the life cycle of bare metals.

[0044] The fourth layer is the storage layer: it is mainly used to use the block storage service provided by Ceph cluster storage.

[0045] Optionally, the present application provides a method for controlling a cloud storage device, as an optional implementation manner, such as Figure 2 As shown, the control method of the above cloud storage device includes:

[0046] Step S202: obtaining a first mount request on the first node device, wherein the first mount request is used to request to mount a cloud storage device to the physical server;

[0047] Step S204, obtaining an identifier of a physical server from a first server through a first client on a first node device, wherein the first client is set on the first node device and the first server is set on the physical server;

[0048] Step S206: Send a second mount request on the first node device to the second node device, wherein the second mount request carries an identifier of the physical server, and the second mount request is used to request the second node device to set a first target configuration for the physical server through the third node device, and the first target configuration is used to allow the physical server to communicate with the third node device, and the third node device is connected to a group of cloud storage devices;

[0049] Step S208, when the mount response sent by the second node device is obtained, the first server is called through the first client on the first node device to perform a first communication between the first server and the third node device, and the target cloud storage device is mounted on the physical server through the first communication, wherein the mount response is used to indicate that the third node device has set the first target configuration for the physical server, and the target cloud storage device is a cloud storage device in a group of cloud storage devices.

[0050] As an optional implementation, the basic cloud layer can also be an OpenStack layer. Figure 1 In the basic cloud layer, this embodiment provides a bare metal cloud hard disk management framework. Figure 3 The present invention is an optional bare metal cloud hard disk management framework diagram according to an embodiment of the present invention, wherein the first node device may be a computing node, the second node device may be a control node, and the third node device may be a Target node. The first client in the Ironic component of the first node device may be an Iscsi client. Figure 3 The first server among the physical servers shown may be an Iscsi restful server.

[0051] As an optional implementation scheme, the first node device as a computing node can be a server with computing capabilities. The computing node can include a Nova component that manages the life cycle of a virtual machine and an Ironic component that manages the life cycle of a physical server. Ironic can be used as a virtual machine driver of nova in Openstack and can be at the same level as the virtual machine. In this embodiment, a first client is provided in the Ironic component, and a first mount request input by a user can be obtained through the first client, wherein the first mount request is used to request to mount a cloud storage device to a physical server.

[0052] As an optional implementation scheme, the first server can be an Iscsirestful server set in a physical server. The reason for setting the first client in the Ironic component of the first node device and the first server in the physical server is that the virtual machine generally uses the kvm driver, and the physical server generally uses the Ironic driver. Kvm depends on the kernel of the host machine where the virtual machine is located, so the virtual machine runs on the host machine and has the operating system of the host machine, so the Iscsi command (for example, the login command) can be directly run to mount the Iscsi disk. However, the physical server does not rely on the host machine, so the Iscsi command cannot be run on the machine served by Ironic, so it is necessary to add a first server in the physical server to execute the Iscsi command, and add a first client in the Ironic component to send a mount or uninstall request to the first server on the physical server. In this embodiment, the first client can be used to perform Iscsi operations such as discover, login, and logout. And the first server can be added when the bare metal image is used to become part of the standard image.

[0053] Through the above steps, since the first node device obtains the first mount request for requesting to mount the cloud storage device to the physical server, the first node device obtains the identification of the physical server from the first server set on the physical server through the first client; the first node device sends the second mount request carrying the identification of the physical server to the second node device, the second mount request is used to request the second node device to set the first target configuration for the physical server through the third node device, the first target configuration is used to allow the physical server to communicate with the third node device, and the third node device is connected to a group of cloud storage devices; in the case of obtaining the mount response sent by the second node device, the first server is called through the first client on the first node device to perform the first communication between the first server and the third node device, and the target cloud storage device is mounted on the physical server through the first communication, wherein the mount response is used to indicate that the third node device has set the first target configuration for the physical server, and the target cloud storage device is a cloud storage device in a group of cloud storage devices. Thus, the technical effect that the physical server can mount the block device of the storage cluster through the network is achieved, thereby solving the technical problem that the cloud platform does not support the physical server to mount the block device of the storage cluster.

[0054] Optionally, after sending a second mount request to the second node device on the first node device, the above method also includes: obtaining the IP address of the third node device from the second server through the second client on the second node device, wherein the second client is set on the second node device and the second server is set on the third node device; registering the identifier of the physical server to the second server on the second node device through the IP address, so that the second server sets the first target configuration for the physical server according to the identifier of the physical server.

[0055] As an optional implementation, the second client is a client set on the Cinder of the second node device, and the second client may be a Target client. The second server is set in the third node device, and the second server may be a Target server.

[0056] As an optional implementation, combining Figure 3 Let's take an example to illustrate the process of physical server mounting. Figure 4 The following is a schematic diagram of an optional physical server mounting process according to an embodiment of the present invention, which may include the following steps:

[0057] Step S402: The user initiates a first mount request to the nova component in the first node device, wherein the first mount request may be a request for a physical server to mount a Ceph Rbd Iscsi disk.

[0058] Step S404: Nova calls Ironic in the first node device, and calls the first server set on the physical server through the first client to obtain the identifier of the physical server, wherein the identifier of the physical server may be the name of the physical server in Iscsi, which is Iscsi initiator name.

[0059] Step S406, Nova in the first node device calls Cinder in the second node device. Specifically, a second mount request may be sent to Cinder in the second node device, and the second mount request carries the identifier of the physical server. The second node device calls the second server on the third node device through the second client, obtains the IP address of the third node device, and some information about the logical volume lun, and registers the identifier of the physical server in the second server.

[0060] Optionally, after registering the physical server's identifier to the second server on the second node device, the above method also includes: writing the physical server's identifier to the kernel file system through the second server on the third node device, and adding the logical volume to the target object corresponding to the physical server's identifier to indicate that the physical server is allowed to access the volume in the cloud storage device corresponding to the target object.

[0061] As an optional implementation, the target object may be a host object, and the kernel file system may be a configfs kernel file system. In the above step S406, the second server may write the identifier of the physical server into the kernel file system configfs. When the second server may write the identifier of the physical server into the kernel file system configfs, a host object may be generated, and the host object corresponds to the identifier of the physical server. Adding the logical volume lun to the host object of the physical server identifier indicates that the physical server can access this volume.

[0062] Optionally, before adding the logical volume to the target object corresponding to the identifier of the physical server, the method further includes: creating an Iscsi-related kernel object in the kernel through a configuration module on the third node device, wherein the Iscsi-related kernel object includes the logical volume.

[0063] As an optional implementation, the configuration module in the third node device will create Iscsi-related kernel objects in the / sys / kernel / config kernel, such as target, tpg, logical volume lun, etc., wherein the configuration module may be configfs.

[0064] Optionally, a first communication is performed between the first server and the third node device, and the target cloud storage device is mounted on the physical server through the first communication, including: sending a target control instruction to the target port on the third node device through the first server on the physical server, wherein the target control instruction is used to mount the target cloud storage device on the physical server, the target port is a port started by the third node device through a created kernel thread, and the first target configuration includes starting the target port.

[0065] As an optional implementation, a kernel object is pre-created in the kernel file system configfs, for example, a target kernel object. The target kernel object triggers the Lio kernel module to create an instance, for example, a targetinstance instance. The kernel thread created by the instance starts the target port, and the target port serves as the port of the data flow of the target in Iscsi. The target port can be port 3260. The physical server can send instructions through the target port in the third node device of the first server, thereby establishing a communication connection between the physical server and the third node device, and the communication connection that can be established can send target control instructions to achieve the first communication.

[0066] As an optional implementation, the process of mounting the physical server also includes:

[0067] Step S408, after Nova in the first node device calls Cinder in the second node device and returns the information, it sends it to the Ironic component. The Ironic component calls the first server by calling the first client. The first server communicates with the kernel-state target port of the third node device through corresponding commands (for example, Iscsi's discover and login commands). In this way, Ceph Rbd can be mounted on the physical server in Iscsi mode for use.

[0068] In this embodiment, the bare metal physical server is mounted to Ceph Rbd Iscsi through steps S402 to S408 in the above physical server mounting process.

[0069] Optionally, after mounting the target cloud storage device on the physical server, the above method also includes: obtaining a first unloading request on the first node device, wherein the first unloading request is used to request to unload the target cloud storage device mounted on the physical server; obtaining the identification of the physical server from the first server through the first client on the first node device; sending a second unloading request to the second node device on the first node device, wherein the second unloading request carries the identification of the physical server, and the second unloading request is used to request the second node device to set a second target configuration for the physical server through the third node device, and the second target configuration is used to allow the physical server to communicate with the third node device; in the case of obtaining the unloading response sent by the second node device, calling the first server through the first client on the first node device to perform a second communication between the first server and the third node device, and unloading the target cloud storage device from the physical server through the second communication, wherein the unloading response is used to indicate that the third node device has set the second target configuration for the physical server.

[0070] As an optional implementation, the uninstallation of Ceph Rbd Iscsi by the physical server is similar to the above-mentioned mounting process. Figure 3 The following is an example of the process of uninstalling a physical server, which may include the following steps:

[0071] Step S502: The user initiates a first uninstallation request to the nova component in the first node device, wherein the first uninstallation request may be a request for the physical server to uninstall the Ceph Rbd Iscsi disk.

[0072] Step S504: Nova calls Ironic in the first node device, and calls the first server set on the physical server through the first client to obtain the identifier of the physical server, wherein the identifier of the physical server may be the name of the physical server in Iscsi, that is, Iscsi initiator name.

[0073] Step S506, Nova in the first node device calls Cinder in the second node device. Specifically, a second uninstallation request may be sent to Cinder in the second node device, and the second uninstallation request carries the identifier of the physical server. The second node device calls the second server on the third node device through the second client, obtains the IP address of the third node device, and some information about the logical volume lun, and registers the identifier of the physical server in the second server.

[0074] Step S508, after Nova in the first node device calls Cinder in the second node device, it sends the return information to the Ironic component. The Ironic component calls the first server by calling the first client. The first server communicates with the kernel state target port of the third node device through corresponding commands (for example, Iscsi's discover and login commands). In this way, Ceph Rbd can be uninstalled on the physical server through Iscsi.

[0075] Optionally, after mounting the target cloud storage device on the physical server, the above method also includes: obtaining a target volume operation request sent by a second client through a second server on a third node device, wherein the second client is set on the second node device, the second server is set on a third node device, and the target volume operation request is used to perform a target control operation on the volume on the target cloud storage device; in response to the target volume operation request, performing a target control operation on the volume on the target cloud storage device through a third client on the third node device, wherein the third client is set in the third node device.

[0076] As an optional implementation, the volume control panel provides users with volume management operations, including volume addition, deletion, modification, and query, volume snapshot operations, and volume expansion operations. The services mainly involved are Cinder's Rbd Iscsi driver and the second server. In this embodiment, Figure 5 is a schematic diagram of an optional volume control panel according to an embodiment of the present invention, combined with Figure 5 To explain the volume control panel:

[0077] As an optional implementation, a third client is provided in the third node device, and the third client may be a Ceph client. The Rbd iscsi driver in the second node device is a plug-in for Cinder to operate Ceph iscsi Rbd, and this plug-in defines all operations of the volume control plane, and each operation sends a target volume operation request to the second server through the second client.

[0078] The second server in the third device node receives the target volume operation request sent by the second node device through the second client in Cinder. The second server can receive various requests through the interface API, including the target volume operation request. Then, the request is sent to the processing module of each resource through routing for processing. The operation is performed through the third client in the third node device.

[0079] Optionally, performing a target control operation on the volume on the target cloud storage device through a third client on the third node device includes: performing a target control operation on the volume on the target cloud storage device using the librbd library through the third client on the third node device; wherein the target control operation includes at least one of the following operations: a volume addition operation, a volume deletion operation, a volume modification operation, and a volume search operation.

[0080] As an optional implementation, the target cloud storage device can be a Ceph cluster. The second server can receive various resource requests through the interface API, and each resource request will be operated through the configuration module configfs in the third node device and the third client respectively, wherein the kernel file system configfs will create Iscsi-related kernel objects in the / sys / kernel / config kernel, such as target, tpg, logical volume lun, etc., and the third client will use the librbd library to perform target control operations on the Ceph cluster's Rbd block device.

[0081] In this embodiment, the target control operation includes: volume addition operation, such as adding a new volume in the Ceph cluster; volume deletion operation, such as deleting a volume in the Ceph cluster; volume modification operation, such as modifying the content of the volume in the Ceph cluster or the name of the volume, and the modified volume is stored in the Ceph cluster; volume search operation, such as searching for a volume through the volume identity, and the volume identity can be the name, attributes and other information of the volume.

[0082] Optionally, after mounting the target cloud storage device on the physical server, the method further includes: obtaining, on a third node device, a data write request sent by the physical server, wherein the data write request is used to request that the first target data be written to the target cloud storage device; in response to the data write request, writing the first target data to the target cloud storage device through a second server on the third node device, wherein the second server is set on the third node device.

[0083] As an optional implementation, after the target cloud storage device is mounted on the physical server, data can be written to the target cloud storage device on the bare metal physical server. The target cloud storage device can be a Ceph storage cluster. In this embodiment, after the target cloud storage device Ceph Rbd Iscsi is mounted on the physical server, the user can initiate a write data request in the physical server, and the physical server sends the write data request to the third node device, wherein the write data request initiated by the user is used to indicate that data is written to the target cloud storage device Ceph Rbd Iscsi, and the write data request carries the first target data that the user wants to write. The third node device can write the first target data to the corresponding Rbd volume in the Ceph cluster through the second server.

[0084] Optionally, writing the first target data to the target cloud storage device through the second server on the third node device includes: storing the first target data in a shared memory on the third node device; reading the first target data from the shared memory by starting the first thread on the third node device, and writing the first target data to a corresponding volume in the target cloud storage device.

[0085] As an optional implementation, Figure 6 This is a schematic diagram of a data plane of an optional physical server cloud hard disk according to an embodiment of the present invention. Figure 6 The data writing process of the Rbd Iscsi disk under the bare metal is described. It should be noted that Figure 6The physical servers include physical server 1 and physical server 2. Physical server 1 and physical server 2 are only for illustrating this application. In actual applications, the number of physical servers is not limited and can be determined according to actual conditions. For example, it can be 100 physical servers, 1,000 servers, 10,000 servers, etc.

[0086] After the target cloud storage device Ceph cluster is mounted to the physical server, a drive letter will be generated. The generated drive letter is related to the bus, for example, the sdb drive letter. Taking writing sdb as an example, when the application in the physical server writes the sdb disk, it will send the write data request to the instance of the target port of the third node device according to the Iscsi protocol, for example, the Targetinstance instance of port 3260. After receiving the Iscsi write data request command, the instance will pass the request to the Lio submodule target core user in the third node device, and the target core user submodule will write the first target data carried in the write data request into the shared memory.

[0087] In this embodiment, the second server in the third node device includes a target worker module, which is used to write Rbd data to the Ceph cluster. The disk mapped on the physical server will start the first thread (for example, worker thread) in the target worker to manage the real Rbd volume in the Ceph cluster. Figure 7 This is an optional schematic diagram of creating a worker thread according to an embodiment of the present invention, wherein the worker thread includes worker1 and worker2, worker1 and worker2 are only for illustrating the present application, and the number of worker threads created in actual applications can be determined according to actual conditions, and is not limited here, for example, it can also include: worker3, worker4...workerN, and the number of N can be determined according to actual conditions, such as 100, 1000, tens of thousands, etc. The worker service notifies the second server when Cinder creates a volume, and the second server constructs a kernel object through the kernel file system configfs, and then the kernel object triggers the generation of targetworker to generate a worker thread through uio. Target worker obtains the first target data requested to be written by the physical server through shared memory, and writes the first target data to the corresponding Rbd volume in the Ceph cluster.

[0088] Optionally, after mounting the target cloud storage device on the physical server, the above method also includes: obtaining a data read request sent by the physical server on a third node device, wherein the data read request is used to request to read second target data from the target cloud storage device; in response to the data read request, reading the second target data from the target cloud storage device through the second server on the third node device, wherein the second server is set on the third node device.

[0089] After the target cloud storage device is mounted on the physical server, the data stored in the target cloud storage device can also be read on the bare metal physical server. The target cloud storage device can be a Ceph storage cluster. In this embodiment, after the target cloud storage device Ceph Rbd Iscsi is mounted on the physical server, the user can initiate a read data request in the physical server, and the physical server sends the read data request to the third node device, wherein the read data request initiated by the user is used to request to read the second target data from the target cloud storage device, and the write data request carries relevant information of the second target data that the user wants to read, such as the identity of the second target data, the storage address of the second target data, etc. The third node device can read the second target data stored in the corresponding Rbd volume in the Ceph cluster through the second server.

[0090] Optionally, the second target data is read from the target cloud storage device through the second server on the third node device, including: reading the second target data from the corresponding volume in the target cloud storage device by starting the second thread on the third node device; storing the second target data in a shared memory on the third node device, so that the physical server reads the second target data from the shared memory.

[0091] Combination Figure 6 The following is an explanation of the data flow process of reading Rbd Iscsi disk under bare metal: the second server in the third node device includes a target worker module, which is used to read Rbd data from the Ceph cluster. The disk mapped on the physical server will start the second thread in the target worker to manage the real Rbd volume in the Ceph cluster. The second thread and the first thread can be the same thread (for example, worker thread). The worker service notifies the target server when Cinder creates a volume. The target server constructs a kernel object through the kernel file system configfs, and then the kernel object triggers the generation of a target worker to generate a worker thread through uio. The target worker obtains the second target data stored in the Rbd volume of the Ceph cluster through shared memory.

[0092] After the target cloud storage device Ceph Rbd Iscsi is mounted to the physical server, a drive letter will be generated. The generated drive letter is related to the bus, for example, the sdb drive letter. Taking reading sdb as an example, when the application in the physical server reads the sdb disk, it will send the read data request to the instance of the target port of the third node target node according to the Iscsi protocol, for example, the Target instance instance of port 3260. After receiving the Iscsi read data request command, the instance will pass the request to the Lio submodule target core user in the third node device, and the target core user submodule will obtain the second target data in the shared memory.

[0093] In this application, by implementing the Iscsi target server based on Ceph and implementing Cinder's RbdIscsi driver, the Iscsi initiator service is added to the bare metal physical server, so that the physical server can mount the Rbd block device like a virtual machine. This allows the Openstack cloud platform to mount the Rbd block device of Ceph through the network, which can improve the user experience of the cloud platform and improve the service quality on the cloud storage device.

[0094] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0095] According to another aspect of an embodiment of the present invention, a control device for a cloud storage device is provided for implementing the control method for the cloud storage device. Figure 8As shown, the device includes: a first acquisition module 82, which is used to acquire a first mount request on a first node device, wherein the first mount request is used to request to mount a cloud storage device to a physical server; a second acquisition module 84, which is used to acquire an identifier of the physical server from the first server through a first client on the first node device, wherein the first client is set on the first node device, and the first server is set on the physical server; a sending module 86, which is used to send a second mount request to the second node device on the first node device, wherein the second mount request carries the identifier of the physical server, and the second mount request is used to request the second node device to set a first target configuration for the physical server through a third node device, and the first target configuration is used to allow the physical server to communicate with the third node device, and the third node device is connected to a group of cloud storage devices; a calling module 88, which is used to call the first server through the first client on the first node device in the case of acquiring a mount response sent by the second node device, so as to perform a first communication between the first server and the third node device, and mount the target cloud storage device on the physical server through the first communication, wherein the mount response is used to indicate that the third node device has set the first target configuration for the physical server, and the target cloud storage device is a cloud storage device in a group of cloud storage devices.

[0096] Optionally, the above-mentioned device is also used to obtain the IP address of the third node device from the second server through the second client on the second node device after sending a second mount request to the second node device on the first node device, wherein the second client is set on the second node device and the second server is set on the third node device; through the IP address, register the identifier of the physical server to the second server on the second node device, so that the second server sets the first target configuration for the physical server according to the identifier of the physical server.

[0097] Optionally, the above-mentioned device is also used to register the physical server identifier in the second server on the second node device, write the physical server identifier into the kernel file system through the second server on the third node device, and add the logical volume under the target object corresponding to the physical server identifier to indicate that the physical server is allowed to access the volume in the cloud storage device corresponding to the target object.

[0098] Optionally, the apparatus is further configured to create an Iscsi-related kernel object in the kernel through a configuration module on a third node device before adding the logical volume to the target object corresponding to the identifier of the physical server, wherein the Iscsi-related kernel object includes the logical volume.

[0099] Optionally, the above-mentioned device is also used to implement a first communication between the first server and the third node device in the following manner, and to mount the target cloud storage device on the physical server through the first communication: sending a target control instruction to the target port on the third node device through the first server on the physical server, wherein the target control instruction is used to mount the target cloud storage device on the physical server, the target port is the port started by the third node device through the created kernel thread, and the first target configuration includes starting the target port.

[0100] Optionally, the above-mentioned device is also used to obtain a first unloading request on the first node device after mounting the target cloud storage device on the physical server, wherein the first unloading request is used to request to unload the target cloud storage device mounted on the physical server; obtain the identification of the physical server from the first server through the first client on the first node device; send a second unloading request to the second node device on the first node device, wherein the second unloading request carries the identification of the physical server, and the second unloading request is used to request the second node device to set a second target configuration for the physical server through the third node device, and the second target configuration is used to allow the physical server to communicate with the third node device; when the unloading response sent by the second node device is obtained, call the first server through the first client on the first node device to perform a second communication between the first server and the third node device, and uninstall the target cloud storage device from the physical server through the second communication, wherein the unloading response is used to indicate that the third node device has set the second target configuration for the physical server.

[0101] Optionally, the above-mentioned device is also used to obtain a target volume operation request sent by a second client through a second server on a third node device after mounting the target cloud storage device on a physical server, wherein the second client is set on the second node device, the second server is set on a third node device, and the target volume operation request is used to perform a target control operation on the volume on the target cloud storage device; in response to the target volume operation request, perform a target control operation on the volume on the target cloud storage device through a third client on the third node device, wherein the third client is set in the third node device.

[0102] Optionally, the above-mentioned device is also used to implement target control operations on the volumes on the target cloud storage device through a third client on a third node device in the following manner: using the libRbd library through a third client on the third node device to perform target control operations on the volumes on the target cloud storage device; wherein the target control operation includes at least one of the following operations: volume addition operation, volume deletion operation, volume modification operation, and volume search operation.

[0103] Optionally, the above-mentioned device is also used to obtain a data write request sent by the physical server on the third node device after the target cloud storage device is mounted on the physical server, wherein the data write request is used to request to write the first target data to the target cloud storage device; in response to the data write request, write the first target data to the target cloud storage device through the second server on the third node device, wherein the second server is set on the third node device.

[0104] Optionally, the above-mentioned device is also used to implement writing the first target data to the target cloud storage device through the second server on the third node device in the following manner: storing the first target data in a shared memory on the third node device; reading the first target data from the shared memory by starting the first thread on the third node device, and writing the first target data to the corresponding volume in the target cloud storage device.

[0105] Optionally, the above-mentioned device is also used to obtain a data read request sent by the physical server on a third node device after the target cloud storage device is mounted on the physical server, wherein the data read request is used to request to read the second target data from the target cloud storage device; in response to the data read request, read the second target data from the target cloud storage device through the second server on the third node device, wherein the second server is set on the third node device.

[0106] Optionally, the above-mentioned device is also used to implement reading the second target data from the target cloud storage device through the second server on the third node device in the following manner: reading the second target data from the corresponding volume in the target cloud storage device by starting the second thread on the third node device; storing the second target data in the shared memory on the third node device, so that the physical server reads the second target data from the shared memory.

[0107] According to another aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the control method of the cloud storage device. The electronic device may be Figure 1 The first node device shown in the figure may be a server with computing capabilities. This embodiment is described by taking the electronic device as a server as an example. Fig. 9 As shown, the electronic device includes a memory 902 and a processor 904. The memory 902 stores a computer program, and the processor 904 is configured to execute the steps in any of the above method embodiments through the computer program.

[0108] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0109] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0110] S1, obtaining a first mount request on a first node device, wherein the first mount request is used to request to mount a cloud storage device to a physical server;

[0111] S2, obtaining, on the first node device, an identifier of the physical server from the first server through the first client, wherein the first client is set on the first node device, and the first server is set on the physical server;

[0112] S3, sending a second mount request to the second node device on the first node device, wherein the second mount request carries an identifier of the physical server, and the second mount request is used to request the second node device to set a first target configuration for the physical server through the third node device, and the first target configuration is used to allow the physical server to communicate with the third node device, and the third node device is connected to a group of cloud storage devices;

[0113] S4, when obtaining the mount response sent by the second node device, calling the first server through the first client on the first node device to perform a first communication between the first server and the third node device, and mounting the target cloud storage device on the physical server through the first communication, wherein the mount response is used to indicate that the third node device has set the first target configuration for the physical server, and the target cloud storage device is a cloud storage device in a group of cloud storage devices.

[0114] Alternatively, a person skilled in the art may understand that: Fig. 9 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Fig. 9 The electronic device and the electronic equipment described above are not limited in structure. Fig. 9 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig. 9 Different configurations are shown.

[0115] Among them, the memory 902 can be used to store software programs and modules, such as the program instructions / modules corresponding to the control method and device of the cloud storage device in the embodiment of the present invention. The processor 904 executes various functional applications and data processing by running the software programs and modules stored in the memory 902, that is, realizing the control method of the cloud storage device mentioned above. The memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 902 may further include a memory remotely arranged relative to the processor 904, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 902 can be specifically, but not limited to, used to store information such as sample characteristics of items and target virtual resource accounts. As an example, if Fig. 9 As shown, the memory 902 may include, but is not limited to, the first acquisition module 82, the second acquisition module 84, the sending module 86, and the calling module 88 in the control device of the cloud storage device. In addition, it may also include, but is not limited to, other module units in the control device of the cloud storage device, which will not be repeated in this example.

[0116] Optionally, the transmission device 906 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 906 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 906 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0117] In addition, the electronic device further includes: a display 908 for displaying relevant information of the target cloud storage device; and a connection bus 910 for connecting various module components in the electronic device.

[0118] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P, Peer To Peer) network, and any form of computing device, such as a server, terminal and other electronic devices, may become a node in the blockchain system by joining the peer-to-peer network.

[0119] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the methods provided in the above-mentioned various optional implementations. The computer program is configured to perform the steps of any of the above-mentioned method embodiments when it is run.

[0120] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0121] S1, obtaining a first mount request on a first node device, wherein the first mount request is used to request to mount a cloud storage device to a physical server;

[0122] S2, obtaining, on the first node device, an identifier of the physical server from the first server through the first client, wherein the first client is set on the first node device, and the first server is set on the physical server;

[0123] S3, sending a second mount request to the second node device on the first node device, wherein the second mount request carries an identifier of the physical server, and the second mount request is used to request the second node device to set a first target configuration for the physical server through the third node device, and the first target configuration is used to allow the physical server to communicate with the third node device, and the third node device is connected to a group of cloud storage devices;

[0124] S4, when obtaining the mount response sent by the second node device, calling the first server through the first client on the first node device to perform a first communication between the first server and the third node device, and mounting the target cloud storage device on the physical server through the first communication, wherein the mount response is used to indicate that the third node device has set the first target configuration for the physical server, and the target cloud storage device is a cloud storage device in a group of cloud storage devices.

[0125] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0126] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0127] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.

[0128] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0129] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0130] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0131] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0132] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for controlling a cloud storage device, characterized in that: include: Obtaining a first mount request on the first node device, wherein the first mount request is used to request to mount a cloud storage device to the physical server; Acquire, on the first node device, an identifier of the physical server from a first server through a first client, wherein the first client is set on the first node device, and the first server is set on the physical server; Sending a second mount request to a second node device on the first node device, wherein the second mount request carries an identifier of the physical server, and the second mount request is used to request the second node device to set a first target configuration for the physical server through a third node device, and the first target configuration is used to allow the physical server to communicate with the third node device, and the third node device is connected to a group of cloud storage devices; Obtaining the IP address of the third node device from the second server through the second client on the second node device, wherein the second client is set on the second node device, and the second server is set on the third node device; registering the identifier of the physical server to the second server on the second node device through the IP address, so that the second server sets the first target configuration for the physical server according to the identifier of the physical server; In case of obtaining the mount response sent by the second node device, the first server is called through the first client on the first node device to perform a first communication between the first server and the third node device, and the target cloud storage device is mounted on the physical server through the first communication, wherein the mount response is used to indicate that the third node device has set the first target configuration for the physical server, and the target cloud storage device is a cloud storage device in the group of cloud storage devices.

2. The method according to claim 1, characterized in that After adding the identifier of the physical server to the second server on the second node device, the method further includes: On the third node device, the identifier of the physical server is written into the kernel file system through the second server, and the logical volume is added under the target object corresponding to the identifier of the physical server to indicate that the physical server is allowed to access the volume in the cloud storage device corresponding to the target object.

3. The method according to claim 2, characterized in that Before adding the logical volume to the target object corresponding to the identifier of the physical server, the method further includes: On the third node device, an Iscsi-related kernel object is created in the kernel through a configuration module, wherein the Iscsi-related kernel object includes a logical volume.

4. The method according to claim 1, characterized in that: The performing first communication between the first server and the third node device, and mounting the target cloud storage device on the physical server through the first communication, includes: A target control instruction is sent on the physical server to a target port on the third node device through the first server, wherein the target control instruction is used to mount the target cloud storage device on the physical server, the target port is a port started by the third node device through a created kernel thread, and the first target configuration includes starting the target port.

5. The method according to claim 1, characterized in that After mounting the target cloud storage device on the physical server, the method further includes: Acquire a first uninstallation request on the first node device, wherein the first uninstallation request is used to request uninstallation of the target cloud storage device mounted on the physical server; Obtaining, on the first node device, an identifier of the physical server from the first server through the first client; Sending a second uninstallation request to the second node device on the first node device, wherein the second uninstallation request carries an identifier of the physical server, and the second uninstallation request is used to request the second node device to set a second target configuration for the physical server through the third node device, and the second target configuration is used to allow the physical server to communicate with the third node device; In case of obtaining the uninstall response sent by the second node device, the first server is called through the first client on the first node device to perform a second communication between the first server and the third node device, and the target cloud storage device is uninstalled from the physical server through the second communication, wherein the uninstall response is used to indicate that the third node device has set the second target configuration for the physical server.

6. The method according to claim 1, characterized in that After mounting the target cloud storage device on the physical server, the method further includes: acquiring, on the third node device, through the second server, a target volume operation request sent by the second client, wherein the target volume operation request is used to perform a target control operation on the volume on the target cloud storage device; In response to the target volume operation request, a target control operation is performed on the volume on the target cloud storage device through a third client on the third node device, wherein the third client is set in the third node device.

7. The method according to claim 6, characterized in that The performing a target control operation on the volume on the target cloud storage device through the third client on the third node device includes: Perform the target control operation on the volume on the target cloud storage device by using the libRbd library through the third client on the third node device; The target control operation includes at least one of the following operations: a volume adding operation, a volume deleting operation, a volume modifying operation, and a volume searching operation.

8. The method according to claim 1, characterized in that After mounting the target cloud storage device on the physical server, the method further includes: Acquire, on the third node device, a data write request sent by the physical server, wherein the data write request is used to request to write the first target data into the target cloud storage device; In response to the data write request, the first target data is written to the target cloud storage device through the second server on the third node device.

9. The method according to claim 8, characterized in that Writing the first target data to the target cloud storage device through the second server on the third node device includes: storing the first target data in a shared memory on the third node device; The first target data is read from the shared memory by starting a first thread on the third node device, and the first target data is written into a corresponding volume in the target cloud storage device.

10. The method according to claim 1, characterized in that After mounting the target cloud storage device on the physical server, the method further includes: Acquire, on the third node device, a data read request sent by the physical server, wherein the data read request is used to request to read second target data from the target cloud storage device; In response to the data read request, the second target data is read from the target cloud storage device through the second server on the third node device.

11. The method according to claim 10, characterized in that Reading the second target data from the target cloud storage device through the second server on the third node device includes: Reading the second target data from the corresponding volume in the target cloud storage device by starting the second thread on the third node device; The second target data is stored in a shared memory on the third node device, so that the physical server reads the second target data from the shared memory.

12. A control device for a cloud storage device, characterized in that: include: A first acquisition module, configured to acquire a first mount request on a first node device, wherein the first mount request is used to request to mount a cloud storage device to a physical server; A second acquisition module, configured to acquire, on the first node device, an identifier of the physical server from a first server through a first client, wherein the first client is set on the first node device and the first server is set on the physical server; a sending module, configured to send a second mount request on the first node device to the second node device, wherein the second mount request carries an identifier of the physical server, and the second mount request is used to request the second node device to set a first target configuration for the physical server through a third node device, and the first target configuration is used to allow the physical server to communicate with the third node device, and the third node device is connected to a group of cloud storage devices; a calling module, configured to, upon obtaining a mount response sent by the second node device, call the first server through the first client on the first node device, so as to perform a first communication between the first server and the third node device, and mount the target cloud storage device on the physical server through the first communication, wherein the mount response is used to indicate that the third node device has set the first target configuration for the physical server, and the target cloud storage device is a cloud storage device in the group of cloud storage devices; The device is also used to: obtain the IP address of the third node device from the second server through the second client on the second node device, wherein the second client is set on the second node device and the second server is set on the third node device; and register the identifier of the physical server to the second server on the second node device through the IP address, so that the second server sets the first target configuration for the physical server according to the identifier of the physical server.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 11 when executed.

14. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 11 through the computer program.

Citation Information

Patent Citations

  • Method and system for mounting cloud hard disk on bare metal server and server

    CN111694519A