A method, device, equipment and medium for mounting file storage
Patent Information
- Application Number
- CN202311325075.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-10-13
AI Technical Summary
当前云主机可视化挂载存在一些限制条件,云主机必须要满足这些条件后,才能进行可视化挂载,这些限制条件的存在,使得文件存储的可视化挂载变的很复杂,进而让用户感觉功能不好用
[0038]The present invention has the following beneficial technical effects: The method for mounting and storing files provided in the embodiments of the present invention, by responding to a request for mounting and storing files, parsing the parameters in the request, and sending the request to a first component; responding to the first component receiving the request for mounting and storing files, creating and configuring a proxy cloud host in the first component, and adding a temporary network card to the cloud host; the proxy cloud host pushing a proxy program to the cloud host and running the proxy program in the cloud host to install a preset file in the cloud host; and responding to the completion of the installation of the preset file, calling the preset file through the preset program in the first component to perform the operation of mounting and storing files, can reduce the difficulty of mounting and storing files, improve the efficiency of mounting and storing files, reduce the process of mounting and storing files, and improve user satisfaction.
Smart Images

Figure CN117349250B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computers, and more specifically to a method, apparatus, device, and readable medium for mounting file storage. Background Technology
[0002] The cloud management platform integrates cloud management, virtualization cloud platform and container cloud platform, realizing unified scheduling and management of underlying computing, storage, network and security resources of cloud data center, enabling dynamic changes of business and intelligent management of resources. Through effective monitoring and flexible scheduling of large-scale hardware resources, it ensures the security and reliability of user data, improves the utilization rate of the entire data center resources, greatly improves the efficiency of IT operation and maintenance, and reduces the maintenance cost of data center.
[0003] The cloud management platform provides file storage services to users through OpenStack Manila, supporting NFS and CIFS protocols. Currently, there are some limitations to visual mounting of cloud hosts. Cloud hosts must meet certain conditions before visual mounting can be performed. These limitations make visual mounting of file storage complex, leading users to find the function unusable. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a method, apparatus, device and readable medium for mounting and storing files. By using the technical solution of this invention, the difficulty of mounting and storing files can be reduced, the efficiency of mounting and storing files can be improved, the process of mounting and storing files can be reduced, and user satisfaction can be increased.
[0005] To achieve the above objectives, one aspect of the present invention provides a method for mounting file storage, comprising the following steps:
[0006] In response to receiving a request to mount file storage, the parameters in the request are parsed and a request to mount file storage is sent to the first component;
[0007] In response to the first component receiving a file storage request, a proxy cloud host is created and configured in the first component, and a temporary network interface card is added to the cloud host;
[0008] The proxy cloud server pushes the proxy program to the cloud server and runs the proxy program on the cloud server to install preset files on the cloud server;
[0009] In response to the completion of the installation of the preset file, the preset program in the first component calls the preset file to perform the operation of mounting the file storage.
[0010] According to one embodiment of the present invention, in response to a first component receiving a file storage mount request, the first component creates and configures a proxy cloud host, and adds a temporary network interface card to the cloud host, including:
[0011] In response to the first component receiving a file storage request, a proxy cloud host is created in the first component, and the proxy cloud host is connected to the cloud host's preset subnet;
[0012] Bind a floating IP address to the proxy cloud server and enable the proxy cloud server to communicate with the external management network through the floating IP address;
[0013] Configure read and write access permissions for the floating IP bound to the proxy cloud server to give the proxy cloud server access to the mounted file storage;
[0014] Enable source address translation in the router of the external management network;
[0015] The nova_compute service in the first component is invoked to add a temporary network interface card (NIC) to the cloud host and connect the temporary NIC to the cloud host's preset subnet so that the cloud host can communicate with the external management network via the temporary NIC.
[0016] According to one embodiment of the present invention, the agent cloud host pushes the agent program to the cloud host and runs the agent program on the cloud host to install preset files on the cloud host, including:
[0017] The proxy cloud server logs in to the cloud server via SSH and pushes the proxy program to the cloud server;
[0018] Run the agent in the cloud server to connect to the software repository;
[0019] Based on the settings in the agent program, download and install the corresponding software installation package from the software repository to install the preset files on the cloud server.
[0020] According to one embodiment of the present invention, in response to the completion of the installation of a preset file, the operation of mounting file storage is performed by calling the preset file through a preset program in the first component, including:
[0021] In response to the completion of the installation of the preset file, the preset program in the first component calls the preset file to create the file directory for mounting the file storage.
[0022] In response to the completion of file directory creation, a preset command is sent to the cloud host to execute the file storage mounting operation.
[0023] According to one embodiment of the present invention, in response to receiving a request to mount file storage, parsing the parameters in the request and sending the mount file storage request to the first component includes:
[0024] In response to receiving a request to mount a file for storage, the system parses the cloud host's unique identifier, the storage path of the file to be mounted, and the mount directory of the file to be mounted on the cloud host.
[0025] According to one embodiment of the present invention, it further includes:
[0026] In response to the completion of the file storage mounting operation, the nova_compute service is invoked to delete the temporary network interface card bound to the cloud host.
[0027] According to one embodiment of the present invention, it further includes:
[0028] In response to the completion of the mount file storage operation, the mount record in the database table is updated via the second component.
[0029] In another aspect, embodiments of the present invention also provide an apparatus for mounting file storage, the apparatus comprising:
[0030] The parsing module is configured to respond to a request to mount a file for storage, parse the parameters in the request, and send the request to the first component.
[0031] Create a module, which is configured to respond to the first component receiving a file storage request, create a proxy cloud host in the first component, configure the proxy cloud host, and add a temporary network card to the cloud host;
[0032] The installation module is configured to push the agent program to the cloud host and run the agent program in the cloud host to install preset files.
[0033] The execution module is configured to, in response to the completion of the installation of the preset file, call the preset file through the preset program in the first component to perform the operation of mounting the file storage.
[0034] Another aspect of the embodiments of the present invention also provides a computer device, the computer device comprising:
[0035] At least one processor; and
[0036] The memory stores computer instructions that can be executed by a processor, which, when executed by the processor, implement the steps of any of the methods described above.
[0037] In another aspect, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above methods.
[0038] The present invention has the following beneficial technical effects: The method for mounting and storing files provided in the embodiments of the present invention, by responding to a request for mounting and storing files, parsing the parameters in the request, and sending the request to a first component; responding to the first component receiving the request for mounting and storing files, creating and configuring a proxy cloud host in the first component, and adding a temporary network card to the cloud host; the proxy cloud host pushing a proxy program to the cloud host and running the proxy program in the cloud host to install a preset file in the cloud host; and responding to the completion of the installation of the preset file, calling the preset file through the preset program in the first component to perform the operation of mounting and storing files, can reduce the difficulty of mounting and storing files, improve the efficiency of mounting and storing files, reduce the process of mounting and storing files, and improve user satisfaction. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic flowchart illustrating a method for mounting file storage according to an embodiment of the present invention;
[0041] Figure 2 This is a schematic diagram of a method for mounting file storage according to an embodiment of the present invention;
[0042] Figure 3 This is a schematic diagram of a device for mounting file storage according to an embodiment of the present invention;
[0043] Figure 4 This is a schematic diagram of a computer device according to an embodiment of the present invention;
[0044] Figure 5 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.
[0046] Based on the above objectives, a first aspect of the embodiments of the present invention provides an embodiment of a method for mounting file storage. Figure 1 The diagram shown is a schematic flowchart of the method.
[0047] like Figure 1As shown, the method may include the following steps:
[0048] Upon receiving a request to mount a file for storage, S1 parses the parameters in the request and sends the request to the first component. After receiving the request, S1 parses the parameters included in the request, which include the cloud host's Universal Unique Identifier (UUID), the storage path of the file to be mounted, and the mount directory on the cloud host to which the file will be mounted (e.g., mounting the file to the / home / share directory on the cloud host). Then, the parsed mount information is updated and recorded in the database table.
[0049] S2 responds to the first component receiving a file mount request by creating and configuring a proxy cloud host within the first component, and adding a temporary network interface card (NIC) to the cloud host. The first component includes the Nova component on the cloud platform. Upon receiving the file mount request, the first component creates a proxy cloud host and connects it to a preset subnet of the cloud host. This preset subnet can be one of multiple subnets of the cloud host. Then, a floating IP address is bound to the proxy cloud host, enabling it to communicate with the external management network via the floating IP. Read and write access permissions are then set for the floating IP bound to the proxy cloud host to grant it access to the mounted file storage. These permissions include default read or read-write access, which can be modified as needed. Source address translation is then enabled on the router of the external management network. Finally, the nova_compute service in the first component is called to add a temporary NIC to the cloud host and connect it to the preset subnet of the cloud host, enabling the cloud host to communicate with the external management network via the temporary NIC. The preset subnet to which the temporary NIC is connected is the same subnet as the proxy cloud host's subnet.
[0050] The S3 proxy cloud server pushes the proxy program to the cloud server and runs the proxy program on the cloud server to install preset files. The proxy cloud server logs into the cloud server via SSH, pushes the proxy program to the cloud server, runs the proxy program on the cloud server to connect to the software repository, and downloads and installs the corresponding software installation packages from the software repository based on the settings in the proxy program to install the preset files on the cloud server. These preset files include the Qemu-guest-agent file.
[0051] Upon completion of the preset file installation, S4 invokes the preset file in the first component to mount the file storage. After installation, the preset program in the first component creates the file directory for the mounted file storage. Once created, a preset command is sent to the cloud host to execute the file storage mounting operation. After mounting, the nova_compute service is invoked to remove the temporary network interface card bound to the cloud host, and the mount record in the database table is updated via the second component, which is the Manila component on the cloud platform.
[0052] By using the technical solution of this invention, the difficulty of mounting file storage can be reduced, the efficiency of mounting file storage can be improved, the process of mounting file storage can be simplified, and user satisfaction can be increased.
[0053] In a preferred embodiment of the present invention, in response to the first component receiving a file storage mounting request, the first component creates and configures a proxy cloud host, and adds a temporary network interface card to the cloud host, including:
[0054] In response to the first component receiving a file storage request, a proxy cloud host is created in the first component, and the proxy cloud host is connected to the cloud host's preset subnet;
[0055] Bind a floating IP address to the proxy cloud server and enable the proxy cloud server to communicate with the external management network through the floating IP address;
[0056] Configure read and write access permissions for the floating IP bound to the proxy cloud server to give the proxy cloud server access to the mounted file storage;
[0057] Enable source address translation in the router of the external management network;
[0058] The `nova_compute` service in the first component is invoked to add a temporary network interface card (NIC) to the cloud host, and the temporary NIC is connected to the cloud host's preset subnet so that the cloud host can communicate with the external management network via the temporary NIC. For example... Figure 2As shown, the first component is the Nova component in the cloud platform. The Nova component is responsible for the lifecycle management of the cloud host. After receiving a file storage mount request, the Nova component creates a proxy cloud host. This proxy cloud host exists in a business network, which is a subnet allocated to the cloud host. Then, a floating IP address is bound to the proxy cloud host, which communicates with the management network (the network connected to the external network) through this floating IP address. The router in the management network has SNAT (Source Address Translation) enabled by default. At this time, the nova_compute service in the Nova component adds a temporary network interface card (NIC) to the cloud host. The network where this NIC resides is the business network where the proxy cloud host resides. The business network of the proxy cloud host can communicate with the external network, and through the SNAT function, the cloud host can also communicate with the external network. Default read or read-write access permissions can be set for the floating IP address of the proxy cloud host. After setting the permissions, the proxy cloud host has access to the mounted file storage. Users can also modify the access permissions as needed.
[0059] In a preferred embodiment of the present invention, the proxy cloud host pushes the proxy program to the cloud host and runs the proxy program on the cloud host to install preset files on the cloud host, including:
[0060] The proxy cloud server logs in to the cloud server via SSH and pushes the proxy program to the cloud server;
[0061] Run the agent in the cloud server to connect to the software repository;
[0062] Based on the settings in the agent program, download and install the corresponding software installation package from the software repository to install the preset files on the cloud server. For example... Figure 2 As shown, the proxy cloud host can log in to the cloud host via SSH (Secure Shell) and then push an agent to the cloud host. The agent executes a shell file inside the cloud host. This shell file can be a pre-written script for downloading, installing, and configuring software. Through the execution of the shell file, it automatically connects to the software repository (which is placed on the cloud platform to provide users with some software installation packages), downloads the preset installation package from the software repository, and installs and configures it to install the Qemu-guest-agent file required for mounting file storage on the cloud host.
[0063] In a preferred embodiment of the present invention, in response to the completion of preset file installation, the operation of mounting file storage by calling the preset file through the preset program in the first component includes:
[0064] In response to the completion of the installation of the preset file, the preset program in the first component calls the preset file to create the file directory for mounting the file storage.
[0065] Upon completion of the file directory creation, a pre-defined command is sent to the cloud host to execute the file storage mounting operation. After the Qemu-guest-agent file is installed, the nova-compute service uses the libvirt_qemu_driver program to call the already installed Qemu-guest-agent file on the cloud host to create the file directory / home / share required for file storage mounting, and then sends the qga command to the cloud host to execute the file storage mounting operation.
[0066] In a preferred embodiment of the present invention, responding to receiving a request to mount a file for storage, parsing the parameters in the request, and sending the file mount request to the first component includes:
[0067] In response to receiving a request to mount a file for storage, the system parses the cloud host's unique identifier, the storage path of the file to be mounted, and the mount directory of the file to be mounted on the cloud host.
[0068] In a preferred embodiment of the present invention, it further includes:
[0069] In response to the completion of the file storage mounting operation, the nova_compute service is invoked to delete the temporary network interface card bound to the cloud host.
[0070] In a preferred embodiment of the present invention, it further includes:
[0071] In response to the completion of the file storage mount operation, the mount record in the database table is updated via the second component. The second component can be the Manila component, which is responsible for the lifecycle management of the file storage. After the file storage mount operation is completed, the Manila component maintains the mount record in the database table.
[0072] By using the technical solution of this invention, the difficulty of mounting file storage can be reduced, the efficiency of mounting file storage can be improved, the process of mounting file storage can be simplified, and user satisfaction can be increased.
[0073] It should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The embodiments of the computer program described above can achieve the same or similar effects as any of the corresponding foregoing method embodiments.
[0074] Furthermore, the method disclosed in the embodiments of the present invention can also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When the computer program is executed by the CPU, it performs the functions defined in the method disclosed in the embodiments of the present invention.
[0075] Based on the above objectives, a second aspect of the embodiments of the present invention provides an apparatus for mounting file storage, such as... Figure 3 As shown, the device 200 includes:
[0076] The parsing module is configured to respond to a request to mount a file for storage, parse the parameters in the request, and send the request to the first component.
[0077] Create a module, which is configured to respond to the first component receiving a file storage request, create a proxy cloud host in the first component, configure the proxy cloud host, and add a temporary network card to the cloud host;
[0078] The installation module is configured to push the agent program to the cloud host and run the agent program in the cloud host to install preset files.
[0079] The execution module is configured to, in response to the completion of the installation of the preset file, call the preset file through the preset program in the first component to perform the operation of mounting the file storage.
[0080] In view of the above objectives, a third aspect of the present invention provides a computer device. Figure 4 The diagram shown is a schematic representation of an embodiment of the computer device provided by the present invention. Figure 4 As shown, embodiments of the present invention include the following apparatus: at least one processor 21; and a memory 22 storing computer instructions 23 executable on the processor, which, when executed by the processor, implement the following method:
[0081] The system collects resource usage information at preset intervals and stores the information in an internal data structure.
[0082] In response to receiving a request to mount file storage, the parameters in the request are parsed and a request to mount file storage is sent to the first component;
[0083] In response to the first component receiving a file storage request, a proxy cloud host is created and configured in the first component, and a temporary network interface card is added to the cloud host;
[0084] The proxy cloud server pushes the proxy program to the cloud server and runs the proxy program on the cloud server to install preset files on the cloud server;
[0085] In response to the completion of the installation of the preset file, the preset program in the first component calls the preset file to perform the operation of mounting the file storage.
[0086] In a preferred embodiment of the present invention, in response to the first component receiving a file storage mounting request, the first component creates and configures a proxy cloud host, and adds a temporary network interface card to the cloud host, including:
[0087] In response to the first component receiving a file storage request, a proxy cloud host is created in the first component, and the proxy cloud host is connected to the cloud host's preset subnet;
[0088] Bind a floating IP address to the proxy cloud server and enable the proxy cloud server to communicate with the external management network through the floating IP address;
[0089] Configure read and write access permissions for the floating IP bound to the proxy cloud server to give the proxy cloud server access to the mounted file storage;
[0090] Enable source address translation in the router of the external management network;
[0091] The nova_compute service in the first component is invoked to add a temporary network interface card (NIC) to the cloud host and connect the temporary NIC to the cloud host's preset subnet so that the cloud host can communicate with the external management network via the temporary NIC.
[0092] In a preferred embodiment of the present invention, the proxy cloud host pushes the proxy program to the cloud host and runs the proxy program on the cloud host to install preset files on the cloud host, including:
[0093] The proxy cloud server logs in to the cloud server via SSH and pushes the proxy program to the cloud server;
[0094] Run the agent in the cloud server to connect to the software repository;
[0095] Based on the settings in the agent program, download and install the corresponding software installation package from the software repository to install the preset files on the cloud server.
[0096] In a preferred embodiment of the present invention, in response to the completion of preset file installation, the operation of mounting file storage by calling the preset file through the preset program in the first component includes:
[0097] In response to the completion of the installation of the preset file, the preset program in the first component calls the preset file to create the file directory for mounting the file storage.
[0098] In response to the completion of file directory creation, a preset command is sent to the cloud host to execute the file storage mounting operation.
[0099] In a preferred embodiment of the present invention, responding to receiving a request to mount a file for storage, parsing the parameters in the request, and sending the file mount request to the first component includes:
[0100] In response to receiving a request to mount a file for storage, the system parses the cloud host's unique identifier, the storage path of the file to be mounted, and the mount directory of the file to be mounted on the cloud host.
[0101] In a preferred embodiment of the present invention, it further includes:
[0102] In response to the completion of the file storage mounting operation, the nova_compute service is invoked to delete the temporary network interface card bound to the cloud host.
[0103] In a preferred embodiment of the present invention, it further includes:
[0104] In response to the completion of the mount file storage operation, the mount record in the database table is updated via the second component.
[0105] In view of the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium. Figure 5 The diagram illustrates an embodiment of the computer-readable storage medium provided by the present invention. Figure 5 As shown, computer-readable storage medium 31 stores a computer program 32 that, when executed by a processor, performs the following methods:
[0106] The system collects resource usage information at preset intervals and stores the information in an internal data structure.
[0107] In response to receiving a request to mount file storage, the parameters in the request are parsed and a request to mount file storage is sent to the first component;
[0108] In response to the first component receiving a file storage request, a proxy cloud host is created and configured in the first component, and a temporary network interface card is added to the cloud host;
[0109] The proxy cloud server pushes the proxy program to the cloud server and runs the proxy program on the cloud server to install preset files on the cloud server;
[0110] In response to the completion of the installation of the preset file, the preset program in the first component calls the preset file to perform the operation of mounting the file storage.
[0111] In a preferred embodiment of the present invention, in response to the first component receiving a file storage mounting request, the first component creates and configures a proxy cloud host, and adds a temporary network interface card to the cloud host, including:
[0112] In response to the first component receiving a file storage request, a proxy cloud host is created in the first component, and the proxy cloud host is connected to the cloud host's preset subnet;
[0113] Bind a floating IP address to the proxy cloud server and enable the proxy cloud server to communicate with the external management network through the floating IP address;
[0114] Configure read and write access permissions for the floating IP bound to the proxy cloud server to give the proxy cloud server access to the mounted file storage;
[0115] Enable source address translation in the router of the external management network;
[0116] The nova_compute service in the first component is invoked to add a temporary network interface card (NIC) to the cloud host and connect the temporary NIC to the cloud host's preset subnet so that the cloud host can communicate with the external management network via the temporary NIC.
[0117] In a preferred embodiment of the present invention, the proxy cloud host pushes the proxy program to the cloud host and runs the proxy program on the cloud host to install preset files on the cloud host, including:
[0118] The proxy cloud server logs in to the cloud server via SSH and pushes the proxy program to the cloud server;
[0119] Run the agent in the cloud server to connect to the software repository;
[0120] Based on the settings in the agent program, download and install the corresponding software installation package from the software repository to install the preset files on the cloud server.
[0121] In a preferred embodiment of the present invention, in response to the completion of preset file installation, the operation of mounting file storage by calling the preset file through the preset program in the first component includes:
[0122] In response to the completion of the installation of the preset file, the preset program in the first component calls the preset file to create the file directory for mounting the file storage.
[0123] In response to the completion of file directory creation, a preset command is sent to the cloud host to execute the file storage mounting operation.
[0124] In a preferred embodiment of the present invention, responding to receiving a request to mount a file for storage, parsing the parameters in the request, and sending the file mount request to the first component includes:
[0125] In response to receiving a request to mount a file for storage, the system parses the cloud host's unique identifier, the storage path of the file to be mounted, and the mount directory of the file to be mounted on the cloud host.
[0126] In a preferred embodiment of the present invention, it further includes:
[0127] In response to the completion of the file storage mounting operation, the nova_compute service is invoked to delete the temporary network interface card bound to the cloud host.
[0128] In a preferred embodiment of the present invention, it further includes:
[0129] In response to the completion of the mount file storage operation, the mount record in the database table is updated via the second component.
[0130] Furthermore, the method disclosed in the embodiments of the present invention can also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. When the computer program is executed by the processor, it performs the functions defined in the method disclosed in the embodiments of the present invention.
[0131] Furthermore, the above-described method steps and system units can also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to perform the functions of the above-described steps or units.
[0132] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.
[0133] In one or more exemplary designs, functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, functionality may be stored as one or more instructions or code on or transmitted via a computer-readable medium. Computer-readable media include computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one location to another. Storage media may be any available medium accessible to a general-purpose or special-purpose computer. By way of example, and not limitation, computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage devices, disk storage devices or other magnetic storage devices, or any other medium that may be used to carry or store the required program code in the form of instructions or data structures and is accessible to a general-purpose or special-purpose computer or a general-purpose or special-purpose processor. Furthermore, any connection may be appropriately referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the aforementioned coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are all included in the definition of media. As used herein, disks and optical discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0134] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.
[0135] It should be understood that, as used herein, the singular form “a” is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, “and / or” refers to any and all possible combinations of one or more of the associated listed items.
[0136] The embodiment numbers disclosed in the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0137] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0138] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.
Claims
1. A method of mounting a file store, characterized by, Includes the following steps: In response to receiving a request to mount file storage, the parameters in the request are parsed and a request to mount file storage is sent to the first component; In response to the first component receiving a file storage request, a proxy cloud host is created and configured in the first component, and a temporary network interface card is added to the cloud host; The proxy cloud server pushes the proxy program to the cloud server and runs the proxy program on the cloud server to install preset files on the cloud server; In response to the completion of the installation of the preset file, the preset program in the first component calls the preset file to perform the operation of mounting the file storage; In response to the first component receiving a file mount storage request, the first component creates and configures a proxy cloud host, and adds a temporary network interface card to the cloud host, including: In response to the first component receiving a file storage request, a proxy cloud host is created in the first component, and the proxy cloud host is connected to the cloud host's preset subnet; Bind a floating IP address to the proxy cloud server and enable the proxy cloud server to communicate with the external management network through the floating IP address; Configure read and write access permissions for the floating IP bound to the proxy cloud server to give the proxy cloud server access to the mounted file storage; Enable source address translation in the router of the external management network; The nova_compute service in the first component is invoked to add a temporary network interface card (NIC) to the cloud host and connect the temporary NIC to the cloud host's preset subnet so that the cloud host can communicate with the external management network via the temporary NIC; The proxy cloud server pushes the proxy program to the cloud server and runs the proxy program on the cloud server to install preset files, including: The proxy cloud server logs in to the cloud server via SSH and pushes the proxy program to the cloud server; Run the agent in the cloud server to connect to the software repository; Based on the settings in the agent program, download and install the corresponding software installation package from the software repository to install the preset files on the cloud server.
2. The method of claim 1, wherein, In response to the completion of the preset file installation, the preset program in the first component calls the preset file to perform the operation of mounting file storage, including: In response to the completion of the installation of the preset file, the preset program in the first component calls the preset file to create the file directory for mounting the file storage. In response to the completion of file directory creation, a preset command is sent to the cloud host to execute the file storage mounting operation.
3. The method of claim 1, wherein, In response to receiving a request to mount file storage, the parameters in the request are parsed, and a request to mount file storage is sent to the first component, including: In response to receiving a request to mount a file for storage, the system parses the request, including the cloud host's unique identifier, the storage path of the file to be mounted, and the mount directory of the file to be mounted on the cloud host.
4. The method of claim 1, wherein, Also includes: In response to the completion of the file storage mounting operation, the nova_compute service is invoked to delete the temporary network interface card bound to the cloud host.
5. The method according to claim 1, characterized in that, Also includes: In response to the completion of the mount file storage operation, the mount record in the database table is updated via the second component.
6. A device for mounting file storage, characterized in that, The device includes: The parsing module is configured to, in response to receiving a request to mount a file for storage, parse the parameters in the request and send the request to the first component. A creation module is configured to, in response to a first component receiving a file storage request, create and configure a proxy cloud host in the first component, and add a temporary network card to the cloud host. The installation module is configured to push the agent program to the cloud host and run the agent program in the cloud host to install preset files in the cloud host. The execution module is configured to, in response to the completion of the installation of the preset file, call the preset file through the preset program in the first component to perform the operation of mounting the file storage; The module creation is also configured as follows: In response to the first component receiving a file storage request, a proxy cloud host is created in the first component, and the proxy cloud host is connected to the cloud host's preset subnet; Bind a floating IP address to the proxy cloud server and enable the proxy cloud server to communicate with the external management network through the floating IP address; Configure read and write access permissions for the floating IP bound to the proxy cloud server to give the proxy cloud server access to the mounted file storage; Enable source address translation in the router of the external management network; The nova_compute service in the first component is invoked to add a temporary network interface card (NIC) to the cloud host and connect the temporary NIC to the cloud host's preset subnet so that the cloud host can communicate with the external management network via the temporary NIC; The installation module is also configured to: The proxy cloud server logs in to the cloud server via SSH and pushes the proxy program to the cloud server; Run the agent in the cloud server to connect to the software repository; Based on the settings in the agent program, download and install the corresponding software installation package from the software repository to install the preset files on the cloud server.
7. A computer device, characterized in that, include: At least one processor; as well as A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of the method according to any one of claims 1-5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Method, system and device for installing database based on OpenStack cloud host, and medium
CN111857747A
File storage management method and system, equipment and medium
CN112003917A