CN106126123B - A kind of method, apparatus and system of the distribution of host volume - Google Patents

A kind of method, apparatus and system of the distribution of host volume Download PDF

Info

Publication number
CN106126123B
CN106126123B CN201610490042.7A CN201610490042A CN106126123B CN 106126123 B CN106126123 B CN 106126123B CN 201610490042 A CN201610490042 A CN 201610490042A CN 106126123 B CN106126123 B CN 106126123B
Authority
CN
China
Prior art keywords
host
volume
information
group
data volume
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
CN201610490042.7A
Other languages
Chinese (zh)
Other versions
CN106126123A (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.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201610490042.7A priority Critical patent/CN106126123B/en
Publication of CN106126123A publication Critical patent/CN106126123A/en
Application granted granted Critical
Publication of CN106126123B publication Critical patent/CN106126123B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes

Abstract

The present invention provides the method, apparatus and system of a kind of volume distribution of host, this method comprises: being directed to each host, at least one disk in host is divided into different volume groups, determines the attribute information of each volume group, and creates each volume group of the host;Determine at least one data volume information;According to determining attribute information, the corresponding target host machine of at least one data volume information is filtered out;The request of the corresponding creation logical volume of an at least data volume information is sent to the target host machine.The disk of host is divided into different volume groups, and according to the attribute information of volume group and the data volume information determined, to create logical volume on host, so as to make full use of the disk resource of host.Therefore, this programme can be improved disk resource utilization rate.

Description

A kind of method, apparatus and system of the distribution of host volume
Technical field
The present invention relates to field of computer technology, in particular to a kind of the method, apparatus and system of the distribution of host volume.
Background technique
In a production environment, server would generally be configured with muti-piece disk.Server can be used as host to provide magnetic Disk resource, and by being allocated and managing to disk resource, for container allocation book and host catalogue can be mounted to.
Currently, can be allocated to the resource of the system disk of host.
Due to can only the system disk resource to host be allocated, therefore the disk resource utilization rate of existing implementation compared with It is low.
Summary of the invention
The present invention provides the method, apparatus and system of a kind of volume distribution of host, can be improved disk resource utilization rate.
In order to achieve the above object, the present invention is achieved through the following technical solutions:
In a first aspect, the present invention provides a kind of methods of host volume distribution, comprising:
S1: being directed to each host, at least one disk in the host be divided into different volume groups, determines The attribute information of each volume group, and create each described volume group of the host;
S2: at least one data volume information is determined;
S3: according to the attribute information, the corresponding target host machine of at least one described data volume information is filtered out;
S4: the request of the corresponding creation logical volume of at least one described data volume information is sent to the target host Machine.
Further, the S1, comprising:
It for each host, is performed both by: determining the type and size of at least one disk in the host;
The disk with same type at least one described disk is divided into a roll of group, at least one volume is obtained Group;
Based on the type and size of at least one disk described in determining, the attribute information of each volume group is determined, And the attribute information include volumegroup name claim, roll up set type, volume group size, host IP address, in included disk extremely Few one kind;
The request of the attribute information of each determining volume group and creation volume group is sent to the host;
The volume group creation information that the host returns is saved.
Further, the attribute information includes: volume set type and volume group size;
The S2, comprising: when creation container, determine its at least one data volume information carried, and the book is believed Breath includes at least one of type, size and its catalogue in the container of book;Establish includes described at least one The data volume list of a data volume information;
The S3, comprising:
A1: it according to the host list including each host pre-established, determines in the host list First host;
A2: judging whether the data volume list is empty, if so, determine that first host is target host machine, And terminate current process, otherwise, obtain first data volume information in the data volume list;
A3: according to the target type and target sizes for including in first data volume information, judge described first It whether include the mesh rolled up set type and be not less than the target sizes for the target type and volume group size in the volume group of host Volume group is marked, if so, first data volume information is removed from the data volume list, according to the target sizes to described Target volume group carries out resource preemption, and executes A2, otherwise, first host is removed from the host list, and Execute A1.
Further, this method further include: be ranked up according to the volume group size summation of the volume group of each host;Root The host list is established according to descending ranking results.
Second aspect, the present invention provides a kind of hosts to roll up assigned unit, comprising:
At least one disk in the host is divided into difference for being directed to each host by creating unit Volume group, determine the attribute information of each volume group, and create each described volume group of the host;
Determination unit, for determining at least one data volume information;
Screening unit, for according to the attribute information, filtering out at least one described corresponding target of data volume information Host;
Transmission unit, it is described for the request of the corresponding creation logical volume of at least one described data volume information to be sent to Target host machine.
Further, the creating unit is specifically used for being directed to each host, is performed both by: determining the host In at least one disk type and size;The disk with same type at least one described disk is divided into together A roll of group, obtain at least one volume group;Based on the type and size of at least one disk described in determining, determine described in each The attribute information of volume group, and the attribute information includes that volumegroup name claims, rolls up set type, volume group size, host IP address, wrapped At least one of disk included;The request of the attribute information of each determining volume group and creation volume group is sent to institute State host;The volume group creation information that the host returns is saved.
Further, the attribute information includes: volume set type and volume group size;
The determination unit when being specifically used for creation container, determines its at least one data volume information carried, and described Book information includes at least one of type, size and its catalogue in the container of book;Establishing includes institute State the data volume list of at least one data volume information;
The screening unit comprises determining that subelement, the first processing subelement, second processing subelement;
The determining subelement, for determining institute according to the host list including each host pre-established State first host in host list;
The first processing subelement, for judging whether the data volume list is empty, if so, determining described first Host is target host machine, and terminates current process, otherwise, obtains first book letter in the data volume list Breath;
The second processing subelement, for according to the target type and target for including in first data volume information Size, judge in the volume group of first host whether include volume set type for the target type and volume group size it is not small In the target volume group of the target sizes, if so, first data volume information is removed from the data volume list, according to The target sizes carry out resource preemption to the target volume group, and trigger the first processing subelement, otherwise, from the place First host is removed in Host List, and triggers the determining subelement.
Further, the creating unit is also used to be carried out according to the volume group size summation of the volume group of each host Sequence;The host list is established according to descending ranking results.
The third aspect, the present invention provides a kind of systems of host volume distribution, comprising:
Any of the above-described the host volume assigned unit and at least one host, wherein
Each described host, the creation logical volume sent for receiving and executing the host volume assigned unit Request, and it is described creation logical volume request correspond at least one data volume information.
Further, each described host is specifically used for according to data volume information described in each, in the data Logical volume is created in the corresponding volume group of volume information;The logical volume of creation is formatted as ext4 file system;According to creation The logical volume uuid, be mounted to the specified directory of the host, and be written to/etc/fatab file.
The present invention provides the method, apparatus and system of a kind of volume distribution of host, for each host, by host At least one disk in machine is divided into different volume groups, determines the attribute information of each volume group, and creates the host Each volume group;Determine at least one data volume information;According to determining attribute information, at least one data volume information is filtered out Corresponding target host machine;The request of the corresponding creation logical volume of an at least data volume information is sent to the target host Machine.The disk of host is divided into different volume groups, and according to the attribute information of volume group and the data volume information determined, with Logical volume is created on host, so as to make full use of the disk resource of host.Therefore, the present invention can be improved disk money Source utilization rate.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is a kind of flow chart of the method for host volume distribution that one embodiment of the invention provides;
Fig. 2 is the flow chart of the method for another host volume distribution that one embodiment of the invention provides;
Fig. 3 is a kind of schematic diagram for host volume assigned unit that one embodiment of the invention provides;
Fig. 4 is the schematic diagram for another host volume assigned unit that one embodiment of the invention provides;
Fig. 5 is a kind of schematic diagram of the system for host volume distribution that one embodiment of the invention provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, may comprise steps of the embodiment of the invention provides a kind of method of host volume distribution:
Step 101: being directed to each host, at least one disk in the host is divided into different volumes Group, determines the attribute information of each volume group, and creates each described volume group of the host.
Step 102: determining at least one data volume information.
Step 103: according to the attribute information, filtering out at least one described corresponding target host of data volume information Machine.
Step 104: the request of the corresponding creation logical volume of at least one described data volume information is sent to the target Host.
The embodiment of the invention provides a kind of methods of host volume distribution will be in host for each host At least one disk be divided into different volume groups, determine the attribute information of each volume group, and create each of the host A volume group;Determine at least one data volume information;According to determining attribute information, it is corresponding to filter out at least one data volume information Target host machine;The request of the corresponding creation logical volume of an at least data volume information is sent to the target host machine.It will The disk of host is divided into different volume groups, and according to the attribute information of volume group and the data volume information determined, in host Logical volume is created on machine, so as to make full use of the disk resource of host.Therefore, the embodiment of the present invention can be improved disk Resource utilization.
In one embodiment of the invention, in order to illustrate a kind of implementation for host creation volume group, so, The step 101, comprising: be directed to each host, be performed both by: determining the type of at least one disk in the host And size;The disk with same type at least one described disk is divided into a roll of group, at least one volume is obtained Group;Based on the type and size of at least one disk described in determining, the attribute information of each volume group is determined, and described Attribute information includes that volumegroup name at least one of claims, rolls up set type, volume group size, host IP address, included disk; The request of the attribute information of each determining volume group and creation volume group is sent to the host;By the host The volume group creation information of return is saved.
It, can be when needing to create container, according to the attribute of the volume group of creation by creating volume group to each host Information, to determine suitable target host machine, so as to pass through the target host machine as container allocation logical volume, and carry To host catalogue.
The realization side of target host machine is determined when in one embodiment of the invention, in order to illustrate a kind of creation container Formula, so, the attribute information includes: volume set type and volume group size;
The step 102, comprising: when creation container, determine its at least one data volume information carried, and the data Volume information includes at least one of type, size and its catalogue in the container of book;It establishes including described in extremely The data volume list of a few data volume information;
The step 103, comprising:
Step 1031: according to the host list including each host pre-established, determining the host column First host in table;
Step 1032: judging whether the data volume list is empty, if so, determining that first host is target place Host, and terminate current process, otherwise, obtain first data volume information in the data volume list;
Step 1033: according to the target type and target sizes for including in first data volume information, described in judgement Whether including rolling up, set type is the target type and volume group size is big not less than the target in the volume group of first host Small target volume group, if so, first data volume information is removed from the data volume list, according to the target sizes Resource preemption is carried out to the target volume group, and executes step 1032, otherwise, removes described first from the host list A host, and execute step 1031.
By this implementation, successively each of host list host can be judged, until sieve Target host machine corresponding with required creation container is selected, so as to be container allocation logical volume using the target host machine.
In one embodiment of the invention, in order to illustrate a kind of list sortord of host list, so, the place The method of host volume distribution may further include: is ranked up according to the volume group size summation of the volume group of each host; The host list is established according to descending ranking results.
Due to that can be ranked up according to the volume group size summation of host to establish host list, therefore can be quick The target host machine determining target host machine, and determining be container allocation logical volume after, can usually have relatively large number of Remaining space thereby may be ensured that target host machine still has superior performance.
As shown in Fig. 2, one embodiment of the invention provides the method for another host volume distribution, this method with For Docker host rolls up allocation strategy, specifically includes the following steps:
Step 201: server-side is performed both by for each host: determining the type of at least one disk in host And size, the disk with same type at least one disk is divided into a roll of group, to obtain at least one volume Group.
In the embodiment of the present invention, executing host volume assigned unit can be a server-side, and can be in the service End executes Docker host and rolls up allocation strategy.Wherein, Docker support uses host catalogue as book carry container.
In an embodiment of the invention, in order to realize that Docker host rolls up allocation strategy, to divide in a production environment With host disk resource, therefore Docker service can be disposed on each host, dispose in server-side by staff From the Docker cluster management software ground, and by the resource information of host, such as including disk, CPU, memory store to clothes Business end.
It usually all include at least one disk, and type and size of each disk for each host To have differences.Wherein, the type of disk may include SATA (Serial ATA, serial ports ATA), SSD (Solid State Drives, solid state hard disk), SAS (Serial Attached SCSI, Serial Attached SCSI (SAS)), NLSAS etc..
For each host, the disk with same type of the host can be divided into a roll by server-side Group, therefore at least one available different types of volume group, and each disk that the size of each volume group can be included for it The sum of size.
Step 202: for each host, server-side based at least one determining disk type and size, really The attribute information of each fixed volume group, and the request of the attribute information of each determining volume group and creation volume group is sent to place Host.
In detail, since server-side can create at least one volume group of the host for each host, therefore For each volume group, the attribute information of volume group may include: that volumegroup name claims, rolls up set type, volume group size, host IP At least one of address, included disk.
In an embodiment of the invention, server-side can use LVM (Logical Volume Manager, logical volume Management) disk is initialized, dispatched and is distributed.In detail, server-side can use LVM and carry out initially to host disk Change, and the disk of the same type in same host is divided into the same volume group, and by the attribute information of each volume group It is stored in database.
For each host, server-side can incite somebody to action after the attribute information of each volume group of the host has been determined The request of determining attribute information and creation volume group is sent to the host, so as to so that the host is every according to what is received One attribute information is to create corresponding volume group.
Step 203: each host is in the attribute information and creation volume for receiving each volume group that server-side is sent When the request of group, each volume group is created, and volume group creation information is sent to server-side.
In an embodiment of the invention, server-side is through business processing, by the request for creating volume group be forwarded to host it Afterwards, the agent of host deployment can complete the creation of volume group.
In detail, the attribute information for each volume group that host is sent according to server-side can use disk creation physical volume, Each volume group is created, and the physical volume of creation is divided into corresponding volume group.Host complete volume group creation operation when, Volume group can be created into information and be sent to server-side.
Step 204: server-side saves the volume group creation information that each host returns.
Step 205: server-side is ranked up according to the volume group size summation of the volume group of each host, and according to by big Host list is established to small ranking results.
In detail, the volume group size summation of the volume group of each host can be each included by the host The adduction of the volume group size of volume group.The volume group size summation is bigger, and the storage resource of corresponding host is more.
In order to which there are still more remaining spaces after target host machine is container allocation logical volume, to guarantee target Host can have superior performance, therefore can be ranked up according to above-mentioned volume group size summation, and with descending sequence As a result host list is established.Therefore, it when screening target host machine from host list to create container, can sieve first It selects and both meets container creation requirement, while still with the target host machine of more remaining space.This implementation can add The breakneck acceleration of fast target host machine.
Step 206: when creation container, server-side determines its at least one data volume information carried, establishes including this extremely The data volume list of a few data volume information.
In detail, each data volume information may include: in the type of book, size and its catalogue in container At least one.
Server-side can be successively according to each of data volume list data volume information, to each place in host list Host is screened, to filter out the host for meeting each data volume information.
Step 207: server-side determines first host in the host list established.
In detail, server-side can according to the ranking results of host list, successively judge each host whether be Target host machine, until determining target host machine.Therefore, first host in host list can be determined first. For example, first host determined is host 1.
Step 208: server-side judges whether data volume list is empty, if so, determining that first host is target host Machine, and step 210 is executed, otherwise, obtain first data volume information in data volume list.
For each of data volume list data volume information, if the host being currently judged meets book letter Breath, it can be temporarily removed from data volume list, therefore when there is no data volume information, as sky in data volume list, it says The bright host being currently judged can satisfy each data volume information, therefore the host that explanation is currently judged can be mesh Mark host.
Therefore, server-side is determining first host: after host 1, whether may determine that data volume list first For sky, due at present to judge for the first time, therefore data volume list is not empty, therefore first data in available data volume list Volume information, for example, being data volume information 1.
Step 209: server-side judges first according to the target type and target sizes that include in first data volume information It whether include the target volume group rolled up set type and be not less than target sizes for target type and volume group size in the volume group of a host, If so, removing first data volume information from data volume list, resource preemption is carried out to target volume group according to target sizes, and Step 208 is executed, otherwise, first host is removed from host list, and execute step 207.
According to first data volume information: the target type and target sizes of data volume information 1, according to first host Machine: the attribute information of the volume group of host 1, it can be determined that go out host 1 in whether include volume set type be the target type and Volume group size illustrates that host 1 meets data volume information 1, therefore can temporarily move not less than the volume group of the target sizes if including Except data volume information 1, and step 208 is executed, to obtain first new data volume information: data volume information 2, and carried out again Judgement.
Since the type of different data volume information can be identical, therefore when judging that host 1 meets data volume information 1, Resource preemption can be carried out to the respective roll group in host 1 according to the data volume size of data volume information 1, i.e., by the volume group Volume group size subtracts the data volume size of data volume information 1, subsequent sentence using remaining size as the volume group size of the volume group It is disconnected.
Assuming that host 1 can be moved from host list when judging that host 1 is unsatisfactory for data volume information 2 It removes, then needing to judge next host.Therefore, each book that can will be temporarily removed from data volume list Information is restored, successively to carry out the judgement of other hosts according to the data volume list.
Further, since host 1 is not target host machine, therefore the camp-on resource in host 1 can be restored.
Assuming that the execution repeatedly through step 208 and step 209, judges newly determine first host: such as host 1 Host 5 later meets each data volume information, thus again execute step 208 when, it can be determined that go out data volume list be Sky, therefore can determine that the host 5 is target host machine.
In an embodiment of the invention, due to being stored with the resource information of each host, and the money in server-side Source information may include CPU and memory, therefore according to different practical application needs, it is carried simultaneously when in server-side creation container CPU, and/or, it, can be before judging data volume list, to the host for meeting the qualifications when qualifications of memory It is screened, is not met the host of the qualifications to screen out part, and host list is established according to the selection result.
Certainly, according to the demand of different user, equally it can judge that target host machine is after judging data volume list It is no to meet the qualifications, if satisfied, thening follow the steps 210, otherwise, the target host machine can be removed, and execute step again Rapid 207 to obtain first new host and carry out subsequent judgement processing operation.
Step 210: the request of the corresponding creation logical volume of an at least data volume information is sent to target place by server-side Host.
When determining target host machine is host 5, the request for creating logical volume can be sent to host by server-side Machine 5, and the request corresponds at least one described data volume information, so that host 5 is according at least one data volume information To create logical volume.
Step 211: target host machine: host 5 is to receive at least one data volume information that server-side sends corresponding Creation logical volume request when, according to each data volume information, create logical volume in the corresponding volume group of data volume information, And the logical volume of creation is formatted as ext4 file system, and the uuid of the logical volume according to creation, it is mounted to place The specified directory of host, and it is written to/etc/fatab file.
In detail, the uuid of logical volume can be the corresponding equipment unique identification of logical volume.In addition, being patrolled by what will be created It collects volume and is written to/etc/fatab file, be persisted to linux system.Container starting after, can by system command, View book directory information.
In an embodiment of the invention, host, can when receiving the request for the creation logical volume that server-side is sent The creation, formatting and carry of logical volume are completed to execute LVM order.
From the foregoing, it will be observed that when server-side creates container, the data volume information that can be carried according to container, and according to creation Host volume group attribute information, to filter out suitable target host machine.It is patrolled by sending creation to target host machine The request of volume is collected, target host machine can be the container allocation logical volume, and be mounted to host catalogue.This implementation can Host disk management is effectively performed, and make full use of the disk resource of host.
As shown in figure 3, one embodiment of the invention provides a kind of host volume assigned unit 30, comprising:
At least one disk in the host is divided into not by creating unit 301 for being directed to each host Same volume group, determines the attribute information of each volume group, and create each described volume group of the host;
Determination unit 302, for determining at least one data volume information;
Screening unit 303, for according to the attribute information, filtering out at least one described corresponding mesh of data volume information Mark host;
Transmission unit 304, for the request of the corresponding creation logical volume of at least one described data volume information to be sent to The target host machine.
In an embodiment of the invention, the creating unit 301 is specifically used for being directed to each host, be performed both by: Determine the type and size of at least one disk in the host;To there is same type at least one described disk Disk be divided into a roll of group, obtain at least one volume group;Based on the type and size of at least one disk described in determining, Determine the attribute information of each volume group, and the attribute information includes that volumegroup name claims, rolls up set type, volume group size, place At least one of host IP address, included disk;By the attribute information of each determining volume group and creation volume The request of group is sent to the host;The volume group creation information that the host returns is saved.
In an embodiment of the invention, referring to FIG. 4, the attribute information includes: volume set type and volume group size;
The determination unit 302 when being specifically used for creation container, determines its at least one data volume information carried, and The book information includes at least one of type, size and its catalogue in the container of book;Establish packet Include the data volume list of at least one data volume information;
The screening unit 303 comprises determining that subelement 3031, first handles subelement 3032, second processing subelement 3033;
The determining subelement 3031, for the host list including each host that basis pre-establishes, really First host in the fixed host list;
The first processing subelement 3032, for judging whether the data volume list is empty, if so, determining described the One host is target host machine, and terminates current process, otherwise, obtains first book in the data volume list Information;
The second processing subelement 3033, for according to the target type that includes in first data volume information and Target sizes judge in the volume group of first host whether include volume set type for the target type and volume group size Not less than the target volume group of the target sizes, if so, first data volume information is removed from the data volume list, Resource preemption is carried out to the target volume group according to the target sizes, and triggers the first processing subelement 3032, otherwise, First host is removed from the host list, and triggers the determining subelement 3031.
In an embodiment of the invention, the creating unit 301 is further used for the volume group according to each host Volume group size summation be ranked up;The host list is established according to descending ranking results.
As shown in figure 5, the embodiment of the invention provides a kind of systems of host volume distribution, comprising: any of the above-described described Host volume assigned unit 30 and at least one host 40, wherein
Each described host 40 is patrolled for receiving and executing the creation that the host volume assigned unit 30 is sent The request of volume is collected, and the request of the creation logical volume corresponds at least one data volume information.
In an embodiment of the invention, each described host 40 is specifically used for according to book described in each Information creates logical volume in the corresponding volume group of the data volume information;The logical volume of creation is formatted as ext4 text Part system;According to the uuid of the logical volume of creation, it is mounted to the specified directory of the host 40, and be written to/ Etc/fatab file.
The contents such as the information exchange between each unit, implementation procedure in above-mentioned apparatus, due to implementing with the method for the present invention Example is based on same design, and for details, please refer to the description in the embodiment of the method for the present invention, and details are not described herein again.
In conclusion each embodiment of the invention at least has the following beneficial effects:
1, in the embodiment of the present invention, for each host, at least one disk in host is divided into difference Volume group, determine the attribute information of each volume group, and create each volume group of the host;Determine at least one book Information;According to determining attribute information, the corresponding target host machine of at least one data volume information is filtered out;By an at least number The target host machine is sent to according to the request of the corresponding creation logical volume of volume information.The disk of host is divided into different volumes Group, and according to the attribute information of volume group and the data volume information determined, to create logical volume on host, so as to abundant Utilize the disk resource of host.Therefore, the embodiment of the present invention can be improved disk resource utilization rate.
2, in the embodiment of the present invention, when server-side creates container, the data volume information that can be carried according to container, and According to the attribute information of the volume group of the host of creation, to filter out suitable target host machine.By being sent out to target host machine The request of creation logical volume is sent, target host machine can be the container allocation logical volume, and be mounted to host catalogue.This reality Host disk management can be effectively performed in existing mode, and makes full use of the disk resource of host.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non- It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements, It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment Some elements.In the absence of more restrictions, the element limited by sentence " including a 〃 ", is not arranged Except there is also other identical factors in the process, method, article or apparatus that includes the element.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light In the various media that can store program code such as disk.
Finally, it should be noted that the foregoing is merely presently preferred embodiments of the present invention, it is merely to illustrate skill of the invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention, Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.

Claims (6)

1. a kind of method of host volume distribution characterized by comprising
S1: it is directed to each host, at least one disk in the host is divided into different volume groups, is determined each The attribute information of a volume group, and create each described volume group of the host;
S2: at least one data volume information is determined;
S3: according to the attribute information, the corresponding target host machine of at least one described data volume information is filtered out;
S4: the request of the corresponding creation logical volume of at least one described data volume information is sent to the target host machine;
The S1, comprising:
It for each host, is performed both by: determining the type and size of at least one disk in the host;
The disk with same type at least one described disk is divided into a roll of group, at least one volume group is obtained;
Based on the type and size of at least one disk described in determining, the attribute information of each volume group, and institute are determined Stating attribute information includes that volumegroup name claims, rolls up set type, volume group size, host IP address, at least one in included disk Kind;
The request of the attribute information of each determining volume group and creation volume group is sent to the host;
The volume group creation information that the host returns is saved;
The attribute information includes: volume set type and volume group size;
The S2, comprising: when creation container, determine its at least one data volume information carried, and the book packet Include at least one of the type, size and its catalogue in the container of book;Establishing includes at least one described number According to the data volume list of volume information;
The S3, comprising:
A1: according to the host list including each host pre-established, first in the host list is determined A host;
A2: judge whether the data volume list is empty, if so, determining that first host is target host machine, and is tied Otherwise beam current process obtains first data volume information in the data volume list;
A3: according to the target type and target sizes for including in first data volume information, judge first host It whether include the target volume rolled up set type and be not less than the target sizes for the target type and volume group size in the volume group of machine Group, if so, first data volume information is removed from the data volume list, according to the target sizes to the target Volume group carries out resource preemption, and executes A2, otherwise, first host is removed from the host list, and execute A1。
2. the method according to claim 1, wherein
Further comprise: being ranked up according to the volume group size summation of the volume group of each host;According to descending row Sequence result establishes the host list.
3. a kind of host rolls up assigned unit characterized by comprising
At least one disk in the host is divided into different volumes for being directed to each host by creating unit Group, determines the attribute information of each volume group, and creates each described volume group of the host;
Determination unit, for determining at least one data volume information;
Screening unit, for according to the attribute information, filtering out at least one described corresponding target host of data volume information Machine;
Transmission unit, for the request of the corresponding creation logical volume of at least one described data volume information to be sent to the target Host;
The creating unit is specifically used for being directed to each host, is performed both by: determining at least one magnetic in the host The type and size of disk;The disk with same type at least one described disk is divided into a roll of group, obtain to A few volume group;Based on the type and size of at least one disk described in determining, the attribute letter of each volume group is determined Breath, and the attribute information include volumegroup name claim, roll up set type, volume group size, host IP address, in included disk It is at least one;The request of the attribute information of each determining volume group and creation volume group is sent to the host;It will The volume group creation information that the host returns is saved;
The attribute information includes: volume set type and volume group size;
The determination unit when being specifically used for creation container, determines its at least one data volume information carried, and the data Volume information includes at least one of type, size and its catalogue in the container of book;It establishes including described in extremely The data volume list of a few data volume information;
The screening unit comprises determining that subelement, the first processing subelement, second processing subelement;
The determining subelement, for determining the place according to the host list including each host pre-established First host in Host List;
The first processing subelement, for judging whether the data volume list is empty, if so, determining first host Machine is target host machine, and terminates current process, otherwise, obtains first data volume information in the data volume list;
The second processing subelement, for big according to the target type and target that include in first data volume information It is small, judge in the volume group of first host whether to include that set type is the target type to volume and volume group size is not less than The target volume group of the target sizes, if so, first data volume information is removed from the data volume list, according to institute It states target sizes and resource preemption is carried out to the target volume group, and trigger the first processing subelement, otherwise, from the host First host is removed in machine list, and triggers the determining subelement.
4. host according to claim 3 rolls up assigned unit, which is characterized in that
The creating unit is further used for being ranked up according to the volume group size summation of the volume group of each host;According to Descending ranking results establish the host list.
5. a kind of system of host volume distribution characterized by comprising
Host volume assigned unit as claimed in claim 4 and at least one host, wherein
Each described host, for receiving and executing asking for creation logical volume that host volume assigned unit is sent It asks, and the request of the creation logical volume corresponds at least one data volume information.
6. a kind of system of host volume distribution according to claim 5, which is characterized in that
Each described host is specifically used for according to data volume information described in each, corresponding in the data volume information Logical volume is created in volume group;The logical volume of creation is formatted as ext4 file system;According to the logical volume of creation Uuid, be mounted to the specified directory of the host, and be written to/etc/fatab file.
CN201610490042.7A 2016-06-28 2016-06-28 A kind of method, apparatus and system of the distribution of host volume Active CN106126123B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610490042.7A CN106126123B (en) 2016-06-28 2016-06-28 A kind of method, apparatus and system of the distribution of host volume

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610490042.7A CN106126123B (en) 2016-06-28 2016-06-28 A kind of method, apparatus and system of the distribution of host volume

Publications (2)

Publication Number Publication Date
CN106126123A CN106126123A (en) 2016-11-16
CN106126123B true CN106126123B (en) 2019-11-05

Family

ID=57286149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610490042.7A Active CN106126123B (en) 2016-06-28 2016-06-28 A kind of method, apparatus and system of the distribution of host volume

Country Status (1)

Country Link
CN (1) CN106126123B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885461B (en) * 2017-10-19 2022-02-01 北京京东尚科信息技术有限公司 Data local storage method and device
CN108509152A (en) * 2018-03-20 2018-09-07 新华三云计算技术有限公司 A kind of method and device for realizing the storage of container runtime data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081508A (en) * 2009-11-27 2011-06-01 中国移动通信集团四川有限公司 Method and device for partitioning discs into host computer
CN102147770A (en) * 2011-03-28 2011-08-10 杭州电子科技大学 Storage resource management system and method
CN105630702A (en) * 2015-12-18 2016-06-01 浪潮(北京)电子信息产业有限公司 Logical volume creation method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081508A (en) * 2009-11-27 2011-06-01 中国移动通信集团四川有限公司 Method and device for partitioning discs into host computer
CN102147770A (en) * 2011-03-28 2011-08-10 杭州电子科技大学 Storage resource management system and method
CN105630702A (en) * 2015-12-18 2016-06-01 浪潮(北京)电子信息产业有限公司 Logical volume creation method and system

Also Published As

Publication number Publication date
CN106126123A (en) 2016-11-16

Similar Documents

Publication Publication Date Title
CN104461744B (en) A kind of resource allocation methods and device
JP4739786B2 (en) Data relocation method
KR102072726B1 (en) Systems and methods for supporting inline delegation of middle-tier transaction logs to database
US20040172512A1 (en) Method, apparatus, and computer readable medium for managing back-up
CN105786405B (en) A kind of online upgrading method, apparatus and system
JP2017199439A (en) System and method for implementing data storage service
CN104461768B (en) copy storage device and copy storage method
US8001327B2 (en) Method and apparatus for managing placement of data in a tiered storage system
CN104035836B (en) Automatic disaster-tolerant recovery method and system in cluster searching platform
CN104391873A (en) Database operation separation method and database operation separation system
CN109582433A (en) A kind of resource regulating method, device, cloud computing system and storage medium
US20150236974A1 (en) Computer system and load balancing method
JP6475304B2 (en) Transaction processing method and apparatus
JP6211631B2 (en) Identifying workloads and sizing buffers for volume replication purposes
CN109643310A (en) System and method for fast resampling in database
CN1602480A (en) Managing storage resources attached to a data network
CN108089926A (en) A kind of method, apparatus, equipment and readable storage medium storing program for executing for obtaining distributed lock
CN105095103A (en) Storage device management method and device used for cloud environment
CN105357042A (en) High-availability cluster system, master node and slave node
US7849264B2 (en) Storage area management method for a storage system
CN104793981B (en) A kind of online snapshot management method and device of cluster virtual machine
CN114153580A (en) Cross-multi-cluster work scheduling method and device
CN107357522A (en) Data processing method and device
CN106126123B (en) A kind of method, apparatus and system of the distribution of host volume
JP4813975B2 (en) Method of changing configuration of non-shared database system, management server, and non-shared database 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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200519

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Patentee after: Tidal Cloud Information Technology Co.,Ltd.

Address before: 250100 Ji'nan high tech Zone, Shandong, No. 1036 wave road

Patentee before: INSPUR ELECTRONIC INFORMATION INDUSTRY Co.,Ltd.

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Patentee after: Inspur cloud Information Technology Co., Ltd

Address before: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Patentee before: Tidal Cloud Information Technology Co.,Ltd.