A kind of method for managing resource of distributed objects storage system
Technical field
A kind of the present invention relates to field of cloud computing computer data distributed objects storage, more particularly to cloud computing environment
The method for managing resource of lower distributed objects storage system.
Background technology
Under cloud computing environment, the storage of data is an extremely important problem.Legacy network storage is broadly divided into three
Kind:Directly additional storage (Direct Attached Storage, DAS), storage area network (Storage Area Network,
) and network attached storage (Network Attached Storage, NAS) SAN.But, DAS is not suitable for large-scale data and deposits
Storage;And for SAN and NAS, with the increase of data scale, meta data server readily becomes the bottleneck of whole system.
Relative to heritage storage system, new distributed objects storage system (Object-Based Storage, OBS)
Can solve the above problems well.OBS is there is provided a traditional file-sharing with NAS system and the list of the characteristics of management
System image (single-system-image) file system, and improve the resource consolidation of SAN and extendible performance.With
The block-oriented logical block of tradition is different, and object storage does not provide the access to incoherent data block, and it is allowed by storage
Object come access correlation data block.Storage object is a pseudo-entity, and it is that a client thinks one group of related data,
Similar to the bit stream file that the size in flat file system is not limited, but object is different from file again, and it simply has attribute
Bit sequence.Although object is both different and data block, also different from file, file can be realized by the definition of Object Semanteme
Or the input/output of data block, therefore, the unification of file input/output and data block input/output by object implementatio8.
Management point two parts of object storage:Server and object storage destination end (Object-based Storage
Target, OST).The memory space of all storage destination ends is virtually unified memory space by server, while being responsible for user
NameSpace management, after certification user's request, distribute to its unique object ID, and realize user by certain algorithm
Mapping of the NameSpace to memory space.OST is responsible for the management of coupled storage device, and it does not have object naming space,
Only planar object ID space, OST are distributed memory space in storage device according to object ID or access storage object.
Safety of the object storage by credit assurance all operations, credit include allowing the operation set and integrity of client to compile
Code.To each offer credit simple to operate, even if credit is not encrypted, protection (due to Integrity Code) can be also provided, because not
A reliable credit may be provided for an operation accidentally.In order to provide safety, to some form of encipherment protection of credit it is
It is necessary.Object storage provides safety and protection to be in object level rather than entirely rolls up level, therefore allows incredible client position
In storage network, and share and access data storage is allowed without accessing the data of whole volume.As client directly can not visit
Ask positioning metadata, it is possible to provide extra protection, because can not possibly wrong configuration and anthelmintic main frame destruction positioning metadata.
Additionally, object storage architecture both provides safety in each rank:Storage system is to storage device
Certification;Certification of the storage system to calculate node;Certification of the storage system to calculate node order;All order all Jing CRC
The integrity checking of (Cyclic Redundancy Check, CRC);Data and order are via the privately owned of IP
Property.Such level of security to user with confidence can they can efficiently be managed and easily be accessed network with more economical.Cause
This, distributed objects storage is a kind of high performance, safe mass data storage technology.
Object storage system is had been achieved for very in terms of mass data storage, performance, data sharing and extensibility
Big achievement, and obtained being widely recognized as industry.If Panasas companies are global first hand OSD (Object-based
Storage Device, object storage device) product provider, while provide it is OO storage and parallel file system
System.HP with open source code producer Lustre file system cooperations, using OSD as the expansible texts of HP StorageWork
The pith of part system.
In distributed objects storage system, all operations of data object are required for accessing metadata, extreme at some
In the case of, system occupies most data access time to the access times of metadata, consequently, it is possible to becoming system for restricting
The bottleneck of performance.So, efficient metadata management method provides high-performance and high scalability to pass to whole storage system
It is important.Meanwhile, the memory capacity of large-scale distributed storage system is often dynamic change, needs to be continuously increased new storage
Node, eliminates old memory node, and it is adaptive, balanced that high scalability, high manageability require that data object can be realized
Distribution, to ensure distribution always load balancing of the data object in whole storage system.
The content of the invention
Goal of the invention:The technical problem to be solved is for the deficiencies in the prior art, there is provided a kind of distributed
The method for managing resource of object storage system, to realize efficient metadata organization, positioning and access control, and data respectively
The dynamic load leveling of object distribution.
In order to solve above-mentioned technical problem, the invention discloses a kind of resource management side of distributed objects storage system
Method, the distributed objects storage system is by the separated from meta-data of the store path attribute of file and file, store path attribute
The store path title being located including file and corresponding path access controlled attribute, the metadata of file include filename, wound
Time, modification time and file size are built in interior access attribute;
The distributed objects storage system includes that store path index server, meta data server and object storage set
It is standby, wherein, store path index server be system in all store paths set up index entry, each index entry include SPID and
Store path attribute, wherein, SPID is the globally unique storage that store path index server distributes for store path
Path ID;Object storage devices of the meta data server positioning store path ID corresponding to the store path object of SPID;
The distributed objects storage system sets up SPID on store path index server with meta data server
Mapping table, and meta data server mapping table is divided into into master metadata server mapping table and from meta data server mapping table,
Wherein master metadata server mapping table is to map the hashed value of SPID with meta data server, is then directly will from mapping table
SPID values are mapped with meta data server;
The distributed objects storage system by SPID as index entry in store path index server major key,
According to SPID and the corresponding different meta data server of the mapping table of meta data server positioning file metadata;Metadata takes
The metadata information calculation document metadata of hashed value and store path object corresponding bucket object of the business device according to filename, and
This barrel of object is determined in object storage device.
In the present invention, new files metadata is comprised the following steps:
Step 1:Store path index server obtains the store path and corresponding access-control attributes of file, and records
In index entry;
Step 1a, store path index server obtain the store path of file and corresponding path access controlled attribute;
Step 1b, store path index server check store path access-control attributes, confirm whether user has newly-built
The authority of file metadata;
If step 1c, user have a new files metadata authority, store path index server by store path and
Corresponding access-control attributes are recorded in index entry, are otherwise terminated;
Step 2:Store path index server is that store path distributes SPID, and is recorded in index entry;
Step 3:The corresponding meta data server of positioning file metadata, file metadata storage is deposited to corresponding object
On storage equipment;
Step 3a, the mapping table for setting up SPID and meta data server on store path index server, wherein master reflect
Firing table is to map the hashed value of SPID and meta data server, is then directly by SPID values and meta data server from mapping table
Mapping;
Step 3b, according to SPID and meta data server mapping table positioning master metadata server and from Metadata Service
Device;
Step 3c, meta data server positioning store path ID are set for the object storage at the store path object place of SPID
It is standby;
Step 3d, filename is converted into into integer, according to its hashed value and the metadata information of store path object
The corresponding bucket object ID of calculation document metadata, determines this barrel of object in object storage device according to bucket object ID;
Step 3e, by file metadata store in the bucket object.
In the present invention, access file metadata and comprise the steps:
Step 4:File is decomposed into into store path and filename two parts;
Step 5:Store path index server obtains the access-control attributes and its SPID of store path
Step 5a, client have searched whether cache entry in local cache;
Step 5b, if it is not, client access store path index server, if it has, then client according to delay
Credit balance determines the bucket object of storage metadata, directly accesses metadata;
Step 5c, store path index server whether there is index entry according to the retrieval of the hashed value of store path, if
Exist, then check whether user there are access rights, if it does not exist, then terminating;If had permission, the visit in index entry is returned
Controlled attribute and SPID is asked, is otherwise terminated;
Step 5d, client obtain the index entry for returning, and save it in local caching;
Step 6:Client obtains the metadata of file;
Step 6a, client have searched whether cache entry in local cache;
Step 6b, if it is not, determining master metadata server according to the hashed value of SPID, access main metadata service
Device, if it has, then client determines the bucket object of storage metadata according to cache entry, directly accesses metadata;
Whether step 6c, master metadata server have the store path object that store path ID is SPID in searching caching,
If it did not, reading the store path object from object storage device according to SPID, otherwise, master metadata server is directly true
Surely store the bucket object of metadata;
Step 6d, filename is converted into into integer, according to its hashed value and the metadata information of store path object
The bucket object ID that calculation document metadata is located, if this barrel of object is deposited from object according to bucket object ID not in local cache
This barrel of object is read in storage equipment;
Step 6e, client obtain the metadata of file from bucket object;
If step 6f, master metadata server overload, from store path index server obtain light load from unit
Data server, the file metadata inquired about from meta data server required for obtaining;
Step 6g, client are stored in the metadata item of acquisition in local caching.
In the present invention, in currently stored path during newly-built catalogue, build new store path access-control attributes include with
Lower step:
Step 7, user inquire about the access-control attributes in currently stored path, confirm whether user has the power of newly-built catalogue
Limit, if had permission, execution step 2 otherwise terminates;
Step 8, user set the access rights attribute of newly-built catalogue;
The access rights attribute of step 9, the access-control attributes according to currently stored path and newly-built catalogue, construction are new
The access-control attributes of store path.
Present invention achieves the method for managing resource of distributed objects storage system, with advantages below:
1st, efficient metadata organization, positioning and access control are realized;
2nd, realize the high-efficiency management to data resources such as objects in system.
3rd, the problems such as solving mass data storage system resource management and be difficult, it is ensured that data under cloud storage environment
Safety.
Description of the drawings
With reference to the accompanying drawings and detailed description the present invention is done and is further illustrated, the present invention's is above-mentioned
And/or otherwise advantage will become apparent.
Fig. 1 is store path object internal structure.
Fig. 2 a and Fig. 2 b is respectively the master and slave mapping tables of MDS.
Fig. 3 is the flow chart for creating new file metadata.
Fig. 4 is the flow chart for accessing file metadata.
Fig. 5 is object resource management work content.
Specific embodiment
The characteristics of present invention is stored for distributed objects under cloud computing environment, it is proposed that a kind of distributed objects storage
Method for managing resource.
(1) metadata management
File and data separate management, metadata information and the real data read-write of file system are divided by object storage system
From alleviating the metadata live load of system, improve the overall performance of system.The present invention is by store path attribute and file
Metadata further separate, store path attribute include file be located store path title and corresponding path access control
Attribute, the metadata of file include the access attributes such as filename, creation time, modification time, file size.Directory attribute is by depositing
Storage path indexing server (Storage Path Index Server, SPIS) concrete management, is all storage roads in system
A globally unique store path ID is distributed in footpath.Directory attribute in store path index server includes:
●SPID:Represent globally unique store path ID;
●ACp:Represent the access-control attributes of the store path;
●StoragePath:Represent the store path name.
When createing directory every time, SPIS records the path access controlled attribute for obtaining in current index entry, in the mesh
Record is lower when creating new catalogue, it is no longer necessary to traversal above catalogue, only need recurrence use current path access controlled attribute with
The access-control attributes of newly-built catalogue file can build new store path access-control attributes.SPID is indexed for store path
File metadata under the major key indexed in server, store path is distributed to different first numbers by the hashed value of SPID
According to server (Metadata Server, MDS).This method arbitrarily can change file road under the conditions of SPID is immovable
Directory name and access rights in footpath, it is to avoid as the modification of directory name and access rights causes the unit of file under the store path
Data update, so as to it also avoid substantial amounts of metadata migration.
Meta data server is mainly responsible for storage and manages the metadata of data file, and these metadata are included in one kind
Referred to as in the logical structure of store path object (Storage Path Object, SPO).SPO is big comprising one or more fixations
The entry of little bucket (Bucket) object, file of each Bucket object comprising fixed qty or catalogue file metadata
Entrance (Entry), each Entry then include whole metadata of a certain file.In the original position of store path object
Comprising the metadata for describing the store path object properties, the internal structure of store path object is as shown in Figure 1.
Generally hashed in different MDS according to the value of statistical indicant of file using static hash method.The present invention combine dictionary with
Hashing, sets up the mapping table of SPID and MDS on SPIS, and MDS mapping tables is divided into main MDS mapping tables and is mapped from MDS
Table, wherein main mapping table are to map the hashed value of SPID with MDS, are then directly to map SPID values with MDS from mapping table.From
The purpose of mapping table is to prevent from transshipping the extreme case for accessing.Master and slave mapping table is as shown in Figure 2 a and 2 b.
The flow process of new files metadata is as follows, and its flow chart is as shown in Figure 3:
Step one:SPIS obtains the store path and corresponding access-control attributes of file, and records in index entry;
, SPIS obtain file the corresponding access-control attributes of store path;
, SIPS inquiry store path access-control attributes, confirm whether user has the authority of new files;
If, user have a new files authority, store path and corresponding access-control attributes record are existed by SPIS
Index entry, otherwise terminates.
Step 2:SPIS is that store path distributes SPID, and is recorded in index entry;
Step 3:The corresponding MDS of positioning file metadata, file metadata is stored on corresponding OSD;
, set up the mapping table of SPID and MDS on SPIS, wherein main mapping table is to reflect the hashed value of SPID with MDS
Penetrate, be then that directly SPID values are mapped with MDS from mapping table;
, determine main MDS according to SPID and MDS mapping tables and from MDS;
, MDS positioning store path ID for SPID the OSD that is located of store path object;
, filename is converted into into integer, calculated according to its hashed value and the metadata information of store path object
The corresponding bucket object ID of file metadata, determines this barrel of object in OSD according to bucket object ID;
, the metadata of file stored in bucket object.
The flow process for accessing file metadata is as follows, and its flow chart is as shown in Figure 4:
Step one:File is decomposed into into store path and filename two parts;
Step 2:SPIS obtains the access-control attributes and its SPID of store path:
, client searched whether cache entry in local Cache;
, if it is not, client access SPIS, if it has, then client according to cache entry determine storage metadata
Bucket object, directly access metadata;
, SPIS according to the hashed value quick-searching of store path whether there is index entry, if it is present check user
Whether access rights are had, if it does not exist, then terminating;If it has, the access-control attributes and SPID in index entry are then returned, it is no
Then terminate;
If, client obtain return index entry, save it in local Cache;
Step 3:Client obtains the metadata of file;
, client searched whether cache entry in local Cache;
, if it is not, determining main MDS according to the hashed value of SPID, access main MDS, if it has, then client according to
Cache entry determines the bucket object of storage metadata, directly accesses metadata;
, main MDS whether have the store path object that store path ID is SPID in searching Cache, if it did not, according to
SPID reads the store path object from OSD, and otherwise, master metadata server directly determines the bucket object of storage metadata;
, filename is converted into into integer, calculated according to its hashed value and the metadata information of store path object
The bucket object ID that file metadata is located, if this barrel of object reads the bucket according to bucket object ID from OSD not in Cache
Object;
, client obtain the metadata of file from bucket object;
If, main MDS overloads, from SPIS obtain light load from MDS, the file inquired about from MDS required for obtaining
Metadata;
, client is stored in the metadata item of acquisition in local caching Cache.
(2) object resource management
In object storage system, used as a kind of resource, needs are reasonably managed and are operated object data, so as to carry
High object storage system performance and resource utilization.
The management of object is mainly managed including object resource, object basic operation management, object performance management etc., every tool
Body running content is as shown in Figure 5.In object resource management, scale and power of the object storage system according to memory node in system
Unit interval is divided into the different interval of length by value, and between these interval and memory nodes sets up mapping relations.Pass through
Data object is mapped to be evenly distributed on unit interval [0,1) in set of random numbers in, according to mapping determine data object
Storage location, so as to realize object data balanced storage in systems.
Embodiment
(1) metadata management
In terms of metadata management relates generally to metadata positioning and file access control attribute management two.
The basic step of metadata positioning action is when client needs to access data file, it is necessary first to accessed
SPIS, inquiry will access the access-control attributes and SPID of the store path of file.If access rights, then root is needed
Hash calculating is carried out according to SPID, the main MDS of storage file metadata is determined.In the case of normal access, by inquiring about main MDS it is
File metadata required for can obtaining, if main MDS overloads, from SPIS obtain light load from MDS, inquire about from MDS
File metadata required for obtaining.As a example by accessing the metadata of file/home/src/test/HelloWorld.Java,
Illustrate specific access process.
Step one:Following file/home/src/test/HelloWorld.java is decomposed into into store path/home/
Src/test/ and filename HelloWorld.java two parts;
Step 2:Obtain the access-control attributes and its SPID of store path/home/src/test/;
, searched whether cache entry in local Cache;
, if it is not, access SPIS;
, SPIS index entry whether there is according to the hashed value quick-searching of/home/src/test/, if it is present
Check whether user there are access rights;If it has, then returning the access-control attributes and SPID in index entry;
If, obtain return index entry, save it in local Cache;
Step 3:Obtain the metadata of file HelloWorld.java;
, searched whether cache entry in local Cache;
, if it is not, determining main MDS according to the hashed value of SPID, access main MDS;
, main MDS whether have the store path object that store path ID is SPID in searching Cache, if it did not, according to
SPID reads the store path object from OSD;
, HelloWorld.java is converted into into integer, according to its hashed value and the metadata of store path object
Information calculates the Bucket object IDs that HelloWorld.java is located, if the Bucket objects are not in Caehe, from OSD
Read the Bucket objects;
, obtain the metadata of HelloWorld.java from Bucket objects;
If, main MDS overloads, from SPIS obtain light load from MDS, the file inquired about from MDS required for obtaining
Metadata;
, the metadata item of acquisition is stored in local Cache.
The basic operation process of file access control attribute management is by the access-control attributes of file itself and place
Store path access-control attributes separate management.During the access-control attributes of construction store path, new catalogue is created every time all
The path access controlled attribute that will be obtained is needed to record in current index entry.When creating new subdirectory under the catalogue, only
Need to visit with reference to building new store path by current path access controlled attribute and the access-control attributes of newly-built catalogue
Controlled attribute is asked, and without the need for traveling through each layer catalogue above.The benefit of this method is, it is only necessary to can inquiry text by SPIS
The store path access-control attributes of part, need not travel through all catalogues in file place path, substantially increase metadata access
Efficiency.When the following is newly-built catalogue test under catalogue/home/src, the access control of store path/home/src/test is constructed
Attribute process processed is as follows:
Step one:User inquires about the access-control attributes of store path/home/src, the access control of acquisition/home/src
Attribute processed is:Rwxr-xr-x, i.e. user have the authority of newly-built catalogue;
Step 2:User set the access rights attribute of newly-built catalogue test as:rwxr-r-;
Step 3:According to access-control attributes and the access rights of newly-built catalogue test of store path/home/src
Attribute, construct store path/home/src/test access-control attributes be:rwxr-r-.
(2) object resource management
Object resource management is mainly concerned with the resource allocation of data object, data object operation, systematic function monitoring, money
The contents such as source recovery, which comprises the following steps that:
Step one:Object storage system receives the object resource application from user, and application information includes that resource requirement is big
It is little.Resource requirement size in resource bid and itself storage capacity are contrasted by object storage system, if storage resource
Abundance, then for applying for distribution object resource, otherwise produce inadequate resource alarm.
Step 2:During object storage distribution object resource, it is that data object x produces the overall situation by linear hash function H (x)
Unique ID, and be mapped to randomly generate be evenly distributed on unit interval [0,1) on set of random numbers on.
Step 3:Object storage system by unit interval [0, l) be divided into such as dried fruitss Uncrossed separate portions.Pass through
Relatively in storage system, the weight of all memory nodes, between interval and memory node sets up mapping relations, is mapped to same
The interval of individual memory node constitutes an interval domain, and the interval in interval domain is carried out according to the order that interval left margin is incremented by
Arrangement, in each interval domain, all siding-to-siding block length sums represent the weight of memory node.
Step 4:The mapping range belonging to random number and interval domain corresponding to object storage system searching data object x,
Corresponding memory node is uniquely determined by interval domain, and by data object x storages to corresponding memory node.
Step 6:In object storage system running, system is monitored to itself storage performance, and generates performance
Record data.If systematic function is less than predetermined threshold, object storage system sends alarm.
Step 5:If user submits the request of operation object resource to, object storage system is according to user's request to object
Resource carries out associative operation.For example, if user submits to the deletion action to data object x, object to store according to object x institutes
Memory node is determined in interval domain, delete data object x, and discharge corresponding storage resource from the memory node.
The invention provides a kind of method for managing resource of distributed objects storage system, implements the technical scheme
Method and approach are a lot, and the above is only the preferred embodiment of the present invention, it is noted that common for the art
For technical staff, under the premise without departing from the principles of the invention, can also make such as dried fruitss improvements and modifications, these improve and
Retouching also should be regarded as protection scope of the present invention.In the present embodiment, clearly each ingredient not can use prior art in addition real
It is existing.