Summary of the invention
The purpose of the present invention is to provide a kind of virtual disk creation method and devices and distributed memory system, to improve
During the creation of the virtual disk of existing distributed memory system, need user oneself manual to virtual disk Match IP
Location, the problem for causing the creation of virtual disk inefficient.
The present invention is implemented as follows:
In a first aspect, a kind of virtual disk creation method provided in an embodiment of the present invention, is applied to distributed memory system,
The distributed memory system includes virtual disk creating device, and the virtual disk creation method includes:
The virtual disk creating device obtains creation instruction, and the creation instruction carries the virtual disk to be created
Demand information;
According to the demand information in the virtual disk index information pre-established, selection is matched with the demand information
Target virtual disk configure index information, what virtual disk configuration index information was associated with that creation virtual disk needs matches
Set the information of resource;
The corresponding configuration resource of information of configuration resource associated by index information is configured according to the target virtual disk,
Create virtual disk.
With reference to first aspect, the embodiment of the invention provides the first embodiments of first aspect, wherein the distribution
Storage system includes that multiple memory resource pools and multiple IP address resource pools, the memory resource pool are stored with storage resource,
The IP address resource pool is stored with IP address resource, and each memory resource pool is respectively arranged with number, each IP address resource
Pond is respectively arranged with number;The information of the configuration resource includes the number information and IP address resource pool of memory resource pool
Number information, the target virtual disk according to selection configure the information of configuration resource associated by index information, wound
Build virtual disk, comprising:
The associated storage of number information with the memory resource pool is obtained according to the number information of the memory resource pool
Resource;
It is obtained according to the number information of the IP address resource pool associated with the number information of the IP address resource pool
IP address resource;
Virtual disk is created according to the storage resource and the address resource.
With reference to first aspect, the embodiment of the invention provides second of embodiments of first aspect, wherein the distribution
Storage system includes multiple memory resource pools and multiple port address resource pools, and the memory resource pool is stored with storage money
Source, the port address resource pool are stored with port address resource, and each memory resource pool is respectively arranged with number, each port
Address resource pond is respectively arranged with number;The information of the configuration resource includes number information and the port of memory resource pool
The number information of location resource pool, the target virtual disk according to selection configure configuration resource associated by index information
Information, create virtual disk, comprising:
The associated storage of number information with the memory resource pool is obtained according to the number information of the memory resource pool
Resource;
It obtains according to the number information of the port address resource pool and is closed with the number information of the port address resource pool
The port address resource of connection;
According to the storage resource and the port address asset creation virtual disk.
With reference to first aspect or second of embodiment of the first embodiment of first aspect or first aspect, this hair
Bright embodiment provides the third embodiment of first aspect, wherein the demand information include in the demand information extremely
One of service type information including the virtual disk to be created, regional information less, it is described to be believed according to the demand
Breath is chosen and is indexed with the matched target virtual disk configuration of the demand information in the virtual disk index information pre-established
Information, comprising:
According to the regional information for the virtual disk to be created and/or service type information in the virtual magnetic pre-established
The regional information and/or the matched mesh of service type information with the virtual disk to be created are chosen in disk index information
It marks virtual disk and configures index information.
Second aspect, the embodiment of the invention provides a kind of creating devices of virtual disk, are applied to distributed storage system
System, the virtual disk creating device, comprising:
Creation instruction obtaining unit, for obtaining creation instruction, the creation instruction carries the virtual disk to be created
Demand information;
Configure index information obtaining unit, for according to the demand information in the virtual disk index information pre-established
In, it chooses and configures index information with the matched target virtual disk of the demand information, the virtual disk configures index information
It is associated with the information for the configuration resource that creation virtual disk needs;
Virtual disk creating unit, for according to configuration resource associated by target virtual disk configuration index information
The corresponding configuration resource of information, create virtual disk.
In conjunction with second aspect, the embodiment of the invention provides the first embodiments of second aspect, wherein the distribution
Storage system includes that multiple memory resource pools and multiple IP address resource pools, the memory resource pool are stored with storage resource,
The IP address resource pool is stored with IP address resource, and each memory resource pool is respectively arranged with number, each IP address resource
Pond is respectively arranged with number;The information of the configuration resource includes the number information and IP address resource pool of memory resource pool
Number information, the virtual disk creating unit, comprising:
First storage resource obtains subelement, for obtaining and the storage according to the number information of the memory resource pool
The associated storage resource of the number information of resource pool;
IP address resource obtains subelement, obtains with the IP for the number information according to the IP address resource pool
The associated IP address resource of the number information of location resource pool.
In conjunction with second aspect, the embodiment of the invention provides second of embodiments of second aspect, wherein the distribution
Storage system includes multiple memory resource pools and multiple port address resource pools, and the memory resource pool is stored with storage money
Source, the port address resource pool are stored with port address resource, and each memory resource pool is respectively arranged with number, each port
Address resource pond is respectively arranged with number;The information of the configuration resource includes number information and the port of memory resource pool
The number information of location resource pool, the virtual disk creating unit, comprising:
Second storage resource obtains subelement, for obtaining and the storage according to the number information of the memory resource pool
The associated storage resource of the number information of resource pool;
Port address resource obtain subelement, for according to the port address resource pool number information obtain with it is described
The associated port address resource of the number information of port address resource pool.
In conjunction with the first of second aspect or second aspect embodiment or second of embodiment of second aspect, this hair
Bright embodiment provides the third embodiment of second aspect, wherein the demand information include in the demand information extremely
One of service type information including the virtual disk to be created, regional information less, the configuration index information obtains
Obtain unit, comprising:
First configuration index information obtains subelement, for being built according to the regional information for the virtual disk to be created in advance
The matched target of regional information with the virtual disk to be created is chosen in the vertical virtual disk index information
Virtual disk configures index information;
Second configuration index information obtain bullet cloud, for according to the service type information for the virtual disk to be created pre-
It is chosen in the virtual disk index information first established matched with the service type information of the virtual disk to be created
The target virtual disk configures index information;
Third configures index information and obtains subelement, for the regional information and service class according to the virtual disk to be created
Type information is chosen and the regional information of the virtual disk to be created in the virtual disk index information pre-established
Index information is configured with the matched target virtual disk of service type information.
The third aspect, the embodiment of the invention provides a kind of distributed memory system, the distributed memory system includes
Virtual disk creating device, memory resource pool, IP address resource pool and port resource pond;
The virtual disk creating device, for obtaining creation instruction, the creation instruct carry to be created it is virtual
The demand information of disk;According to the demand information in the virtual disk index information pre-established, choose and the demand
The target virtual disk of information matches configures index information, and the virtual disk configuration index information is associated with creation virtual disk
The information of the configuration resource needed;According to the information pair of configuration resource associated by target virtual disk configuration index information
The configuration resource answered creates virtual disk.
Virtual disk creation method provided in an embodiment of the present invention, passes through the void pre-established in distributed memory system
In quasi- disk index information, chooses the matched target virtual disk of the demand information obtained with virtual disk creating device and match
Index information is set, the information acquisition for the configuration resource that the associated creation virtual disk of index information needs is configured according to virtual disk
The mode for configuring resource, realizes quickly creation virtual disk, combinational logic layer is configured further through introducing, by underlying resource pond
It is decoupled with service logic, in the case of realizing same asset pond, supports more more flexible service applications by introducing configuration group
Logical layer is also decoupled by underlying resource pond and service logic, can not be to upper layer industry when realizing adjustment underlying resource pond
Business model and logic impact, and during the creation so as to improve the virtual disk of existing distributed memory system, need
User oneself is wanted to give virtual disk Match IP Address manually, the problem for causing the creation of virtual disk inefficient greatly mentions
High user experience.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete
Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist
The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause
This, is not intended to limit claimed invention to the detailed description of the embodiment of the present invention provided in the accompanying drawings below
Range, but it is merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
Referring to Fig. 1, virtual disk creation method provided by the embodiment of the present invention, applied to distribution as shown in Figure 1
It include virtual disk creating device, multiple IP address resource pools, multiple ports in the distributed memory system in storage system
Resource pool and multiple memory resource pools.The memory resource pool is stored with storage resource, and the IP address resource pool is stored with
IP address resource, the port resource pond are stored with port address resource.
Referring to Fig. 2, a kind of virtual disk creation method provided in an embodiment of the present invention, is applied to distributed storage system
System, the distributed memory system includes virtual disk creating device, which comprises
Step S101: the virtual disk creating device obtains creation instruction, and the creation instruction, which carries, to be created
The demand information of virtual disk.
In practice process, the creation instruction that virtual disk creating device obtains can be issued on computers by user,
Correspondingly, sending creation instruction for the ease of user, it is additionally provided with instruction sending unit on that computer, described instruction is sent
Process communication between unit and this virtual disk creating device.
Step S102: it according to the demand information in the virtual disk index information pre-established, chooses and the need
The target virtual disk of information matches is asked to configure index information, the virtual disk configuration index information is associated with creation virtual magnetic
The information for the configuration resource that disk needs.
In practice process, when virtual disk creating device provided in this embodiment obtains the desire carried for sending instruction
When the demand information of the virtual disk of creation, for the ease of quickly creating virtual disk by the demand information, in systems, in advance
First establishing has virtual disk index information, and the virtual disk index information is associated in advance with demand information.When virtual disk is created
After building device acquisition demand information, by being matched with virtual disk index information, it can be obtained creation virtual disk needs
Configuration resource information.
And distributed storage system provided in this embodiment includes multiple memory resource pools and multiple IP address resource pools, institute
It states memory resource pool and is stored with storage resource, the IP address resource pool is stored with IP address resource, and every for the ease of distinguishing
A resource pool, as a kind of preferable embodiment, each memory resource pool is respectively arranged with number, each IP address resource pool
It is respectively arranged with number.Correspondingly, the information of the configuration resource includes the number information and IP address money of memory resource pool
The number information in source pond.
Step S103: the information according to configuration resource associated by target virtual disk configuration index information is corresponding
Resource is configured, virtual disk is created.
During creating virtual disk, in order to improve the applicability of virtual disk provided in this embodiment, virtual magnetic
Disk is divided into the virtual disk of the virtual disk for exclusively enjoying IP address and shared IP address.Exclusively enjoy the virtual disk of IP address by IP
Location distinguishes, then described to match according to the target virtual disk during in creation, this exclusively enjoys the virtual disk of IP address
The corresponding configuration resource of information of configuration resource associated by index information is set, creates virtual disk, including according to the storage
The number information of resource pool obtains the associated storage resource of number information with the memory resource pool;It is provided according to the IP address
The number information in source pond obtains the associated IP address resource of number information with the IP address resource pool;It is provided according to the storage
Source and the address resource create virtual disk.
And the virtual disk of shared IP address is distinguished by port, then in the virtual magnetic for creating shared IP address
During disk, the information of configuration resource associated by the target virtual disk configuration index information according to selection,
Virtual disk is created, obtains including the number information according to the memory resource pool and is closed with the number information of the memory resource pool
The storage resource of connection;It obtains according to the number information of the port address resource pool and believes with the number of the port address resource pool
Cease associated port address resource;According to the storage resource and the port address asset creation virtual disk.
And in practice process, the type of service that the demand information includes at least the virtual disk to be created is believed
Breath, one of regional information, i.e., it can also be regional information that demand information, which can be service type information, can also be with
It both, then, can root during information creating virtual disk according to demand including service type information or including regional information
According to for example for developing, the service type informations such as administration create virtual disk, can also be only according to regional informations such as Guangzhou, Hong Kong
Create virtual disk, can also not only according to service type information, but also according to regional information create virtual disk.
For further instruction virtual disk creation method provided in this embodiment, as shown in figure 3, when the present embodiment mentions
When the demand information in user instruction that the virtual disk creating device of confession obtains is " Guangzhou " this regional information, then preparatory
It is matched in the virtual disk index information of foundation, obtains storing with the information of the associated configuration resource of the regional information
The number 1 of resource pool, the number 3 of IP address resource pool and the number 2 in port resource pond, then further according to the memory resource pool
Number, the number of IP address resource pool and the number in port resource pond, obtain storage resource, IP address resource and port
Address resource completes the creation of virtual disk.It certainly, can also by the table when demand information is " research and development " or " administration "
To obtain the information of configuration resource.
Virtual disk creation method provided in an embodiment of the present invention, passes through the void pre-established in distributed memory system
In quasi- disk index information, chooses the matched target virtual disk of the demand information obtained with virtual disk creating device and match
Index information is set, the information acquisition for the configuration resource that the associated creation virtual disk of index information needs is configured according to virtual disk
The mode for configuring resource, realizes quickly creation virtual disk, combinational logic layer is configured further through introducing, by underlying resource pond
It is decoupled with service logic, in the case of realizing same asset pond, supports more more flexible service applications by introducing configuration group
Logical layer is also decoupled by underlying resource pond and service logic, can not be to upper layer industry when realizing adjustment underlying resource pond
Business model and logic impact, and during the creation so as to improve the virtual disk of existing distributed memory system, need
User oneself is wanted to give virtual disk Match IP Address manually, the problem for causing the creation of virtual disk inefficient greatly mentions
High user experience.
As described in Figure 3, the creating device of a kind of virtual disk provided in an embodiment of the present invention, described device include that creation refers to
Enable obtaining unit 201, configuration index information obtaining unit 202 and virtual disk creating unit 203.The virtual disk wound
The realization principle for building device is identical with preceding method, and the embodiment of the present invention does not refer to place, may refer to preceding method embodiment
Middle corresponding portion.
Creation instruction obtaining unit 201, for obtaining creation instruction, the creation instruction carries the virtual magnetic to be created
The demand information of disk.
Index information obtaining unit 202 is configured, for indexing according to the demand information in the virtual disk pre-established
In information, chooses and configure index information, the virtual disk configuration index with the matched target virtual disk of the demand information
The information for the configuration resource that information association has creation virtual disk to need.
And in practice process, the demand information include in the demand information include at least it is described to be created it is virtual
One of the service type information of disk, regional information, then correspondingly, the configuration index information obtaining unit 202 includes:
First configuration index information obtains subelement, for being built according to the regional information for the virtual disk to be created in advance
The matched target of regional information with the virtual disk to be created is chosen in the vertical virtual disk index information
Virtual disk configures index information;
Second configuration index information obtain bullet cloud, for according to the service type information for the virtual disk to be created pre-
It is chosen in the virtual disk index information first established matched with the service type information of the virtual disk to be created
The target virtual disk configures index information;
Third configures index information and obtains subelement, for the regional information and service class according to the virtual disk to be created
Type information is chosen and the regional information of the virtual disk to be created in the virtual disk index information pre-established
Index information is configured with the matched target virtual disk of service type information.
Virtual disk creating unit 203, for according to configuration associated by target virtual disk configuration index information
The corresponding configuration resource of the information of resource creates virtual disk.During the creation of virtual disk, pass through for the ease of creation
What IP address distinguished exclusively enjoys the virtual disk of IP address, and the virtual disk creating unit 203 includes the first storage resource
Subelement is obtained, obtains for the number information according to the memory resource pool and is associated with the number information of the memory resource pool
Storage resource;IP address resource obtain subelement, for according to the IP address resource pool number information obtain with it is described
The associated IP address resource of the number information of IP address resource pool.
And for the ease of creating the virtual disk of shared IP address, the virtual disk creating unit 203 is deposited including second
It stores up resource and obtains subelement, obtain for the number information according to the memory resource pool and believe with the number of the memory resource pool
Cease associated storage resource;
Port address resource obtain subelement, for according to the port address resource pool number information obtain with it is described
The associated port address resource of the number information of port address resource pool.
As shown in Figure 1, a kind of distributed memory system provided in an embodiment of the present invention, the distributed memory system include
Virtual disk creating device 300, multiple memory resource pools 302, multiple IP address resource pools 301 and multiple port resource ponds
303;
The virtual disk creating device 300, for obtaining creation instruction, the creation instruction carries the void to be created
The demand information of quasi- disk;According to the demand information in the virtual disk index information pre-established, choose and the need
The target virtual disk of information matches is asked to configure index information, the virtual disk configuration index information is associated with creation virtual magnetic
The information for the configuration resource that disk needs;According to the information of configuration resource associated by target virtual disk configuration index information
Corresponding configuration resource creates virtual disk.
Distributed memory system provided in an embodiment of the present invention, it is virtual by what is pre-established in distributed memory system
In disk index information, chooses the matched target virtual disk of the demand information obtained with virtual disk creating device and configure
Index information is matched according to the information acquisition that virtual disk configures the configuration resource that the associated creation virtual disk of index information needs
The mode for setting resource, realize quickly creation virtual disk, further through introduce configure combinational logic layer, by underlying resource pond with
Service logic decoupling in the case of realizing same asset pond, supports more more flexible service applications by introducing configuration combination
Logical layer is also decoupled by underlying resource pond and service logic, can not be to upper-layer service when realizing adjustment underlying resource pond
Model and logic impact, and during the creation so as to improve the virtual disk of existing distributed memory system, need
User oneself gives virtual disk Match IP Address manually, and the problem for causing the creation of virtual disk inefficient greatly improves
User experience.
Referring to fig. 4, another virtual disk creating device 500 that the embodiment of the present invention also provides, comprising: processor 501,
Memory 502, bus 503 and communication interface 504, the processor 501, communication interface 504 and memory 502 pass through bus
503 connections;Processor 501 is for executing the executable module stored in memory 502, such as computer program.
Wherein, memory 502 may include high-speed random access memory (RAM:Random Access Memory),
It may further include non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.By extremely
A few communication interface 504 (can be wired or wireless) is realized logical between the system network element and at least one other network element
Letter connection, can be used internet, wide area network, local network, Metropolitan Area Network (MAN) etc..
Bus 503 can be isa bus, pci bus or eisa bus etc..The bus can be divided into address bus, number
According to bus, control bus etc..Only to be indicated with a four-headed arrow in Fig. 4, it is not intended that an only bus convenient for indicating
Or a type of bus.
Wherein, memory 502 is for storing program, and the processor 501 executes the journey after receiving and executing instruction
Sequence, method performed by the device that the stream process that aforementioned any embodiment of the embodiment of the present invention discloses defines can be applied to handle
In device 501, or realized by processor 501.
Processor 501 may be a kind of IC chip, the processing capacity with signal.It is above-mentioned during realization
Each step of method can be completed by the integrated logic circuit of the hardware in processor 501 or the instruction of software form.On
The processor 501 stated can be general processor, including central processing unit (Central Processing Unit, abbreviation
CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (DSP), dedicated
Integrated circuit (ASIC), ready-made programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor
Logical device, discrete hardware components.It may be implemented or execute disclosed each method, step and the logic in the embodiment of the present invention
Block diagram.General processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with this hair
The step of method disclosed in bright embodiment, can be embodied directly in hardware decoding processor and execute completion, or be handled with decoding
Hardware and software module combination in device execute completion.Software module can be located at random access memory, flash memory, read-only memory,
In the storage medium of this fields such as programmable read only memory or electrically erasable programmable memory, register maturation.This is deposited
Storage media is located at memory 502, and processor 501 reads the information in memory 502, and the step of the above method is completed in conjunction with its hardware
Suddenly.
It should be noted that the technical effect of device provided by the embodiment of the present invention, realization principle and generation is with before
It is identical to state embodiment of the method, to briefly describe, Installation practice part does not refer to place, can refer to phase in preceding method embodiment
Answer content.
It should be noted that in several embodiments provided herein, it should be understood that disclosed system, dress
It sets and method, may be implemented in other ways.The apparatus embodiments described above are merely exemplary, for example, institute
The division of unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation.
It should be noted that the unit as illustrated by the separation member may or may not be it is physically separate
, component shown as a unit may or may not be physical unit, it can and it is in one place, or can also
To be distributed over a plurality of network elements.Some or all of unit therein can be selected to realize this reality according to the actual needs
Apply the purpose of a scheme.In addition, the functional units in various embodiments of the present invention may be integrated into one processing unit,
It is also possible to each unit to physically exist alone, can also be integrated in one unit with two or more units.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.