CN103514222B - Storage method, management method, memory management unit and the system of virtual machine image - Google Patents

Storage method, management method, memory management unit and the system of virtual machine image Download PDF

Info

Publication number
CN103514222B
CN103514222B CN201210222670.9A CN201210222670A CN103514222B CN 103514222 B CN103514222 B CN 103514222B CN 201210222670 A CN201210222670 A CN 201210222670A CN 103514222 B CN103514222 B CN 103514222B
Authority
CN
China
Prior art keywords
virtual machine
machine image
metadata
bucket
key
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
CN201210222670.9A
Other languages
Chinese (zh)
Other versions
CN103514222A (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.)
Wuxi Jiangnan Computing Technology Institute
Original Assignee
Wuxi Jiangnan Computing Technology Institute
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 Wuxi Jiangnan Computing Technology Institute filed Critical Wuxi Jiangnan Computing Technology Institute
Priority to CN201210222670.9A priority Critical patent/CN103514222B/en
Publication of CN103514222A publication Critical patent/CN103514222A/en
Application granted granted Critical
Publication of CN103514222B publication Critical patent/CN103514222B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A kind of virtual machine image storage method, management method, memory management unit and system based on distributed key assignments type database.The storage method includes distributing unique identification code for each virtual machine image;Each virtual machine image is stored respectively in bucket of the distributed key assignments type database for its distribution, the bucket is named with the identification code of the virtual machine image.The management method includes receiving the operation requests for carrying out self virtualizing machine;Identification code in operation requests, corresponding bucket is found in the distributed key assignments type database;Corresponding operating is carried out to the data in bucket.The memory management unit includes allocation unit, image storage unit.The system includes distributed key assignments type Database Systems, virtual machine, virtual machine image memory management unit.The present invention is using distributed key assignments type database purchase virtual machine image, with the characteristics of structure is flexible, availability is high, fault-tolerance is high.

Description

Storage method, management method, memory management unit and the system of virtual machine image
Technical field
Reflected the present invention relates to field of computer technology, more particularly to one kind based on distribution type key-value data base virtual machine Storage method, management method, memory management unit and the system of picture.
Background technology
Virtual machine(Virtual Machine, VM)Referring to by what software was simulated has complete hardware system function, operation Complete computer in a completely isolated environment.What operation was faced on a virtual machine is not actual physical hardware Equipment, the realization of actual physical device is transparent for virtual machine, can be provided virtually for virtual machine with different methods Hardware environment.Wherein, host may have access to one or several files, the virtual hard disk needed for being run as virtual machine, this Virtual hard disk is referred to as virtual machine image(Virtual Machine Image, VMI).
Virtual machine image administrative skill includes both sides content, and one is the memory technology of image, and two be the tissue of image Administrative skill.Virtual machine image carrier is one big file, and virtual machine image memory technology is substantially file storage technology.It is empty The characteristics of organizing and management techniques of plan machine image are then directed to virtual machine image, record safeguards its related specific properties, such as institute Belong to user, file type, the authority possessed etc..
There are many methods in terms of virtual machine image memory technology, such as build global storage system, or use data Storehouse system etc..But, professional global storage system builds dumb, it usually needs professional person is disposed and safeguarded, and Do not designed specially for virtual machine image storage.And virtual machine image is generally larger, also it is unsuitable be stored in it is traditional In relevant database.
Still an alternative is that big file block is stored on distributed server, certain file redundancy is set, Piecemeal metadata information is safeguarded simultaneously, is easy to recombinate virtual machine image using metadata.But, file stripping and slicing is set into redundancy simultaneously Safeguard that the mode of metadata is unfavorable for the dynamic expansion volume reduction of storage system, add or remove memory node or metadata memory node Huge impact will be brought to system.
The general relevant information that virtual machine image is safeguarded using database in terms of virtual machine image organizing and management techniques, By operating database, the management to virtual machine image is completed jointly with reference to virtual machine image storage.
No matter using piecemeal storage and the storage scheme of meta data server, or using the scheme of intensive data library management There is the not high defect of poor availability, fault-tolerance.All there is single failure point in the above method.Meta data server or database The failure of server can all cause whole system to fail.
Authorization Notice No. provides distributed storage there is provided a kind of for CN101419535B Chinese patent for virtual machine System.But the system be not regarding to the issue above, but in order to meet virtual machine storage some specific demands.
Therefore how virtual machine image storage management system is flexibly built, while availability and fault-tolerance are improved, as this Art personnel's urgent problem to be solved.
The content of the invention
The technical problems to be solved by the invention are flexible structure, the Gao Ke of virtual machine image storage management system to be solved With with high Fault-Tolerant Problems.
In order to solve the above problems, a kind of virtual machine image storage method based on distribution type key-value data base, bag Include:
Unique identification code is distributed for each virtual machine image;
Each virtual machine image is stored respectively in bucket of the distribution type key-value data base for its distribution, institute Bucket is stated to name with the identification code of the virtual machine image.
Optionally, the storage method also includes:The metadata of all virtual machine images is centrally stored in the distribution In metadata bucket in formula key-value type database, the metadata bucket is mutually distinguished by name with the bucket.
Optionally, the metadata is stored in the form of key-value in the metadata bucket, and the key is that each virtual machine reflects The Attribute Recognition code of picture, described value is the value of attribute described in each virtual machine image metadata.
Optionally, it is described that each virtual machine image is stored respectively in bucket, including:
Distributed respectively with the bucket of the identification code name of the virtual machine image for each virtual machine image;
Each virtual machine image is divided into the blocks of files of multiple fixed granularities, is that each blocks of files generates a position skew Amount;
Upload request is sent to the distribution type key-value data base;
Request is obtained after response, and by the blocks of files to be uploaded to successively in the bucket in the form of key-value, the key is Position offset, the data content that described value is stored by blocks of files.
Optionally, the storage method also includes:
Obtain the metadata of each virtual machine image;
The metadata bucket in distribution type key-value data base is found, metadata in bucket is carried out according to the metadata of acquisition Update.
Optionally, the Block granularity of the blocks of files can be adjusted.
Present invention also offers a kind of virtual machine image management method based on distribution type key-value data base, the void Plan machine image is stored in the distribution type key-value data base with above-mentioned storage method, and the management method is received from void The operation requests of plan machine;Identification code in operation requests, finds in the distribution type key-value data base and deposits accordingly Storage tank;Corresponding operating is carried out to the data in bucket.
Optionally, the virtual machine image management method also includes:
Receive the metadata operation request for carrying out self virtualizing machine;
Metadata bucket is found in the distribution type key-value data base;
Asked according to metadata operation, corresponding operating is carried out to the metadata in metadata bucket.
Optionally, when the metadata operation request is inquiry request, the corresponding operating includes:
In metadata bucket, the simple search based on key-value is realized by fields match inquiry;
Sought common ground to matching corresponding field in above-mentioned value, obtain Query Result.
Optionally, when the operation requests are download request, the corresponding operating includes:
Keys all in the bucket are obtained, and key value is ranked up;
Download request is sent to the distribution type key-value data base;
Request is obtained after response, according to the key after sequence, finds corresponding value, and download the data content wherein stored;
The data content of download is locally sequentially being write, the restructuring of the virtual machine image is completed.
Optionally, when the operation requests are removal request, the corresponding operating includes:
Delete the bucket.
Optionally, when the operation requests are removal request, the corresponding operating also includes:
Delete the metadata of the virtual machine image in metadata bucket in the distribution type key-value data base.
Present invention also offers a kind of virtual machine image memory management unit, including:Allocation unit, in distribution In key-value type database bucket is distributed for virtual machine image;
Image storage unit, for virtual machine image to be stored in the bucket.
Optionally, the virtual machine image memory management unit also includes:Metadata storage unit, for will be all virtual The metadata of machine image is centrally stored in the metadata bucket in the distribution type key-value data base.
Optionally, the virtual machine image memory management unit also includes:Query unit, for the inquiry according to virtual machine Request, realizes inquiry;
Download unit, for the download request according to virtual machine, downloads virtual machine image;
Unit is deleted, for the removal request according to virtual machine, virtual machine image is deleted.
Optionally, the image storage unit also includes Block granularity setup unit, the piecemeal grain for setting blocks of files Degree.
Optionally, the image storage unit and/or download unit also include alarm unit, and the alarm unit is used for After completing storage and/or downloading, the file number of blocks in local file number of blocks and distribution type key-value data base is carried out Compare, when both differ, send alarm.
Present invention also offers a kind of virtual machine image storage management system based on distribution type key-value data base, bag Include distribution type key-value data base system, virtual machine, virtual machine image memory management unit;The virtual machine image storage tube Reason device is above-mentioned virtual machine image memory management unit.
Optionally, there are network data channels between the virtual machine image memory management unit and the virtual machine.
Compared with prior art, technical scheme has advantages below:
1st, the present invention has abandoned traditional centralised storage system, and uses distributed key-value type data storage.It is distributed Key-value type data storage is distributed, non-stop layer node, and what it was stored is the unprocessed form of data value, any number of nonrecognition According to structure, all data types can be almost handled.Compared to traditional centralised storage system, storage system tool of the invention There are high availability and good fault-tolerance.
2nd, the present invention distributes independent bucket for each virtual machine image(bucket), any two virtual machine images it Between will not influence each other so that the structure of storage system is more flexible.
3rd, in alternative, the data content of virtual machine image and metadata are stored separately.When being inquired about, only exist Carry out pressing fields match in metadata, then the field again to matching seeks common ground, and obtains Query Result, compensate for simple key-value Type storage system does not support the defect of complex query, and the complex query being equal with SQL can be achieved.
Brief description of the drawings
Fig. 1 is a kind of structural representation of embodiment of bucket in virtual machine image storage method of the present invention;
Fig. 2 is a kind of schematic flow sheet of embodiment of the virtual machine image storage method of the present invention;
Fig. 3 is the virtual machine image structural representation using the embodiment of virtual machine image storage method one of the present invention;
Fig. 4 realizes a kind of flow signal of embodiment of download in the virtual machine image management method for the present invention Figure;
Fig. 5 is the virtual machine image structure that the embodiment downloaded is realized using the virtual machine image management method of the present invention Schematic diagram;
Fig. 6 realizes a kind of flow signal of embodiment of deletion in the virtual machine image management method for the present invention Figure;
Fig. 7 realizes a kind of flow signal of embodiment of inquiry in the virtual machine image management method for the present invention Figure;
Fig. 8 is a kind of structural representation of embodiment of virtual machine image memory management unit of the invention;
Fig. 9 is a kind of system construction drawing of embodiment of virtual machine image storage management system of the invention.
Embodiment
Many details are elaborated in the following description to fully understand the present invention.But the present invention can be with Much it is different from other manner described here to implement, those skilled in the art can be in the situation without prejudice to intension of the present invention Under do similar popularization, therefore the present invention is not limited to the specific embodiments disclosed below.
Secondly, the present invention is described in detail using schematic diagram, when the embodiment of the present invention is described in detail, for purposes of illustration only, institute It is example to state schematic diagram, and it should not limit the scope of protection of the invention herein.
In order to solve the technical problem in background technology, distribution type key-value data base is based on the invention provides one kind Virtual machine image storage method.A kind of embodiment of bucket in Fig. 1 virtual machine image storage methods of the present invention Structural representation.As shown in figure 1, this virtual machine image storage method provides unique identification code for each virtual machine image (Universally Unique Identifier, UUID).It is its distribution that the virtual machine image, which is stored in key-value database, Bucket(Bucket)In, the bucket is with the identification code(UUID)Name.The virtual machine image is with fixed size blocks of files Form is stored in distributed key-value database, and the key of each blocks of files is position offset, and corresponding value is the number that need to be stored According to content.
It should be noted that it is 1MB that fixed granularity is given tacit consent in the present embodiment.But the granule size is adjustable.Granularity is big, The blocks of files negligible amounts of virtual machine image, the expense in lookup is relatively fewer, but once in upload or downloading process certain There is mistake in blocks of files, then the data volume for uploading or downloading again is just larger.Granularity is small, and virtual machine image is divided into more Blocks of files, expense is larger in lookup, but the data volume retransmitted during error is just smaller.The 1MB of acquiescence is only to consider Preferred value in speed and efficiency basis.In other embodiments, it can be adjusted according to the scene of practical application, such as Less granularity is set in the higher environment of error rate, or higher granularity is set in inquiry frequently environment.
Data allocations independent memory space of the distribution type key-value data base also for each virtual machine image.It is so-called Metadata, is the data for describing data, mainly describes data attribute, for supporting as indicated storage location, historical summary, resource The functions such as lookup, file record.These metadata are stored in metadata bucket, and metadata bucket passes through special name and other Bucket is mutually distinguished.In such as the present embodiment metadata bucket be named as vmi_metadata, the name of other buckets is equal Started with image.
Why metadata and virtual machine image are stored separately, are to realize complex query.Because using simple Key-value mode data storage, storage be data value primitive form, i.e., with position(bit)Form storage, be to reflect Data structure, so general key-value type database is only capable of searching corresponding value according to key, that is, it is only capable of providing simple queries, The complex query of combination condition can not be provided.The present invention will describe the metadata separate storage of data attribute, can be in member during inquiry Multi-field matching is carried out to metadata in data bucket, to realize the complex query for being essentially identical to SQL.
Fig. 2 is a kind of schematic flow sheet of embodiment of the virtual machine image storage method of the present invention, is at least wrapped Include following steps:
Step S201, is that virtual machine image generates a unique identification code;
Step S202, in distribution type key-value data base, creates a bucket, the bucket is uniquely to know Other code name;
Step S203, virtual machine image is divided into the blocks of files of fixed size, is that each blocks of files generates a position Offset;
Step S204, upload request is sent to distribution type key-value data base;
Step S205, request is obtained after response, and All Files block is uploaded into the bucket, the blocks of files in sequence Key be the position offset, the value of the blocks of files is the data content that need to be stored;
Step S206, obtains the metadata of virtual machine image;
Step S207, finds the metadata bucket that metadata is stored in the distribution type key-value data base, according to acquisition Metadata is updated to metadata in bucket.
Fig. 3 is the virtual machine image structural representation using the embodiment of virtual machine image storage method one of the present invention.Below Technical scheme is described further with reference to Fig. 2, Fig. 3.
Step S201 is performed, a unique identification code image0 is generated for the virtual machine image;
Step S202 is performed, in distribution type key-value data base, entitled image0 bucket is created, is used to Storage virtual machine image image0;
Step S203 is performed, virtual machine image is divided into the blocks of files of fixed size, is that each blocks of files generates one Position offset.Virtual machine image capacity in the present embodiment is 4MB, and Block granularity is 1MB, therefore virtual machine image is divided into 4 pieces, named respectively with block 1 to block 4, be 1MB per blocks of files capacity.Meanwhile, it is that each blocks of files generates a position skew Amount, i.e., compared the initial position of this document block with the initial position of whole virtual machine image, and difference is the position offset. Such as:Blocks of files headed by block 1, its initial position is overlapped with the initial position of virtual machine image, therefore the position offset of block 1 is 0.The difference of the initial position of block 2 and whole virtual machine image initial position is the capacity of block 1, and the capacity of block 1 is 1MB, therefore block 2 Position offset is 1MB, is abbreviated as 1.Similarly, the position offset of block 3 is 2, and the position offset of block 4 is 3.
Step S204 is performed, upload request is sent to distribution type key-value data base;
Step S205 is performed, request obtains after response, blocks of files 1 to block 4 is uploaded in bucket image0 in sequence, Blocks of files 1 to the key of block 4 is respective position offset, and the value of blocks of files 1 to block 4 is the data content that need to be stored;
Step S206 is performed, virtual machine image image0 metadata is obtained;
Step S207 is performed, the metadata bucket of entitled vmi_metadata in distribution type key-value data base is found, it is right Metadata in vmi_metadata barrels is updated, and virtual machine image image0 metadata is added thereto.
Present invention also offers a kind of virtual machine image management method based on distribution type key-value data base, receive and The operation requests of self virtualizing machine;Identification code in operation requests, finds corresponding in the distribution type key-value data base Bucket;Corresponding operating is carried out to the data in bucket.
The operation requests may include download request, removal request and inquiry request.
Fig. 4 realizes a kind of flow signal of embodiment of download in the virtual machine image management method for the present invention Figure, download comprises the following steps:
Step S401, according to identification code, finds the storage for storing the virtual machine image in distribution type key-value data base Bucket;
Step S402, obtains keys all in bucket, and key value is ranked up;
Step S403, download request is sent to distribution type key-value data base;
Step S404, request is obtained after response, according to the key after sequence, finds corresponding value, and download the number wherein stored According to content;
Step S405, the data content of download is locally sequentially being write, and completes the restructuring of the virtual machine image.
Fig. 5 is the virtual machine image structure that the embodiment downloaded is realized using the virtual machine image management method of the present invention Schematic diagram.Technical scheme is described further with reference to Fig. 4, Fig. 5.Identification code is image1 in the present embodiment Virtual machine image be stored in distribution type key-value data base in entitled image1 bucket, be divided into 4 pieces of storages, every piece Granularity be 1MB.
Step S401 is performed, according to the identification code image1 of virtual machine image, is found in distribution type key-value data base Entitled image1 bucket;
Step S 402 is performed, keys 2,1,3,0 all in image1 buckets are obtained, and key value is ranked up, and is sorted As a result it is 0,1,2,3;
Step S403 is performed, download request is sent to distribution type key-value data base;
Step S404 is performed, request is obtained after response, according to the key after sequence, find corresponding value, and download is wherein stored Data content.First key is 0, and its corresponding value is block 1, downloads the data content of block 1.By ranking results 0,1,2,3, successively Download subsequent block 2, block 3, block 4.
Step S405 is performed, block 1 to block 4 is locally sequentially being write, the virtual machine image that identification code is image1 is completed Restructuring.
Because download is the reproduction process to virtual machine image, the change of metadata is not related to.So need not be to storage The metadata bucket of metadata is operated.
Fig. 6 realizes a kind of flow signal of embodiment of deletion in the virtual machine image management method for the present invention Figure, deletion comprises the following steps:
Step S601, according to identification code, finds the storage for storing the virtual machine image in distribution type key-value data base Bucket;The present embodiment is attached to, entitled image1 bucket is found in distributed key assignments type database.
Step S602, deletes the bucket;The present embodiment is attached to, image1 buckets are deleted.
Step S603, updates the metadata in metadata bucket in the distribution type key-value data base.It is attached to this implementation Example, deletes the metadata on image1 buckets in vmi_metadata metadata bucket.
It should be noted that the process for deleting virtual machine image is asynchronous, virtual machine is sent can continue after removal request Perform subsequent commands, it is not necessary to wait storage system that the data dump of actual storage is fallen.
Fig. 7 realizes a kind of flow signal of embodiment of inquiry in the virtual machine image management method for the present invention Figure, inquiry comprises the following steps:
Step S701, finds the metadata bucket that metadata is stored in distribution type key-value data base;
Step S702, in metadata bucket, the simple search based on key-value is realized by fields match inquiry;
Step S703, seeks common ground to matching corresponding field in above-mentioned value, obtains Query Result.
Because the present invention comes out the meta-data extraction of each virtual machine image when uploading, individually storage.So, inquiry Method only relates to store the metadata bucket of metadata.
The present invention can realize complex query substantially by above-mentioned querying method.So-called complex query refers to traditional SQL numbers Inquired about according to the sql command in storehouse.Key-value storage uses simple key-value pair, does not reflect data structure, the inquiry that can be realized is exactly Corresponding value is searched by key, that is, is only capable of providing simple queries, it is impossible to provide the complex query of combination condition.The present invention is for reality Now the complex query function substantially equivalent with SQL, increases a metadata bucket to store whole metadata on virtual machine, so Simple search based on key-value is realized by fields match inquiry afterwards, then the acquisition Query Result that sought common ground to the field of matching.
For example:The virtual machine image of different operating system is stored in the vmi_metadata metadata bucket of the present embodiment Identification code, using os_type as key, typical value shape such as { ' Linux ':[1,2,3],‘Windows’:[4,6,7],….};Simultaneously The virtual machine image identification code of different capabilities is also stored for, using img_size as key, typical value shape such as { ' 20G ':[1,5,6], ‘30G’:[2,9],…..}.If inquiring about virtual machine image of the capacity for 30G installation linux system, then key is first passed through Os_type, inquiry respective value is the virtual machine image identification code of ' Linux ', and the operating system for obtaining virtual machine image 1,2,3 is Linux system.Again by key img_size, inquiry respective value is the virtual machine image identification code of ' 30G ', obtains virtual machine image 2nd, 9 capacity is 30G.Then to the " virtual machine image 1,2,3 " and " virtual machine image 2,9 " seeks common ground, and obtains of Query Result twice The virtual machine image for knowing the installation linux system that capacity is 30G is virtual machine image 2.
It should be noted that the value in metadata bucket is labyrinth, can definition value according to the actual requirements data structure, Such as:Multi-field, data dictionary etc..
It should be noted that it will be understood by those skilled in the art that the virtual machine image storage of above-mentioned embodiment And all or part of management method can instruct the hardware of correlation to complete by program, described program can be fixed in meter In calculation machine readable storage medium storing program for executing, the storage medium includes ROM, RAM, magnetic disc, CD etc..
Fig. 8 is a kind of structural representation of embodiment of virtual machine image memory management unit of the invention.Such as Fig. 8 Shown, virtual machine image memory management unit U8 passes through virtual machine between virtual machine and distributed key-value Database Systems Image memory management unit U8, can be achieved the data exchange between virtual machine and distributed key-value Database Systems.Virtual machine reflects Memory management device U8 includes allocation unit U80, image storage unit U81, download unit U82, deletion unit U83, inquiry Unit U84, metadata storage unit U85, are connected with the virtual machine, the distributed key-value Database Systems.Image is deposited Also include Block granularity setup unit U811 in storage unit U81, to provide the function of the self-defined Block granularity of virtual machine.Image is deposited Also include alarm unit U812 in storage unit U81, alarm is sent when occurring mistake in upload procedure to realize.Alarm unit U812 is used for after completing to upload, by the file in the file number of blocks and distribution type key-value data base of local image file Number of blocks is compared, and when both differ, sends alarm.
Also include alarm unit U821 in download unit U82, report is sent when occurring mistake in downloading process to realize Alert, its function and implementation method are similar with alarm unit U812, and here is omitted.
Image storage unit U81, download unit U82, deletion unit U83, query unit U84, metadata storage unit U85, using above-mentioned virtual machine image storage method or management method, will not be repeated here.
Fig. 9 is a kind of system construction drawing of embodiment of virtual machine image storage management system of the invention.Such as Fig. 9 Shown, virtual machine image storage management system includes distribution type key-value data base system, virtual machine, virtual machine image storage Managing device.The virtual machine image passes through real-time performance data exchange with the virtual machine.Network in present embodiment is adopted With ethernet standard, but the present invention is not limited network standard.In present embodiment in distribution type key-value data base system Store each virtual machine image and whole metadata.The virtual machine image is above-mentioned virtual machine image, and the virtual machine reflects Memory management device is above-mentioned virtual machine image memory management unit, and here is omitted.Virtual machine, virtual machine image storage Managing device is mounted on computer physically.The virtual machine image storage management system of the present invention is applied to middle and small scale IAAS platforms, be particularly suitable for use in the use pattern for once uploading and repeatedly downloading.
Distribution type key-value data base is applied in the storage of virtual machine image by the present invention, compared to traditional centralization Storage system, has the advantages that high reliability, high availability and good fault-tolerance.The present invention is the distribution of each virtual machine image Independent bucket(bucket), will not influence each other between any two virtual machine images so that the structure of storage system is cleverer It is living.The present invention carries out pressing fields match also by the way that the data content of virtual machine image and metadata are stored separately to metadata The mode sought common ground again, realizes the complex query being equal with SQL substantially, compensate for simple key-value type storage system and does not support multiple The defect of miscellaneous inquiry.
Although the present invention is disclosed as above with preferred embodiment, it is not for limiting the present invention, any this area Technical staff without departing from the spirit and scope of the present invention, may be by the methods and techniques content of the disclosure above to this hair Bright technical scheme makes possible variation and modification, therefore, every content without departing from technical solution of the present invention, according to the present invention Any simple modifications, equivalents, and modifications made to above example of technical spirit, belong to technical solution of the present invention Protection domain.

Claims (19)

1. a kind of virtual machine image storage method based on distribution type key-value data base, it is characterised in that including:
Unique identification code is distributed for each virtual machine image;
Each virtual machine image is stored respectively in bucket of the distribution type key-value data base for its distribution, it is described to deposit Storage tank is named with the identification code of the virtual machine image.
2. virtual machine image storage method as claimed in claim 1, it is characterised in that also include:
In the metadata bucket that the metadata of all virtual machine images is centrally stored in the distribution type key-value data base, The metadata bucket is mutually distinguished by name with the bucket.
3. virtual machine image storage method as claimed in claim 2, it is characterised in that:
The metadata is stored in the form of key-value in the metadata bucket, and the key is known for the attribute of each virtual machine image Other code, described value is the value of attribute described in each virtual machine image metadata.
4. virtual machine image storage method as claimed in claim 1 or 2, it is characterised in that described to distinguish each virtual machine image It is stored in bucket, including:
Distributed respectively with the bucket of the identification code name of the virtual machine image for each virtual machine image;
Each virtual machine image is divided into the blocks of files of multiple fixed granularities, is that each blocks of files generates a position offset;
Upload request is sent to the distribution type key-value data base;
Request is obtained after response, by the blocks of files to be uploaded to successively in the bucket in the form of key-value, and the key is position Offset, the data content that described value is stored by blocks of files.
5. virtual machine image storage method as claimed in claim 4, it is characterised in that the storage method also includes:
Obtain the metadata of each virtual machine image;
The metadata bucket in distribution type key-value data base is found, metadata in metadata bucket is entered according to the metadata of acquisition Row updates.
6. virtual machine image storage method as claimed in claim 4, it is characterised in that:
The Block granularity of the blocks of files can be adjusted.
7. a kind of virtual machine image management method based on distribution type key-value data base, the virtual machine image is with such as right It is required that the storage method described in 1 is stored in distribution type key-value data base, it is characterised in that including:
Receive the operation requests for carrying out self virtualizing machine;
Identification code in operation requests, finds corresponding bucket in the distribution type key-value data base;
Corresponding operating is carried out to the data in bucket.
8. virtual machine image management method as claimed in claim 7, it is characterised in that also include:
Receive the metadata operation request for carrying out self virtualizing machine;
Metadata bucket is found in the distribution type key-value data base;
Asked according to metadata operation, corresponding operating is carried out to the metadata in metadata bucket.
9. virtual machine image management method as claimed in claim 8, it is characterised in that the metadata operation request is inquiry During request, the corresponding operating includes:
In metadata bucket, the simple search based on key-value is realized by fields match inquiry;
Sought common ground to matching corresponding field in above-mentioned value, obtain Query Result.
10. virtual machine image management method as claimed in claim 7, it is characterised in that the operation requests are download request When, the corresponding operating includes:
Keys all in the bucket are obtained, and key value is ranked up;
Download request is sent to the distribution type key-value data base;
Request is obtained after response, according to the key after sequence, finds corresponding value, and download the data content wherein stored;
The data content of download is locally sequentially being write, the restructuring of the virtual machine image is completed.
11. virtual machine image management method as claimed in claim 7, it is characterised in that the operation requests are removal request When, the corresponding operating includes:
Delete the bucket.
12. virtual machine image management method as claimed in claim 11, it is characterised in that the operation requests are removal request When, the corresponding operating also includes:
Delete the metadata of the virtual machine image in metadata bucket in the distribution type key-value data base.
13. a kind of virtual machine image memory management unit, it is characterised in that the virtual machine image is with as claimed in claim 1 Storage method be stored in distribution type key-value data base, including:
Allocation unit, for distributing bucket in distribution type key-value data base for virtual machine image;
Image storage unit, for virtual machine image to be stored in the bucket.
14. virtual machine image memory management unit as claimed in claim 13, it is characterised in that also include:Metadata is stored Unit, for the metadata being centrally stored in the metadata of all virtual machine images in the distribution type key-value data base In bucket.
15. virtual machine image memory management unit as claimed in claim 13, it is characterised in that also include:Query unit, is used In the inquiry request according to virtual machine, inquiry is realized;
Download unit, for the download request according to virtual machine, downloads virtual machine image;
Unit is deleted, for the removal request according to virtual machine, virtual machine image is deleted.
16. virtual machine image memory management unit as claimed in claim 13, it is characterised in that:The image storage unit is also Including Block granularity setup unit, the Block granularity for setting blocks of files.
17. virtual machine image memory management unit as claimed in claim 15, it is characterised in that:The image storage unit And/or download unit also includes alarm unit, the alarm unit is used for after completing storage and/or downloading, by local text File number of blocks in part number of blocks and distribution type key-value data base is compared, and when both differ, sends alarm.
18. a kind of virtual machine image storage management system based on distribution type key-value data base, it is characterised in that:Including dividing Cloth key-value type Database Systems, virtual machine, virtual machine image memory management unit;The virtual machine image storage management dress It is set to any virtual machine image memory management unit as described in claim 13 to 17.
19. the virtual machine image storage management system as claimed in claim 18 based on distribution type key-value data base, it is special Levy and be:There are network data channels between the virtual machine image memory management unit and the virtual machine.
CN201210222670.9A 2012-06-29 2012-06-29 Storage method, management method, memory management unit and the system of virtual machine image Active CN103514222B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210222670.9A CN103514222B (en) 2012-06-29 2012-06-29 Storage method, management method, memory management unit and the system of virtual machine image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210222670.9A CN103514222B (en) 2012-06-29 2012-06-29 Storage method, management method, memory management unit and the system of virtual machine image

Publications (2)

Publication Number Publication Date
CN103514222A CN103514222A (en) 2014-01-15
CN103514222B true CN103514222B (en) 2017-09-19

Family

ID=49896955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210222670.9A Active CN103514222B (en) 2012-06-29 2012-06-29 Storage method, management method, memory management unit and the system of virtual machine image

Country Status (1)

Country Link
CN (1) CN103514222B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339177A (en) * 2015-07-13 2017-01-18 中兴通讯股份有限公司 Method and device for creating virtual machines
CN105389522B (en) * 2015-12-23 2022-03-04 普华基础软件股份有限公司 Virtual machine safety management system and computer terminal
CN107919033A (en) * 2016-10-10 2018-04-17 北京七展国际数字科技有限公司 A kind of telegraphy official's Experience of Ecological system by merging multimedia, micro climate and bio-landscape
CN111291018B (en) * 2018-12-07 2023-06-23 北京沃东天骏信息技术有限公司 Data management method, device, equipment and storage medium
CN111125002B (en) * 2019-11-15 2023-10-27 卢万龙 Data backup archiving method and system based on distributed storage
CN111367869A (en) * 2020-02-26 2020-07-03 北京三快在线科技有限公司 Mirror image file processing method and device, storage medium and electronic equipment
CN111782150B (en) * 2020-07-02 2024-05-31 深圳市瑞驰信息技术有限公司 Multi-bucket storage system and method based on object storage

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101243413A (en) * 2005-06-24 2008-08-13 信科索尔特公司 System and method for virtualizing backup images
CN101398768A (en) * 2008-10-28 2009-04-01 北京航空航天大学 Construct method of distributed virtual machine monitor system
CN101652749A (en) * 2007-04-05 2010-02-17 微软公司 Network group name for virtual machines
CN101751284A (en) * 2009-12-25 2010-06-23 北京航空航天大学 I/O resource scheduling method for distributed virtual machine monitor
CN102254021A (en) * 2011-07-26 2011-11-23 北京市计算中心 Method for constructing database based on virtual machine management system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101243413A (en) * 2005-06-24 2008-08-13 信科索尔特公司 System and method for virtualizing backup images
CN101652749A (en) * 2007-04-05 2010-02-17 微软公司 Network group name for virtual machines
CN101398768A (en) * 2008-10-28 2009-04-01 北京航空航天大学 Construct method of distributed virtual machine monitor system
CN101751284A (en) * 2009-12-25 2010-06-23 北京航空航天大学 I/O resource scheduling method for distributed virtual machine monitor
CN102254021A (en) * 2011-07-26 2011-11-23 北京市计算中心 Method for constructing database based on virtual machine management system

Also Published As

Publication number Publication date
CN103514222A (en) 2014-01-15

Similar Documents

Publication Publication Date Title
CN103514222B (en) Storage method, management method, memory management unit and the system of virtual machine image
US9740706B2 (en) Management of intermediate data spills during the shuffle phase of a map-reduce job
CN105786408B (en) Logic sector mapping in flash array
US8458425B2 (en) Computer program, apparatus, and method for managing data
US8504571B2 (en) Directed placement of data in a redundant data storage system
CN103874980B (en) Mapping in a storage system
CN103902623B (en) Method and system for the accessing file in storage system
US8682874B2 (en) Information processing system
JP4206586B2 (en) Database management method and apparatus, and storage medium storing database management program
US11403269B2 (en) Versioning validation for data transfer between heterogeneous data stores
US20160350302A1 (en) Dynamically splitting a range of a node in a distributed hash table
CN102136003A (en) Large-scale distributed storage system
US10956051B2 (en) Data-packed storage containers for streamlined access and migration
CN104184812B (en) A kind of multipoint data transmission method based on private clound
US10031682B1 (en) Methods for improved data store migrations and devices thereof
CN107451138A (en) A kind of distributed file system storage method and system
US20160092454A1 (en) Sparse file access
US20160139980A1 (en) Erasure-coding extents in an append-only storage system
US20220197861A1 (en) System and method for reducing read amplification of archival storage using proactive consolidation
WO2020215580A1 (en) Distributed global data deduplication method and device
CN104662522B (en) The system and method backed up using the full virtual machine of storage system functionality
JP2001142752A (en) Database managing method
CN109597903A (en) Image file processing apparatus and method, document storage system and storage medium
CN110109866A (en) A kind of management method and equipment of file system directories
Zhong et al. A novel method to manage very large raster data on distributed key-value storage system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant