CN103092673B - Virtual machine snapshot disposal route and device - Google Patents

Virtual machine snapshot disposal route and device Download PDF

Info

Publication number
CN103092673B
CN103092673B CN201210490839.9A CN201210490839A CN103092673B CN 103092673 B CN103092673 B CN 103092673B CN 201210490839 A CN201210490839 A CN 201210490839A CN 103092673 B CN103092673 B CN 103092673B
Authority
CN
China
Prior art keywords
virtual machine
bunch
address
mirrored disk
bit pattern
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
Application number
CN201210490839.9A
Other languages
Chinese (zh)
Other versions
CN103092673A (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.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN201210490839.9A priority Critical patent/CN103092673B/en
Publication of CN103092673A publication Critical patent/CN103092673A/en
Application granted granted Critical
Publication of CN103092673B publication Critical patent/CN103092673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a kind of virtual machine snapshot disposal route and device, comprising: the write request to virtual machine detected, described write request comprises bunch address of new data and described new data to be written; Set up the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in the address of each bunch comprised in described virtual machine and the mirrored disk of described virtual machine, is written to storage space corresponding with described bunch of address in the mirrored disk of described virtual machine by described new data; Set up the message bit pattern table of the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in each message bit pattern comprised in institute's bitmap information table and the mirrored disk of described virtual machine, is revised as the first mark by message bit pattern corresponding with described bunch of address in institute's bitmap information table; Described first is designated a bit, represents in the storage space that bunch address of described first mark sensing is corresponding and is written with new data; The problem that virtual machine snapshot treatment effeciency is low can be solved.

Description

Virtual machine snapshot disposal route and device
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of virtual machine snapshot disposal route and device.
Background technology
Due to existing magnetic disk of virtual machine form, such as QEMU copy-on-write version 2 is (English: QEMUCopy-on-Write version2, qcow2) conversion that the structure of the two-stage index table of high expense realizes from virtual address to magnetic disk of virtual machine mirror image address is used, also use reference count table and reference count block record aggregate of data to be shared by how many snapshots simultaneously, when carrying out snapshot to the virtual machine of qcow2 disc format, upgrading in the reference count of current all bunches, need to read two-stage index table from magnetic disk of virtual machine image file frequently, reference count table and reference count block, secondly, the virtual machine of qcow2 disc format uses larger metadata, buffer memory can be taken completely, make a part of concordance list of the virtual machine of a qcow2 disc format buffer memory, therefore, need constantly from disk, required two-stage index table to be read in internal memory, thus the efficiency of virtual machine snapshot process can be reduced.
Summary of the invention
The invention provides a kind of virtual machine snapshot disposal route and device, the problem that virtual machine snapshot treatment effeciency is low can be solved.
First aspect present invention provides a kind of virtual machine snapshot disposal route, comprising:
The write request to virtual machine detected, described write request comprises bunch address of new data and described new data to be written;
Set up the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in the address of each bunch comprised in described virtual machine and the mirrored disk of described virtual machine, is written to storage space corresponding with described bunch of address in the mirrored disk of described virtual machine by described new data;
Set up the message bit pattern table of the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in each message bit pattern comprised in institute's bitmap information table and the mirrored disk of described virtual machine, is revised as the first mark by message bit pattern corresponding with bunch address that described new data writes in institute's bitmap information table;
Described first is designated a bit, represents in the storage space that bunch address of described first mark sensing is corresponding and is written with new data.
The present invention provides a kind of virtual machine snapshot treating apparatus on the other hand, comprising:
Detection module, for the write request to virtual machine being detected, described write request comprises bunch address of new data and described new data to be written;
First sets up module, for setting up the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in the address of each bunch comprised in described virtual machine and the mirrored disk of described virtual machine, is written to storage space corresponding with described bunch of address in the mirrored disk of described virtual machine by described new data;
Second sets up module, for setting up the message bit pattern table of the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in each message bit pattern comprised in institute's bitmap information table and the mirrored disk of described virtual machine, is revised as the first mark by message bit pattern corresponding with bunch address that described new data writes in institute's bitmap information table;
Described first is designated a bit, represents in the storage space that bunch address of described first mark sensing is corresponding and is written with new data.
The present invention is detecting the write request to virtual machine, according to the new data comprised in write request and bunch address needing write new data, set up the mirrored disk of described virtual machine, wherein, the address one_to_one corresponding of each bunch in the address of each bunch comprised in described virtual machine and the mirrored disk of described virtual machine, is written to storage space corresponding with described bunch of address in the mirrored disk of described virtual machine by described new data; Further, in order to improve follow-up snapshot data treatment effeciency, in the present embodiment, also set up the message bit pattern table of the mirrored disk of described virtual machine, message bit pattern corresponding with described bunch of address in institute's bitmap information table is revised as the first mark; Wherein, the address one_to_one corresponding of each bunch in each message bit pattern comprised in institute's bitmap information table and the mirrored disk of described virtual machine.Further, the first mark in message bit pattern table and the second mark are only a bit, therefore, the metadata amount of message bit pattern table can be reduced, so that message bit pattern table can be preserved in the buffer completely, do not need to read message bit pattern table from other disks, reduce extra I/O expense, improve virtual machine snapshot data-handling efficiency.
Accompanying drawing explanation
The schematic flow sheet of the virtual machine snapshot disposal route that Fig. 1 provides for one embodiment of the invention;
The schematic flow sheet of the virtual machine snapshot disposal route that Fig. 2 provides for another embodiment of the present invention;
The structural representation of the virtual machine snapshot treating apparatus that Fig. 3 provides for another embodiment of the present invention;
The Organization Chart of the virtual machine snapshot disposal system that Fig. 4 provides for another embodiment of the present invention;
Fig. 5 is the schematic diagram of the message bit pattern table of embodiment of the present invention application;
Fig. 6 is based on iROW and the contrast schematic diagram creating performance based on the virtual machine snapshot of qcow2;
Fig. 7 is based on iROW and the contrast schematic diagram based on the virtual machine snapshot rollback performance of qcow2.
Embodiment
The embodiment of the present invention provides a kind of virtual machine snapshot disposal route, can solve the problem that virtual machine snapshot treatment effeciency is low, can improve magnetic disk of virtual machine performance, can also reduce buffer memory expense simultaneously.
The schematic flow sheet of the virtual machine snapshot disposal route that Fig. 1 provides for one embodiment of the invention; As shown in Figure 1, specifically comprise:
101, the write request to virtual machine detected, described write request comprises bunch address of new data and described new data to be written.
The Organization Chart of the virtual machine snapshot disposal system that Fig. 4 provides for another embodiment of the present invention, as shown in Figure 4, when arbitrary entity in network needs to write new data at least one in virtual machine bunch, write request can be sent to virtual machine, monitor of virtual machine can detect the write request to virtual machine, wherein, bunch address of new data and described new data to be written is comprised in write request, it should be noted that, in the present embodiment, the least unit of virtual machine is bunch, each bunch of correspondence bunch of address.
102, the mirrored disk of described virtual machine is set up, the address one_to_one corresponding of each bunch in the address of each bunch comprised in described virtual machine and the mirrored disk of described virtual machine, is written to storage space corresponding with described bunch of address in the mirrored disk of described virtual machine by described new data.
In an embodiment of the invention, as shown in Figure 4, in the host of described virtual machine, the mirrored disk of a described virtual machine is set up according to snapshot instruction, and the corresponding relation between the mirrored disk setting up described virtual machine and described virtual machine, wherein, the address one_to_one corresponding of each bunch in the address of each bunch comprised in described virtual machine and the mirrored disk of described virtual machine.
It should be noted that, without any data in newly-built mirrored disk, therefore, the speed creating mirrored disk can be accelerated, after the write request to virtual machine write new data being detected, the new data comprised can be written to storage space corresponding with described bunch of address in newly-built mirrored disk in write request.
103, the message bit pattern table of the mirrored disk of described virtual machine is set up, the address one_to_one corresponding of each bunch in each message bit pattern comprised in institute's bitmap information table and the mirrored disk of described virtual machine, is revised as the first mark by message bit pattern corresponding with bunch address that described new data writes in institute's bitmap information table.
When the write request to virtual machine write new data being detected, and after new data being written to storage space corresponding with described bunch of address in newly-built mirrored disk, in order to improve the efficiency of the process of follow-up snapshot data, in the present embodiment, often set up the mirrored disk of a virtual machine, set up the message bit pattern table of the mirrored disk of this virtual machine accordingly, wherein, the address one_to_one corresponding of each bunch in each message bit pattern comprised in message bit pattern table and the mirrored disk of described virtual machine.
It should be noted that, in the present embodiment, message bit pattern comprises the first mark and the second mark, and wherein, first is designated a bit, such as, be 1, represents in the storage space that bunch address of described first mark sensing is corresponding and is written with new data.Second is designated a bit, such as, be 0, represents in the storage space that bunch address of described second mark sensing is corresponding and does not write new data.
Fig. 5 is the schematic diagram of the message bit pattern table of embodiment of the present invention application, as shown in Figure 5, suppose to have three bunches in virtual machine, be respectively bunch 1, bunches 2 and bunches 3, only in first mirrored disk of virtual machine, be written with new data in bunch storage space that 1 address is corresponding when supposing snapshot, message bit pattern corresponding with this bunch 1 address in the message bit pattern table of first mirrored disk is revised as the first mark 1.Owing to not writing new data in first mirrored disk of virtual machine bunch 2 and bunch storage space that 3 addresses are corresponding, in the present embodiment, the second mark 0 can be defaulted as in the message bit pattern table of first mirrored disk with bunches 2 and bunch message bit pattern that 3 addresses are corresponding.
The embodiment of the present invention is detecting the write request to virtual machine, according to the new data comprised in write request and bunch address needing write new data, set up the mirrored disk of described virtual machine, wherein, the address one_to_one corresponding of each bunch in the address of each bunch comprised in described virtual machine and the mirrored disk of described virtual machine, is written to storage space corresponding with described bunch of address in the mirrored disk of described virtual machine by described new data; Further, in order to improve follow-up snapshot data treatment effeciency, in the present embodiment, also set up the message bit pattern table of the mirrored disk of described virtual machine, message bit pattern corresponding with described bunch of address in institute's bitmap information table is revised as the first mark; Wherein, the address one_to_one corresponding of each bunch in each message bit pattern comprised in institute's bitmap information table and the mirrored disk of described virtual machine.Further, the first mark in message bit pattern table and the second mark are only a bit, therefore, the metadata amount of message bit pattern table can be reduced, so that message bit pattern table can be preserved in the buffer completely, do not need to read message bit pattern table from other disks, reduce extra I/O expense, improve virtual machine snapshot data-handling efficiency.
On the basis of establishment virtual machine snapshot embodiment illustrated in fig. 1, the schematic flow sheet of the virtual machine snapshot disposal route that Fig. 2 provides for another embodiment of the present invention, as shown in Figure 2, comprising:
201, the read request to virtual machine detected, described read request comprises bunch address of data to be read.
As shown in Figure 4, when entity arbitrary in network needs to process the data in virtual machine, read request can be sent to virtual machine, monitor of virtual machine can detect the read request to this virtual machine, wherein, bunch address of data to be read is at least comprised in read request, usually, when not comprising Snapshot time point in read request, be defaulted as and read latest data corresponding to bunch address.
202, the message bit pattern table of the current mirrored disk of described virtual machine is inquired about.
In actual applications, there is multiple snapshot in virtual machine, the corresponding mirrored disk of each snapshot, namely the data of the stylish write of snapshot are each time kept in corresponding mirrored disk, for example, suppose that virtual machine exists N number of snapshot, then there is N number of mirrored disk and N number of message bit pattern table in virtual machine, the corresponding message bit pattern table of each mirrored disk, particularly, the mirrored disk that snapshot is corresponding is for the first time called first mirrored disk, then the data of the stylish write of first time snapshot are kept at first mirrored disk; The mirrored disk that the N time snapshot is corresponding is called N number of mirrored disk, also referred to as current mirrored disk, then the data of the N time stylish write of snapshot are kept at N number of mirrored disk, in order to subsequent query is convenient and improve search efficiency, can using the father mirrored disk of first mirrored disk as second mirrored disk, second mirrored disk is as father's mirrored disk of the 3rd mirrored disk, and by that analogy, N-1 mirrored disk is father's mirrored disk of N number of mirrored disk.
203, determine whether message bit pattern corresponding with described bunch of address in the message bit pattern table of current mirrored disk is the first mark, if so, then perform step 204, otherwise perform step 205.
If determine, message bit pattern corresponding with described bunch of address in the message bit pattern table of current mirrored disk is the first mark, then determine to write new data in storage space corresponding with described bunch of address in described current mirrored disk, performs step 204 further;
If determine, message bit pattern corresponding with described bunch of address in the message bit pattern table of current mirrored disk is the second mark, then determine not write new data in storage space corresponding with described bunch of address in described current mirrored disk, performs step 205 further.
204, described data to be read are read in corresponding with described bunch of address from described current mirrored disk storage space.
205, determine whether there is father's mirrored disk of described current mirrored disk, if so, then perform step 206, otherwise perform step 209.
206, the message bit pattern table that described in recursive query, father's mirrored disk of current mirrored disk is corresponding.
Particularly, suppose the father's mirrored disk that there is described current mirrored disk, then inquire about father's mirrored disk of described current mirrored disk according to Snapshot time point recurrence successively.
207, determine whether message bit pattern corresponding with described bunch of address in the message bit pattern table that described father's mirrored disk is corresponding is the first mark, if so, then perform step 208, otherwise perform step 209.
Particularly, suppose that virtual machine exists N number of mirrored disk, N number of mirrored disk is current mirrored disk, when the message bit pattern table that father's mirrored disk of the N number of mirrored disk of recursive query is corresponding, first the message bit pattern table that N-1 mirrored disk is corresponding is inquired about, if message bit pattern corresponding with described bunch of address in determining the message bit pattern table that N-1 mirrored disk is corresponding is the second mark 0, then inquire about the message bit pattern table that father's mirrored disk father of N-1 mirrored disk is corresponding, namely the message bit pattern table that N-2 mirrored disk is corresponding is inquired about, the rest may be inferred carries out recursive query.
208, described data to be read are read in corresponding with described bunch of address from described father's mirrored disk storage space.
The above-mentioned father's mirrored disk inquiring about described current mirrored disk according to Snapshot time point recurrence successively, determine that message bit pattern corresponding with described bunch of address in the message bit pattern table that described father's mirrored disk is corresponding is the first mark, then determine there are data to be read in storage space corresponding with described bunch of address in this father's mirrored disk, then read described data to be read in corresponding with described bunch of address from described father's mirrored disk storage space.
209, described data to be read are read in corresponding with described bunch of address from described virtual machine storage space.
If above-mentioned steps 205 determines the father's mirrored disk that there is not described current mirrored disk, or the above-mentioned father's mirrored disk inquiring about described current mirrored disk according to Snapshot time point recurrence successively, determine that message bit pattern corresponding with described bunch of address in the message bit pattern table that described father's mirrored disk is corresponding is the second mark, then determine that the data of preserving in storage space corresponding with described bunch of address in described virtual machine are through upgrading, that is, the data of preserving in storage space corresponding with described bunch of address in described virtual machine are data to be read, then read described data to be read in direct storage space corresponding with described bunch of address from described virtual machine.
The embodiment of the present invention is detecting the read request to virtual machine, according to bunch address of the data to be read that read request comprises; Inquire about the message bit pattern table that the current mirrored disk of described virtual machine is corresponding, if message bit pattern corresponding with described bunch of address in institute's bitmap information table is the first mark, then read described data to be read in corresponding with described bunch of address from described current mirrored disk storage space.If message bit pattern corresponding with described bunch of address in institute's bitmap information table is the second mark, and determines the father's mirrored disk that there is described current mirrored disk, then the message bit pattern table that described in recursive query, father's mirrored disk of current mirrored disk is corresponding; Further, if message bit pattern corresponding with described bunch of address in message bit pattern table corresponding to described father's mirrored disk is the first mark, then read described data to be read in corresponding with described bunch of address from described father's mirrored disk storage space; Further, if message bit pattern corresponding with described bunch of address in institute's bitmap information table is the second mark, and determine the father's mirrored disk that there is not described current mirrored disk, then read described data to be read in corresponding with described bunch of address from described virtual machine storage space; Because the first mark in the message bit pattern table that the present embodiment adopts and the second mark are only a bit, thus the message bit pattern table of low expense can be used to realize from virtual address to the conversion of magnetic disk of virtual machine mirror image address, and then the message bit pattern table quick position of low expense can be used to need the data read, therefore, the present embodiment not only can save disk buffering expense, and can improve snapshot data treatment effeciency.
The virtual machine snapshot disposal route provided the embodiment of the present invention below and the existing snap processing method based on qcow2 magnetic disk of virtual machine form carry out the comparison of snapshot creation and snapshot rollback performance test, during specific implementation:
Test environment carries out on DELL Precision T1500, is mainly configured to: the specification of CPU is Intel Core i7-860,8M Cache, 2.8GHz, the specification of internal memory is KingstonKP223C-ELD 2GB × 2, DDR3-1333, and the specification of hard disk is Seagate ST3500418AS, 500G, 7200RPM, 16M, SATAII, the operating system of installing is debian 6, and its linux kernel version is 2.6.32.
In order to test snapshot creation and snapshot rollback performance, first a script is write, first function of this script is the magnetic disk of virtual machine creating specified format, designated disk size, appointment bunch size, full data are write in this magnetic disk of virtual machine, then according to the instruction of establishment snapshot, according to specified format, designated disk size, specify the magnetic disk of virtual machine of bunch size, create a mirrored disk corresponding with magnetic disk of virtual machine, then in this mirrored disk, write new data; Second function of script rolls back to father's mirrored disk from current mirrored disk.
For convenience, magnetic disk of virtual machine size is labeled as disk_size, a magnetic disk of virtual machine bunch size is labeled as cluster_size, a magnetic disk of virtual machine bunch number is labeled as n.
It should be noted that, for convenience, the virtual machine snapshot disposal route embodiment of the present invention provided is redirected (Improved Redirect-On-Write when being called writing after improvement, iROW), be TiROW-c by iROW snapshot creation time mark, be TiROW-a by iROW snapshot rollback time mark, iROW snapshot erasing time is labeled as TiROW-d; Similar, be Tqcow2-c by qcow2 snapshot creation time mark, be Tqcow2-a by qcow2 snapshot rollback time mark, qcow2 snapshot erasing time is labeled as Tqcow2-d.The test result of every snapshot performance is as shown in Fig. 6, Fig. 7, Fig. 8.
Fig. 6 is based on iROW and the contrast schematic diagram creating performance based on the virtual machine snapshot of qcow2, wherein, horizontal ordinate in Fig. 6-A represents disk size (disk_size), unit is GB, ordinate represents the snapshot creation time (Snapshot Creation Time), unit is second (Seconds), Fig. 6-A for bunch size is 64KB(cluster_size=64KB) time, iROW and the qcow2 snapshot creation time is with disk size (disk_size) situation of change; Horizontal ordinate in Fig. 6-B represents a bunch size (cluster_size), unit is KB, ordinate represents the snapshot creation time (Snapshot Creation Time), unit is second (Seconds), Fig. 6-B is disk size is 1GB(disk_size=1GB) time, the snapshot creation time is with the situation of change of disk size (cluster_size).
As can be seen from above-mentioned Fig. 6-A, iROW snapshot creation not only speed is fast, and performance is very stable, does not substantially change with disk size (cluster_size).This is mainly because based on the establishment snapshot of iROW, I/O expense is little, and based on the snapshot creation of qcow2, needs the reference count upgrading each bunch, therefore have Tqcow2-c ∝ n; When a bunch size (cluster_size) is fixing, n ∝ disk_size, so Tqcow2-c ∝ disk_size.As disk_size=50GB, TiROW-c=0.19 second, Tqcow2-c=3.26 second, now TiROW-c is only 5.8% of Tqcow2-c.
As can be seen from Fig. 6-B, the change of cluster_size does not almost affect TiROW-c, when disk_size fixes, and n ∝ 1/cluster_size, therefore Tqcow2-c ∝ 1/cluster_size; Along with cluster_size reduces, Tqcow2-c sharply increases.As cluster_siz=0.5KB, TiROW-c is only 0.13% of Tqcow2-c.
Fig. 7 is based on iROW and the contrast schematic diagram based on the virtual machine snapshot rollback performance of qcow2.When Fig. 7-A is cluster_size=64KB, the snapshot rollback time, when Fig. 7-B is disk_size=1GB, the snapshot rollback time was with cluster_size situation of change with disk_size situation of change.As disk_size=50GB, TiROW-a=0.18 second, Tqcow2-a=6.39 second, TiROW-a is only 2.8% of Tqcow2-a.
The structural representation of the virtual machine snapshot treating apparatus that Fig. 3 provides for another embodiment of the present invention; During specific implementation, the virtual machine snapshot treating apparatus that the present embodiment provides can adopt monitor of virtual machine to realize, and as shown in Figure 3, comprising:
Detection module 31, for the write request to virtual machine being detected, described write request comprises bunch address of new data and described new data to be written;
First sets up module 32, for setting up the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in the address of each bunch comprised in described virtual machine and the mirrored disk of described virtual machine, is written to storage space corresponding with described bunch of address in the mirrored disk of described virtual machine by described new data;
Second sets up module 33, for setting up the message bit pattern table of the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in each message bit pattern comprised in institute's bitmap information table and the mirrored disk of described virtual machine, is revised as the first mark by message bit pattern corresponding with bunch address that described new data writes in institute's bitmap information table;
Wherein, described first is designated a bit, represents in the storage space that bunch address of described first mark sensing is corresponding and is written with new data.
For example, detection module 31, also for the read request to described virtual machine being detected, described read request comprises bunch address that data to be read are pointed to;
Further, described device also comprises:
Enquiry module 34, sets up message bit pattern table corresponding to the current mirrored disk of described virtual machine that module 33 sets up for inquiring about described second;
First determination module 35, if the message bit pattern corresponding with described bunch of address in bitmap information table for determining is the first mark, then reads described data to be read in corresponding with described bunch of address from described current mirrored disk storage space.
Further, described device also comprises:
Second determination module 36, if be the second mark for message bit pattern corresponding with described bunch of address in the message bit pattern table of the current mirrored disk of described virtual machine, and determine the father's mirrored disk that there is described current mirrored disk, then pass through the message bit pattern table that father's mirrored disk of current mirrored disk described in described enquiry module recursive query is corresponding;
3rd determination module 37, if be the first mark for message bit pattern corresponding with described bunch of address in the message bit pattern table that described father's mirrored disk is corresponding, then read described data to be read in corresponding with described bunch of address from described father's mirrored disk storage space;
4th determination module 38, if be the second mark for message bit pattern corresponding with described bunch of address in the message bit pattern table of the current mirrored disk of described virtual machine, and determine the father's mirrored disk that there is not described current mirrored disk, then read described data to be read in corresponding with described bunch of address from described virtual machine storage space;
Wherein, described second is designated a bit, represents in the storage space corresponding to bunch address of the described second mark sensing of institute and does not write new data.
The embodiment of the present invention is detecting the write request to virtual machine, according to the new data comprised in write request and bunch address needing write new data, set up the mirrored disk of described virtual machine, wherein, the address one_to_one corresponding of each bunch in the address of each bunch comprised in described virtual machine and the mirrored disk of described virtual machine, is written to storage space corresponding with described bunch of address in the mirrored disk of described virtual machine by described new data; Further, in order to improve follow-up snapshot data treatment effeciency, in the present embodiment, also set up the message bit pattern table of the mirrored disk of described virtual machine, message bit pattern corresponding with described bunch of address in institute's bitmap information table is revised as the first mark; Wherein, the address one_to_one corresponding of each bunch in each message bit pattern comprised in institute's bitmap information table and the mirrored disk of described virtual machine.Further, the first mark in message bit pattern table and the second mark are only a bit, therefore, the metadata amount of message bit pattern table can be reduced, so that message bit pattern table can be preserved in the buffer completely, do not need to read message bit pattern table from other disks, reduce extra I/O expense.
Further, the read request to virtual machine detected, according to bunch address of the data to be read that read request comprises; Inquire about the message bit pattern table that the current mirrored disk of described virtual machine is corresponding, if message bit pattern corresponding with described bunch of address in institute's bitmap information table is the first mark, then read described data to be read in corresponding with described bunch of address from described current mirrored disk storage space.If message bit pattern corresponding with described bunch of address in institute's bitmap information table is the second mark, and determines the father's mirrored disk that there is described current mirrored disk, then the message bit pattern table that described in recursive query, father's mirrored disk of current mirrored disk is corresponding; Further, if message bit pattern corresponding with described bunch of address in message bit pattern table corresponding to described father's mirrored disk is the first mark, then read described data to be read in corresponding with described bunch of address from described father's mirrored disk storage space; Further, if message bit pattern corresponding with described bunch of address in institute's bitmap information table is the second mark, and determine the father's mirrored disk that there is not described current mirrored disk, then read described data to be read in corresponding with described bunch of address from described virtual machine storage space; Because the first mark in the message bit pattern table that the present embodiment adopts and the second mark are only a bit, thus the message bit pattern table of low expense can be used to realize from virtual address to the conversion of magnetic disk of virtual machine mirror image address, and then the message bit pattern table quick position of low expense can be used to need the data read, therefore, the present embodiment not only can save disk buffering expense, and can improve snapshot data treatment effeciency.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that programmed instruction is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (4)

1. a virtual machine snapshot disposal route, is characterized in that, comprising:
The write request to virtual machine detected, described write request comprises bunch address of new data and described new data to be written;
Set up the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in the address of each bunch comprised in described virtual machine and the mirrored disk of described virtual machine, is written to storage space corresponding with described bunch of address in the mirrored disk of described virtual machine by described new data;
Set up the message bit pattern table of the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in each message bit pattern comprised in institute's bitmap information table and the mirrored disk of described virtual machine, is revised as the first mark by message bit pattern corresponding with bunch address that described new data writes in institute's bitmap information table;
Described first is designated a bit, represents in the storage space that bunch address of described first mark sensing is corresponding and is written with new data;
Described set up the message bit pattern table of the mirrored disk of described virtual machine after, described method also comprises:
The read request to described virtual machine detected, described read request comprises bunch address that data to be read are pointed to;
Inquire about the message bit pattern table that the current mirrored disk of described virtual machine is corresponding, if message bit pattern corresponding with described bunch of address in institute's bitmap information table is the first mark, then read described data to be read in corresponding with described bunch of address from described current mirrored disk storage space;
After the message bit pattern table that the current mirrored disk of the described virtual machine of described inquiry is corresponding, described method also comprises:
If message bit pattern corresponding with described bunch of address in the message bit pattern table that the current mirrored disk of described virtual machine is corresponding is the second mark, and determine the father's mirrored disk that there is described current mirrored disk, then the message bit pattern table that described in recursive query, father's mirrored disk of current mirrored disk is corresponding;
If message bit pattern corresponding with described bunch of address in the message bit pattern table that described father's mirrored disk is corresponding is the first mark, then read described data to be read in corresponding with described bunch of address from described father's mirrored disk storage space;
Described second is designated a bit, represents in the storage space that bunch address of described second mark sensing is corresponding and does not write new data.
2. method according to claim 1, is characterized in that, after the message bit pattern table that the current mirrored disk of the described virtual machine of described inquiry is corresponding, described method also comprises:
If message bit pattern corresponding with described bunch of address in the message bit pattern table that the current mirrored disk of described virtual machine is corresponding is the second mark, and determine the father's mirrored disk that there is not described current mirrored disk, then read described data to be read in corresponding with described bunch of address from described virtual machine storage space;
Described second is designated a bit, represents in the storage space that bunch address of described second mark sensing is corresponding and does not write new data.
3. a virtual machine snapshot treating apparatus, is characterized in that, comprising:
Detection module, for the write request to virtual machine being detected, described write request comprises bunch address of new data and described new data to be written;
First sets up module, for setting up the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in the address of each bunch comprised in described virtual machine and the mirrored disk of described virtual machine, is written to storage space corresponding with described bunch of address in the mirrored disk of described virtual machine by described new data;
Second sets up module, for setting up the message bit pattern table of the mirrored disk of described virtual machine, the address one_to_one corresponding of each bunch in each message bit pattern comprised in institute's bitmap information table and the mirrored disk of described virtual machine, is revised as the first mark by message bit pattern corresponding with bunch address that described new data writes in institute's bitmap information table;
Described first is designated a bit, represents in the storage space that bunch address of described first mark sensing is corresponding and is written with new data;
Described detection module, also for the read request to described virtual machine being detected, described read request comprises bunch address that data to be read are pointed to;
Described device also comprises:
Enquiry module, sets up message bit pattern table corresponding to the current mirrored disk of described virtual machine that module sets up for inquiring about described second;
First determination module, if be the first mark for message bit pattern corresponding with described bunch of address in the message bit pattern table of the current mirrored disk of determining described virtual machine, then read described data to be read in corresponding with described bunch of address from described current mirrored disk storage space;
Second determination module, if be the second mark for message bit pattern corresponding with described bunch of address in the message bit pattern table of the current mirrored disk of described virtual machine, and determine the father's mirrored disk that there is described current mirrored disk, then pass through the message bit pattern table that father's mirrored disk of current mirrored disk described in described enquiry module recursive query is corresponding;
3rd determination module, if be the first mark for message bit pattern corresponding with described bunch of address in the message bit pattern table that described father's mirrored disk is corresponding, then read described data to be read in corresponding with described bunch of address from described father's mirrored disk storage space;
Described second is designated a bit, represents in the storage space corresponding to bunch address of the described second mark sensing of institute and does not write new data.
4. device according to claim 3, is characterized in that, also comprises:
4th determination module, if be the second mark for message bit pattern corresponding with described bunch of address in the message bit pattern table of the current mirrored disk of described virtual machine, and determine the father's mirrored disk that there is not described current mirrored disk, then read described data to be read in corresponding with described bunch of address from described virtual machine storage space;
Described second is designated a bit, represents in the storage space corresponding to bunch address of the described second mark sensing of institute and does not write new data.
CN201210490839.9A 2012-11-27 2012-11-27 Virtual machine snapshot disposal route and device Active CN103092673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210490839.9A CN103092673B (en) 2012-11-27 2012-11-27 Virtual machine snapshot disposal route and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210490839.9A CN103092673B (en) 2012-11-27 2012-11-27 Virtual machine snapshot disposal route and device

Publications (2)

Publication Number Publication Date
CN103092673A CN103092673A (en) 2013-05-08
CN103092673B true CN103092673B (en) 2015-09-16

Family

ID=48205283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210490839.9A Active CN103092673B (en) 2012-11-27 2012-11-27 Virtual machine snapshot disposal route and device

Country Status (1)

Country Link
CN (1) CN103092673B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103713970B (en) * 2013-12-31 2017-02-15 曙光云计算技术有限公司 Disk mirroring file snapshot making method and system based on virtual machine
CN103745170B (en) * 2014-01-02 2017-01-04 浙江云巢科技有限公司 The processing method and processing device of data in magnetic disk
CN105095016B (en) * 2014-05-16 2018-05-18 北京云巢动脉科技有限公司 A kind of disk snapshot rollback method and device
CN105573813B (en) * 2014-10-10 2018-11-13 北京航空航天大学 The continuous Snapshot Method of virtual machine and device
CN106293882A (en) * 2016-08-12 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of virtual disk snapshot implementing method and device
CN110119389B (en) * 2018-01-09 2023-07-25 阿里巴巴集团控股有限公司 Writing operation method of virtual machine block equipment, snapshot creation method and device
CN109165118A (en) * 2018-07-25 2019-01-08 深信服科技股份有限公司 A kind of method and its device, equipment, storage medium of virtual machine backup
CN109101323A (en) * 2018-09-10 2018-12-28 南京铱迅信息技术股份有限公司 Snapshot implementing method based on qcow2 format under virtual machine operating status
CN111459849B (en) * 2020-04-20 2021-05-11 网易(杭州)网络有限公司 Memory setting method and device, electronic equipment and storage medium
CN117762695B (en) * 2024-02-22 2024-04-26 成都云祺科技有限公司 Agent-free CDP method, system and storage medium for Hyper-V

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567262A (en) * 2003-06-10 2005-01-19 联想(北京)有限公司 On-line data backup method based on data volume snapshot
CN102646064A (en) * 2011-02-16 2012-08-22 微软公司 Incremental virtual machine backup supporting migration

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8738883B2 (en) * 2011-01-19 2014-05-27 Quantum Corporation Snapshot creation from block lists

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567262A (en) * 2003-06-10 2005-01-19 联想(北京)有限公司 On-line data backup method based on data volume snapshot
CN102646064A (en) * 2011-02-16 2012-08-22 微软公司 Incremental virtual machine backup supporting migration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
虚拟机可靠性备份机制的研究与实现;褚福勇;《中国优秀硕士学位论文全文数据库信息科技辑》;20111215(第S1期);正文第6页,第7-8页,附图6(b) *

Also Published As

Publication number Publication date
CN103092673A (en) 2013-05-08

Similar Documents

Publication Publication Date Title
CN103092673B (en) Virtual machine snapshot disposal route and device
US9778873B2 (en) Maintaining versions of data in solid state memory
US10430282B2 (en) Optimizing replication by distinguishing user and system write activity
US9342248B2 (en) Techniques for reducing read I/O latency in virtual machines
US9690666B1 (en) Incremental backup operations in a transactional file system
US20130275653A1 (en) Multi-tier storage using multiple file sets
US20130332649A1 (en) File system for maintaining data versions in solid state memory
WO2014110158A1 (en) Snapshots in a storage system
US9471233B1 (en) Named mount optimization for virtual tape systems
US9229852B2 (en) Flash translation layer system for maintaining data versions in solid state memory
CN102971698A (en) Snapshot data-processing method and system, storage system and snapshot agency
US9122581B2 (en) Data versioning in solid state memory
CN110352410B (en) Tracking access patterns of index nodes and pre-fetching index nodes
CN101477447A (en) Disk snap method and apparatus
US20180357263A1 (en) Maintaining data associated with a storage device
EP3264254A1 (en) System and method for a simulation of a block storage system on an object storage system
US10747452B1 (en) Hybrid log-structured array and allocated storage device
US10503703B1 (en) Method for parallel file system upgrade in virtual storage environment
US11748259B2 (en) System and method to conserve device lifetime for snapshot generation
EP3485362B1 (en) Maintaining data associated with a storage device related applications
JP2020052852A (en) Storage and information processing system
US10296221B1 (en) Systems and methods for improving the efficiency of recording data to tape
US10963348B1 (en) Summary change log indexed by inode numbers
CN114461135A (en) Data cleaning method for edge cloud migration of self-organizing network
CN113849346A (en) Data backup method, device and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant