CN107391224A - A kind of creation method of virtual volume, hanging method and device - Google Patents

A kind of creation method of virtual volume, hanging method and device Download PDF

Info

Publication number
CN107391224A
CN107391224A CN201710434062.7A CN201710434062A CN107391224A CN 107391224 A CN107391224 A CN 107391224A CN 201710434062 A CN201710434062 A CN 201710434062A CN 107391224 A CN107391224 A CN 107391224A
Authority
CN
China
Prior art keywords
virtual volume
storage space
virtual
volume
preemption
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.)
Pending
Application number
CN201710434062.7A
Other languages
Chinese (zh)
Inventor
李候青
谷强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710434062.7A priority Critical patent/CN107391224A/en
Publication of CN107391224A publication Critical patent/CN107391224A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A kind of creation method of virtual volume, hanging method and device, are related to field of cloud computer technology, to solve the problems, such as that same virtual volume is influenceed business normal operation during multiple virtual machine carries.This method is:Virtual management platform receives the request for creating virtual volume;The virtual management platform is based on the request and creates virtual volume, and the virtual volume includes the first memory space, and first memory space is used to record the whether occupied information of the virtual volume.

Description

Virtual volume creating method, mounting method and device
Technical Field
The embodiment of the application relates to the technical field of cloud computing, in particular to a virtual volume creating method, a virtual volume mounting method and a virtual volume mounting device.
Background
At present, the service and the information system of each industry are all in virtualization deployment. In a virtualized deployment, a user's data is placed on a virtual volume, which can be viewed as a logical storage resource, such as a logical disk. And the virtualization management platform uniformly manages the shared storage resource pool where each user service operates. The virtualization management platform allocates a certain size of Virtual volume to a user from the shared storage resource pool as required, and mounts the Virtual volume to a Virtual Machine (VM) for the user to store a system and use application data.
In a network abnormal situation or a host abnormal situation, the virtualization management platform performs exception handling on the virtual machines, and a situation that the same virtual machine instance runs on a plurality of hosts at the same time is easily generated, so that one virtual volume is mounted by a plurality of virtual machines, and the plurality of virtual machines run the virtual volume at the same time. In addition, there is a possibility that an abnormality may occur in the mount state of the virtual volume, and if the virtual volume is already mounted to the virtual machine a but the mount state of the virtual volume indicates that the virtual volume is not mounted, the virtual volume may still be mounted to the virtual machine B.
All of the above situations may cause a problem of Internet Protocol (IP) address conflict and a problem of data storage being damaged, which may affect normal operation of the service.
Disclosure of Invention
The embodiment of the application provides a creating method, a mounting method and a mounting device of a virtualized volume, which are used for solving the problem that the normal operation of a service is influenced when the same virtualized volume is mounted by a plurality of virtual machines.
The embodiment of the application provides the following specific technical scheme:
in a first aspect, a method for creating a virtual volume is provided, where a virtualization management platform allocates some more storage spaces at a fixed location of a virtual volume as a volume operation control domain space when creating and allocating the virtual volume, and the storage spaces are used to record information about whether the virtual volume is occupied, so that a problem that the virtual volume is simultaneously mounted by two or more virtual machines can be effectively solved, service reliability is greatly improved, and service loss is reduced.
In one possible design, a virtualization management platform receives a request for creating a virtual volume, and creates the virtual volume based on the request, wherein the virtual volume includes a first storage space, and the first storage space is used for recording information about whether the virtual volume is occupied. In this way, the occupation state of the virtual volume is recorded in the virtual volume, which is helpful for improving the accuracy of the occupation state of the virtual machine and avoiding the problem that the virtual volume is repeatedly mounted.
In one possible design, the first storage space is recorded as empty for characterizing that the virtual volume is unoccupied; or, when the first storage space is recorded as the first indication information, the first storage space is used for representing that the virtual volume is occupied.
In one possible design, the first indication information includes a first identifier for characterizing that the virtual volume is occupied by a first virtual machine. In a non-HA application scenario, a virtual machine that needs to occupy a virtual volume may determine whether the virtual volume is occupied through a first identifier, and if the virtual volume is occupied, mount is not allowed, so that the virtual volume is prevented from being mounted repeatedly.
In one possible design, the first indication information further includes a second identifier for characterizing a compute node running the first virtual machine. In an HA application scenario, a first computing node that may run a first virtual machine may fail, and a second computing node is required to run the first virtual machine, so that the problem that a virtual volume is run by two computing nodes can be avoided by the present scheme.
In one possible design, the virtual volume further includes a second storage space, and the second storage space is used to record information on whether the virtual volume is preempted by at least two virtual machines. Based on this information, it may be helpful to prevent the virtual volume from being preemptively mounted.
In one possible design, the second storage space is recorded as empty, and is used for representing that the virtual volume is not preempted by at least two virtual machines; or when the second storage space is recorded as the second indication information, the second storage space is used for representing that the virtual volume is preempted by at least two virtual machines.
In one possible design, the second indication information includes a third identifier for indicating that the second virtual machine needs to preempt the virtual volume when the virtual volume is already occupied by the first virtual machine. Wherein the third identification is written to the virtual volume by a computing node running the second virtual machine.
In a possible design, the second indication information further includes a fourth identifier, which is used to characterize a time when the second virtual machine preempts the virtual volume.
In a second aspect, a method for mounting a virtual volume is provided, in which a computing node reads a first storage space of a virtual volume, the first storage space is used to record information about whether the virtual volume is occupied, and when the computing node determines that the virtual volume is not occupied, the computing node mounts the virtual volume to a virtual machine. Therefore, the problem that the virtual volume is repeatedly mounted is avoided, the service reliability is greatly improved, and the service loss is reduced.
In one possible design, when the computing node determines that the virtual volume is occupied and the computing node needs to preempt the virtual volume, recording preemption information and preemption time in a second storage space of the virtual volume, and starting a timer; the computing node reads the second storage space when the timer is overtime; if the recording information of the second storage space is emptied, determining that the preemption fails; and if the preemption information and the preemption moment are recorded in the second storage space, determining that preemption is successful, and mounting the virtual volume to a virtual machine. In this way, it may help prevent the virtual volume from being preemptively mounted.
In a third aspect, an apparatus for creating a virtual volume is provided, where the apparatus has a function of implementing the behavior of the virtualization management platform in any one of the possible designs of the first aspect and the first aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In a fourth aspect, a mount apparatus for a virtual volume is provided, which has a function of calculating node behaviors in any one of the possible designs of the second aspect and the second aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In a fifth aspect, a mount apparatus for a virtual volume is provided, which structurally includes a communication interface, a memory, and a processor, wherein the memory is used for storing a set of programs, and the processor is used for calling the programs stored in the memory and executing the method according to any one of the possible designs of the second aspect and the second aspect through the communication interface.
In a sixth aspect, there is provided a virtualization system comprising the apparatus of the third aspect, and the apparatus of the fourth or fifth aspect.
In a seventh aspect, a computer storage medium is provided for storing a computer program comprising instructions for performing the first aspect, the second aspect, any of the possible implementations of the first aspect, or the method in any of the possible implementations of the second aspect.
In an eighth aspect, embodiments of the present application provide a computer program product containing instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
Drawings
FIG. 1 is a block diagram of a virtualization system architecture according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for creating a virtual volume according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a storage space of a virtual volume in an embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for mounting a virtual volume according to an embodiment of the present application;
FIG. 5 is a diagram illustrating a structure of volume mount control domain information in an embodiment of the present application;
fig. 6 is a schematic diagram of mounting a virtual volume in an application scenario according to an embodiment of the present application;
fig. 7 is a schematic diagram of mounting a virtual volume in an HA application scenario in the embodiment of the present application;
FIG. 8 is a schematic structural diagram of a device for creating a virtual volume in an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a mounting apparatus for virtual volumes according to an embodiment of the present application;
fig. 10 is a second schematic structural diagram of a virtual volume mount device according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
The embodiment of the application provides a virtual volume creating method, a virtual volume mounting method and a virtual volume mounting device.
The method can be widely applied to the field of cloud computing and virtualization, and after service clouding or virtualization deployment in various industries, the accuracy of the operation state of the virtual volume is improved and the operation control of the virtual volume is facilitated.
As shown in fig. 1, a virtualization system 100 provided in the embodiment of the present application includes: a virtualization management platform 101, a storage resource pool 102, and a computing resource pool 103. The virtualization management platform 101 manages a storage resource pool 102 and a computing resource pool 103 in which each user service operates in a unified manner. The virtualization management platform 101 allocates a certain size of virtual volume to the user from the storage resource pool 102 as needed, and mounts the virtual volume to the virtual machine for the user to store the system and the application data. The virtualization management platform 101 includes several functional units, where volume management is responsible for operations such as creating and deleting virtual volumes; high Availability (HA) manages the HA flow responsible for the virtual machine, HA refers to: when a computing node (or physical server) or a virtual machine fails, the virtual machine is automatically started to another available computing node in the computing resource pool 103, so that the user service is ensured not to be interrupted. The virtual machine management is responsible for creating, deleting and other operations of the virtual machine. The storage resource pool 102 includes storage nodes for providing storage resources for the entire virtualization system. The computing resource pool 103 includes compute nodes that are used to run virtual machines.
Based on the virtualization system 100 shown in fig. 1, the creating method, the mounting method, and the virtualization management platform of the virtual volume provided in the embodiments of the present application will be described in further detail below with reference to the drawings.
As shown in fig. 2, a specific flow of the method for creating a virtual volume according to the embodiment of the present application is as follows.
Step 201, a virtualization management platform receives a request for creating a virtual volume;
step 202, the virtualization management platform creates a virtual volume based on the request. The virtual volume comprises a first storage space, and the first storage space is used for recording information about whether the virtual volume is occupied or not.
Specifically, when the first storage space is recorded as empty, the virtual volume is used for representing that the virtual volume is not occupied; when the first storage space is recorded as the first indication information, the first storage space is used for representing that the virtual volume is occupied.
The first indication information includes a first identifier for characterizing the virtual volume as being occupied by the first virtual machine. For example, the first identification is a unique identification ID of the first virtual machine.
The first indication information further includes a second identifier for characterizing the computing node running the first virtual machine, for example, the second identifier is an ID or an IP address of the computing node running the first virtual machine.
The virtual volume also comprises a second storage space, and the second storage space is used for recording information whether the virtual volume is preempted by at least two virtual machines.
Specifically, when the second storage space is recorded as empty, the second storage space is used for representing that the virtual volume is not preempted by at least two virtual machines; when the second storage space is recorded as the second indication information, the second storage space is used for representing that the virtual volume is preempted by at least two virtual machines.
The second indication information includes a third identifier for indicating that the second virtual machine needs to preempt the virtual volume when the virtual volume is already occupied. For example, the third identification is an ID or IP address of the computing node running the second virtual machine.
The second indication information further includes a fourth identifier, which is used for representing the time when the second virtual machine occupies the virtual volume. For example, the Time is the current Universal Time (UTC).
In particular, the first storage space and the second storage space may be located at fixed locations, for example, the fixed locations connecting the head or tail of the data storage space. The data storage space is used for recording user data of the virtual volume. The byte size occupied by the first storage space and the second storage space is fixed, and may be 1K, for example.
Fig. 3 is a schematic structural diagram of a storage space of a virtual volume, which is suitable for the storage space of the virtual volume in the methods shown in fig. 3 and fig. 4.
As shown in fig. 4, a specific flow of the mount method for a virtual volume according to the embodiment of the present application is as follows.
Step 401, the computing node reads a first storage space of the virtual volume.
The first storage space is used for recording information whether the virtual volume is occupied or not. The structure of the specific first storage space is shown in fig. 3.
Step 402, when the computing node determines that the virtual volume is not occupied, the virtual volume is hung on the virtual machine.
For example, the computing node determines that the first storage space is empty and determines that the virtual volume is unoccupied.
Optionally, when the computing node determines that the virtual volume is occupied, the computing node does not perform the operation of hanging the virtual volume to the virtual machine.
In one application scenario, when determining that a virtual volume is occupied, a computing node needs to preempt the virtual volume. For example, if a virtual machine occupying a virtual volume fails or a first computing node running the virtual machine fails, the virtualization management platform determines that the virtual machine HAs the HA attribute, and selects an available second computing node (i.e., the computing node described in steps 401 and 402 above) to start the virtual machine. And the second computing node records the preemption information and the preemption moment in a second storage space of the virtual volume and starts a timer, wherein the timer is marked as an HA timer. The preemption information is a third identification as shown in fig. 3, e.g., the preemption information is an ID or IP address of the second computing node. The preemption time is the fourth identification shown in fig. 3.
The second computing node reads the second storage space when the timer is overtime; if the recording information of the second storage space is emptied, determining that the preemption fails; and if the second storage space is not emptied, and the preemption information and the preemption moment are still recorded, determining that the preemption is successful, and mounting the virtual volume to the virtual machine.
Explanation of the above emptying case: the first compute node that HAs run the virtual machine HAs a resident timer on it with a period that is less than the period of the HA timer. If the first computing node can normally operate during the timing period of the HA timer of the second computing node, the first computing node reads that the second storage space records the preemption information when the resident timer times out, and clears the preemption information; if the first computing node fails and the failure is not released when the HA timer of the second computing node finishes timing, the preemption information will not be cleared. And when the HA timer finishes timing, the second computing node finds that the preemption information is not emptied, determines that the first computing node is in a fault state, determines that preemption is successful, mounts the virtual volume to the virtual machine, and completes the HA process.
Therefore, the problems of repeated mounting and mounting preemption of the virtual volume can be avoided, and the problem of split brain of the virtual machine can be solved in the HA process of the virtual machine. The method ensures that effective user data is not damaged, greatly improves the service reliability and reduces the service loss.
The method shown in fig. 2 and 4 will be further described in detail with reference to specific application scenarios.
One, creating virtual volume
And the volume management in the virtualization management platform receives the volume creation request, allocates a virtual volume for a user, and mounts the virtual volume to a node where the volume management is located.
In this case, the volume mount control field information is written at a fixed position (e.g., a head or a tail) in the storage space of the virtual volume. The volume mount control field information is information recorded in the first storage space and the second storage space. The initial values of the volume mount control information are all filled with NULL. NULL is indicated as NULL. The volume mount control domain space is fixed in size, such as 1 kbyte. As shown in fig. 5, the volume mount control field information specifically includes the following control items: VM identification, mounting identification, preemption identification, and preemption timestamp.
The VM identifier is used to identify the VM on which the virtual volume is mounted, and may be a VM ID, for example.
The mount identifier is used to identify the compute node running the VM, for example, the mount identifier may be an ID or an IP address of the compute node where the VM runs.
The preemption identification is used to indicate whether the virtual volume is preemptively mounted by at least two VMs. If the preemption identification is NULL, indicating that the virtual machine is not preempted, and if the preemption identification is not NULL, indicating that at least two VMs preempt the mount virtual machine. For example, the preemption identification may be an ID or IP address of the compute node on which the VM is running.
The preemption timestamp represents the time of preemptively mounting the virtual volume by the VM, and can be represented by UTC time, and if the virtual volume is preempted, the current UTC time is written.
After the virtual volume is created, the initial values of these control items are all filled with NULL.
Secondly, mounting the virtual volume
After the virtual volume is created by the volume management in the virtualization management platform, the virtual machine can mount the virtual volume by operating the computing node where the virtual machine is located.
For example, as shown in FIG. 6, virtual machine VM1 runs on compute node CN1, and CN1 mounts LUN1 locally when VM1 needs to mount virtual volume LUN 1. In one application scenario, during the process of creating a virtual volume by volume management, the virtual volume may be mounted on CN 1. CN1 reads the volume mount control domain, judges the VM identifier and the mount identifier, and determines that the VM identifier and the mount identifier are NULL, then directly mounts. And after the mounting is successful, filling the information of the volume mounting control domain: the VM is identified as VM1, the mount is identified as CN1, the preemption identifier is NULL, and the preemption timestamp is NULL.
If the VM does not have the HA attribute, the volume mount control domain information in the embodiment of the present application may not include the mount identifier, and CN1 may determine whether the virtual volume is mounted only through the VM identifier.
If the VM HAs the HA attribute, the virtual machine may run on two or more computing nodes simultaneously under the condition that the HA process is executed imperfectly or fails, and since the VM identifiers on different computing nodes are the same, CN1 cannot determine whether the virtual volume is mounted only by the VM identifier, and the accuracy of the mounting state of the virtual volume can be improved by the mounting identifier.
VM2 runs on compute node CN2, and when VM2 needs to mount virtual volume LUN1, CN2 reads the VM identification of LUN1 as VM1 and the mount identification as CN1, and determines that the virtual volume has been mounted by VM1 and mount is not allowed.
In this way, the problem of virtual volumes being mounted by different virtual machines can be helped to be avoided.
Third, virtual machine HA flow
As shown in fig. 7, VM1 runs on compute node CN1, VM1 successfully mounts virtual volume LUN1, fills out volume mount control domain information: the VM is identified as VM1, the mount is identified as CN1, the preemption identifier is NULL, and the preemption timestamp is NULL.
When VM1 or CN1 or network fails, HA management queries VM1 status, finds VM1 failure, selects an available node, i.e., compute node CN2, starts VM1, and then VM1 needs to mount virtual volume LUN1 on compute node CN 2. The mount identifier of LUN1 is CN1, then CN2 writes the preemption identifier as CN2, writes the preemption timestamp as current UTC Time1, and CN2 starts an HA timer, the system may configure the timeout, for example, the timeout is set to 8 seconds, and CN2 waits for 8 seconds and then detects whether the preemption identifier will be modified.
During the time period of the timer on CN2, if CN1 does not have a fault or the fault is repaired, CN1 may work normally, CN1 periodically queries volume mount control domain information of mounted LUN1 by using a resident timer, if CN1 finds that VM is identified as VM1 and mount is identified as CN1, but the preemption identification is recorded as CN2, it is recognized that LUN1 is preempted, that is, the preemption identification is set to NULL; wherein, the resident timer period of CN1 is less than the period of HA timer on CN 2. When the HA timer of CN2 times out, the VM identifier of LUN1 is read as VM1, the mount identifier is CN1, and the preemption identifier is NULL, then the volume suspension preemption fails, and LUN1 is not allowed to be mounted.
Of course, if CN1 fails and the failure is not repaired, the CN cannot clear the preemption identification. When the HA timer of CN2 times out, reading the VM identifier of LUN1 as VM1, the mount identifier is CN1, the preemption identifier is CN2, and if the volume preemption succeeds, the VM1 mounts LUN 1; after the volume is successfully mounted, the information of the volume mounting control domain is filled as follows: the VM is identified as VM1, the mount is identified as CN2, the preemption identifier is NULL, and the preemption timestamp is NULL.
By the method, the problems of VM HA split and mount preemption can be effectively solved.
Based on the same inventive concept of the method for creating a virtual volume shown in fig. 2, as shown in fig. 8, an embodiment of the present application further provides a virtual volume creating apparatus 800, where the virtual volume creating apparatus 800 is configured to execute the method for creating a virtual volume shown in fig. 2. The virtual volume creation apparatus 800 includes a reception unit 801 and a processing unit 802, wherein:
a receiving unit 801 configured to receive a request to create a virtual volume;
a processing unit 802, configured to create a virtual volume based on the request, where the virtual volume includes a first storage space, and the first storage space is used to record information about whether the virtual volume is occupied.
Optionally, the first storage space is recorded as empty, and is used for representing that the virtual volume is not occupied; or, when the first storage space is recorded as the first indication information, the first storage space is used for representing that the virtual volume is occupied.
Optionally, the first indication information includes a first identifier for indicating that the virtual volume is occupied by the first virtual machine.
Optionally, the first indication information further includes a second identifier, which is used to characterize a computing node running the first virtual machine.
Optionally, the virtual volume further includes a second storage space, where the second storage space is used to record information about whether the virtual volume is preempted by at least two virtual machines.
Optionally, the second storage space is recorded as empty, and is used to represent that the virtual volume is not preempted by at least two virtual machines; or when the second storage space is recorded as the second indication information, the second storage space is used for representing that the virtual volume is preempted by at least two virtual machines.
Optionally, the second indication information includes a third identifier, which is used to indicate that the second virtual machine needs to preempt the virtual volume when the virtual volume is already occupied by the first virtual machine.
Optionally, the second indication information further includes a fourth identifier, which is used to characterize a time when the second virtual machine occupies the virtual volume.
Based on the same inventive concept of the mount method of the virtual volume shown in fig. 4, as shown in fig. 9, an embodiment of the present application further provides a mount apparatus 900 of the virtual volume, where the mount apparatus 900 of the virtual volume is configured to execute the mount method of the virtual volume shown in fig. 4, and the mount apparatus 900 of the virtual volume includes a reading unit 901 and a processing unit 902, where:
a reading unit 901, configured to read a first storage space of a virtual volume, where the first storage space is used to record information about whether the virtual volume is occupied;
a processing unit 902 is configured to, when it is determined that the virtual volume is not occupied, suspend the virtual volume to the virtual machine.
Optionally, the processing unit 902 is further configured to:
when the virtual volume is determined to be occupied and the virtual volume needs to be preempted, recording preemption information and preemption time in a second storage space of the virtual volume, and starting a timer; reading the second storage space when the timer is overtime; if the recording information of the second storage space is emptied, determining that the preemption fails; and if the second storage space records the preemption information and the preemption moment, determining that the preemption is successful, and mounting the virtual volume to the virtual machine.
Based on the same inventive concept of the mount method of the virtual volume shown in fig. 4, as shown in fig. 10, an embodiment of the present application further provides a mount apparatus 1000 of the virtual volume, where the mount apparatus 1000 of the virtual volume is configured to perform the mount method of the virtual volume shown in fig. 4, the mount apparatus 1000 of the virtual volume includes a communication interface 1001, a processor 1002, a memory 1003, and both the communication interface 1001 and the memory 1003 are connected to the processor 1002, and the processor 1002 is configured to execute code in the memory 1003, where when the code is executed, the execution causes the processor 1002 to perform the mount method of the virtual volume shown in fig. 4.
The processor 1002 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 1002 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The memory 1003 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1003 may also include a non-volatile memory (non-volatile) such as a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD); the memory 1003 may also include a combination of the above types of memories.
An embodiment of the present application provides a computer storage medium for storing a computer program, where the computer program includes a program for executing the mount method of the virtual volume shown in fig. 4.
The present application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the mount method of the virtual volume shown in fig. 4.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to encompass such modifications and variations.

Claims (20)

1. A method for creating a virtual volume, comprising:
the virtualization management platform receives a request for creating a virtual volume;
and the virtualization management platform creates a virtual volume based on the request, wherein the virtual volume comprises a first storage space, and the first storage space is used for recording information about whether the virtual volume is occupied or not.
2. The method of claim 1, wherein the first storage space is recorded as empty for characterizing that the virtual volume is unoccupied; or,
when the first storage space is recorded as the first indication information, the first storage space is used for representing that the virtual volume is occupied.
3. The method of claim 2, wherein the first indication information includes a first identifier characterizing the virtual volume as being occupied by a first virtual machine.
4. The method of claim 3, wherein the first indication information further comprises a second identification characterizing a compute node running the first virtual machine.
5. The method according to any one of claims 1 to 4, wherein the virtual volume further comprises a second storage space, and the second storage space is used for recording information whether the virtual volume is preempted by at least two virtual machines.
6. The method of claim 5, wherein the second storage space is recorded as empty for characterizing that the virtual volume is not preempted by at least two virtual machines; or,
and when the second storage space is recorded as the second indication information, the second storage space is used for representing that the virtual volume is preempted by at least two virtual machines.
7. The method of claim 6, wherein the second indication information includes a third indication that the second virtual machine needs to preempt the virtual volume when the virtual volume is already occupied by the first virtual machine.
8. The method of claim 7, wherein the second indication information further comprises a fourth identification characterizing a time at which the second virtual machine preempts the virtual volume.
9. A method for mounting a virtual volume, comprising:
reading a first storage space of a virtual volume by a computing node, wherein the first storage space is used for recording information about whether the virtual volume is occupied or not;
the computing node, upon determining that the virtual volume is unoccupied, hangs the virtual volume to a virtual machine.
10. The method of claim 9, wherein the method further comprises:
when the computing node determines that the virtual volume is occupied and the computing node needs to occupy the virtual volume, recording occupation information and occupation time in a second storage space of the virtual volume, and starting a timer;
the computing node reads the second storage space when the timer is overtime;
if the recording information of the second storage space is emptied, determining that the preemption fails;
and if the preemption information and the preemption moment are recorded in the second storage space, determining that preemption is successful, and mounting the virtual volume to a virtual machine.
11. An apparatus for creating a virtual volume, comprising:
a receiving unit configured to receive a request to create a virtual volume;
and the processing unit is used for creating a virtual volume based on the request, wherein the virtual volume comprises a first storage space, and the first storage space is used for recording information about whether the virtual volume is occupied or not.
12. The apparatus of claim 11, wherein the first storage space is recorded as empty for characterizing that the virtual volume is unoccupied; or,
when the first storage space is recorded as the first indication information, the first storage space is used for representing that the virtual volume is occupied.
13. The apparatus of claim 12, wherein the first indication information comprises a first identification characterizing the virtual volume as being occupied by a first virtual machine.
14. The apparatus of claim 13, wherein the first indication information further comprises a second identification characterizing a compute node running the first virtual machine.
15. The apparatus according to any of claims 11 to 14, wherein the virtual volume further comprises a second storage space, and the second storage space is used for recording information whether the virtual volume is preempted by at least two virtual machines.
16. The apparatus of claim 15, wherein the second storage space is recorded as empty for characterizing that the virtual volume is not preempted by at least two virtual machines; or,
and when the second storage space is recorded as the second indication information, the second storage space is used for representing that the virtual volume is preempted by at least two virtual machines.
17. The apparatus of claim 16, wherein the second indication information comprises a third indication that the second virtual machine needs to preempt the virtual volume when the virtual volume is already occupied by the first virtual machine.
18. The apparatus of claim 17, wherein the second indication information further comprises a fourth identification characterizing a time at which the second virtual machine preempts the virtual volume.
19. An apparatus for mounting a virtual volume, comprising:
the device comprises a reading unit, a storage unit and a processing unit, wherein the reading unit is used for reading a first storage space of a virtual volume, and the first storage space is used for recording information whether the virtual volume is occupied or not;
and the processing unit is used for hanging the virtual volume to the virtual machine when determining that the virtual volume is not occupied.
20. The apparatus as recited in claim 19, said processing unit to further:
when the virtual volume is determined to be occupied and the virtual volume needs to be preempted, recording preemption information and preemption time in a second storage space of the virtual volume, and starting a timer;
reading the second storage space when the timer is overtime;
if the recording information of the second storage space is emptied, determining that the preemption fails;
and if the preemption information and the preemption moment are recorded in the second storage space, determining that preemption is successful, and mounting the virtual volume to a virtual machine.
CN201710434062.7A 2017-06-09 2017-06-09 A kind of creation method of virtual volume, hanging method and device Pending CN107391224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710434062.7A CN107391224A (en) 2017-06-09 2017-06-09 A kind of creation method of virtual volume, hanging method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710434062.7A CN107391224A (en) 2017-06-09 2017-06-09 A kind of creation method of virtual volume, hanging method and device

Publications (1)

Publication Number Publication Date
CN107391224A true CN107391224A (en) 2017-11-24

Family

ID=60333214

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710434062.7A Pending CN107391224A (en) 2017-06-09 2017-06-09 A kind of creation method of virtual volume, hanging method and device

Country Status (1)

Country Link
CN (1) CN107391224A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108614728A (en) * 2018-04-27 2018-10-02 平安科技(深圳)有限公司 Virtual machine service providing method, device, equipment and computer readable storage medium
CN110825487A (en) * 2019-09-19 2020-02-21 烽火通信科技股份有限公司 Management method for preventing split brain of virtual machine and main server
CN111880742A (en) * 2020-07-29 2020-11-03 北京浪潮数据技术有限公司 Distributed storage volume creation method, system, device and computer medium
CN112035219A (en) * 2020-09-10 2020-12-04 深信服科技股份有限公司 Virtual machine data access method, device, equipment and storage medium
CN113126912A (en) * 2021-03-15 2021-07-16 新华三大数据技术有限公司 Personal disk mounting method and device
CN113761491A (en) * 2021-07-29 2021-12-07 苏州浪潮智能科技有限公司 Storage volume access authority management method, device, terminal and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063338A (en) * 2010-12-28 2011-05-18 华为技术有限公司 Method and device for requesting exclusive resource
CN103209095A (en) * 2013-03-13 2013-07-17 广东新支点技术服务有限公司 Method and device for preventing split brain on basis of disk service lock
CN103544047A (en) * 2013-10-25 2014-01-29 华为技术有限公司 Cloud system data management method
CN104253860A (en) * 2014-09-11 2014-12-31 武汉噢易云计算有限公司 Shared storage message queue-based implementation method for high availability of virtual machines
CN104410531A (en) * 2014-12-11 2015-03-11 上海百事通信息技术股份有限公司 Redundant system architecture approach
CN104461698A (en) * 2014-12-29 2015-03-25 成都致云科技有限公司 Dynamic virtual disk mounting method, virtual disk management device and distributed storage system
CN104461687A (en) * 2014-11-20 2015-03-25 华为技术有限公司 Virtual machine configuration information storage method and device
US20170024232A1 (en) * 2015-07-20 2017-01-26 Nimble Storage, Inc. Methods and systems for integrating a volume shadow copy service (vss) requester and/or a vss provider with virtual volumes (vvols)
CN106789350A (en) * 2017-01-23 2017-05-31 郑州云海信息技术有限公司 A kind of method and device of back-level server virtualization system host node High Availabitity
CN106775924A (en) * 2016-11-07 2017-05-31 北京百度网讯科技有限公司 Virtual machine starts method and apparatus

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063338A (en) * 2010-12-28 2011-05-18 华为技术有限公司 Method and device for requesting exclusive resource
CN103209095A (en) * 2013-03-13 2013-07-17 广东新支点技术服务有限公司 Method and device for preventing split brain on basis of disk service lock
CN103544047A (en) * 2013-10-25 2014-01-29 华为技术有限公司 Cloud system data management method
CN104253860A (en) * 2014-09-11 2014-12-31 武汉噢易云计算有限公司 Shared storage message queue-based implementation method for high availability of virtual machines
CN104461687A (en) * 2014-11-20 2015-03-25 华为技术有限公司 Virtual machine configuration information storage method and device
CN104410531A (en) * 2014-12-11 2015-03-11 上海百事通信息技术股份有限公司 Redundant system architecture approach
CN104461698A (en) * 2014-12-29 2015-03-25 成都致云科技有限公司 Dynamic virtual disk mounting method, virtual disk management device and distributed storage system
US20170024232A1 (en) * 2015-07-20 2017-01-26 Nimble Storage, Inc. Methods and systems for integrating a volume shadow copy service (vss) requester and/or a vss provider with virtual volumes (vvols)
CN106775924A (en) * 2016-11-07 2017-05-31 北京百度网讯科技有限公司 Virtual machine starts method and apparatus
CN106789350A (en) * 2017-01-23 2017-05-31 郑州云海信息技术有限公司 A kind of method and device of back-level server virtualization system host node High Availabitity

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108614728A (en) * 2018-04-27 2018-10-02 平安科技(深圳)有限公司 Virtual machine service providing method, device, equipment and computer readable storage medium
WO2019205272A1 (en) * 2018-04-27 2019-10-31 平安科技(深圳)有限公司 Virtual machine service providing method, device and equipment and computer readable storage medium
CN110825487A (en) * 2019-09-19 2020-02-21 烽火通信科技股份有限公司 Management method for preventing split brain of virtual machine and main server
CN110825487B (en) * 2019-09-19 2022-07-15 烽火通信科技股份有限公司 Management method for preventing split brain of virtual machine and main server
CN111880742A (en) * 2020-07-29 2020-11-03 北京浪潮数据技术有限公司 Distributed storage volume creation method, system, device and computer medium
CN111880742B (en) * 2020-07-29 2022-06-17 北京浪潮数据技术有限公司 Distributed storage volume creation method, system, device and computer medium
CN112035219A (en) * 2020-09-10 2020-12-04 深信服科技股份有限公司 Virtual machine data access method, device, equipment and storage medium
CN112035219B (en) * 2020-09-10 2024-04-09 深信服科技股份有限公司 Virtual machine data access method, device, equipment and storage medium
CN113126912A (en) * 2021-03-15 2021-07-16 新华三大数据技术有限公司 Personal disk mounting method and device
CN113761491A (en) * 2021-07-29 2021-12-07 苏州浪潮智能科技有限公司 Storage volume access authority management method, device, terminal and storage medium
CN113761491B (en) * 2021-07-29 2023-07-21 苏州浪潮智能科技有限公司 Storage volume access authority management method, device, terminal and storage medium

Similar Documents

Publication Publication Date Title
CN107391224A (en) A kind of creation method of virtual volume, hanging method and device
US10545781B2 (en) Dynamically deployed virtual machine
US20220129299A1 (en) System and Method for Managing Size of Clusters in a Computing Environment
EP2840495B1 (en) Container-based processing method and apparatus
US8635493B2 (en) High availability system allowing conditionally reserved computing resource use and reclamation upon a failover
CN106201659B (en) A kind of method and host of live migration of virtual machine
US11558311B2 (en) Automated local scaling of compute instances
US11461191B2 (en) Orchestrating and prioritizing the rebuild of storage object components in a hyper-converged infrastructure
CN111897558A (en) Kubernets upgrading method and device for container cluster management system
CN114089926B (en) Management method of distributed storage space, computing equipment and storage medium
CN111158945B (en) Kernel fault processing method, device, network security equipment and readable storage medium
CN104461698A (en) Dynamic virtual disk mounting method, virtual disk management device and distributed storage system
CN104216771A (en) Restarting method and device for software program
CN115167757A (en) Acceleration card distributed storage access method, device, equipment and storage medium
CN114064216A (en) Virtual machine initialization method, device, terminal equipment and storage medium
CN113687779A (en) Data migration method and device, electronic equipment and readable storage medium
CN110471744B (en) Password modification method, device, equipment and computer readable storage medium
CN117453242A (en) Application updating method of virtual machine, computing equipment and computing system
US10976934B2 (en) Prioritizing pages to transfer for memory sharing
CN109684029A (en) Storage content access method, device, electronic equipment and computer storage medium
US11157309B2 (en) Operating cluster computer system with coupling facility
US9753670B2 (en) Prioritizing memory pages to copy for memory migration
CN110688193B (en) Disk processing method and device
CN115103020B (en) Data migration processing method and device
CN107678838B (en) Method and device for tracking operation of virtual machine and virtual machine management platform

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20171124

RJ01 Rejection of invention patent application after publication