CN113821157A - Local disk mounting method, device, equipment and storage medium - Google Patents
Local disk mounting method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN113821157A CN113821157A CN202010561497.XA CN202010561497A CN113821157A CN 113821157 A CN113821157 A CN 113821157A CN 202010561497 A CN202010561497 A CN 202010561497A CN 113821157 A CN113821157 A CN 113821157A
- Authority
- CN
- China
- Prior art keywords
- disk
- computer node
- local disk
- virtual machine
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 230000006872 improvement Effects 0.000 claims abstract description 31
- 238000012545 processing Methods 0.000 claims description 31
- 238000012216 screening Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 13
- 239000007787 solid Substances 0.000 claims description 10
- 230000000903 blocking effect Effects 0.000 abstract description 9
- 230000015654 memory Effects 0.000 description 19
- 230000008569 process Effects 0.000 description 12
- 230000007246 mechanism Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 239000011230 binding agent Substances 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000977 initiatory effect Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
- G06F3/0664—Virtualisation aspects at device level, e.g. emulation of a storage device or system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45566—Nested virtual machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45579—I/O management, e.g. providing access to device drivers or storage
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a local disk mounting method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring request information of a local disk mounted virtual machine; determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node; setting a target mounting mode for a local disk of a target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file; and carrying out local disk mounting and creating a virtual machine by using the virtual machine configuration file. Therefore, a local disk mounting mode of the node is added into the OpenStack platform without changing an OpenStack platform framework, and local disk mounting and virtual machine creation are realized; and by combining a preset performance improvement strategy, the stability of the mounting performance of the local disk is further improved, and meanwhile, the occurrence of message blocking is avoided, so that the overhead of management performance is reduced.
Description
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for mounting a local disk.
Background
In the prior art, a method of managing a mounted local volume by using a block storage (renderer) component, integrating a virtual operating system simulator (Qemu) management function into the renderer component, creating empty Qemu virtual disk files on a physical machine data disk of a compute node, and finally managing (e.g., formatting and initializing) the files as a local disk exists. When a user initiates a request of a Kernel-based Virtual Machine (KVM) constructed by a local volume mount Kernel, the Kernel-based Virtual Machine is mounted through a Qemu Virtual file local to the computing nodes.
According to the technical scheme, the mounting of the local disk is realized. However, a storage management framework (binder) of a cloud computing management platform (OpenStack) is modified, that is, management of a data disk of a computer node is increased; however, when the number of computer nodes is large, since the shader uses the middleware mechanism, and thus the core message queue in the middleware mechanism is weighted, the overhead of management performance is very large to avoid message blocking.
Disclosure of Invention
In order to solve the problems of message blocking and high management performance overhead in the prior art, the application provides a local disk mounting method, a device, equipment and a storage medium, and aims to mount a local disk on a cloud platform and create a virtual machine and reduce management performance overhead.
In order to achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
in a first aspect, a local disk mount method is provided, where the method includes:
acquiring request information of a local disk mounted virtual machine;
determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node;
setting a target mounting mode for the local disk of the target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file;
and carrying out local disk mounting and creating a virtual machine by using the virtual machine configuration file.
In the above scheme, the preset performance improvement policy is used to improve the processing capability of a disk Input/Output (I/O) event;
in the foregoing solution, the preset performance improvement policy includes: adding the thiophread information on the basis of the target mounting mode; the setting of a target mounting mode for the local disk of the target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file includes: acquiring an initial configuration file of a virtual machine; adding the target mounting mode and the thiophead information in the initial configuration file to generate a virtual machine configuration file; the thiophead information is used for setting different I/O processing threads for different disk I/O events so as to improve the I/O read-write performance.
In the above scheme, the target mount mode is a virtio-blk mount mode or a virtio-scsi mount mode.
In the above scheme, the method further comprises: acquiring local disk information which is reported by at least one computer node and can be mounted; wherein the local disk information at least comprises: the first type of disk information and the second type of disk information.
In the foregoing solution, the determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node includes: analyzing the request information of the local disk mounted virtual machine to obtain the mounted disk information of the virtual machine; wherein the mounting disk information at least comprises: first type disk information and second type disk information; selecting the target computer node from the at least one computer node based on the mounted disk information and the local disk information of the at least one computer node.
In the above scheme, the first type of disk information and the second type of disk information include the number of disks; said selecting said target computer node from said at least one computer node, comprising: determining M preselected computer nodes from said at least one computer node; wherein, M is a positive integer, and the number of the first type of disks and the number of the second type of disks in the local disk information of the M preselected computer nodes are greater than or equal to the number of the first type of disks and the number of the second type of disks in the mounted disk information; when M is 1, taking the M preselected computer nodes as the target computer node; and when M is larger than 1, screening the M preselected computer nodes by using a preset screening condition to determine the target computer node.
In the above scheme, the first type of disk is a solid state disk, and the second type of disk is a mechanical hard disk.
In a second aspect, a local disk mount apparatus is provided, the apparatus including:
the acquisition unit is used for acquiring request information of the local disk mount virtual machine;
the determining unit is used for determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node;
a generating unit, configured to set a target mount mode for the local disk of the target computer node, configure a preset performance improvement policy for the local disk of the target computer node on the basis of the target mount mode, and generate a virtual machine configuration file;
and the creating unit is used for mounting a local disk by using the virtual machine configuration file and creating a virtual machine.
In the above scheme, the preset performance improvement strategy is used for improving the processing capacity of a disk I/O event;
in the above scheme, the generating unit is further configured to add the thiophread information based on the target mount manner; acquiring an initial configuration file of a virtual machine; adding the target mounting mode and the thiophead information in the initial configuration file to generate a virtual machine configuration file; the thiophead information is used for setting different I/O processing threads for different disk I/O events so as to improve the I/O read-write performance.
In the above scheme, the target mount mode is a virtio-blk mount mode or a virtio-scsi mount mode.
In the above scheme, the obtaining unit is further configured to obtain local disk information that is reported by at least one computer node and available for mounting; wherein the local disk information at least comprises: the first type of disk information and the second type of disk information.
In the above scheme, the determining unit is further configured to perform an analysis operation on the request information of the local disk mount virtual machine, so as to obtain the mount disk information of the virtual machine; wherein the mounting disk information at least comprises: first type disk information and second type disk information; selecting the target computer node from the at least one computer node based on the mounted disk information and the local disk information of the at least one computer node.
In the above scheme, the first type of disk information and the second type of disk information include the number of disks; the determining unit is further configured to determine M preselected computer nodes from the at least one computer node; wherein, M is a positive integer, and the number of the first type of disks and the number of the second type of disks in the local disk information of the M preselected computer nodes are greater than or equal to the number of the first type of disks and the number of the second type of disks in the mounted disk information; when M is 1, taking the M preselected computer nodes as the target computer node; and when M is larger than 1, screening the M preselected computer nodes by using a preset screening condition to determine the target computer node.
In the above scheme, the first type of disk is a solid state disk, and the second type of disk is a mechanical hard disk.
In a third aspect, a local disk mount device is provided, including: a processor and a memory configured to store a computer program operable on the processor, wherein the processor is configured to perform the steps of the aforementioned method when executing the computer program.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the aforementioned method.
By adopting the technical scheme, request information of the local disk mount virtual machine is obtained; determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node; setting a target mounting mode for a local disk of a target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file; and carrying out local disk mounting and creating a virtual machine by using the virtual machine configuration file. Therefore, a local disk mounting mode of the node is added into the OpenStack platform without changing an OpenStack platform framework, and local disk mounting and virtual machine creation are realized; and by combining a preset performance improvement strategy, the stability of the mounting performance of the local disk is further improved, and meanwhile, the occurrence of message blocking is avoided, so that the overhead of management performance is reduced.
Drawings
Fig. 1 is a first flowchart of a local disk mount method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating selection of a target computer node according to an embodiment of the present application;
FIG. 3 is a second flowchart of a local disk mount method according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a configuration structure of a configuration file of a virtual machine according to an embodiment of the present disclosure;
FIG. 5 is a block diagram illustrating an overall structure of a local disk mount method according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating a structure of a local disk mount device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a local disk mount device in an embodiment of the present application.
Detailed Description
So that the manner in which the features and elements of the present embodiments can be understood in detail, a more particular description of the embodiments, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings.
It should be noted that, in the prior art, a manner of managing and mounting a local volume by using a binder component exists, that is, a storage management framework binder of an OpenStack is modified, and management of a data disk of a computer node is increased; however, when the number of computer nodes is large, since the shader uses the middleware mechanism, and thus the core message queue in the middleware mechanism is weighted, the overhead of management performance is very large to avoid message blocking.
Based on the problems, the technical scheme that local disk mounting can be achieved without modifying an OpenStack platform framework is designed.
Before explaining a specific implementation scheme, firstly, the related technical field is briefly introduced:
the application mainly relates to cloud computing, OpenStack, Linux, Qemu, KVM and Libvirt technologies.
OpenStack is an open-source cloud computing platform, and is divided into management components such as an authentication component (Keystone), a computing component (Nova), a network component (Neutron), and a block storage component (shader).
Linux is an open-source operating system, is mainly used in enterprise server scenarios, and serves as a host operating system for carrying virtual machines in cloud computing.
Qemu is a pure software simulator on Linux, and is used for simulating hardware equipment and dynamically translating the hardware equipment to real hardware for operation.
The KVM is an open-source virtualization kernel module, needs hardware support (such as Intel-VT technology or AMD-V technology), and is used in combination with Qemu to provide a virtual machine based on hardware acceleration, so that the virtualization performance is improved.
Libvirt is a tool for managing Qemu on Linux, and a method for quickly creating a virtual machine for an operator by using a command line and an XML file, which is also a default driver of an OpenStack Nova component.
An embodiment of the present application provides a local disk mount method, fig. 1 is a first flowchart of the local disk mount method in the embodiment of the present application, and as shown in fig. 1, the local disk mount method may specifically include:
step 101: acquiring request information of a local disk mounted virtual machine;
it should be noted that the technical scheme of the application aims to implement the local disk mount virtual machine. Specifically, the implementation of mounting the local disk is to add a mounting mode to the configuration information of the computer node. Therefore, finding a computer node that meets the mount condition becomes a primary task. In other words, a computer node meeting the mounting condition needs to be found from at least one local computer node; the search condition is the request information of the local disk mount virtual machine.
Illustratively, the operator initiates request information of the local disk mount virtual machine, and the request information at least comprises: the type and number of mounted disks, etc.
Step 102: determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node;
when a virtual machine is created by using a local disk of a computer node, matching is performed according to disk information required in request information and local disk information of the computer node, and the computer node meeting mounting conditions is found.
In some embodiments, the method further comprises: acquiring local disk information which is reported by at least one computer node and can be mounted; wherein the local disk information at least comprises: the first type of disk information and the second type of disk information.
Exemplarily, the computer nodes that can be reported include a computer node a, a computer node B, and a computer node C, where the local disk information of the computer node a includes: 3 first-type disks and 1 second-type disk; the local disk information of the computer node B comprises: 3 second type disks; the local disk information of the computer node C includes: 1 first type disk and 1 second type disk.
In some embodiments, the determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of the at least one computer node includes: analyzing the request information of the local disk mounted virtual machine to obtain the mounted disk information of the virtual machine; wherein the mounting disk information at least comprises: first type disk information and second type disk information; selecting the target computer node from the at least one computer node based on the mounted disk information and the local disk information of the at least one computer node.
It should be noted that, the request information of the local disk mount virtual machine is analyzed to obtain the disk information to be mounted, that is, the disk type and the corresponding number of the disk information are included; and matching by combining the disk types and the corresponding quantity contained in the local disk information of at least one computer node, and selecting the computer node meeting the mounting condition.
For example, the request information of the operator initiating the local disk mount virtual machine includes the disk type and the number corresponding to the disk type, but the specific disk type and the number corresponding to the disk type cannot be directly identified, and the specific disk type and the number corresponding to the disk type need to be analyzed. Here, the API service is used to analyze the request information, so that the specific disk type and the corresponding disk number of the local disk required to be mounted for creating the virtual machine can be obtained exactly. And further matching by combining the disk types and the corresponding quantity contained in the local disk information of at least one computer node, and selecting the computer node meeting the mounting condition.
In some embodiments, the first type of disk information and the second type of disk information comprise a number of disks, and the selecting the target computer node from the at least one computer node comprises: determining M preselected computer nodes from said at least one computer node; wherein, M is a positive integer, and the number of the first type of disks and the number of the second type of disks in the local disk information of the M preselected computer nodes are greater than or equal to the number of the first type of disks and the number of the second type of disks in the mounted disk information; when M is 1, taking the M preselected computer nodes as the target computer node; and when M is larger than 1, screening the M preselected computer nodes by using a preset screening condition to determine the target computer node.
It should be noted that the first type of disk information and the second type of disk information include the number of disks; and determining the target computer node by comparing the number of the first type of disks and the number of the second type of disks in the request information, wherein the number of the first type of disks and the number of the second type of disks in the local disk information of the at least one computer node are respectively less than or equal to the number of the first type of disks and the number of the second type of disks in the local disk information of the at least one computer node.
Exemplarily, when the number of the first type disks in the request information is judged to be less than or equal to the number of the first type disks in the local disks, the first type computer nodes meeting the judgment condition are selected, and at this time, the number of the first type computer nodes is more than or equal to 1; and directly abandoning the computer nodes which do not meet the judgment condition, and not considering whether the computer nodes are possible target computer nodes or not. When the number of the second type of disks in the request information is judged to be less than or equal to the number of the second type of disks in the local disks of the first type of computer nodes, the second type of computer nodes meeting the judgment condition are selected from the first type of computer nodes, and at the moment, the number of the second type of computer nodes is more than or equal to 1; and directly abandoning the computer nodes which do not meet the judgment condition. When the second computer node is equal to 1, taking the second computer node as a target computer node; and when the second computer node is larger than 1, screening the second computer node by using a preset screening condition, and then determining a target computer node.
Or when the number of the first type disks of one computer node is larger than or equal to the number of the first type disks in the request information, continuously judging whether the number of the second type disks of the computer node is larger than or equal to the number of the second type disks in the request information, and if so, reserving the computer node. If the number of the first disks or the number of the second disks is judged to be respectively smaller than the number of the first disks or the number of the second disks in the request information aiming at the computer node, directly discarding the first disks or the second disks; continuing to judge the next computer node; and by analogy, finally determining the target computer node.
Specifically, the computer nodes that can be reported include a computer node a, a computer node B, and a computer node C, where the local disk information of the computer node a includes: 3 first-type disks and 1 second-type disk; the local disk information of the computer node B comprises: 3 second type disks; the local disk information of the computer node C includes: 1 first type disk and 1 second type disk. The disk information in the request information includes: 2 second type disks and 1 first type disk. According to the above determination method, for the first type of disk, the computer node that satisfies the condition that the number of the first type of disks in the local disk information is greater than or equal to the number of the first type of disks in the request information includes: computer node A and computer node C; and then, judging that the computer node meeting the condition that the number of the second type of disks in the local disk information is greater than or equal to the number of the second type of disks in the request information is a computer node A, namely the computer node A is a target computer node.
The following describes a specific process for selecting a target computer node by taking the first type of Disk as a Solid State Drive (SSD Disk) and the second type of Disk as a Hard Disk Drive (HDD Disk). Fig. 2 is a schematic flow chart illustrating the selection of a target computer node in the embodiment of the present application. The method comprises the following specific steps:
step 201: starting;
step 202: initiating request information of a local disk mount virtual machine;
the request information for the operator to initiate the local disk mount virtual machine may be: { "ssd": 1 "," hdd ": 2" };
acquiring request information of an operator for initiating a local disk mount virtual machine, and analyzing the request information by using API service to obtain mount disk information comprising 1 SSD hard disk and 2 HDD hard disks.
Step 203: judging whether the mounted SSD number is less than or equal to the node SSD number; if yes, go to step 204; otherwise, continuing to execute step 203 until the last computer node is judged;
specifically, the number of SSD hard disks in mounted disk information and the number of SSD hard disks of each computer node in at least one computer node are obtained; when the number of the SSD hard disks of at least one computer node is more than or equal to 1, N computer nodes which meet the requirement are selected, wherein N is more than 1, and N is an integer.
Here, when the number of the SSD hard disks in the mounted disk information and the number of the SSD hard disks of the computer node are determined, the number of the HDD disks of each of the at least one computer node may be determined after each of the at least one computer node is determined; after the judgment of the number of the SSD hard disks of the computer node is finished, the judgment of whether the number of the HDD disks meets the requirement or not can be carried out immediately after the condition is met.
Step 204: if yes, executing step 205 when judging whether the number of the mounted HDDs is less than or equal to the number of the node HDDs; otherwise, continuing to execute step 204 until the last computer node is judged;
acquiring the number of HDDs in the mounted disk information and the number of HDDs of each computer node in the N computer nodes meeting a first condition; and when the number of the HDD hard disks of at least one computer node is more than or equal to 2, selecting M satisfied preselected computer nodes again, wherein M is more than or equal to 1 and is an integer.
Step 205: a target node;
and when the SSD number of any node in at least one computer node is larger than or equal to the SSD number in the mounted disk information and the HDD number is larger than or equal to the HDD number in the mounted disk information, the node is taken as a target computer node.
Step 206: and (6) ending.
After the above steps, there may be more than one computer node selected for the second time.
When M is 1, the preselected computer node is determined to be the target computer node.
When M is larger than 1, the target computer node needs to be selected for the third time based on the preset screening condition, and then the target computer node is further selected; wherein, the preset screening conditions can be as follows: and calculating based on other filters and the original weight of the OpenStack to obtain an optimal node, namely the target computer node.
Exemplarily, the computer nodes that can be reported include a computer node a, a computer node B, and a computer node C, where the local disk information of the computer node a is: 3 mechanical hard disks and 1 solid state hard disk; the local disk information of the computer node B is as follows: 3 mechanical hard disks; the local disk information of the computer node C is: 1 mechanical hard disk and 1 solid state hard disk. It needs to mount local 2 HDD disks and 1 SSD disk to create a virtual machine. Firstly, selecting computer nodes with more than or equal to 2 HDD disks from a computer node A, a computer node B and a computer node C based on the requirement of creating a virtual machine to mount local 2 HDD disks, wherein the computer nodes are satisfied by the computer node A and the computer node B; and selecting a computer node with more than or equal to 1 SSD disk from the computer node A and the computer node B based on the fact that the virtual machine is created and the local 1 SSD disk needs to be mounted, namely the computer node A meets the condition and is the finally determined target computer node.
After the target node is determined, whether the computer node resource is satisfied needs to be detected; if not, the computer nodes need to be reselected; namely deducting the mounted local disk resources, and preventing the problem of repeated scheduling in a concurrent state.
Exemplarily, due to a mechanism of multiple scheduler processes of the OpenStack itself, the above-mentioned a node may receive simultaneously, and based on the request information of 2 HDD hard disks and 1 SSD hard disk, the resource of the a node itself is deducted for the first time, and then 1 HDD hard disk is left; i.e., the resources are satisfied, then the virtual machine may be created. If not enough resources are deducted for the second time, an error is reported; namely, the resources are not satisfied, and the error reporting request can be rescheduled to obtain a new node depending on the retry mechanism of the OpenStack.
Step 103: setting a target mounting mode for the local disk of the target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file;
it should be noted that, in the prior art, the mounting of the local disk cannot be realized based on the initialization configuration file generated by the computer node; therefore, in the application, a target mounting mode is set for the local disk of the target computer node, and the mounting of the local disk is realized; however, the performance of the local disk greatly fluctuates, and the processing capacity of the disk is further influenced; here, the present application configures a preset performance improvement policy for the local disk of the target computer node on the basis of the target mount mode to solve the problem of large local disk performance fluctuation, thereby improving the disk processing capability.
Here, the preset performance-improving strategy is used for improving the processing capacity of the disk I/O event.
Here, the target mounting method is a virtio-blk mounting method or a virtio-scsi mounting method.
Step 104: and carrying out local disk mounting and creating a virtual machine by using the virtual machine configuration file.
It should be noted that the mounting of the local disk and the creation of the virtual machine are realized based on the virtual machine configuration file.
By adopting the technical scheme, request information of the local disk mount virtual machine is obtained; determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node; setting a target mounting mode for a local disk of a target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file; and carrying out local disk mounting and creating a virtual machine by using the virtual machine configuration file. Therefore, a local disk mounting mode of the node is added into the OpenStack platform without changing an OpenStack platform framework, and local disk mounting and virtual machine creation are realized; and by combining a preset performance improvement strategy, the stability of the mounting performance of the local disk is further improved, and meanwhile, the occurrence of message blocking is avoided, so that the overhead of management performance is reduced.
On the basis of the foregoing embodiment, the present application provides another local disk mounting method, fig. 3 is a second flowchart of the local disk mounting method in the embodiment of the present application, and as shown in fig. 3, the local disk mounting method may specifically include:
step 301: acquiring request information of a local disk mounted virtual machine;
step 302: determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node;
it should be noted that, in order to mount a local disk, a computer node that meets the mounting request information needs to be searched from the local disk information that is reported by at least one computer node and is available for mounting; the local disk information includes at least first type disk information and second type disk information.
The first type of disk information includes a first type of disk and the number thereof, and the second type of disk information includes a second type of disk and the number thereof.
It should be noted that after the request information of the local disk mount virtual machine is analyzed to obtain the disk information to be mounted, the target computer node that meets the requirement for creating the virtual machine is selected by combining the local disk information of at least one computer node. Wherein the mounting disk information at least comprises: the first type of disk information and the second type of disk information.
The first type of disk information includes a first type of disk and the number thereof, and the second type of disk information includes a second type of disk and the number thereof.
Specifically, the preselected computer node is determined by judging that the number of the first type disk and the number of the second type disk of the mount request information are both less than or equal to the number of the first type disk and the second type disk of the computer node. Based on the selected pre-selected computer node, there may be more than one, so when the pre-selected computer node is 1, the pre-selected computer node is determined as the target computer node; when the preselected computer node is larger than 1, the preselected computer node needs to be selected again based on the preset screening condition, and a target computer node is further selected; wherein, the preset screening conditions can be as follows: and calculating based on other filters and the original weight of the OpenStack to obtain an optimal node, namely the target computer node.
Step 303: acquiring an initial configuration file of the virtual machine based on the target computer node;
acquiring an initial configuration file of a virtual machine; fig. 4 is a schematic diagram of a composition structure of a virtual machine configuration file in the embodiment of the present application. The method comprises the steps that on an OpenStack platform, an XML configuration file (namely an initial configuration file in the application) is generated based on Libvirt virtual machine management equipment; the information of the XML configuration file comprises the following steps: motherboard information, CPU information, memory information, system disk information, local disk information, and other device information. And generating a cloud host according to the XML, namely a Qemu process, and laying a cushion for creating a virtual machine.
Step 304: adding the target mounting mode and the thiophead information in the initial configuration file to generate a virtual machine configuration file; the thiophead information is used for setting different I/O processing threads for different disk I/O events so as to improve the I/O read-write performance;
it should be noted that, in the following description,
after a target mounting mode is set for the local disk of the target computer node, the performance of the local disk is greatly fluctuated, and the processing capacity of the disk I/O event is further influenced; here, the method and the device configure the preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and further improve the processing capacity of the disk I/O event. Wherein, the preset performance improvement strategy comprises: adding the thiophread information on the basis of the target mounting mode.
Specifically, to mount the virtual machine on the local disk, a target mount mode and the thiophad information need to be added on the basis of the initial configuration file, so as to generate a virtual machine configuration file.
Based on the fact that the target computer node comprises A first-type disks and B second-type disks, wherein A, B are both greater than or equal to 0 but not 0 at the same time; each hard disk is provided with a mounting mode; therefore, a corresponding mounting mode is set for at least one hard disk in the disk information of the target computer.
The thiophead information is used for setting different I/O processing threads for different disk I/O events so as to improve the I/O read-write performance; therefore, it is required here to set at least one thiophread information.
Illustratively, based on a target computer node, acquiring an initial configuration file of a virtual machine and creating a KVM virtual machine based on an OpenStack platform; at this time, the KVM virtual machine created on the basis of the OpenStack platform cannot provide a local disk mounting function; therefore, a virtual-blk mounting mode or a virtual-scsi mounting mode and the thiophread information are added to the initial configuration file to generate a KVM virtual machine configuration file; and the virtual machine configuration file finishes mounting of the local disk and creating the virtual machine. The virtual machine configuration file may also be referred to herein as a Qemu process. The added thiophead information is used for setting different I/O processing threads for different disk I/O events so as to improve the I/O read-write performance.
Specifically, as shown in fig. 4, when the initial configuration file is modified, a corresponding mount mode is set for the local disk information of the target computer node; meanwhile, different I/O processing threads are required to be set for processing different disk I/O events based on the fact that different disk I/O events exist in the CPU information, so that at least one thiophread information needs to be added in the CPU information during modification; and further generating an updated XML configuration file (namely the virtual machine configuration file of the application), and completing the mounting of the local disk and the creation of the virtual machine based on the virtual machine configuration file.
Illustratively, the local disk information of the target computer node includes 1 first type disk and 3 second type disks. When configuration information of a target computer node is modified, setting a virtual-blk mounting mode for 1 first type of disk, setting a virtual-blk mounting mode for 1 second type of disk, and setting a virtual-scsi mounting mode for the rest 2 second types of disks; setting at least one needed thiophread information in the CPU information according to the setting of the mounting mode; and further generating a virtual machine configuration file, and finishing the mounting of the local disk and the creation of the virtual machine based on the virtual machine configuration file. The virtual machine configuration file may also be referred to herein as a Qemu process.
Step 305: and carrying out local disk mounting and creating a virtual machine by using the virtual machine configuration file.
In the method for quickly creating the virtual machine for the operator by using the virtual machine configuration file, because the OpenStact platform adds a local disk mounting mode of a computer node and a preset performance improvement strategy for the OpenStact platform, the virtual machine configuration file (also called a Qemu process) is generated; libvirt is a tool for managing Qemu on Linux, so that the mounting of a local disk and the creation of a virtual machine are completed based on the Libvirt management virtual machine configuration file.
By adopting the technical scheme, request information of the local disk mount virtual machine is obtained; determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node; setting a target mounting mode for a local disk of a target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file; and carrying out local disk mounting and creating a virtual machine by using the virtual machine configuration file. Therefore, a local disk mounting mode of the node is added into the OpenStack platform without changing an OpenStack platform framework, and local disk mounting and virtual machine creation are realized; and by combining a preset performance improvement strategy, the stability of the mounting performance of the local disk is further improved, and meanwhile, the occurrence of message blocking is avoided, so that the overhead of management performance is reduced.
The foregoing is specifically exemplified for the purpose of further embodying the present application. Fig. 5 is a block diagram of an overall structure of a local disk mount method in the embodiment of the present application.
Under the condition that the OpenStack platform framework is not changed, mounting of a local disk and creation of a virtual machine are achieved based on a computer node. The KVM virtual machine is used for IaaS resource provisioning, and is a bottom layer virtualization technology of the OpenStack platform. The KVM is an open-source virtualization kernel module, needs hardware support (such as Intel-VT technology or AMD-V technology), and is used in combination with Qemu to provide a virtual machine based on hardware acceleration, so that the virtualization performance is improved. Qemu is a pure software simulator on Linux, and is used for simulating hardware equipment and dynamically translating the hardware equipment to real hardware for operation.
The general structure block diagram mainly comprises three modules, specifically: an interface processing module 50, a scheduling module 51 and a driving module 52.
The method for specifically realizing the mounting of the local disk comprises the following steps:
firstly, a driver service 5003 in a driver module 52 based on an OpenStack platform sends reported local disk information 501 to an API service 5001 in an interface processing module 50;
in the second step, the operator 53 initiates a request 502 for mounting the virtual machine on the local disk to the API service 5001, where the request information may be: -metadata local _ disk { "ssd": 1 "," hdd ": 2" }';
thirdly, the API service 5001 parses the request of the local disk mount virtual machine, and sends the request information to the scheduling service 5002 of the scheduling module 51 to request scheduling 503;
here, the API service resolves the request to obtain that 2 local HDD disks and 1 SSD disk need to be mounted to create the virtual machine.
Step four, filtering out the target computer node 504 based on the scheduling module 51, and requesting the driver service 5003 to create a virtual machine based on the target computer node 504;
specifically, when the scheduling module 51 determines that the number of the SSD hard disks and the number of the HDD hard disks of the mount request information are both less than or equal to the number of the SSD hard disks and the HDD hard disks of the computer node, the preselected computer node is determined. Based on the selection of more than one preselected computer node, so that when the preselected computer node is 1, the preselected computer node is determined to be the target computer node 504; when the preselected computer node is larger than 1, the preselected computer node needs to be selected again based on the preset screening condition, and a target computer node is further selected; wherein, the preset screening conditions can be as follows: based on other filters and the OpenStack native weight calculation, an optimal node, i.e., the target computer node 504, is obtained.
Exemplarily, the computer nodes that can be reported include a computer node a, a computer node B, and a computer node C, where the local disk information of the computer node a is: 3 mechanical hard disks and 1 solid state hard disk; the local disk information of the computer node B is as follows: 3 mechanical hard disks; the local disk information of the computer node C is: 1 mechanical hard disk and 1 solid state hard disk. It needs to mount local 2 HDD disks and 1 SSD disk to create a virtual machine. Firstly, selecting computer nodes with more than or equal to 2 HDD disks from a computer node A, a computer node B and a computer node C based on the requirement of creating a virtual machine to mount local 2 HDD disks, wherein the computer nodes are satisfied by the computer node A and the computer node B; and selecting a computer node with more than or equal to 1 SSD disk from the computer node A and the computer node B based on the fact that the virtual machine is created and the local 1 SSD disk needs to be mounted, namely the computer node A meets the condition and is the finally determined target computer node.
Fifthly, the target computer node 504 initiates a response request to the driver service 5003, and the driver service 5003 detects whether the local disk resource is satisfied at the detection point 505; when the condition is met, executing the seventh step; when not satisfied, executing the sixth step;
the process acts on deducting the mounted local disk resources, and prevents the problem of repeated scheduling in a concurrent state.
Exemplarily, due to a mechanism of multiple scheduler processes of the OpenStack itself, the above-mentioned a node may receive simultaneously, and based on the request information of 2 HDD hard disks and 1 SSD hard disk, the resource of the a node itself is deducted for the first time, and then 1 HDD hard disk is left; i.e., the resources are satisfied, then the virtual machine may be created. If not enough resources are deducted for the second time, an error is reported; namely, the resources are not satisfied, and the error reporting request can be rescheduled to obtain a new node depending on the retry mechanism of the OpenStack.
Sixthly, the driver service 5003 re-sends a re-scheduling request 506 to the scheduling service 5002, and re-selects a computer node;
seventhly, the drive service 5003 detects that the local disk resource is in the satisfied state 507 at the detection point 505, and starts to create a virtual machine based on the Libvirt management device 5004;
eighthly, under the Libvirt management device 5004, configuring a virtio-blk mounting mode 508 for the target computer node 504, and using virtio-blk + thiophread to carry out local disk mounting to generate a corresponding first XML file 5005;
illustratively, based on the target computer node 504, an initial configuration file of the virtual machine is obtained and a KVM virtual machine is created based on the OpenStack platform; at this time, the KVM virtual machine created on the basis of the OpenStack platform cannot provide a local disk mounting function; therefore, a virtio-blk mount mode 508 and the thiophead information are added to the initial configuration file, and a corresponding first XML file 5005, that is, a KVM virtual machine configuration file, is generated under the Libvirt management device 5004; and the virtual machine configuration file finishes mounting of the local disk and creating the virtual machine. The virtual machine configuration file may also be referred to herein as a Qemu process. The added thiophead information is used for setting different I/O processing threads for different disk I/O events so as to improve the I/O read-write performance.
The information for generating the KVM virtual machine configuration file at least includes: motherboard information, CPU information, memory information, system disk information, local disk information, and other device information, among others.
Based on the fact that the target computer node 504 comprises a SSD hard disks and B HDD hard disks, wherein A, B is greater than or equal to 0 but not 0 at the same time; each hard disk is provided with a mounting mode; therefore, a corresponding mounting mode is set for at least one hard disk in the disk information of the target computer.
The thiophead information is used for setting different I/O processing threads for different disk I/O events so as to improve the I/O read-write performance; therefore, it is required here to set at least one thiophread information.
Specifically, when the initial configuration file is modified, a virtio-blk mount mode 508 is set for at least one hard disk of the target computer node 504; meanwhile, different I/O processing threads are required to be set for processing different disk I/O events based on the fact that different disk I/O events exist in the CPU information, so that at least one thiophread information needs to be added in the CPU information during modification; and further generates a first XML file 5005, and completes the mounting of the local disk and the creation of the virtual machine based on the first XML file 5005.
Ninth, configuring a virtual-sci mounting mode 509 for the target computer node 504 under the Libvirt management device 5004, and using virtual-sci + thiophread to mount a local disk to generate a corresponding second XML file 5006;
illustratively, based on the target computer node 504, an initial configuration file of the virtual machine is obtained and a KVM virtual machine is created based on the OpenStack platform; at this time, the KVM virtual machine created on the basis of the OpenStack platform cannot provide a local disk mounting function; therefore, a virtio-sci mount mode 509 and the thioread information are added to the initial configuration file, and a corresponding second XML file 5006, that is, a KVM virtual machine configuration file, is generated under the Libvirt management device 5004; and the virtual machine configuration file finishes mounting of the local disk and creating the virtual machine. The virtual machine configuration file may also be referred to herein as a Qemu process. The added thiophead information is used for setting different I/O processing threads for different disk I/O events so as to improve the I/O read-write performance.
Specifically, in the Libvirt management device 5004, when the initial configuration file is modified, a virtio-sci mount mode 509 is set for at least one hard disk of the target computer node 504; meanwhile, different I/O processing threads are required to be set for processing different disk I/O events based on the fact that different disk I/O events exist in the CPU information, so that at least one thiophread information needs to be added in the CPU information during modification; and then a second XML file 5006 is generated, and the mounting of the local disk and the creation of the virtual machine are completed based on the second XML file 5006.
Tenth, the driver module 52 creates a KVM virtual machine 5007 in a virtual-to-blk mount mode or a KVM virtual machine 5008 in a virtual-to-scsi mount mode by calling the Libvirt management device 5004.
In the method for quickly creating the virtual machine for the operator by using the virtual machine configuration file, because the drive module 52 is used for generating a first XML file or a second XML file (also called a Qemu process) for the mounting mode and the thiophead information of the local disk of the added computer node on the openact platform; libvirt is a tool for managing Qemu on Linux, so the driver module 52 calls the Libvirt management device 5004 to create a KVM virtual machine 5007 in a virtio-blk mount mode or a KVM virtual machine 5008 in a virtio-scsi mount mode.
By adopting the technical scheme, request information of the local disk mount virtual machine is obtained; determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node; setting a target mounting mode for a local disk of a target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file; and carrying out local disk mounting and creating a virtual machine by using the virtual machine configuration file. Therefore, a local disk mounting mode of the node is added into the OpenStack platform without changing an OpenStack platform framework, and local disk mounting and virtual machine creation are realized; and by combining a preset performance improvement strategy, the stability of the mounting performance of the local disk is further improved, and meanwhile, the occurrence of message blocking is avoided, so that the overhead of management performance is reduced.
An embodiment of the present application further provides a local disk mount device, and as shown in fig. 6, the device includes:
an obtaining unit 601, configured to obtain request information for mounting a virtual machine on a local disk;
a determining unit 602, configured to determine a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node;
a generating unit 603, configured to set a target mount manner for the local disk of the target computer node, configure a preset performance improvement policy for the local disk of the target computer node on the basis of the target mount manner, and generate a virtual machine configuration file;
a creating unit 604, configured to perform local disk mount and create a virtual machine by using the virtual machine configuration file.
In some embodiments, the preset performance-improving policy is used to improve the processing capability of the disk I/O event.
In some embodiments, the apparatus comprises: the generating unit 603 is further configured to add the thiophread information based on the target mount manner; acquiring an initial configuration file of a virtual machine; adding the target mounting mode and the thiophead information in the initial configuration file to generate a virtual machine configuration file; the thiophead information is used for setting different I/O processing threads for different disk I/O events so as to improve the I/O read-write performance.
In some embodiments, the target mount mode is a virtio-blk mount mode or a virtio-scsi mount mode.
In some embodiments, the apparatus comprises: the obtaining unit 601 is further configured to obtain local disk information that is reported by at least one computer node and is available for mounting; wherein the local disk information at least comprises: the first type of disk information and the second type of disk information.
In some embodiments, the apparatus comprises: the determining unit 602 is further configured to perform an analysis operation on the request information of the local disk mount virtual machine, so as to obtain mount disk information of the virtual machine; wherein the mounting disk information at least comprises: first type disk information and second type disk information; selecting the target computer node from the at least one computer node based on the mounted disk information and the local disk information of the at least one computer node.
In some embodiments, the first type of disk information and the second type of disk information include a number of disks, the apparatus comprising: the determining unit 602 is further configured to determine M preselected computer nodes from the at least one computer node; wherein, M is a positive integer, and the number of the first type of disks and the number of the second type of disks in the local disk information of the M preselected computer nodes are greater than or equal to the number of the first type of disks and the number of the second type of disks in the mounted disk information; when M is 1, taking the M preselected computer nodes as the target computer node; and when M is larger than 1, screening the M preselected computer nodes by using a preset screening condition to determine the target computer node.
In some embodiments, the first type of disk is a solid state disk, and the second type of disk is a mechanical hard disk.
By adopting the technical scheme, request information of the local disk mount virtual machine is obtained; determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node; setting a target mounting mode for a local disk of a target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file; and carrying out local disk mounting and creating a virtual machine by using the virtual machine configuration file. Therefore, a local disk mounting mode of the node is added into the OpenStack platform without changing an OpenStack platform framework, and local disk mounting and virtual machine creation are realized; and by combining a preset performance improvement strategy, the stability of the mounting performance of the local disk is further improved, and meanwhile, the occurrence of message blocking is avoided, so that the overhead of management performance is reduced.
An embodiment of the present application further provides a local disk mount device, as shown in fig. 7, where the device includes: a processor 701 and a memory 702 configured to store a computer program capable of running on the processor; the processor 701, when running the computer program in the memory 702, performs the following steps:
acquiring request information of a local disk mounted virtual machine;
determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node;
setting a target mounting mode for the local disk of the target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file;
and carrying out local disk mounting and creating a virtual machine by using the virtual machine configuration file.
In some embodiments, the preset performance-improving policy is used to improve the processing capability of the disk I/O event.
In some embodiments, the preset performance improvement policy includes: adding the thiophread information on the basis of the target mounting mode; the processor 701, when executing the computer program in the memory 702, further realizes the following steps: the setting of a target mounting mode for the local disk of the target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file includes: acquiring an initial configuration file of a virtual machine; adding the target mounting mode and the thiophead information in the initial configuration file to generate a virtual machine configuration file; the thiophead information is used for setting different I/O processing threads for different disk I/O events so as to improve the I/O read-write performance.
In some embodiments, the target mount mode is a virtio-blk mount mode or a virtio-scsi mount mode.
In some embodiments, the processor 701, when executing the computer program in the memory 702, further realizes the following steps: acquiring local disk information which is reported by at least one computer node and can be mounted; wherein the local disk information at least comprises: the first type of disk information and the second type of disk information.
In some embodiments, the processor 701, when executing the computer program in the memory 702, further realizes the following steps: analyzing the request information of the local disk mounted virtual machine to obtain the mounted disk information of the virtual machine; wherein the mounting disk information at least comprises: first type disk information and second type disk information; selecting the target computer node from the at least one computer node based on the mounted disk information and the local disk information of the at least one computer node.
In some embodiments, the processor 701, when executing the computer program in the memory 702, further realizes the following steps: the first type of disk information and the second type of disk information comprise the number of disks; determining M preselected computer nodes from said at least one computer node; wherein, M is a positive integer, and the number of the first type of disks and the number of the second type of disks in the local disk information of the M preselected computer nodes are greater than or equal to the number of the first type of disks and the number of the second type of disks in the mounted disk information; when M is 1, taking the M preselected computer nodes as the target computer node; and when M is larger than 1, screening the M preselected computer nodes by using a preset screening condition to determine the target computer node.
In some embodiments, the first type of disk is a solid state disk, and the second type of disk is a mechanical hard disk.
Of course, in actual practice, the various components of the local disk mount device are coupled together by a bus system 703, as shown in FIG. 7. It is understood that the bus system 703 is used to enable communications among the components. The bus system 703 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled in fig. 7 as bus system 703.
In practical applications, the processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, and a microprocessor. It is understood that the electronic devices for implementing the above processor functions may be other devices, and the embodiments of the present application are not limited in particular.
The Memory may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (HDD), or a Solid-State Drive (SSD); or a combination of the above types of memories and provides instructions and data to the processor.
The embodiment of the application also provides a computer readable storage medium for storing the computer program.
Optionally, the computer-readable storage medium may be applied to any one of the methods in the embodiments of the present application, and the computer program enables a computer to execute corresponding processes implemented by a processor in each method in the embodiments of the present application, which is not described herein again for brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. A local disk mount method, the method comprising:
acquiring request information of a local disk mounted virtual machine;
determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node;
setting a target mounting mode for the local disk of the target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file;
and carrying out local disk mounting and creating a virtual machine by using the virtual machine configuration file.
2. The method of claim 1,
and the preset performance improving strategy is used for improving the processing capacity of the disk I/O event.
3. The method of claim 2, wherein the predetermined performance improvement policy comprises: adding the thiophread information on the basis of the target mounting mode;
the setting of a target mounting mode for the local disk of the target computer node, configuring a preset performance improvement strategy for the local disk of the target computer node on the basis of the target mounting mode, and generating a virtual machine configuration file includes:
acquiring an initial configuration file of a virtual machine;
adding the target mounting mode and the thiophead information in the initial configuration file to generate a virtual machine configuration file; the thiophead information is used for setting different I/O processing threads for different disk I/O events so as to improve the I/O read-write performance.
4. The method of claim 1,
the target mounting mode is a virtio-blk mounting mode or a virtio-scsi mounting mode.
5. The method of claim 1, further comprising: acquiring local disk information which is reported by at least one computer node and can be mounted; wherein the local disk information at least comprises: the first type of disk information and the second type of disk information.
6. The method of claim 5, wherein determining the target computer node based on the request information of the local disk mount virtual machine and the local disk information of the at least one computer node comprises:
analyzing the request information of the local disk mounted virtual machine to obtain the mounted disk information of the virtual machine; wherein the mounting disk information at least comprises: first type disk information and second type disk information;
selecting the target computer node from the at least one computer node based on the mounted disk information and the local disk information of the at least one computer node.
7. The method of claim 6,
the first type of disk information and the second type of disk information comprise the number of disks;
said selecting said target computer node from said at least one computer node, comprising:
determining M preselected computer nodes from said at least one computer node; wherein, M is a positive integer, and the number of the first type of disks and the number of the second type of disks in the local disk information of the M preselected computer nodes are greater than or equal to the number of the first type of disks and the number of the second type of disks in the mounted disk information;
when M is 1, taking the M preselected computer nodes as the target computer node;
and when M is larger than 1, screening the M preselected computer nodes by using a preset screening condition to determine the target computer node.
8. The method of claim 6, wherein the first type of disk is a solid state disk and the second type of disk is a mechanical hard disk.
9. A local disk mount apparatus, the apparatus comprising:
the acquisition unit is used for acquiring request information of the local disk mount virtual machine;
the determining unit is used for determining a target computer node based on the request information of the local disk mount virtual machine and the local disk information of at least one computer node;
a generating unit, configured to set a target mount mode for the local disk of the target computer node, configure a preset performance improvement policy for the local disk of the target computer node on the basis of the target mount mode, and generate a virtual machine configuration file;
and the creating unit is used for mounting a local disk by using the virtual machine configuration file and creating a virtual machine.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010561497.XA CN113821157B (en) | 2020-06-18 | 2020-06-18 | Local disk mounting method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010561497.XA CN113821157B (en) | 2020-06-18 | 2020-06-18 | Local disk mounting method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113821157A true CN113821157A (en) | 2021-12-21 |
CN113821157B CN113821157B (en) | 2024-05-24 |
Family
ID=78911926
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010561497.XA Active CN113821157B (en) | 2020-06-18 | 2020-06-18 | Local disk mounting method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113821157B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114697331A (en) * | 2022-03-29 | 2022-07-01 | 浪潮云信息技术股份公司 | Cloud disk mounting quantity scheduling method, system, device and storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102203737A (en) * | 2011-05-20 | 2011-09-28 | 华为技术有限公司 | Method and device for multithread to access multiple copies |
KR20150095978A (en) * | 2014-02-13 | 2015-08-24 | (주)케이아이엔엑스 | Distributed Storage System using Local Disk of Computing Node on Cloud Computing |
CN105224253A (en) * | 2015-09-29 | 2016-01-06 | 浪潮电子信息产业股份有限公司 | Method for optimizing performance of solid state disk |
US9286261B1 (en) * | 2011-11-14 | 2016-03-15 | Emc Corporation | Architecture and method for a burst buffer using flash technology |
CN106020720A (en) * | 2016-05-16 | 2016-10-12 | 浪潮电子信息产业股份有限公司 | Method for optimizing IO performance of Smart Rack node |
US20160299856A1 (en) * | 2015-04-10 | 2016-10-13 | Rambus Inc. | Memory appliance couplings and operations |
CN109040276A (en) * | 2018-08-20 | 2018-12-18 | 郑州云海信息技术有限公司 | A kind of method, apparatus, computer storage medium and terminal constructing cloud platform |
CN109101194A (en) * | 2018-07-26 | 2018-12-28 | 郑州云海信息技术有限公司 | One kind writing with a brush dipped in Chinese ink performance optimization method and storage system |
CN109725844A (en) * | 2017-10-31 | 2019-05-07 | 阿里巴巴集团控股有限公司 | A kind of disk distribution method, device and storage system |
CN109885377A (en) * | 2018-11-23 | 2019-06-14 | 中国银联股份有限公司 | The method of unified resource scheduling coordinator and its creation virtual machine and/or container, unified resource dispatch system |
CN110780973A (en) * | 2018-07-31 | 2020-02-11 | 中兴通讯股份有限公司 | Virtual machine migration device, method, equipment and readable storage medium |
-
2020
- 2020-06-18 CN CN202010561497.XA patent/CN113821157B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102203737A (en) * | 2011-05-20 | 2011-09-28 | 华为技术有限公司 | Method and device for multithread to access multiple copies |
US9286261B1 (en) * | 2011-11-14 | 2016-03-15 | Emc Corporation | Architecture and method for a burst buffer using flash technology |
KR20150095978A (en) * | 2014-02-13 | 2015-08-24 | (주)케이아이엔엑스 | Distributed Storage System using Local Disk of Computing Node on Cloud Computing |
US20160299856A1 (en) * | 2015-04-10 | 2016-10-13 | Rambus Inc. | Memory appliance couplings and operations |
CN105224253A (en) * | 2015-09-29 | 2016-01-06 | 浪潮电子信息产业股份有限公司 | Method for optimizing performance of solid state disk |
CN106020720A (en) * | 2016-05-16 | 2016-10-12 | 浪潮电子信息产业股份有限公司 | Method for optimizing IO performance of Smart Rack node |
CN109725844A (en) * | 2017-10-31 | 2019-05-07 | 阿里巴巴集团控股有限公司 | A kind of disk distribution method, device and storage system |
CN109101194A (en) * | 2018-07-26 | 2018-12-28 | 郑州云海信息技术有限公司 | One kind writing with a brush dipped in Chinese ink performance optimization method and storage system |
CN110780973A (en) * | 2018-07-31 | 2020-02-11 | 中兴通讯股份有限公司 | Virtual machine migration device, method, equipment and readable storage medium |
CN109040276A (en) * | 2018-08-20 | 2018-12-18 | 郑州云海信息技术有限公司 | A kind of method, apparatus, computer storage medium and terminal constructing cloud platform |
CN109885377A (en) * | 2018-11-23 | 2019-06-14 | 中国银联股份有限公司 | The method of unified resource scheduling coordinator and its creation virtual machine and/or container, unified resource dispatch system |
Non-Patent Citations (5)
Title |
---|
刘诗海;孙宇清;石维琪;高云伟;: "面向可扩展集群环境的快速虚拟机迁移方法", 东南大学学报(自然科学版), no. 03, 20 May 2011 (2011-05-20) * |
张江凯;陈闻;: "面向电力行业的OpenStack私有云建设", 湖北电力, no. 08 * |
张沪滨;李小勇;: "面向QEMU的分布式块存储系统的设计与实现", 微型电脑应用, no. 04, 20 April 2016 (2016-04-20) * |
朱叶: "基于软件定义存储的OpenStack云平台设计与实现", 硕士电子期刊, pages 1 - 76 * |
杨皓森;胡晓勤;黄传波;: "面向OpenStack/Ceph的虚拟机备份系统研究", 计算机系统应用, no. 11 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114697331A (en) * | 2022-03-29 | 2022-07-01 | 浪潮云信息技术股份公司 | Cloud disk mounting quantity scheduling method, system, device and storage medium |
CN114697331B (en) * | 2022-03-29 | 2024-06-07 | 浪潮云信息技术股份公司 | Cloud disk mounting quantity scheduling method, system, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113821157B (en) | 2024-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3761170B1 (en) | Virtual machine creation method and apparatus | |
US11204793B2 (en) | Determining an optimal computing environment for running an image | |
RU2640724C1 (en) | Method of troubleshooting process, device and system based on virtualization of network functions | |
US11023267B2 (en) | Composite virtual machine template for virtualized computing environment | |
JP5680961B2 (en) | Integrated provision of physical and virtual images | |
US11327809B2 (en) | Virtual machine memory removal increment selection | |
US11924117B2 (en) | Automated local scaling of compute instances | |
JP6211631B2 (en) | Identifying workloads and sizing buffers for volume replication purposes | |
US11941406B2 (en) | Infrastructure (HCI) cluster using centralized workflows | |
CN112005219A (en) | Workload management with data access awareness in a compute cluster | |
CN113821157A (en) | Local disk mounting method, device, equipment and storage medium | |
CN109032762B (en) | Virtual machine backtracking method and related equipment | |
US9588831B2 (en) | Preventing recurrence of deterministic failures | |
CN113127258A (en) | Data backup method, device, equipment and medium | |
CN109218259B (en) | License management method and device, APPLM functional entity and computer readable storage medium | |
US10528397B2 (en) | Method, device, and non-transitory computer readable storage medium for creating virtual machine | |
US11188235B2 (en) | Reducing data replications among storage locations | |
CN109617954B (en) | Method and device for creating cloud host | |
WO2023024621A1 (en) | Conditionally deploying a reusable group of containers for a job based on available system resources | |
CN117389713B (en) | Storage system application service data migration method, device, equipment and medium | |
CN116089020B (en) | Virtual machine operation method, capacity expansion method and capacity expansion system | |
US11953972B2 (en) | Selective privileged container augmentation | |
CN109542588B (en) | Method and device for managing virtual equipment in cloud environment | |
US20220391135A1 (en) | File system operations for a storage supporting a plurality of submission queues | |
KR20180000204A (en) | Method, apparatus and system for providing auto scale |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |