CN112799790B - Scheduling method, scheduling device, electronic equipment and computer storage medium - Google Patents
Scheduling method, scheduling device, electronic equipment and computer storage medium Download PDFInfo
- Publication number
- CN112799790B CN112799790B CN202110403296.1A CN202110403296A CN112799790B CN 112799790 B CN112799790 B CN 112799790B CN 202110403296 A CN202110403296 A CN 202110403296A CN 112799790 B CN112799790 B CN 112799790B
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- type
- block storage
- storage device
- request
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000012544 monitoring process Methods 0.000 claims description 22
- 238000004519 manufacturing process Methods 0.000 claims description 20
- 230000015654 memory Effects 0.000 claims description 20
- 238000004891 communication Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 8
- 230000003044 adaptive effect Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000008034 disappearance Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000000007 visual effect Effects 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/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing 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/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- 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/0653—Monitoring storage devices or 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/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
- G06F3/0676—Magnetic disk device
-
- 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- 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/45587—Isolation or security of virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a scheduling method, a scheduling device, an electronic device and a computer storage medium, wherein the method comprises the following steps: receiving a first request for applying for a block storage device sent by a first type of virtual machine, wherein the first request at least carries requirement information about the block storage device; allocating a target block storage device provided by a second type of virtual machine to the first type of virtual machine based on the first request; and mounting the target block storage device to the first type of virtual machine. According to the technical scheme of the application, the low-version virtual machine can provide the block storage service.
Description
Technical Field
The present application relates to the field of cloud computers, and in particular, to a scheduling method and apparatus, an electronic device, and a computer storage medium.
Background
A Virtual Machine (VM) refers to a complete computer system with complete hardware system functions, which is simulated by software and runs in a completely isolated environment. Storage virtualization is a storage service that provides highly available, flexibly configurable, and secure storage for virtual machines. Data block level storage virtualization is a storage service that provides logical storage for virtual machines. The block storage refers to an independent storage disk, and the storage medium can be flexibly switched between virtual machines or physical machines. However, the low-version virtual machine cannot create a separate storage disk, and it is difficult to provide a flexible block storage service for use by a storage cluster.
Disclosure of Invention
In order to solve at least one of the above problems in the prior art, embodiments of the present application provide a scheduling method, an apparatus, an electronic device, and a computer storage medium.
In a first aspect, an embodiment of the present application provides a scheduling method, including:
receiving a first request for applying for a block storage device sent by a first type of virtual machine, wherein the first request at least carries requirement information about the block storage device;
allocating a target block storage device provided by a second type of virtual machine to the first type of virtual machine based on the first request;
and mounting the target block storage device to the first type of virtual machine.
In one embodiment of the present application, the method further comprises:
receiving a second request for releasing the block storage device sent by the first type of virtual machine;
uninstalling the target block storage device mounted by the first type of virtual machine based on the second request.
In one embodiment of the present application, the method further comprises:
and creating a configuration table, wherein the configuration table is used for recording the expected number of the second type virtual machines configured by each storage cluster and the permitted number of the production block storage devices of each second type virtual machine.
In an embodiment of the present application, the allocating, based on the first request, a target block storage device provided by a second type of virtual machine for the first type of virtual machine includes:
determining a storage cluster to which the first type of virtual machine belongs;
determining a target second type virtual machine from a plurality of second type virtual machines of a storage cluster to which the first type virtual machine belongs;
and allocating the target block storage device adaptive to the first request for the first type virtual machine from a plurality of block storage devices of the target second type virtual machine.
In one embodiment of the present application, the method further comprises:
monitoring the actual number of the second type virtual machines which are created currently and the actual number of the storage devices of the production blocks of each second type virtual machine to obtain a monitoring result;
and adjusting the number of the second type of virtual machines and the number of the production block storage devices of each second type of virtual machine based on the configuration table and in combination with the monitoring result.
In one embodiment of the present application, the method further comprises:
recording a life cycle and/or usage record of the target block storage device.
In a second aspect, an embodiment of the present application provides a scheduling apparatus, where the apparatus includes:
the communication module is used for receiving a first request for applying for the block storage device sent by a first type of virtual machine, wherein the first request at least carries requirement information about the block storage device;
the scheduling module is used for allocating target block storage equipment provided by a second type of virtual machine to the first type of virtual machine based on the first request; and mounting the target block storage device to the first type of virtual machine.
In an embodiment of the present application, the communication module is further configured to receive a second request for releasing the block storage device, where the second request is sent by the first type of virtual machine; the scheduling module is further configured to unload the target block storage device mounted by the first type of virtual machine based on the second request.
In one embodiment of the present application, the apparatus further comprises:
and the creating module is used for creating a configuration table, and the configuration table is used for recording the expected number of the second type virtual machines configured by each storage cluster and the permitted number of the production block storage devices of each second type virtual machine.
In an embodiment of the present application, the scheduling module is configured to:
determining a storage cluster to which the first type of virtual machine belongs;
determining a target second type virtual machine from a plurality of second type virtual machines of a storage cluster to which the first type virtual machine belongs;
and allocating the target block storage device adaptive to the first request for the first type virtual machine from a plurality of block storage devices of the target second type virtual machine.
In one embodiment of the present application, the apparatus further comprises:
the monitoring module is used for monitoring the actual number of the second type virtual machines which are created currently and the actual number of the storage devices of the production blocks of each second type virtual machine to obtain a monitoring result;
the scheduling module is further configured to adjust the number of the second type of virtual machines and the number of the production block storage devices of each second type of virtual machine in combination with the monitoring result based on the configuration table.
In one embodiment of the present application, the apparatus further comprises:
and the recording module is used for recording the life cycle and/or the use record of the target block storage device.
In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the embodiments of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which is used to make a computer execute the method in any one of the embodiments of the present application when the computer program runs on the computer.
The advantages or beneficial effects in the above technical solution at least include:
receiving a first request for applying for a block storage device sent by a first type of virtual machine, and distributing a target block storage device provided by a second type of virtual machine for the first type of virtual machine based on the first request; and mounting the target block storage device to the first type of virtual machine, so that block storage service can be provided for the low-version virtual machine.
The foregoing summary is provided for the purpose of description only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present application will be readily apparent by reference to the drawings and following detailed description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a first flowchart illustrating a scheduling method according to an embodiment of the present application;
FIG. 2 is a second flowchart illustrating a scheduling method according to an embodiment of the present application;
FIG. 3 is a third flowchart illustrating a scheduling method according to an embodiment of the present application;
FIG. 4 is a fourth flowchart illustrating a scheduling method according to an embodiment of the present application;
FIG. 5 is a fifth flowchart illustrating a scheduling method according to an embodiment of the present application;
fig. 6 is a sixth schematic flowchart of a scheduling method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a system architecture for implementing a block storage service according to an embodiment of the present application;
fig. 8 is a first schematic structural diagram of a scheduling apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a scheduling apparatus according to an embodiment of the present application;
fig. 10 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The terms "first," "second," and "third," etc. in the description and claims of the present application and the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprises" and "comprising," as well as any variations thereof, are intended to cover a non-exclusive inclusion, such as a list of steps or elements. A method, system, article, or apparatus is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, system, article, or apparatus.
The application provides a scheduling method, which can be applied to electronic devices including but not limited to fixed devices and/or mobile devices, for example, fixed devices including but not limited to servers, and the servers can be cloud servers or ordinary servers. For example, mobile devices include, but are not limited to, mobile phones, tablet computers, in-vehicle devices, and the like. As shown in fig. 1, the method includes:
step S101, receiving a first request for applying for a block storage device sent by a first type of virtual machine, wherein the first request at least carries requirement information about the block storage device;
step S102, distributing target block storage equipment provided by a second type of virtual machine to the first type of virtual machine based on the first request;
step S103, mounting the target block storage device to the first type of virtual machine.
The present application does not limit the manner of acquiring the first request. Illustratively, the electronic device receives a first request sent by a first type of virtual machine through an external interface. Further illustratively, the electronic device receives a first request sent by a first type of virtual machine forwarded by the other device.
The format of the first request is not limited in the present application. Any request format that the electronic device can recognize to indicate the application block storage device may be used.
Wherein, the requirement information about the block storage device at least comprises one or more of the following information: size of the block storage device, type of block storage device, IOPS of the block storage device. The IOPS (Input/Output Per Second), i.e., the Input/Output amount (or the number of read/write times) Per Second, is one of the main indicators for measuring the performance of the disk, and the IOPS refers to the number of I/O requests that can be processed by the system in unit time, generally, the number of I/O requests processed Per Second is taken as a unit, and the I/O requests are usually read or write data operation requests.
The first request may also carry an identifier of the first type of virtual machine, and indication information of the application block storage device.
Wherein the first type of virtual machine is a virtual machine for consuming block storage device resources. In the present application, the type of the first type of virtual machine is not limited. Illustratively, the first type of virtual machine may be VMware of versions 6.0 and below, or 6.0 and above.
Wherein the second type of virtual machines are virtual machines for producing block storage device resources, each of the second type of virtual machines producing one or more block storage devices. In the present application, the second type of virtual machine is a virtual machine that cannot provide a block storage service function alone. In the present application, the type of the second type virtual machine is not limited. Illustratively, the second type of virtual machine may be VMware version 6.0 and below.
Wherein, one target block storage device is used for mounting a first type virtual machine at the same time.
Therefore, according to the scheme of the application, the first request of applying for the block storage device sent by the first type of virtual machine is received, the target block storage device provided by the second type of virtual machine is allocated to the first type of virtual machine based on the first request, and the target block storage device is mounted to the first type of virtual machine, so that the second type of virtual machine can provide mounting service of block storage for the first type of virtual machine according to the first request of the first type of virtual machine, and the function that the low-version virtual machine can also provide the block storage service is realized.
In this embodiment of the present application, on the basis of implementing any one of the methods described above, allocating a target block storage device provided by a second type of virtual machine to the first type of virtual machine based on the first request may include:
determining a storage cluster to which the first type of virtual machine belongs;
determining a target second type virtual machine from a plurality of second type virtual machines of a storage cluster to which the first type virtual machine belongs;
and allocating the target block storage device adaptive to the first request for the first type virtual machine from a plurality of block storage devices of the target second type virtual machine.
The first type of virtual machine and the second type of virtual machine belong to the same storage cluster.
Illustratively, assuming that the storage cluster to which the first type of virtual machine belongs is a storage cluster 1, and the storage cluster 1 includes 10 second type virtual machines capable of producing block storage devices, then, a target second type virtual machine is determined from the 10 second type virtual machines, and assuming that the target second type virtual machine has several block storage devices in a free state, in the case that the several block storage devices in the free state have a block storage device adapted to the first request, one block storage device is selected from one or more block storage devices adapted to the first request as the target block storage device.
Through the implementation mode, the target block storage device provided by the second type of virtual machine can be quickly allocated to the first type of virtual machine.
In this embodiment of the present application, on the basis of implementing any one of the methods described above, allocating a target block storage device provided by a second type of virtual machine to the first type of virtual machine based on the first request may include:
determining a storage cluster to which the first type of virtual machine belongs;
determining a target second type virtual machine from a plurality of second type virtual machines of a storage cluster to which the first type virtual machine belongs;
notifying the target second type virtual machine to generate a target block storage device corresponding to the first request.
For example, assuming that a storage cluster to which a first type of virtual machine belongs is a storage cluster 1, and the storage cluster 1 includes 10 second type of virtual machines capable of producing block storage devices, a target second type of virtual machine is determined from the 10 second type of virtual machines, the target second type of virtual machine generates a block storage device meeting the requirement of a first request according to the first request of the first type of virtual machine, and the block storage device is allocated to the first type of virtual machine as a target block storage device.
Through the implementation mode, the target block storage device provided by the second type of virtual machine can be quickly allocated to the first type of virtual machine.
In the embodiment of the present application, on the basis of implementing any one of the methods described above, as shown in fig. 2, the method may further include:
step S104, receiving a second request for releasing the block storage device sent by the first type of virtual machine;
step S105, uninstalling the target block storage device mounted by the first type of virtual machine based on the second request.
The present application does not limit the manner of obtaining the second request. Illustratively, the electronic device receives a second request sent by the first type of virtual machine through the external interface. Further illustratively, the electronic device receives a second request sent by the first type of virtual machine forwarded by the other device.
Wherein the format of the second request is not limited in the present application. Any request format that the electronic device can recognize to instruct the release of the block storage device may be used.
Illustratively, the second request carries at least an identification of the first type of virtual machine and indication information for releasing the block storage device.
Further, the second request may also carry a target block storage device identification. Therefore, the electronic equipment can quickly lock the target block storage device currently mounted by the first type of virtual machine, and the target block storage device can be quickly unloaded conveniently.
Through the implementation mode, the target block storage device mounted on the first type of virtual machine can be unloaded according to the second request of the first type of virtual machine, so that the second type of virtual machine provides unloading service of block storage for the first type of virtual machine, and the low-version virtual machine can also provide block storage service.
In the embodiment of the present application, on the basis of implementing any one of the methods described above, as shown in fig. 3, the method may further include:
step S106, a configuration table is created, and the configuration table is used for recording the expected number of the second type virtual machines configured by each storage cluster and the permitted number of the production block storage devices of each second type virtual machine.
Exemplarily, the electronic device is responsible for scheduling block storage services in X storage clusters, and the number n of the second type virtual machines of the storage cluster 1 is recorded in the configuration table1Number n of virtual machines of the second type of storage cluster 22…, number n of virtual machines of the second type of storage cluster Xx。
Further illustratively, the configuration table also records the permitted number m of the 1 st second type virtual machine production block storage devices in the storage cluster 11The allowed number m of 2 nd class-two virtual machines in the storage cluster 1 to produce a block storage device2…, n-th in storage cluster 11Permitted number m of second type virtual machine production block storage devicesn1。
Through the embodiment, the second type of virtual machines in each storage cluster can be monitored and managed conveniently according to the configuration table, and the scheduling efficiency is improved.
In the embodiment of the present application, on the basis of implementing any one of the methods described above, as shown in fig. 4, the method may further include:
step S107, monitoring the actual number of the second type virtual machines which are created currently and the actual number of the storage devices of the production blocks of each second type virtual machine to obtain a monitoring result;
and step S108, based on the configuration table, adjusting the number of the second type virtual machines and the number of the production block storage devices of each second type virtual machine in combination with the monitoring result.
In some embodiments, adjusting the number of the second type of virtual machines in combination with the monitoring result based on the configuration table includes:
deleting a first target number of the second type of virtual machines from the current second type of virtual machines based on the expected number when the number of the second type of virtual machines which are created currently is larger than the expected number of the second type of virtual machines in the configuration table;
and in the case that the number of the second type virtual machines which are created currently is less than or equal to the expected number of the second type virtual machines in the configuration table, increasing a second target number of the second type virtual machines based on the expected number.
The values of the first target quantity and the second target quantity can be set or adjusted according to actual conditions such as scheduling precision requirements, scheduling speed requirements or design requirements.
Exemplarily, the electronic device is responsible for scheduling block storage services in X storage clusters, and the number n of the second type virtual machines of the storage cluster 1 is recorded in the configuration table1Number n of virtual machines of the second type of storage cluster 22…, number n of virtual machines of the second type of storage cluster Xx(ii) a Suppose that the storage cluster 1 has n virtual machines of the second type currently1y,n1yGreater than n1Then n is deleted1y−n1A second type of virtual machine; suppose that the storage cluster 2 currently has n virtual machines of the second type2y,n2yLess than n2Then n is added to storage cluster 22−n2yA second type of virtual machine.
In some embodiments, adjusting the number of production block storage devices of each second type virtual machine in combination with the monitoring result based on the configuration table includes:
in the case that the number of block storage devices produced by the second type of virtual machine is greater than the permitted number of production block storage devices of the second type of virtual machine in the configuration table, deleting a third target number of the block storage devices from the current block storage devices of the second type of virtual machine based on the permitted number;
and in the case that the number of the block storage devices produced by the second type of virtual machine is smaller than the permitted number of the block storage devices produced by the second type of virtual machine in the configuration table, adding a fourth target number of the block storage devices to the second type of virtual machine based on the permitted number.
The values of the third target quantity and the fourth target quantity can be set or adjusted according to actual conditions such as scheduling precision requirements, scheduling speed requirements or design requirements.
Is exemplified byThe electronic equipment is responsible for scheduling block storage services in X storage clusters, and the allowable number m of block storage equipment produced by the 1 st second type virtual machine in the storage cluster 1 is recorded in the configuration table1The allowable number m of block storage devices produced by the 2 nd class two virtual machine in storage cluster 12…, permitted number m of block storage devices produced by the n1 th second type virtual machine in storage cluster 1n1. Suppose the number of block storage devices produced by the 1 st second type virtual machine of the storage cluster 1 is m1z,m1zGreater than m1Then m of the 1 st second type virtual machine is deleted1z−m1A block storage device; suppose the 2 nd class II virtual machine of storage cluster 1 produces m number of block storage devices2z,m2zLess than m2Then m is added to the 2 nd second class virtual machine2−m2zA block storage device.
Through the embodiment, the number of the block storage devices produced by each second type of virtual machine in each storage cluster can be monitored and managed conveniently, so that the configuration requirement can be met.
In the embodiment of the present application, on the basis of implementing any one of the methods described above, as shown in fig. 5, the method may further include:
step S109, recording the life cycle and/or usage record of the target block storage device.
Wherein the lifecycle includes several phases from production to disappearance of the target block storage device. For example, the creation time, the update time, and the disappearance time are included.
The usage record includes information such as identification and usage time of the first type of virtual machine using the block storage device.
Through the embodiment, the life cycle and/or the use record of the target block storage device are recorded, so that the use record of the target block storage device is convenient to look over, and the use condition of the target block storage device is convenient to monitor.
In the embodiment of the present application, on the basis of implementing any one of the methods described above, as shown in fig. 6, the method may further include:
in step S110, a state record table is created.
The status record table is used for recording block storage device information, including size, IOPS, status (use status or free status), use record, and the like.
Illustratively, the life cycle and/or usage record of the target block storage device of step S109 is recorded to the status record table.
Through the embodiment, the use record of the target block storage device can be conveniently checked through the state record table subsequently, and the use condition of the target block storage device can be conveniently monitored through the state record table.
Fig. 7 shows a schematic diagram of a system architecture for implementing the block storage service, in which a first type of virtual machine is denoted as a consumer and a second type of virtual machine is denoted as a producer for understanding, and as can be seen from fig. 7, the architecture includes a scheduling system, a monitoring system, and a database. The scheduling system is responsible for receiving first requests of applying for the block storage devices sent by all consumers and distributing target block storage devices provided by a producer to all consumers based on the first requests of all consumers; the corresponding target block storage device is then mounted to the corresponding consumer. The scheduling system is also responsible for receiving second requests sent by the consumers for releasing the block storage devices, and unloading the mounted target block storage devices for the consumers based on the second requests of the consumers. The configuration table is created in the database, and includes how many producers each storage cluster is configured with, and at most, several disks (i.e., several block storage devices) can be produced by each producer at the same time. A state record table related to the block storage device is also created in the database and used for recording the block storage device information generated by the producer, including information of the size of the block storage device, the IOPS, whether the block storage device is used and which consumer the block storage device is used. The monitoring system is responsible for regularly checking the number of actual producers, comparing the actual producers with the configuration table, and informing the scheduling system of a comparison result, if the number of the actual producers is more than that in the configuration table, the scheduling system deletes the producers; if the actual number of producers is less than the number in the configuration table, the scheduling system creates producers to ensure that the number of producers meets expectations.
After the dispatching system is started, the initialization of the system is automatically completed according to the configuration table, including the automatic creation of a producer. After the dispatching system is started, the dispatching system waits for a request of a consumer for applying the block storage device and receives a post-application processing requirement, so that the block storage device can be quickly provided for the consumer. After the scheduling system is started, the monitoring system completes the initial creation of the producer, and continuously monitors the state of the producer, so as to ensure that the available producer meets the configuration number in the configuration table.
When a consumer needs to use block storage, the scheduling system distributes the request of the consumer to the producers corresponding to different storage clusters according to the different storage clusters, the producers divide storage resources from the storage clusters, the configuration of the storage clusters is updated, the required block storage devices are created, and then the block storage devices are unloaded to become independent block storage device resources. After the steps are completed, the producer returns the information of the block storage device to the consumer, the scheduling system executes mounting of the block storage device to the specified consumer, so that the creation and mounting of the block storage device are completed, and the consumer can use the block storage device.
That is, when a consumer applies for using a block storage device to the scheduling system, the producer completes the creation of the block storage device, and the scheduling system mounts the block storage device to a designated consumer according to the information, so that the consumer can use the block storage device and record and store the information of the block storage device in the state information table. When a consumer applies for the unloading of the block storage device to the scheduling system, the scheduling system executes unloading operation to unload the block storage device from the consumer, so that the block storage device is changed back to a free state and can be used by other consumers. Optionally, the original consumer's data on the block storage device is maintained by default and its usage record and current status are recorded in the status information table. The block storage device in the free state belongs to the block storage device which can be used at any time, and the scheduling system manages all the block storage devices in a unified manner and records the states and the use records of all the life cycles of the block storage devices.
Through the system architecture, the specified virtual machines can be used as producers according to the configuration information to produce the required block storage equipment, and the produced block storage equipment supports free mounting and unloading in the same storage cluster; when a consumer needs to uninstall the block storage device, the scheduling and uninstalling of the storage device from the consumer can be realized; the method has the advantages that the free scheduling of the block storage devices is realized, the block storage devices are distributed from different storage clusters to consumers according to the demands of the consumers, the formatting of the block storage devices, the mounting and the dismounting of the block storage devices and the like, all operations can ensure the safety of data stored on the block storage devices, the low-version virtual machine can provide a block storage service function, and the problem that the low-version virtual machine cannot provide the block storage for the cluster to use is solved.
It should be understood that the architecture diagram shown in fig. 7 is an alternative specific implementation manner, and those skilled in the art may make various obvious changes and/or substitutions based on the example in fig. 7, and the obtained technical solution still belongs to the disclosure scope of the embodiment of the present application.
The scheduling method provided by the application can be used for items such as block storage service items or virtual machine use. Illustratively, the execution subject of the method may be an electronic device, which may be a terminal, or may be a server.
As an implementation of the foregoing methods, the present application also provides a scheduling apparatus. Fig. 8 shows a schematic diagram of a scheduling apparatus. As shown in fig. 8, the apparatus includes:
a communication module 801, configured to receive a first request for applying for a block storage device sent by a first type of virtual machine, where the first request at least carries requirement information about the block storage device;
a scheduling module 802, configured to allocate a target block storage device provided by a second type of virtual machine to the first type of virtual machine based on the first request; and mounting the target block storage device to the first type of virtual machine.
In some embodiments, the communication module 801 is further configured to receive a second request for freeing a block storage device sent by the first type of virtual machine; the scheduling module 802 is further configured to unload the target block storage device mounted by the first type of virtual machine based on the second request.
In some embodiments, as shown in fig. 9, the apparatus may further comprise:
a creating module 803, configured to create a configuration table, where the configuration table is used to record the expected number of the second type virtual machines configured by each storage cluster, and the permitted number of the production block storage devices of each second type virtual machine.
In some embodiments, the scheduling module 802 is configured to:
determining a storage cluster to which the first type of virtual machine belongs;
determining a target second type virtual machine from a plurality of second type virtual machines of a storage cluster to which the first type virtual machine belongs;
and allocating the target block storage device adaptive to the first request for the first type virtual machine from a plurality of block storage devices of the target second type virtual machine.
In some embodiments, as shown in fig. 9, the apparatus may further comprise:
a monitoring module 804, configured to monitor an actual number of the currently created second type virtual machines and an actual number of storage devices of a production block of each second type virtual machine, so as to obtain a monitoring result;
the scheduling module 802 is further configured to adjust the number of the second type virtual machines and the number of the production block storage devices of each second type virtual machine based on the configuration table and in combination with the monitoring result.
In some embodiments, as shown in fig. 9, the apparatus may further comprise:
a recording module 805, configured to record a life cycle and/or usage record of the target block storage device.
The functions of each module in each apparatus in the embodiment of the present application may refer to corresponding descriptions in the above method, and are not described herein again.
The scheduling device of the embodiment of the application can realize that the low-version virtual machine provides the block storage service.
There is also provided, in accordance with an embodiment of the present application, an electronic device, a readable storage medium, and a computer program product.
FIG. 10 illustrates a schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the electronic apparatus includes: one or more processors 1001, memory 1002, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display Graphical information for a Graphical User Interface (GUI) on an external input/output device, such as a display device coupled to the Interface. In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Fig. 10 illustrates an example of one processor 1001.
The memory 1002 is a non-transitory computer readable storage medium provided herein. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the scheduling method provided by the present application. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the scheduling method provided by the present application.
The memory 1002, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the scheduling method in the embodiments of the present application (e.g., the communication module 801, the scheduling module 802, the creating module 803, the monitoring module 804, and the recording module 805 shown in fig. 9). The processor 1001 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 1002, that is, implements the scheduling method in the above-described method embodiments.
The memory 1002 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the electronic device of the scheduling method, and the like. Further, the memory 1002 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 1002 may optionally include memory located remotely from the processor 1001, which may be connected to the scheduling method's electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the scheduling method may further include: an input device 1003 and an output device 1004. The processor 1001, the memory 1002, the input device 1003, and the output device 1004 may be connected by a bus or other means, and the bus connection is exemplified in fig. 10.
The input device 1003 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus of the scheduling method, such as an input device such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer, one or more mouse buttons, a track ball, a joystick, or the like. The output devices 1004 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The Display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) Display, and a plasma Display. In some implementations, the display device can be a touch screen.
According to an embodiment of the present application, the present application also provides an electronic device. The electronic device may include:
one or more processors; and
and a storage device for storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the scheduling method in the above-described method embodiments.
The functions and implementations of the processor and the storage device of the electronic device may refer to the descriptions about the processor and the memory in the above embodiments of the electronic device.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, Integrated circuitry, Application Specific Integrated Circuits (ASICs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a Programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a Cathode Ray Tube (CRT) or LCD monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, which is also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in a conventional physical host and Virtual Private Server (VPS) service. The server may also be a server of a distributed system, or a server incorporating a blockchain.
According to the technical scheme of the embodiment of the application, the block storage service function provided by the low-version virtual machine can be realized.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present application can be achieved, and the present invention is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.
Claims (9)
1. A method of scheduling, comprising:
receiving a first request for applying for a block storage device sent by a first type of virtual machine, wherein the first request at least carries requirement information about the block storage device;
determining a storage cluster to which the first type of virtual machine belongs;
determining a target second type virtual machine from a plurality of second type virtual machines of a storage cluster to which the first type virtual machine belongs;
allocating a target block storage device adapted to the first request to the first class virtual machine from a plurality of block storage devices in a free state of the target second class virtual machine, or informing the target second class virtual machine to generate a target block storage device adapted to the first request;
and mounting the target block storage device to the first type of virtual machine.
2. The method of claim 1, further comprising:
receiving a second request for releasing the block storage device sent by the first type of virtual machine;
uninstalling the target block storage device mounted by the first type of virtual machine based on the second request.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
and creating a configuration table, wherein the configuration table is used for recording the expected number of the second type virtual machines configured by each storage cluster and the permitted number of the production block storage devices of each second type virtual machine.
4. The method of claim 3, further comprising:
monitoring the actual number of the second type virtual machines which are created currently and the actual number of the storage devices of the production blocks of each second type virtual machine to obtain a monitoring result;
and adjusting the number of the second type of virtual machines and the number of the production block storage devices of each second type of virtual machine based on the configuration table and in combination with the monitoring result.
5. The method of claim 1, further comprising:
recording a life cycle and/or usage record of the target block storage device.
6. A scheduling apparatus, the apparatus comprising:
the communication module is used for receiving a first request for applying for the block storage device sent by a first type of virtual machine, wherein the first request at least carries requirement information about the block storage device;
the scheduling module is used for determining the storage cluster to which the first type of virtual machine belongs; determining a target second type virtual machine from a plurality of second type virtual machines of a storage cluster to which the first type virtual machine belongs; allocating a free-state target block storage device adapted to the first request to the first class virtual machine from a plurality of free-state block storage devices of the target second class virtual machine, or informing the target second class virtual machine to generate a target block storage device adapted to the first request; and mounting the target block storage device to the first type of virtual machine.
7. The apparatus of claim 6,
the communication module is further configured to receive a second request for releasing the block storage device, which is sent by the first type of virtual machine;
the scheduling module is further configured to unload the target block storage device mounted by the first type of virtual machine based on the second request.
8. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
9. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method of any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110403296.1A CN112799790B (en) | 2021-04-15 | 2021-04-15 | Scheduling method, scheduling device, electronic equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110403296.1A CN112799790B (en) | 2021-04-15 | 2021-04-15 | Scheduling method, scheduling device, electronic equipment and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112799790A CN112799790A (en) | 2021-05-14 |
CN112799790B true CN112799790B (en) | 2022-03-11 |
Family
ID=75811431
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110403296.1A Active CN112799790B (en) | 2021-04-15 | 2021-04-15 | Scheduling method, scheduling device, electronic equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112799790B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140237181A1 (en) * | 2011-07-07 | 2014-08-21 | Atlantis Computing, Inc. | Method and apparatus for preparing a cache replacement catalog |
CN106549986A (en) * | 2015-09-17 | 2017-03-29 | 南京中兴新软件有限责任公司 | A block storage service method and device |
CN110673927A (en) * | 2019-09-27 | 2020-01-10 | 北京浪潮数据技术有限公司 | Scheduling method and device of virtual machine |
CN111831399A (en) * | 2020-07-21 | 2020-10-27 | 浪潮云信息技术股份公司 | Data synchronization method and system of shared disk based on Ceph storage back-end volume |
CN112052072A (en) * | 2020-09-10 | 2020-12-08 | 华云数据控股集团有限公司 | Scheduling strategy and super-fusion system of virtual machine |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103631640B (en) * | 2013-11-08 | 2017-06-09 | 华为技术有限公司 | A kind of data access request response method and device |
US10585760B2 (en) * | 2016-10-19 | 2020-03-10 | International Business Machines Corporation | File name level based file search and restoration from block level backups of virtual machines |
US10558531B2 (en) * | 2017-04-18 | 2020-02-11 | Netapp, Inc. | Systems and methods for backup and restore of master-less distributed database clusters |
CN108038236A (en) * | 2017-12-27 | 2018-05-15 | 深信服科技股份有限公司 | File sharing method, device, system and readable storage medium storing program for executing |
CN111124536B (en) * | 2019-12-12 | 2024-03-22 | 诚迈科技(南京)股份有限公司 | Dual-system data sharing method and device based on data isolation and terminal equipment |
CN111679889B (en) * | 2020-06-10 | 2023-08-29 | 广州市品高软件股份有限公司 | Conversion migration method and system of virtual machine |
-
2021
- 2021-04-15 CN CN202110403296.1A patent/CN112799790B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140237181A1 (en) * | 2011-07-07 | 2014-08-21 | Atlantis Computing, Inc. | Method and apparatus for preparing a cache replacement catalog |
CN106549986A (en) * | 2015-09-17 | 2017-03-29 | 南京中兴新软件有限责任公司 | A block storage service method and device |
CN110673927A (en) * | 2019-09-27 | 2020-01-10 | 北京浪潮数据技术有限公司 | Scheduling method and device of virtual machine |
CN111831399A (en) * | 2020-07-21 | 2020-10-27 | 浪潮云信息技术股份公司 | Data synchronization method and system of shared disk based on Ceph storage back-end volume |
CN112052072A (en) * | 2020-09-10 | 2020-12-08 | 华云数据控股集团有限公司 | Scheduling strategy and super-fusion system of virtual machine |
Also Published As
Publication number | Publication date |
---|---|
CN112799790A (en) | 2021-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9501309B2 (en) | Monitoring hypervisor and provisioned instances of hosted virtual machines using monitoring templates | |
CN111258609A (en) | Upgrading method and device of Kubernetes cluster, electronic equipment and medium | |
CN110704162B (en) | Method, device and equipment for sharing container mirror image by physical machine and storage medium | |
US20180253246A1 (en) | Method and system for memory allocation in a disaggregated memory architecture | |
CN112256423A (en) | System, apparatus, and process for dynamic tenant fabric adjustment in a distributed resource management system | |
JP7170768B2 (en) | Development machine operation task processing method, electronic device, computer readable storage medium and computer program | |
CN111694646A (en) | Resource scheduling method and device, electronic equipment and computer readable storage medium | |
CN111694857A (en) | Method and device for storing resource data, electronic equipment and computer readable medium | |
US9501313B2 (en) | Resource management and allocation using history information stored in application's commit signature log | |
US8230122B2 (en) | Direct provisioning of storage devices to virtual OS partitions | |
CN111782147A (en) | Method and apparatus for cluster scale-up | |
CN111066005A (en) | Asynchronous updates to metadata tracks in response to cache hits generated via I/O operations on a bus interface | |
CN111459645A (en) | Task scheduling method and device and electronic equipment | |
CN112565356A (en) | Data storage method and device and electronic equipment | |
US10742731B2 (en) | Maintaining service configuration consistency across nodes of a clustered file system | |
CN111767169A (en) | Data processing method and device, electronic equipment and storage medium | |
CN111782341A (en) | Method and apparatus for managing clusters | |
CN111782357B (en) | Label control method and device, electronic equipment and readable storage medium | |
CN114721686A (en) | Configuration data updating method and device, electronic equipment and storage medium | |
CN112799790B (en) | Scheduling method, scheduling device, electronic equipment and computer storage medium | |
US9588831B2 (en) | Preventing recurrence of deterministic failures | |
CN115576565A (en) | Application program deployment method and device, electronic equipment and storage medium | |
CN112416593A (en) | Resource management method and device, electronic equipment and computer readable medium | |
US11943292B2 (en) | Extend controller for multi-tenancy | |
CN112799585A (en) | Data processing method and device, electronic equipment and readable storage medium |
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 |