Background technology
Cloud storage is in cloud computing(Cloud Computer)Conceptive extension and the new ideas that developed, be
Refer to by functions such as cluster application, network technology or distributed file systems, by various types of storage in a large number in network
Equipment gathers collaborative work by application software, jointly externally provides of data storage and Operational Visit function to be
System.
Compared with traditional storage device, cloud storage is not only a hardware, but network equipment, storage device,
The complication system of some such as server, application software, public visit interface, access network and client-side program compositions.
Uit distributed file system(UFS, Uit Distributed File System)It is now widely used one
Kind of distributed file system, have that high reliability, scalability be strong, high availability the features such as.
XenServer platform is a kind of server virtualization management platform recently developed, based on powerful
XenHypervisor program is realized, as enterprise-level virtual platform, the features such as have quick, safe efficient.
At present, cloud storage assumes virtualized development trend, in view of the These characteristics of XenServer platform and UFS, if
Both can be combined, that is, by means of XenServer platform, realize the virtualization towards cloud storage service based on UFS
Distributed storage, it will there is very important Practical significance, but in prior art, also there is no corresponding settling mode.
Specific embodiment
In order that technical scheme is clearer, clear, develop simultaneously embodiment referring to the drawings, to institute of the present invention
The scheme of stating is described in further detail.
Fig. 1 is the flow chart based on the virtual disk distributed storage method embodiment of UFS for the present invention.As shown in figure 1, bag
Include following steps 11~12.
Step 11:It is respectively created the virtual disk thesaurus based on UFS and the ISO based on UFS in XenServer platform
File repository.
The size of virtual disk thesaurus and ISO file repository all can be decided according to the actual requirements.
Entitled thesaurus defined in XenServer platform(SR)Container describing storage virtual disk image
Particular memory target.
Fig. 2 is the storage organization schematic diagram of existing XenServer platform.As shown in Fig. 2 physics block device therein
(PBD)Interface between representative server and the thesaurus being connected, server refers to XenServer main frame;Virtual disk image
(VDI)It is to be shown to virtual machine(VM)Storage abstract, be the elementary cell of the virtualization storage in XenServer platform;Empty
Intend block device(VBD)It is connector object, for being mapped between virtual disk image and virtual machine.
The virtual disk distributed storage based on UFS proposing in heretofore described scheme it is simply that allow thesaurus in generation
Table UFS, if user creates the thesaurus based on UFS, then he is exactly the operation to UFS to any operation of thesaurus.
In this step, the virtual disk thesaurus based on UFS and the ISO file repository based on UFS can be respectively created, it
So referred to as ISO file repository, it is because that it is served only for storing ISO file, can according to actual needs, to the storage of ISO file
Add required ISO file in storehouse.
Step 12:When needing to create a virtual machine, by XenServer platform, Shen from virtual disk thesaurus
Please one piece of predefined size disk space, and obtain the installation system of this virtual machine from ISO file repository;According to being applied for
Disk space and the installation system getting, complete the establishment of this virtual machine.
When user needs to create a virtual machine, XenServer platform can be passed through, apply for from virtual disk thesaurus
One piece of disk space corresponding with virtual machine size to be created, and pass through XenServer platform, from the storage of ISO file
The installation system of this virtual machine is obtained in storehouse;Afterwards, you can according to apllied disk space and the installation system that gets,
Complete the establishment of this virtual machine, how to be created as prior art.
May include multiple virtual disks, the big I of each virtual disk is decided according to the actual requirements in each virtual machine,
And can set during the establishment of virtual machine.
One virtual disk is exactly a file in UFS.Illustrate:Assume that a virtual machine is windows behaviour
Make system, then its c disk and d disk are a virtual disk respectively, be exactly the file c and file mapping therewith in UFS
Folder d.
Multiple virtual machines can be created in the manner described above according to actual needs.
Subsequently, for each virtual machine being created, other process can also be carried out further, such as:Increase disk space, fast
According to migration etc., be described below respectively.
1)Increase disk space
For each virtual machine, if the user while in practical application, finding that the disk space of this virtual machine is not enough, need
Increase the disk space of this virtual machine, then required increase can be applied for from virtual disk thesaurus by XenServer platform
Disk space.
Such as, the original disk space of a virtual machine is 10G, now wishes to be expanded to 15G, then then can pass through
The disk space of 5G applied for again by XenServer platform, and after application success, the disk space of this virtual machine can be changed into 15G.
2)Snapshot
For each virtual machine, user can pass through XenServer platform, create the snapshot of this virtual machine.
The snapshot of virtual machine, that is, refer to the record in certain time point for the virtual machine, can play the effects such as virtual machine backup.
Illustrate:Assume to be directed to a certain virtual machine, need to create snapshot, then then can pass through XenServer platform
Virtual machine snapshot function generates the snapshot document of this virtual machine, and is stored in UFS, thus supporting the backup of this virtual machine and going back
Former.
3)Migration
For each virtual machine, user can pass through XenServer platform, carry out the migration of this virtual machine.
The migration of virtual machine refers to virtual machine and can move on different physical environment virtual platforms, can play having of resource
The effects such as effect management, reliability management, XenServer platform achieves the shift function of virtual machine.
Understood based on above-mentioned introduction, for realizing scheme of the present invention, need existing XenServer platform is carried out
Transformation, such as adds the thesaurus based on UFS, and adds required UFS operate interface and UFS association in XenServer platform
View realizes interface etc., and correspondingly, XenServer platform, by calling described interface, completes required operation, i.e. above-mentioned various behaviour
Make.
Described UFS operate interface may include:
1)handles(type)、load(sr_uuid)、check_server()、create(Sr_uuid, size)、
Delete(sr_uuid)、attach(sr_uuid)、detach(sr_uuid)、probe()、vdi(Uuid, loadLocked)、
validate_remotepath()、scan(uuid);
2)attach(Sr_uuid, vdi_uuid)、enerata_config(Sr_uuid, vdi_uuid)、attach_
from_config(Sr_uuid, vdi_uuid);
Wherein, 1)Mainly for thesaurus, 2)Mainly for virtual disk, a VDI can be regarded as a virtual magnetic
Disk;
Described UFS protocol realization interface may include:
open(vdi_uuid)、create(vdi_uuid)、read(vdi_uuid)、write(vdi_uuid);
The implication of above-mentioned each interface is known in the art.
For a user, it only needs to carry out operating on XenServer platform, need not be concerned about how backstage is entered
Row is processed.
In a word, using scheme of the present invention, the virtual disk based on UFS can be realized by means of XenServer platform
Distributed storage such that it is able to merge XenServer platform and UFS feature so that the storage of virtual machine have high reliability,
Scalability is strong, high availability, quick, safe the features such as, and then improve storage performance.
In sum, these are only presently preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.
All any modification, equivalent substitution and improvement within the spirit and principles in the present invention, made etc., should be included in the present invention's
Within protection domain.