The content of the invention
The technical assignment of the present invention is to be directed to above weak point, there is provided a kind of physical store dispatching method and cloud main frame wound
Construction method.
A kind of physical store dispatching method, during the establishment for cloud main frame, implementation step includes:
First, available physical Host List is obtained first, you can for creating the physical host list of cloud main frame, and the physics master
Some physical stores are configured with machine;
Two and then physical store scheduling is carried out according to physical host list successively, physical store scheduling includes root disk storage
Dispatched with data disk storage, described disk storage refers to the disk for depositing cloud host operating system, and data disk storage is
Refer to the disk for depositing other non-OS data of cloud main frame;
3rd, after cloud main frame, which corresponds to root disk and data disks, all finds matching storage, physical store scheduling process is terminated.
Physical host list in the step 1 carries out inverted order arrangement, and detailed process is:
Required, all satisfactory physical hosts are chosen, the wound of the cloud main frame according to the establishment of cloud main frame first
Build and require to include the requirement of CPU core number, memory size requirement;
Then required according to the establishment of cloud main frame, it is determined that each physical host can create the quantity of cloud main frame;
It is descending that physical host is sorted according to the quantity that can create cloud main frame, and ranking results are shown with tabular form.
, it is necessary to classify to the physical store in each physical host before physical store scheduling is carried out, the classification is led to
Cross procedure below realization:
Obtaining each physical host first includes capacity information, stores all physics storage informations of purposes, and wherein capacity is believed
Breath refers to available memory capacity;Storage purposes refers to be used to deposit cloud host operating system data, non-cloud host operating system
Data;
Then according to storage purposes, the physical store available for storage cloud host operating system data is identified as root disk and deposited
Storage, the physical store available for storage non-cloud host operating system data is identified as data disk storage.
In the physical store scheduling process of the step 2, root disk storage scheduling, root workable for acquisition are carried out first
Disk storage simultaneously identifies, and the workable root disk storage refers to meet to deposit cloud host operating system data capacity to be created
The storage of demand;Then data disk storage scheduling is carried out, data disk storage workable for acquisition simultaneously identifies, the workable number
Refer to meet the storage for depositing cloud main frame non-OS data capacity demand to be created according to disk storage.
Described disk storage scheduling process be:
First physical host in physics Host List is selected first, and all disk storages in the physical host are pressed
Active volume is descending to be ranked up, and the active volume of first root disk storage and the capacity of cloud main frame root disk are entered
Row compares, if off-capacity, marks the current affiliated physical host of root disk storage to be unavailable, and handle next physics
Main frame;Otherwise, root disk storage active volume is subtracted into cloud main frame root disk size, records storage mark.
The process of data disk storage scheduling is:
First physical host in physics Host List is selected first, and all data disk storages in the physical host are pressed
Active volume is descending to be ranked up, and is successively compared the data disks capacity of the capacity of data disk storage and cloud main frame
Compared with if off-capacity, it is unavailable to mark the current affiliated physical host of data disk storage, and handles next physics master
Machine;Otherwise, data disk storage active volume is subtracted into cloud host data disk capacity, records storage mark.
A kind of cloud main frame creation method, implementation step include:
1)Cloud host number to be created is obtained first, and the demand information of each cloud main frame, the demand information include required
Root disk size, want the data disks quantity and capacity of carry;
2)By above-mentioned physical store dispatching method, order is completed to obtain available physical Host List, root disk storage scheduling, number
The process dispatched according to disk storage, complete the establishment of first cloud main frame;
3)Repeat use above-mentioned physical store dispatching method, until all cloud main frames can find matching physical host and
Physical store, so as to complete the establishment process of all cloud main frames.
Using above-mentioned physical store dispatching method, the process for obtaining available physical Host List is:
In step 1)The cloud host requirements information of middle acquisition also includes creating CPU and memory information that cloud main frame needs, first root
All physical hosts for creating the cloud main frame are selected according to the information, and it is descending according to the progress of cloud host number can be created
Sequence, and the result after sequence is showed with tabular form, the CPU and memory information refer to the requirement of CPU core number, memory size
It is required that.
Using above-mentioned physical store dispatching method, the process for carrying out root disk storage scheduling is:
a)First according to the physical host list of acquisition, the first physical host is chosen;
b)The relevant information for all physical stores that selected physical host uses is obtained, relevant information here includes can use
Capacity, storage purposes, and root disk storage and the class of data disk storage two are divided into according to storage purposes;
c)Select root disk storage, by the descending sequence of active volume, and by the active volume of first root disk storage with
The capacity of cloud main frame root disk is compared, if off-capacity, the affiliated physical host of mark current root disk storage is can not
With;
d)Select next physical host, return to step b)Repeat, until obtaining active volume can store and cloud main frame root magnetic
The root disk storage of disk, and storage active volume is subtracted into root disk size, storage mark is recorded, root disk is so far completed and deposits
Store up scheduling process.
Using above-mentioned physical store dispatching method, the process for carrying out data disk storage scheduling is:
e)First according to the physical host list of acquisition, the first physical host is chosen;
f)The relevant information for all physical stores that selected physical host uses is obtained, relevant information here includes can use
Capacity, storage purposes, and root disk storage and the class of data disk storage two are divided into according to storage purposes;
g)Select data disk storage, descending sequence by measure, and by the active volume of first data disk storage and cloud master
The capacity of machine data disks is compared, if off-capacity, the affiliated physical host of mark current data disk storage is unavailable;
h)Select next physical host, return to step f)Repeat, until obtaining active volume can store and cloud host data
The data disk storage of disk, and storage active volume is subtracted into data disks capacity, storage mark is recorded, data is so far completed and takes inventory
Store up scheduling process;
i)When cloud main frame to be created needs carry multi-block data disk, then return to step g)Continue executing with, until all cloud main frames
Data disks can be assigned to a data disk storage.
Compared to the prior art a kind of physical store dispatching method and cloud main frame creation method of the present invention, has with following
Beneficial effect:
A kind of physical store dispatching method and cloud main frame creation method of the present invention, can press characteristic by cloud hard disk(It is required that IO
Energy is high or is only used for achieving)Create in different types of physical store, be more reasonably utilized physical resource, prevent resource
Waste;Using the physical store dispatching method and cloud main frame creation method, storage usage amount can be made to be uniformly distributed as far as possible,
The utilization rate of storage resource is effectively increased while best performance is ensured, it is practical, it is applied widely, it is easy to push away
Extensively.
Embodiment
In order that those skilled in the art more fully understand the solution of the present invention, with reference to embodiment to this
Invention is described in further detail.Obviously, described embodiment is only part of the embodiment of the present invention, rather than all
Embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art institute under the premise of creative work is not made
The every other embodiment obtained, belongs to the scope of protection of the invention.
As shown in Figure 1, the present invention provides a kind of physical store dispatching method, during the establishment for cloud main frame, its
Realize that step includes:
First, available physical Host List is obtained first, you can for creating the physical host list of cloud main frame, and the physics master
Some physical stores are configured with machine, physical host is the hardware device for providing the service of calculating, also referred to as server;Thing
Reason storage is the hardware device for providing storage service, can be one piece of hard disk or network storage;
Two and then physical store scheduling is carried out according to physical host list successively, physical store scheduling includes root disk storage
Dispatched with data disk storage, described disk storage refers to the disk for depositing cloud host operating system, and each cloud main frame must
The palpus root tuber disk of carry one can just be run;Data disk storage refers to the magnetic for depositing other non-OS data of cloud main frame
Disk, it is not necessary to;
3rd, after cloud main frame, which corresponds to root disk and data disks, all finds matching storage, physical store scheduling process is terminated.
Physical host list in the step 1 carries out inverted order arrangement, and detailed process is:
Required, all satisfactory physical hosts are chosen, the wound of the cloud main frame according to the establishment of cloud main frame first
Build and require to include the requirement of CPU core number, memory size requirement, the CPU selected here both CPU check figure, such as virtual machine and need 4 cores
CPU or 8 core CPU;Internal memory then refers to capacity, if desired for 8G internal memories or 16G internal memories;
Then required according to the establishment of cloud main frame, it is determined that each physical host can create the quantity of cloud main frame;
It is descending that physical host is sorted according to the quantity that can create cloud main frame, and ranking results are shown with tabular form.
, it is necessary to classify to the physical store in each physical host before physical store scheduling is carried out, the classification is led to
Cross procedure below realization:
Obtaining each physical host first includes capacity information, stores all physics storage informations of purposes, and wherein capacity is believed
Breath refers to available memory capacity;Storage purposes refers to be used to deposit cloud host operating system data, non-cloud host operating system
Data;
Then according to storage purposes, the physical store available for storage cloud host operating system data is identified as root disk and deposited
Storage, the physical store available for storage non-cloud host operating system data is identified as data disk storage.
In the physical store scheduling process of the step 2, root disk storage scheduling, root workable for acquisition are carried out first
Disk storage simultaneously identifies, and the workable root disk storage refers to meet to deposit cloud host operating system data capacity to be created
The storage of demand;Then data disk storage scheduling is carried out, data disk storage workable for acquisition simultaneously identifies, the workable number
Refer to meet the storage for depositing cloud main frame non-OS data capacity demand to be created according to disk storage.
Described disk storage scheduling process be:
First physical host in physics Host List is selected first, and all disk storages in the physical host are pressed
Active volume is descending to be ranked up, and the active volume of first root disk storage and the capacity of cloud main frame root disk are entered
Row compares, if off-capacity, marks the current affiliated physical host of root disk storage to be unavailable, and handle next physics
Main frame;Otherwise, root disk storage active volume is subtracted into cloud main frame root disk size, records storage mark.
The process of data disk storage scheduling is:
First physical host in physics Host List is selected first, and all data disk storages in the physical host are pressed
Active volume is descending to be ranked up, and is successively compared the data disks capacity of the capacity of data disk storage and cloud main frame
Compared with if off-capacity, it is unavailable to mark the current affiliated physical host of data disk storage, and handles next physics master
Machine;Otherwise, data disk storage active volume is subtracted into cloud host data disk capacity, records storage mark.
A kind of cloud main frame creation method, implementation step include:
1)Cloud host number to be created is obtained first, and the demand information of each cloud main frame, the demand information include required
Root disk size, want the data disks quantity and capacity of carry;
2)By above-mentioned physical store dispatching method, order is completed to obtain available physical Host List, root disk storage scheduling, number
The process dispatched according to disk storage, complete the establishment of first cloud main frame;
3)Repeat use above-mentioned physical store dispatching method, until all cloud main frames can find matching physical host and
Physical store, so as to complete the establishment process of all cloud main frames.
Using above-mentioned physical store dispatching method, the process for obtaining available physical Host List is:
In step 1)The cloud host requirements information of middle acquisition also includes creating CPU and memory information that cloud main frame needs, first root
All physical hosts for creating the cloud main frame are selected according to the information, and it is descending according to the progress of cloud host number can be created
Sequence, and the result after sequence is showed with tabular form, the CPU and memory information refer to the requirement of CPU core number, memory size
It is required that.
Using above-mentioned physical store dispatching method, the process for carrying out root disk storage scheduling is:
a)First according to the physical host list of acquisition, the first physical host is chosen;
b)The relevant information for all physical stores that selected physical host uses is obtained, relevant information here includes can use
Capacity, storage purposes, and root disk storage and the class of data disk storage two are divided into according to storage purposes;
c)Select root disk storage, by the descending sequence of active volume, and by the active volume of first root disk storage with
The capacity of cloud main frame root disk is compared, if off-capacity, the affiliated physical host of mark current root disk storage is can not
With;
d)Select next physical host, return to step b)Repeat, until obtaining active volume can store and cloud main frame root magnetic
The root disk storage of disk, and storage active volume is subtracted into root disk size, storage mark is recorded, root disk is so far completed and deposits
Store up scheduling process.
Using above-mentioned physical store dispatching method, the process for carrying out data disk storage scheduling is:
e)First according to the physical host list of acquisition, the first physical host is chosen;
f)The relevant information for all physical stores that selected physical host uses is obtained, relevant information here includes can use
Capacity, storage purposes, and root disk storage and the class of data disk storage two are divided into according to storage purposes;
g)Select data disk storage, descending sequence by measure, and by the active volume of first data disk storage and cloud master
The capacity of machine data disks is compared, if off-capacity, the affiliated physical host of mark current data disk storage is unavailable;
h)Select next physical host, return to step f)Repeat, until obtaining active volume can store and cloud host data
The data disk storage of disk, and storage active volume is subtracted into data disks capacity, storage mark is recorded, data is so far completed and takes inventory
Store up scheduling process;
i)When cloud main frame to be created needs carry multi-block data disk, then return to step g)Continue executing with, until all cloud main frames
Data disks can be assigned to a data disk storage.
The establishment process of 1 pair of cloud main frame is described in detail below in conjunction with the accompanying drawings:
Step 1, the precondition for carrying out scheduling of resource.
, it is necessary to clearly know that the root disk size of the cloud main frame to be created needs, cloud main frame want the data of carry before scheduling
The characteristic of disk quantity, capacity and data disks(It is required that IO performances are high or are only used for achieving)
Step 2, scheduling of resource flow.
Exemplified by creating the scheduling flow of single cloud main frame:
11)Dispatch physical host resource:
The CPU and internal memory needed first according to cloud main frame is created, select all physical hosts that can create the cloud main frame, and root
Bit-reversed is carried out according to cloud host number can be created.Handled successively by the Host List after sequence, carry out physical memory resources
Scheduling(Step 2).
22)Dispatch physical memory resources:
2.1st, the relevant information for all physical stores that main frame can use, including active volume, storage characteristics are obtained, storage is used
On the way(Root disk, data disks can be created).
2.2nd, select the storage that purposes is " can create root disk ", Bit-reversed by measure, and by first store can
With capacity compared with the capacity of cloud main frame root disk, if off-capacity, currently stored affiliated physical host is marked as not
It can use, and return to step 2.1 handles next physical host.Otherwise, storage active volume is subtracted into root disk size, record should
Storage mark.
If 2.3 cloud main frames need carry excessive data disk, storage of the purposes for " data disks can be created " is selected, checks storage
Whether matched with the characteristic of data disks, and record matching degree(Storage and data disks can have multiple characteristics, identical characteristic simultaneously
More, matching degree is higher, and storage is actually the disk array being made up of polylith hard disk, according to the difference of usage scenario, selects
Disk would also vary from.For example, under the scene of monitoring or archives data, it will usually which use is relatively low by performance but holds
The storage of larger hard disk composition is measured, and under the very big scene of the regular read-write repeatedly of needs or data access amount, generally
The higher storage formed such as SSD or SCIS hard disks of performance can be selected.For different types of storage, we maintain one for it
Tag metadata is organized to indicate its characteristic, such as:The storage that relatively low but larger capacity hard disk forms by performance we can be
It safeguards the tag metadata of " archive ", " Large Copacity " etc;Can be its maintenance such as " high property if the storage of SSD compositions
The tag metadata of energy ".One storage can set multiple marks according to its capacity characteristic, usage scenario, performance characteristics etc. for it
Sign metadata.When request for data disk, according to the usage scenario of data disks data disks can be selected to create with what
In the storage of kind of label, multiple labels can be selected, are then matched by label, if a tag match must one
Point, the storage of final choice highest scoring creates data disks).
Storage is ranked up according to matching degree positive sequence, active volume inverted order, and successively held memory capacity and data disks
Amount is compared, and selects first storage that can create data disks, active volume is subtracted into data disks capacity, records the storage
Mark.If the data disks can be created by not storing, mark it is currently stored belonging to physical host to be unavailable, and return to step
The 2.1 next physical hosts of processing.
If the 2.4, cloud main frame needs carry multi-block data disk, step 2.3 is performed repeatedly, until all data disks can divide
It is fitted on a storage.
33)If the storage that present physical main frame can use meets the root disk and data disks for creating cloud main frame, return
The physical host identifies and step 22)The storage mark of middle record.
44)To create multiple cloud main frames in batches, then step 11 can be performed repeatedly)-33), until all cloud main frames can
Find matching physical host and storage.
By embodiment above, the those skilled in the art can readily realize the present invention.Herein
Apply specific case to be set forth the principle and embodiment of the present invention, the explanation of above example is only intended to help
Understand the method and its core concept of the present invention.It should be pointed out that for those skilled in the art, do not taking off
On the premise of from the principle of the invention, some improvement and modification can also be carried out to the present invention, these are improved and modification also falls into this
In invention scope of the claims.