Embodiment
The embodiment of the invention provides a kind of distributed storage method, and the embodiment of the invention also provides corresponding distributed storage devices and distributed memory system.Below be elaborated respectively.
See also Fig. 1, the embodiment of the invention provides an embodiment of distributed storage method, specifically comprises:
101, the amount of physical memory with all memory nodes cuts at least two physical blocks, the set of all physical blocks is videoed into the memory resource pool of a logic;
Storage system is that the process of logical volume distribution amount of physical memory is static at present, when creating logical volume, just distribute amount of physical memory for each logical volume, if can adopt dynamic method distribution according to need amount of physical memory, undoubtedly, will greatly improve the utilance of amount of physical memory, thereby not increase the capacity that increases storage system under the condition of cost.And to adopt dynamic, the demand assigned method just must be virtual with storage system.
The first step of the Storage Virtualization that the embodiment of the invention is carried out is: the amount of physical memory of all memory nodes is cut at least two physical blocks, the set of all physical blocks is videoed into the memory resource pool of a logic, thereby shielded the difference between the memory node, made up a unified memory resource pool.
Need to prove that aforementioned " amount of physical memory of all memory nodes " refer to total amount of physical memory that the amount of physical memory unification by each memory node constitutes.
Make up memory resource pool detailed process can for: at first the amount of physical memory with all memory nodes is divided at least two physical blocks, again these physical blocks are videoed into logical block, these logical blocks are got up with a data structure organization, just can construct the memory resource pool of a logic.Storage system is divided at least two physical blocks with the amount of physical memory of all memory nodes, is specifically as follows: the amount of physical memory of all memory nodes is divided into anisometric at least two physical blocks; Perhaps in order to improve the processing speed that makes up memory resource pool, the amount of physical memory of all memory nodes such as is divided at least two big physical blocks, for example the amount of physical memory of 1TB is divided into the physical block of 1000 1GB, 1000 logical blocks are arranged in the memory resource pool that constructs, when need using resource, pick out logical block in the memory resource pool and use.
102, on memory resource pool, set up virtual volume, and be each dummy block will in the virtual volume set up and memory resource pool in logical block between mapping relations;
Second step of the Storage Virtualization that the embodiment of the invention is carried out is: set up the virtual volume of storage system on memory resource pool, have mapping relations between each dummy block will in the virtual volume and the logical block in the memory resource pool.
Set up the mapping table between virtual volume and the logical volume, the expression dummy block will is to the mapping relations of logical block (piece in the storage pool), but do not distribute amount of physical memory, the foundation of virtual volume makes storage system just not be used in when not storing in advance for each client provides amount of physical memory, and the amount of physical memory that storage system provided that each client is seen is actually the virtual disk of setting up on virtual volume.
103, deposit each object in memory resource pool, be the mapping relations of the logical block of each Object Creation and memory resource pool, and physical block is distributed to the logical block that each and object have mapping relations according to the capacity of each object;
When the some clients in the multi-client are stored data on virtual volume in the presence of all, data are divided at least two objects, deposit each object in memory resource pool, be the mapping relations of the logical block of each Object Creation and memory resource pool, and physical block distributed to the logical block that each and object have mapping relations according to the capacity of each object.
Above-mentioned mode for logical block distribution physical block makes amount of physical memory only just distribute in use, storage system can be according to the required amount of physical memory of user, the distribution amount of physical memory of dynamic flexible, the amount of physical memory that is assigned with is not changeless, improved the utilance of amount of physical memory, and above-mentioned mode for logical block distribution physical block also makes the user avoid buying temporary transient unwanted memory device, has saved the administrative effort that the user buys those estimated expenditures that also unwanted space spent and manages these temporary transient unwanted spaces greatly; Simultaneously, the minimizing of memory device quantity also makes storage system environmental protection more.
In this step, mapping relations for the logical block of each Object Creation and memory resource pool, be specifically as follows: with big granularities such as object are divided into, such as 8KB, set up a mapping table, a list item of every 8KB correspondence mappings table, write down on the data of certain 8KB on certain logical block that this 8KB is mapped to memory resource pool the inside, begin on the logical block 2 of memory resource pool the 3rd of storage to 16KB above the 8KB such as, object 1 from 8K.
104, be stored as mapping relations each Object Creation and logical block memory resource pool.
Be mapping relations each Object Creation and logical block memory resource pool in the storage system storing step 103, the operation to data all will be retrieved as mapping relations each Object Creation and logical block memory resource pool at every turn.
Optionally, storage system can be stored as mapping relations each Object Creation and logical block memory resource pool in memory resource pool, that is to say, will be in the same place with each object storage for the mapping relations with logical block memory resource pool each Object Creation.
Perhaps, optionally, storage system can also separate, stored be mapping relations each Object Creation and logical block memory resource pool, separate, stored be meant with for the mapping relations of each Object Creation and logical block memory resource pool and storage at different amount of physical memory, thereby caused the logical view of data and Physical View to be separated, will be for the mapping relations of each Object Creation and logical block memory resource pool and each object storage together the time in storage system, the operation to data all will be retrieved as mapping relations each Object Creation and logical block memory resource pool at every turn.When the frequent generation of operation, just become the bottleneck of whole storage system, limited the autgmentability of storage system, and the storage system separate, stored is mapping relations each Object Creation and logical block memory resource pool, can solve the scalability problem of storage system for the memory space of the mapping relations of each Object Creation and logical block memory resource pool by increasing separate, stored, specific implementation can for: will for the mapping relations with logical block memory resource pool each Object Creation be stored in another storage system or with the logical volume of the separate same storage system of memory resource pool.
In the present embodiment, object storage is in the resource storage pool, amount of physical memory has only in the time of storage object, just distribute to the resource storage pool, thereby can be according to the required amount of physical memory of user, the distribution amount of physical memory of dynamic flexible, improved the utilance of amount of physical memory, and since in the prior art to as if be stored on the file system, being equivalent to data need just can be stored on the disk via file system, and in the present embodiment, to as if be stored on the memory resource pool, directly just be stored on the disk, removed the file system link, reduced the complexity of storage system.
In the above-described embodiments, when the client-access data, operating system in the storage system can be according to the mapping relations that are each Object Creation and logical block memory resource pool of these data, and each object that obtains these data is positioned at the particular location of memory resource pool, thus reading of data.
In the above-described embodiments, memory node can be storage area network network (SAN, Storage Area Network) memory device in the array, memory device in the SAN array is a smart machine, also can be referred to as object-based memory device (OSD, Object-based Storage Device), each OSD has the storage medium of oneself, processor, internal memory and network system, OSD is provided object interface, make in the data write process, memory node can pass through OSD object interface and client direct communication, will for the mapping relations separate, stored of each Object Creation and logical block memory resource pool meta data server (Metadata Server, MDS) in.Mapping relations with logical block memory resource pool each Object Creation are metadata, and meta data server comprises catalogue formation, the pairing OSD of each data etc. for client provides the logical view of data.In traditional SAN array, metadata is responsible for maintenance by the file server in the SAN array, all will obtain metadata to the operation of data at every turn.When the frequent generation of operation, metadata operation just becomes the bottleneck of whole storage system, has limited the expansion of performance.But the memory device in the SAN array is OSD, the OSD object interface externally is provided, because each operation is for once to the visit of metadata, concrete transfer of data is all undertaken by directly being connected with client by OSD, significantly reduced the operation of metadata, reduced the burden of meta data server, by increasing the scaling concern that meta data server solves the SAN array.
Need to prove that memory node also can be the network storage equipment (NAS, Network Attached Storage).
Consult Fig. 2, the embodiment of the invention also provides an embodiment of distributed storage devices, and the distributed storage devices 20 in the present embodiment can be applicable in the foregoing description, and carrying out above-mentioned is method among the embodiment.
Distributed storage devices 20 in the present embodiment comprises:
Make up storage resources pool unit 201, be used for the amount of physical memory of all memory nodes is cut at least two physical blocks, the set of all physical blocks is videoed into the memory resource pool of a logic;
Set up virtual volume unit 202, be used on memory resource pool, setting up virtual volume;
Distribute amount of physical memory unit 203, be used for when client is stored data on virtual volume, data are divided at least two objects, each object is write memory resource pool, be the mapping relations of the logical block of each Object Creation and memory resource pool, and physical block distributed to the logical block that has mapping relations with each object according to the capacity of each object;
Storage Mapping concerns unit 204, is used to be stored as mapping relations each Object Creation and logical block memory resource pool.
Optionally, Storage Mapping concerns that unit 204 specifically is used for separate, stored and is mapping relations each Object Creation and logical block memory resource pool.
Optionally, Storage Mapping concern unit 204 specifically be used for be stored in for the mapping relations with logical block memory resource pool each Object Creation another storage system or with the logical volume of separate this storage system of memory resource pool.
Optionally, making up storage resources pool unit 201 specifically is used for the amount of physical memory of all memory nodes is cut at least two physical blocks that grade is big, each physical block is mapped to logical block, and all logical blocks get up with data structure organization, construct the memory resource pool of a logic.
In the present embodiment, memory node can be the memory device in the storage area network network SAN array, and the memory device in the SAN array is based on the memory device (OSD, Object-based Storage Device) of object, and the OSD object interface externally is provided.
In the present embodiment, distribute amount of physical memory unit 203 with object storage in the resource storage pool, and amount of physical memory has only in the time of storage object, just distribute to the resource storage pool, thereby can be according to the required amount of physical memory of user, the distribution amount of physical memory of dynamic flexible has improved the utilance of amount of physical memory.
Consult Fig. 3, the embodiment of the invention also provides an embodiment of distributed memory system, and the distributed memory system in the present embodiment can be applicable in the foregoing description, carries out the method in the foregoing description.
Distributed memory system in the present embodiment comprises: at least one client 301, at least one memory node 302 and distributed storage devices 303;
Distributed storage devices 303 in the present embodiment is identical with distributed storage devices 20 in the foregoing description.
Optionally, distributed memory system also comprises meta data server 304, and meta data server 304 is used for separate, stored distributed storage devices 304 and is mapping relations each Object Creation and logical block memory resource pool.
In the distributed memory system that present embodiment provides, the quantity of meta data server 304 can be at least one, so just can solve the problem of the autgmentability of distributed memory system system.Memory node in meta data server 304 and the distributed storage devices 303 is separate.
Optionally, memory node 302 is specially the memory device in the storage area network network SAN array, and the memory device in the SAN array is based on the memory device OSD of object, the OSD object interface externally is provided, under this application scenarios, meta data server 304 provides the logical view of data for client, comprise that catalogue constitutes, the pairing OSD of each data etc., when client 301 access objects, at first send request to meta data server 304, meta data server 304 is according to the metadata of reflection object to the mapping relations of logical block, and the information such as particular location that object are positioned at memory resource pool send to client 301; After this be positioned at the particular location of memory resource pool according to object, client 301 just directly sends request to the memory node 302 that stores this object and reads and writes data, and does not need with meta data server 304 mutual.
It is the important component part of storage system that network connects.It couples together client 301, meta data server 304 and memory node 302.The continuous progress of network technology makes the network ways of connecting that more more options arranged.Gigabit Ethernet has performance height, cost performance height, be easy to advantage such as management, therefore become to make up the first-selection of storage system.Along with the maturation of optical-fibre channel technology and the reduction of cost, use also more and more widely.In addition, various new network technologies also constantly occur, and as network technologies such as Myrinet, Infiniband, all have higher performance.Especially Infiniband, constantly the performance of expansion makes it have very strong competitiveness.
In the present embodiment, distributed storage devices 303 can be with object storage in the resource storage pool, and amount of physical memory has only in the time of storage object, just distribute to the resource storage pool, thereby can be according to the required amount of physical memory of user, the distribution amount of physical memory of dynamic flexible has improved the utilance of amount of physical memory.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of the foregoing description is to instruct relevant hardware to finish by program, this program can be stored in the computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
More than distributed storage method, distributed storage devices and distributed memory system that the embodiment of the invention provided are described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.