CN111737048A - Openstack docking storage virtual machine volume backup processing method and device - Google Patents

Openstack docking storage virtual machine volume backup processing method and device Download PDF

Info

Publication number
CN111737048A
CN111737048A CN202010472075.5A CN202010472075A CN111737048A CN 111737048 A CN111737048 A CN 111737048A CN 202010472075 A CN202010472075 A CN 202010472075A CN 111737048 A CN111737048 A CN 111737048A
Authority
CN
China
Prior art keywords
virtual machine
openstack
copied
storage
backed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010472075.5A
Other languages
Chinese (zh)
Other versions
CN111737048B (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010472075.5A priority Critical patent/CN111737048B/en
Publication of CN111737048A publication Critical patent/CN111737048A/en
Application granted granted Critical
Publication of CN111737048B publication Critical patent/CN111737048B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • 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

Abstract

The invention discloses a backup processing method and a device for openstack docking storage virtual machine volumes, which are used for copying an openstack end virtual machine under the condition that the openstack end virtual machine service state is normal; the copied virtual machine is subjected to uninstalling and closing state setting; the set copied virtual machine is backed up and stored; and after the storage back end is changed, restoring the copied virtual machine which is backed up and stored to realize virtual machine restoration. According to the invention, the openstack end virtual machine is copied, and the openstack end virtual machine is extracted for backup, so that the backup of the virtual machine when the normal service of the virtual machine is not influenced is realized, the stability and the usability of the virtual machine are improved, and the normal operation requirement of a client is ensured.

Description

Openstack docking storage virtual machine volume backup processing method and device
Technical Field
The invention relates to the field of openstack virtual machines, in particular to a backup processing method and device for openstack docking storage virtual machine volumes.
Background
The virtual machine is equivalent to a storage resource caller and a scheme implementer for a client, one virtual machine is a client, and the stability of the virtual machine directly influences the use experience of the user. At present, the connection between the openstack and the AS13000 storage end is mainly realized by using a virtual machine created by the openstack end to utilize and divide resources of the storage end. However, if the storage side has a change, such as a cluster failure, a storage pool change, etc., hundreds or even thousands of virtual machines need to be relocated in the process of repairing the virtual machines, and it takes time to recreate the virtual machines for the use of the clients. Therefore, under the condition that the cluster is normal and each service is normally operated, the existing virtual machine needs to be backed up to improve the safety of the product. However, the backup of the virtual machine is only performed in a state that the volume is not mounted on the virtual machine and the switch is turned off, otherwise, the information is inconsistent after the virtual machine is restored and backed up, which causes the virtual machine to be incapable of being normally used, thereby causing unnecessary loss.
Disclosure of Invention
In order to solve the above problems, the present invention provides a backup processing method and device for openstack docking storage of virtual machine volumes, which can realize backup of virtual machines without affecting the normal service of the virtual machines.
The technical scheme of the invention is as follows: an openstack docking storage virtual machine volume backup processing method comprises the following steps:
under the condition that the openstack end virtual machine service state is normal, copying the openstack end virtual machine;
the copied virtual machine is subjected to uninstalling and closing state setting;
the set copied virtual machine is backed up and stored;
and after the storage back end is changed, restoring the copied virtual machine which is backed up and stored to realize virtual machine restoration.
Further, copying the openstack virtual machine through an rbd native command, and performing uninstallation and closing state setting on the copied virtual machine.
Further, the set copied virtual machine is backed up and saved through an rbd volume backup command.
Further, after the storage back end is changed and before the copied virtual machine which is backed up and saved is restored, the method also comprises the following steps:
butting the openstack end with the storage back end;
and modifying the state of the virtual machine of the database at the openstack end to be closed, setting the state of the mounted volume to be unmounted, and refreshing an openstack end interface.
Further, the virtual machine state of the openstack end database is modified to be closed through an rbd native restore command, the mounted volume state is set to be unmounted, and an openstack end interface is refreshed.
Further, the replicated virtual machines that were backed up for saving are restored via the rbd volume backup restore command.
Further, restoring the copied virtual machine which is backed up and saved specifically includes:
and restoring the corresponding virtual machine volume to a storage pool of the storage end corresponding to the virtual machine.
Further, the rbd native command, the rbd volume backup command, the rbd native restore command, and the rbd volume backup restore command are encapsulated in a script.
The technical scheme of the invention also comprises an openstack docking storage virtual machine volume backup processing device, which comprises,
virtual machine replication module: under the condition that the openstack end virtual machine service state is normal, copying the openstack end virtual machine;
virtual machine setting module: the copied virtual machine is subjected to uninstalling and closing state setting;
a virtual machine backup and storage module: the set copied virtual machine is backed up and stored;
a virtual machine reduction module: and after the storage back end is changed, restoring the copied virtual machine which is backed up and stored to realize virtual machine restoration.
Furthermore, after the storage back end is changed, the openstack end and the storage back end are firstly butted, the virtual machine restoring module also modifies the virtual machine state of the openstack end database to be closed before restoring the copied virtual machine which is backed up and stored, the mounted volume state is set to be uninstalled, and the openstack end interface is refreshed.
According to the backup processing method and device for the openstack butt-joint storage virtual machine volume, provided by the invention, the openstack end virtual machine is copied, and the openstack end virtual machine is extracted for backup, so that the backup of the virtual machine is realized when the normal service of the virtual machine is not influenced. And during backup, firstly, the copied virtual machine is subjected to uninstalling and closing state setting, and the virtual machine state of the openstack end interface database is processed during recovery backup, so that the information consistency of the virtual machine during multiplexing is ensured. The invention improves the stability and the usability of the virtual machine and ensures the normal operation requirement of a client.
Drawings
FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention.
Fig. 2 is a schematic block diagram of a second structure according to an embodiment of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings by way of specific examples, which are illustrative of the present invention and are not limited to the following embodiments.
Example one
In this embodiment, when a virtual machine is not manually turned off and a logical volume is manually unmounted, a backup command is executed to backup the virtual machine without affecting the normal service of the virtual machine, and the state of the virtual machine is a non-mounted volume or a closed state. And after the storage of the back end is changed and the end connection with the openstack is completed, executing the virtual machine with the recovery state of a mounted volume-free and closed state, and modifying the state of the virtual machine of the openstack interface database to complete the recovery of the virtual machine.
As shown in fig. 1, the method specifically includes the following steps:
and S1, copying the openstack end virtual machine under the condition that the openstack end virtual machine service state is normal.
S2, the copied virtual machine is subjected to uninstalling and closing state setting;
in this embodiment, a virtual machine at an openstack end is copied by an rbd (Rados block device) native command, and the copied virtual machine is subjected to uninstallation and closing state setting.
S3, backup and storage are carried out on the set copied virtual machine;
in the embodiment, the set copied virtual machine is backed up and saved through the rbd volume backup command.
The rbd volume backup command is: rbd export { novaPool }/{ volumeme } { novaBackupDir }/{ volumeme }.
Note that the copied virtual machine backup is saved to the openstack local.
S4, after the back end change is stored, the copied virtual machine which is backed up and stored is restored to realize virtual machine restoration;
in this embodiment, after the change of the storage back end, before the virtual machine copied and backed up and saved is restored, the following process is further performed:
butting the openstack end with the storage back end;
and modifying the state of the virtual machine of the database at the openstack end to be closed, setting the state of the mounted volume to be unmounted, and refreshing an openstack end interface.
In this embodiment, the state of the virtual machine of the openstack end database is modified to be closed through the rbd native restore command, the mounted volume state is set to be unmounted, and an openstack end interface is refreshed.
The rbd native restore command is: rbd import-pool { novaPool } { novafkupdir }/{ volumame } - - -image-format = 2-id { circumferentially } conf/etc/icfs.
The present embodiment restores the copied virtual machines that were backed up and saved by the rbd volume backup restoration command.
And restoring the copied virtual machine which is backed up and stored, specifically, restoring the corresponding virtual machine volume to the storage pool of the virtual machine which is correspondingly stored at the storage end.
It should be noted that, in this embodiment, the rbd native command, the rbd volume backup command, the rbd native restore command, and the rbd volume backup restore command are encapsulated in a script, and the method of this embodiment is implemented by automatically executing the script.
Example two
As shown in fig. 2, according to a first embodiment, the present embodiment provides an openstack docking virtual machine volume backup processing apparatus, which includes the following functional modules.
Virtual machine replication module 101: under the condition that the openstack end virtual machine service state is normal, copying the openstack end virtual machine;
virtual machine setting module 102: the copied virtual machine is subjected to uninstalling and closing state setting;
the virtual machine backup saving module 103: the set copied virtual machine is backed up and stored;
the virtual machine restoring module 104: and after the storage back end is changed, restoring the copied virtual machine which is backed up and stored to realize virtual machine restoration.
After the storage back end is changed, the openstack end and the storage back end are firstly butted, the virtual machine restoring module 104 also modifies the virtual machine state of the openstack end database to be closed before restoring the copied virtual machine which is backed up and stored, the mounted volume state is set to be unmounted, the openstack end interface is refreshed, and the consistency of the restored information is ensured.
The above disclosure is only for the preferred embodiments of the present invention, but the present invention is not limited thereto, and any non-inventive changes that can be made by those skilled in the art and several modifications and amendments made without departing from the principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. An openstack docking storage virtual machine volume backup processing method is characterized by comprising the following steps:
under the condition that the openstack end virtual machine service state is normal, copying the openstack end virtual machine;
the copied virtual machine is subjected to uninstalling and closing state setting;
the set copied virtual machine is backed up and stored;
and after the storage back end is changed, restoring the copied virtual machine which is backed up and stored to realize virtual machine restoration.
2. The openstack docking storage virtual machine volume backup processing method according to claim 1, wherein the openstack end virtual machine is copied through an rbd native command, and the copied virtual machine is subjected to uninstallation and closing state setting.
3. The openstack docking storage virtual machine volume backup processing method according to claim 2, wherein the set copied virtual machine is backed up and saved by an rbd volume backup command.
4. The openstack docking storage virtual machine volume backup processing method according to claim 3, wherein after the storage back end is changed, before the copied virtual machine which is backed up and saved is restored, the method further comprises the following steps:
butting the openstack end with the storage back end;
and modifying the state of the virtual machine of the database at the openstack end to be closed, setting the state of the mounted volume to be unmounted, and refreshing an openstack end interface.
5. The openstack docking storage virtual machine volume backup processing method according to claim 4, wherein the openstack end database virtual machine state is modified to be closed through an rbd native restore command, the mounted volume state is set to be unmounted, and an openstack end interface is refreshed.
6. The openstack docking storage virtual machine volume backup processing method according to claim 5, wherein the copied virtual machine whose backup is saved is restored by an rbd volume backup restoration command.
7. The openstack docking storage virtual machine volume backup processing method according to claim 6, wherein the restoring the copied virtual machine that is backed up and saved specifically includes:
and restoring the corresponding virtual machine volume to a storage pool of the storage end corresponding to the virtual machine.
8. The openstack docking storage virtual machine volume backup processing method according to claim 6, wherein an rbd native command, an rbd volume backup command, an rbd native restore command, and an rbd volume backup restore command are encapsulated in a script.
9. An openstack docking virtual machine volume backup processing device is characterized by comprising,
virtual machine replication module: under the condition that the openstack end virtual machine service state is normal, copying the openstack end virtual machine;
virtual machine setting module: the copied virtual machine is subjected to uninstalling and closing state setting;
a virtual machine backup and storage module: the set copied virtual machine is backed up and stored;
a virtual machine reduction module: and after the storage back end is changed, restoring the copied virtual machine which is backed up and stored to realize virtual machine restoration.
10. The openstack docking storage virtual machine volume backup processing device according to claim 9, wherein after the storage back end is changed, the openstack end is first docked with the storage back end, the virtual machine restore module further modifies the virtual machine state of the openstack end database to off, sets the mounted volume state to off-mount, and refreshes the openstack end interface before restoring the copied virtual machine that is backed up and stored.
CN202010472075.5A 2020-05-29 2020-05-29 Openstack docking storage virtual machine volume backup processing method and device Active CN111737048B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010472075.5A CN111737048B (en) 2020-05-29 2020-05-29 Openstack docking storage virtual machine volume backup processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010472075.5A CN111737048B (en) 2020-05-29 2020-05-29 Openstack docking storage virtual machine volume backup processing method and device

Publications (2)

Publication Number Publication Date
CN111737048A true CN111737048A (en) 2020-10-02
CN111737048B CN111737048B (en) 2022-06-10

Family

ID=72647951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010472075.5A Active CN111737048B (en) 2020-05-29 2020-05-29 Openstack docking storage virtual machine volume backup processing method and device

Country Status (1)

Country Link
CN (1) CN111737048B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7584339B1 (en) * 2006-09-28 2009-09-01 Emc Corporation Remote backup and restore operations for ISB protocol systems
CN107124473A (en) * 2017-06-26 2017-09-01 网宿科技股份有限公司 The construction method and cloud platform of cloud platform
CN107197022A (en) * 2017-06-02 2017-09-22 华南理工大学 OpenStack storage optimization methods and system
US10459802B2 (en) * 2015-01-30 2019-10-29 Hewlett-Packard Development Company, L.P. Backup image restore
CN110515763A (en) * 2019-07-26 2019-11-29 浪潮电子信息产业股份有限公司 A kind of method and system of the virtual machine two-node cluster hot backup based on OpenStack
CN110716829A (en) * 2019-10-10 2020-01-21 浪潮云信息技术有限公司 Block storage backup method, terminal and storage medium based on Ceph technology

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7584339B1 (en) * 2006-09-28 2009-09-01 Emc Corporation Remote backup and restore operations for ISB protocol systems
US10459802B2 (en) * 2015-01-30 2019-10-29 Hewlett-Packard Development Company, L.P. Backup image restore
CN107197022A (en) * 2017-06-02 2017-09-22 华南理工大学 OpenStack storage optimization methods and system
CN107124473A (en) * 2017-06-26 2017-09-01 网宿科技股份有限公司 The construction method and cloud platform of cloud platform
CN110515763A (en) * 2019-07-26 2019-11-29 浪潮电子信息产业股份有限公司 A kind of method and system of the virtual machine two-node cluster hot backup based on OpenStack
CN110716829A (en) * 2019-10-10 2020-01-21 浪潮云信息技术有限公司 Block storage backup method, terminal and storage medium based on Ceph technology

Also Published As

Publication number Publication date
CN111737048B (en) 2022-06-10

Similar Documents

Publication Publication Date Title
US10423585B2 (en) Method and device for making differential upgrade package, and method and device for system differential upgrading
WO2017049828A1 (en) Method, device and system for data processing based on linux
CN110543386B (en) Data storage method, device, equipment and storage medium
CN102163167A (en) Method and device for rescuing system
CN106469069B (en) Version upgrading method and system
CN103677870A (en) System upgrading method and system upgraded by means of method
CN111309524A (en) Distributed storage system fault recovery method, device, terminal and storage medium
CN102455954A (en) Power-failure-preventing upgrading method of Linux system
CN106598774A (en) Virtual machine backup restoring method and apparatus
CN106033362A (en) Method and device for processing flash memory partition
CN110209525B (en) Operating system restoration method and device
CN112711498A (en) Virtual machine disaster recovery backup method, device, equipment and readable storage medium
WO2011109049A1 (en) Method and apparatus of backing-up subversion repository
CN111737048B (en) Openstack docking storage virtual machine volume backup processing method and device
CN110795356A (en) System and method for realizing one-click deployment and automatic testing of software based on android
CN103678592A (en) Data backup method and system
CN114443356A (en) Container cluster processing method and system
CN107544868B (en) Data recovery method and device
CN114461338B (en) virtio driver injection method and device
CN112540800A (en) Method for realizing compatibility of EMMCs with different sizes through newly added partitions based on high-pass platform
CN111240895A (en) OpenStack-oriented node batch backup system method
JP2005107819A (en) Fail/safe method for computer network system
CN111209140B (en) Method and device for recovering crash of main and standby dual-node databases
CN114138557B (en) Consistency test method and device for rollback data of stored snapshot
CN113741928B (en) Firmware upgrading method and system of logic device based on I2C

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