Method and device for constructing distributed file storage framework
A technology of distributed files and construction methods, which is applied in the construction field of distributed file storage architecture, can solve problems such as duplicate files, and achieve the effect of avoiding redundant duplicate files
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0017] This embodiment provides a method for constructing a distributed file storage framework. Refer below figure 1 , detailing the method, which includes:
[0018] Step S101: select a file;
[0019] Step S102: performing Hash calculation on the file content of the file to obtain the file identifier of the file;
[0020] Wherein, the HASH value of the file is obtained by performing Hash calculation on the file content to obtain the file identifier of the file, for example, calculated by methods such as MD5, SHA-1, SHA-2, and SHA-256;
[0021] Step S103: Construct a distributed file storage framework for files according to the file identifier.
[0022] Such as figure 2 As shown, the distributed file storage architecture includes a super block layer (super block), an index node matching layer (IMAP, inode map), an index node layer (inode) and a data block layer (datablock). Among them such as image 3 As shown in , the inode matching layer is used for matching between th...
Embodiment 2
[0029] This embodiment further describes in detail the construction method of the distributed file storage framework according to Embodiment 1 through writing operations. see Figure 5 , the method includes:
[0030] Step S501: The client calculates the HASH value based on the content of the file to be written to the storage node, and transmits the HASH value of the file to the metadata server. The HASH value of the file can be passed through MD5, SHA-1, SHA-2, SHA- 256 and other methods to calculate;
[0031] Step S502: the metadata server obtains the HASH value of the file;
[0032] Step S503: The metadata server constructs an index node matching layer (IMAPTree) according to the HASH value of the file, and simultaneously constructs a super block layer, an index node layer, and a data block layer; wherein, the index node matching layer includes a plurality of IMAP tables, using a B+ tree To build, the key value of the IMAP table is the file HASH value, and the value is th...
Embodiment 3
[0038] This embodiment provides a device for constructing a distributed file storage framework. Such as Figure 6 As shown, the device 600 includes:
[0039] The file identifier obtaining module 601 is used for performing Hash calculation on the file content of the file to obtain the file identifier of the file; the file identifier is the HASH value of the file, which is obtained through MD5, SHA-1, SHA-2, SHA-256 and other calculations.
[0040] The framework construction module 602 is configured to construct a distributed file storage framework according to the file identification. Such as figure 2 As shown, the distributed file storage architecture includes a super block layer (super block), an index node matching layer (IMAP, inode map), an index node layer (inode) and a data block layer (data block). Among them such as image 3 As shown in , the inode matching layer is used for matching between the file identifier and the inode of the file, and the inode layer is use...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 