WO2011140991A1 - 分布式文件系统的文件处理方法及装置 - Google Patents

分布式文件系统的文件处理方法及装置 Download PDF

Info

Publication number
WO2011140991A1
WO2011140991A1 PCT/CN2011/073986 CN2011073986W WO2011140991A1 WO 2011140991 A1 WO2011140991 A1 WO 2011140991A1 CN 2011073986 W CN2011073986 W CN 2011073986W WO 2011140991 A1 WO2011140991 A1 WO 2011140991A1
Authority
WO
WIPO (PCT)
Prior art keywords
data storage
storage server
data
file
block
Prior art date
Application number
PCT/CN2011/073986
Other languages
English (en)
French (fr)
Inventor
陈善席
周伟
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2011140991A1 publication Critical patent/WO2011140991A1/zh
Priority to US13/676,559 priority Critical patent/US9229950B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems

Definitions

  • the present invention relates to the field of storage technologies, and in particular, to a file processing method and apparatus for a distributed file system. Background technique
  • the file system functions currently included in the operating system are responsible for organizing the system, applications, and content that the end user needs to persist, saving them on the local storage device, and providing these persistent content under the control of access rights. Read, modify, delete, transfer and other functions. With the development of storage and network technologies, file systems have undergone major changes in their composition and implementation dependencies.
  • the prior art provides a distributed file system that saves each partition of the managed file in multiple copies to ensure the reliability of the file content. In the entire system, any copy is valid, which means that the data is valid and the user can successfully access the data.
  • the reliability provided by this independent copy is a parallel system in the reliability model. Parallel systems are a system of increased reliability that provides reliability in parallel.
  • the above prior art system saves the file by partitioning the file and then storing the block in a direct redundancy manner on multiple data storage servers, so that the storage space utilization rate is low, resulting in a high system. Construction costs. Especially in the case where a single data storage server is expensive, direct redundancy will result in higher costs, making the system difficult to construct.
  • An embodiment of the present invention provides a file processing method for a distributed file system, which is used to improve storage space utilization and reduce a construction cost of a distributed file system.
  • the method includes: dividing at least one data group according to a file size, Determining a first mapping information of the file to the at least one data group, wherein each data group includes a content partitioning and a verification partition of the file;
  • the embodiment of the present invention further provides a file processing method for a distributed file system, which is used to improve storage space utilization and reduce the construction cost of the distributed file system.
  • the method includes:
  • the embodiment of the invention further provides a file processing method for a distributed file system, which is used to improve the availability of a distributed file system in a case where a storage space utilization of a distributed file system is high and a construction cost is low, and the method includes :
  • the data storage server on the recovery path obtains information about the recovery path; the recovery path is based on a valid partition in the data group where the lost partition is located, a data storage server that stores the valid partition, and a data storage that is invalid
  • the server selects an alternate data storage server to generate; the last data storage server on the recovery path is the replacement data storage server; the lost partition is stored in the failed data storage server; and the data storage on the recovery path
  • the server performs calculation and storage of the lost block according to the related information of the recovery path.
  • the embodiment of the present invention further provides a metadata server of a distributed file system, which is used to improve storage space utilization and reduce the construction cost of the distributed file system.
  • the metadata server includes:
  • a data group segmentation module configured to perform segmentation of at least one data group on the file according to a file size, and determine first mapping information of the file to the at least one data group, where each data group includes a content block and a check score of the file Piece;
  • a storage mapping determining module configured to determine respective data groups to second mapping information of the data storage server that stores the respective data groups
  • a metadata maintenance module configured to provide the first mapping information and the second mapping information to a client for performing a file writing operation.
  • the embodiment of the present invention further provides a client of a distributed file system, which is used to improve storage space utilization and reduce the construction cost of the distributed file system.
  • the client includes: a file processing module, configured to obtain first mapping information of the file to the at least one data group, and respective data groups to second mapping information of the data storage server storing the respective data groups, wherein the at least one data group is based on the file size Dividing a file into a file, each data group includes a content block and a check block of the file; and, according to the first mapping information, the file is divided into blocks, and the content of the file is divided into blocks;
  • a redundancy check module configured to generate a check block of each data group according to the first mapping information
  • a block read/write module configured to block and verify the generated content according to the second mapping information The block is sent to the data storage server for saving.
  • the embodiment of the present invention further provides a data storage server of a distributed file system, which is used to improve the availability of a distributed file system in a case where a storage space utilization of a distributed file system is high and a construction cost is low.
  • the server includes:
  • a recovery path information obtaining module configured to obtain related information of the recovery path; the recovery path is based on a valid partition in a data group in which the lost partition is located, a data storage server that stores the valid partition, and a data that is invalid
  • the replacement data storage server selected by the storage server generates; the last data storage server on the recovery path is the replacement data storage server; the lost partition is saved in the failed data storage server; the lost block processing module is used Calculating and saving the lost block based on the related information of the recovery path.
  • the embodiment of the present invention further provides a distributed file system, which is used to improve storage space utilization and reduce the construction cost of a distributed file system.
  • the distributed file system includes:
  • a metadata server configured to perform at least one data group segmentation on the file according to the file size, and determine first mapping information of the file to the at least one data group, where each data group includes a content block and a check block of the file Determining, by each of the data groups, second mapping information of the data storage server storing the respective data groups; transmitting the first mapping information and the second mapping information;
  • a client configured to obtain the first mapping information and the second mapping information sent by the metadata server; according to the first mapping information, the file is divided into blocks, and the content of the generated file is divided into blocks; The first mapping information is generated, and the verification block of each data group is generated; and the generated content block and the check block are sent according to the second mapping information;
  • the data storage server is configured to receive and save the content block and check block sent by the client.
  • the file is divided into at least one data group according to the file size, where each data group includes a content block and a check block of the file, and the first mapping information of the file to the at least one data group is established.
  • the respective data groups to the second mapping information of the data storage server storing the respective data groups, the client according to the Decoding a content block of the first mapping information generating file and a check block of each data group, and saving the content blocking and the verifying block to the corresponding data storage server according to the second mapping information, compared to the prior art
  • the technical solution of saving files in a copy manner can greatly improve storage space utilization and reduce the construction cost of the distributed file system.
  • the recovery of the distributed file system is performed by the data storage server on the recovery path through the recovery path, and the loss and block calculation and storage are performed, and the data group update is not required, but is valid according to the data group.
  • the block computing can be lost, and a large number of read, write, and compute operations can be avoided, and the availability of the distributed file system can be improved under the condition of high storage space utilization and low construction cost of the distributed file system.
  • FIG. 1 is a flowchart of a file processing method of a distributed file system according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a composition of a data group in an embodiment of the present invention.
  • FIG. 3 is a flowchart of performing at least one data group segmentation on a file according to a file size according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a file processing method of another distributed file system according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a file writing process according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a data recovery process in an embodiment of the present invention.
  • FIG. 7 is a flowchart of a file processing method of another distributed file system according to an embodiment of the present invention.
  • FIG. 8 is a structural diagram of a metadata server of a distributed file system according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a metadata server in a technical solution for saving a file in a copy manner according to an embodiment of the present invention
  • FIG. 10 is a schematic diagram of a specific example of a metadata server according to an embodiment of the present invention.
  • FIG. 11 is a structural diagram of a client of a distributed file system according to an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of a client in a technical solution for saving a file in a copy manner according to an embodiment of the present invention
  • FIG. 13 is a schematic diagram of a specific example of a client in an embodiment of the present invention.
  • FIG. 14 is a structural diagram of a data storage server of a distributed file system according to an embodiment of the present invention.
  • FIG. 15 is a schematic diagram of a data storage server in a technical solution for saving a file in a copy manner according to an embodiment of the present invention
  • FIG. 16 is a schematic diagram of a specific example of a data storage server according to an embodiment of the present invention:
  • FIG. 17 is a structural diagram of a distributed file system according to an embodiment of the present invention. detailed description
  • a file processing method of a distributed file system may include: Step 101: Perform at least one data group segmentation on a file according to a file size, and determine a file to the at least one data group. a mapping information, wherein each data group includes a content block and a check block of the file;
  • Step 102 Determine, according to each data group, second mapping information of a data storage server that saves the data groups.
  • Step 103 Provide the first mapping information and the second mapping information to a client to perform a file writing operation.
  • At least one data group is divided according to a file size, wherein each data group includes a content block and a check block of the file, and the file is created.
  • the first mapping information of the at least one data group, and the respective data groups to the second mapping information of the data storage server storing the respective data groups, and the first mapping information and the second mapping information are provided to the client.
  • the file writing operation can greatly improve the storage space utilization and reduce the construction cost of the distributed file system, compared with the technical solution of saving the file in the prior art.
  • the storage space utilization rate is 1/N;
  • the content block and the check block of the example selection file constitute a data group to manage the file, and the data group includes: N content blocks of the file, and a check block generated for the N content blocks, which can be called For N+1 data sets, storage space utilization can reach N/(N+1). This can greatly reduce the cost of building a system for a distributed file system consisting of highly reliable data storage server hardware.
  • At least one data group is divided according to the file size, the number of data groups is flexible, and the block is related to the file content, which can adapt to the flexible development requirements of the distributed file system.
  • the number of blocks of any data group is changed - the block of any data group exists only in one file;
  • File-i's data group is divided into four file contents and one check block.
  • This data group is a (4+1) redundancy mode, which utilizes the system memory space occupied by it. The rate is 80%;
  • File-j's data group is divided into three file contents and one check block.
  • This data group is the (3+1) redundancy mode, which occupies the utilization of system storage space. It is 75%.
  • the flow shown in Fig. 1 can be implemented by a device capable of realizing its function, for example, the device can be a metadata server or the like.
  • the flow shown in FIG. 1 is implemented by a metadata server as an example.
  • the content of the file may be first calculated according to the file size and the block size. And determining the number and composition of the at least one data group according to the number of blocks of the content of the file and the threshold number of blocks in the preset data group.
  • c ⁇ m + b— V) lb .
  • M is the file size
  • is the block size
  • c is the number of blocks of the content of the file
  • the number of groups is 1, and the data group is composed of c content blocks, blank blocks, and 1 check block; if ⁇ ⁇ , it is determined that the number of the at least one data group is g ⁇ + —s ⁇ — 1 ) , where the first g- 1 data group consists of - 1 content block and 1 check block; the last data group consists of content block, blank block and check block.
  • the number of content blocks is less than ⁇ -1, and the number of check blocks is 1;
  • is the preset number limit of the number of blocks in the data group, which is the lower limit of the number of blocks in the preset data group, which is the upper limit of the number of blocks in the preset data group.
  • the number and composition of these data sets can form the management metadata of the file.
  • the above can be set according to different requirements for reliability and performance for a specific application environment.
  • For distributed file systems consisting of low-reliability independent storage server hardware if this system is required to provide higher reliability, you can use smaller values to form a block number limit within the data group for higher reliability.
  • a distributed file system consisting of separate independent storage server hardware If this system is required to provide higher performance, a larger value can be used to form a block number limit ( , ) within the data group.
  • the process of performing at least one data group splitting on the file according to the file size may include:
  • Step 303 Determine whether the content block number c of the file is smaller than if yes, execute step 304;
  • Step 304 Generate one data group, and the data group is composed of c content blocks, blank blocks, and one verification block, and the process ends;
  • each data group to save the second mapping information of the data storage server of each data group it may be determined that different blocks in the same data group are saved in different data storage servers; and/or, determining Different data groups reuse data storage servers.
  • Different blocks in the same data group are stored in different data storage servers, which can avoid losing more blocks in the same data group when one data storage server fails, which complicates the recovery calculation of lost blocks.
  • Different data groups reuse the data storage server, which can increase the space utilization of the data storage server, further reduce the data storage server data used, and reduce the system construction cost.
  • an embodiment of the present invention further provides a file processing method for a distributed file system, where the processing flow may include: Step 401: Obtain a first mapping information of a file to at least one data group, and each data group to And storing second mapping information of the data storage server of each data group, wherein the at least one data group is formed by dividing a file according to a file size, where each data group includes a content partitioning and a verification partition of the file;
  • Step 402 The content of the file is divided into blocks according to the first mapping information, and the content of the file is divided into blocks.
  • Step 403 Generate a verification block of each data group according to the first mapping information.
  • Step 404 Send the generated content block and check block to the data storage server for saving according to the second mapping information.
  • the content partition of the file and the check block of each data group are generated according to the first mapping information, and the content is divided and verified according to the second mapping information.
  • the block is saved to the corresponding data storage server, and the technical solution of saving the file in the copy mode in the prior art can greatly improve the storage space utilization and reduce the construction cost of the distributed file system; and at the same time, the file is performed according to the file size.
  • the data group is divided, so the number of data groups is flexible and the blocks are related to the file content, which can adapt to the flexible and variable development requirements of the distributed file system.
  • the flow shown in Fig. 4 can be implemented by a device capable of realizing its function, for example, the device can be a client or the like. In the following embodiments, the flow shown in FIG. 4 is implemented by the client as an example.
  • Step 501 A client sends a file write operation request to a metadata server;
  • Step 502 After receiving the file write operation request, the metadata server obtains information to be written of the file, including a file size, and the like, and performs at least one data group splitting according to the file size to form a file to the at least one data. First mapping information of the group;
  • Step 503 The metadata server determines, according to information such as capacity, storage space utilization, and network traffic of each data storage server, a data storage server that saves the data group, and forms each data group to a data storage server that stores the data groups. Second mapping information;
  • different blocks in the same data group can be saved in different data storage servers; different data groups can reuse the data storage server;
  • Step 504 The metadata server feeds back the first mapping information and the second mapping information to the client.
  • Step 505 The metadata server sends a command to save the blocking to the corresponding data storage server.
  • the storage server provides information such as the block size;
  • Step 506 After receiving the first mapping information and the second mapping information, the client performs content segmentation according to the first mapping information, and generates content partitioning of the file.
  • Step 507 The client generates a check block of each data group according to the first mapping information.
  • Step 508 The client sends the generated content block and check block to the data storage server for saving according to the second mapping information.
  • Step 509 The data storage server saves the block and the block, and the data storage server can also save the data. Establish a mapping relationship between the identifier of the block and the block and the saved local location;
  • Step 510 After the operation is successful, the data storage server indicates to the client that the block content is saved.
  • Step 512 The metadata server receives the client operation success information, and the first mapping information and the second mapping information of the file are persistent as metadata; thus, the client can return the file to the upper application.
  • the result of the incoming operation if the client reports a failed result to the metadata server, the metadata server clears the temporary information in the file operation process such as the first mapping information and the second mapping information of the file.
  • the client may further cache the first mapping information and the second mapping information. Through the caching mechanism, traffic between the client and the metadata server can be reduced.
  • the distributed file system of the embodiment of the present invention may also perform data recovery processing.
  • the metadata server may determine, according to the first mapping information and the second mapping information, a lost partition saved by the failed data storage server; select an alternate data storage server for the failed data storage server; A valid partition in the data group, a data storage server that holds the valid partition, and an alternate data storage server generate a recovery path for the data storage server on the recovery path to calculate and save the lost chunks.
  • the first data storage server on the recovery path provides the locally saved valid partition as the data content to the second data storage server on the recovery path; the second data storage server on the recovery path is locally saved.
  • the effective partitioning is performed with the received data content, and the calculated data content is provided to the third data storage server on the recovery path; and so on, until the last data storage server on the recovery path is used as an alternative data storage server , save the received data content as a lost chunk.
  • the method may include: Step 601: The metadata server identifies the occurrence of the data storage server failure in a heartbeat manner; Step 602: The metadata server is saved according to the The first mapping information and the second mapping information in the metadata, determining a lost partition saved by the failed data storage server;
  • Step 603 The metadata server selects an alternate data storage server for the failed data storage server.
  • Step 604 The metadata server saves the valid partitioned data storage server according to the valid partition in the data group where the lost partition is located, and The substitute data storage server generates a recovery path, and then notifies that the recovery path is sent to the related data storage server by the recovery path; the recovery path is composed of a data storage server that stores the valid partition, and an alternate data storage server. Data storage server vector, the alternate data storage server is at the end of the vector;
  • Step 605 Each data storage server in the recovery path selected by the metadata server participates in the processing of the recovery process:
  • the first data storage service on the recovery path provides the locally saved valid partition as data content to the second data storage server on the recovery path;
  • the second data storage server on the recovery path calculates the locally saved valid partition and the received data content, and provides the calculated data content to the third data storage server on the recovery path; and so on.
  • the last data storage server on the recovery path is used as an alternative data storage server for: saving the received data content as a lost block, generating metadata information, and then reporting the recovery result to the metadata server;
  • Step 606 After receiving the recovery result of the substitute data storage server, the metadata server persists the metadata information related to the alternate data storage server.
  • the embodiment of the present invention provides a file processing method, that is, the processing process in the data recovery process, as shown in FIG. 7, may include: Step 701: The data storage server on the recovery path obtains the Recovering information related to the path; the recovery path is generated according to a valid partition in the data group where the lost partition is located, a data storage server storing the valid partition, and an alternative data storage server selected for the failed data storage server; The last data storage server on the recovery path is the replacement data storage server; the lost partition is saved in the failed data storage server;
  • Step 702 The data storage server on the recovery path performs calculation and storage of lost blocks according to related information of the recovery path.
  • step 702 can include:
  • the first data storage server on the recovery path provides the locally saved valid partition as data content to the next data storage server on the recovery path;
  • the last data storage server on the recovery path saves the received data content as a lost partition.
  • the last data storage server on the recovery path may further generate metadata information of the lost partition and feed back to the metadata server after saving the lost partition.
  • the recovery of the distributed file system is through the recovery path, and the data storage server on the recovery path performs the calculation and storage of the lost partition, without re-update the data group, but according to the data.
  • the effective block calculation in the group can be lost and block, which can avoid a large number of read, write and calculation operations, and improve the distributed file system in the case of high storage space utilization and low construction cost of the distributed file system.
  • the present invention further provides a metadata server of a distributed file system, as shown in FIG. 8, including:
  • the data group segmentation module 801 is configured to perform segmentation of at least one data group on the file according to the file size, and determine first mapping information of the file to the at least one data group, where each data group includes content partitioning and verification of the file Block;
  • a storage mapping determining module 802 configured to determine respective data groups to second mapping information of a data storage server that stores the respective data groups
  • the metadata maintenance module 803 is configured to provide the first mapping information and the second mapping information to the client to perform a file writing operation.
  • the data group segmentation module 801 can include:
  • a calculating unit configured to calculate a content block number of the file according to the file size and the block size
  • the determining unit is configured to determine the number and composition of the at least one data group according to the content block number of the file and the preset block number limit value in the data group.
  • the determining unit can be specifically used to:
  • ⁇ ⁇ determining that the number of the at least one data group is 1, and the data group is composed of c content blocks, blank blocks, and one check block; if C ⁇ , determining the at least The number of data groups is g ⁇ + - S ⁇ - 1 ) , where the first g - 1 data group consists of - 1 content block and 1 check block; the last data group is divided by content, The blank block and the check block are composed, wherein the content block number is less than ⁇ _ 1 and the check block number is 1; Wherein, it is a threshold number of blocks in the preset data group.
  • the storage map determining module 802 can be specifically configured to:
  • the metadata server shown in FIG. 8 may further include:
  • the lost partition determining module 804 is configured to determine, according to the first mapping information and the second mapping information, a lost partition saved by the failed data storage server;
  • the replacement module 805 is configured to select an alternate data storage server for the failed data storage server; the failure recovery module 806 is configured to save the valid partitioned data storage server according to the valid partition in the data group where the lost partition is located. And the replacement data storage server, generating a recovery path for the data storage server on the recovery path to perform loss block calculation and the replacement data storage server to perform loss block storage.
  • the metadata server includes: a metadata maintenance module: implementing space management and maintenance of user logical files, and blocks and storage blocks of the files to system management. Mapping information of the server;
  • Metadata persistence module implements persistence of the above metadata on permanent storage, and snapshot data forming file information
  • the copy decision module according to the number of DS (Data Storage, Data Storage Server) configured, the capacity of the system, and the utilization rate of the system, determine which DSs the data block written to the file is stored in; Module: This module maintains a fixed copy factor for each data block. After receiving the DS failure information, the data block's copy factor is checked. For those data blocks that are lost due to DS failure, the copy decision module needs to be triggered to select these copies and save the new DS.
  • DS Data Storage, Data Storage Server
  • DS information maintenance module responsible for DS entry and exit processing, and report this information to the metadata maintenance module; responsible for the collection of CPU, storage space utilization and network traffic information of each DS to support the function of the replica decision module.
  • the embodiment of the present invention provides a data group segmentation module, which performs at least one data group segmentation according to a size, thereby forming redundancy of a file N/(N+1) voting model in internal management of the system; and also providing a storage map Determining a module to implement a function of determining second mapping information; the metadata maintenance module implementing a function of providing first mapping information and second mapping information to a client for performing a file writing operation.
  • the embodiment of the present invention further enhances the function of the failure recovery module in the technical solution of saving the file in the prior art by the lost block determination module, the selection replacement module, and the failure recovery module. Its purpose is to ensure the reliability of the data content in the system management, but it adopts a completely different failure recovery method, according to the redundancy of the N/(N+1) voting model, generates a recovery path, and makes the data storage on the recovery path.
  • the server computes the lost data blocks in all affected data sets computationally.
  • the present invention further provides a client of a distributed file system, as shown in FIG. 11, including:
  • a file processing module 1 101 configured to obtain first mapping information of a file to at least one data group, and respective data groups to second mapping information of a data storage server that stores the respective data groups, wherein the at least one data group is configured according to The file size is formed by dividing the file, and each data group includes a content block and a check block of the file; and, according to the first mapping information, the file is divided into blocks, and the content of the file is divided into blocks;
  • the redundancy check module 1102 is configured to generate a check block of each data group according to the first mapping information, and the block read/write module 1 103 is configured to block the generated content according to the second mapping information. And the verification block is sent to the data storage server for storage.
  • the client shown in FIG. 11 may further include:
  • the cache module 1104 is configured to cache the first mapping information and the second mapping information.
  • the client includes a file processing module, a file invoking request for processing an application, and a result of returning the file operation, which is a central module of the client (client).
  • MDS Metal Data Server, Metadata Server
  • the client responsible for sending MDS (Metadata Server, Metadata Server) information about the requested operation file; passing relevant information to the driver block read/write module, and obtaining the operation result of each block of the file;
  • MDS Metal Data Server, Metadata Server
  • the cache (Cache) module maintains the cache of the client's recent processing file metadata. Through some cache invalidation strategy or mechanism, the traffic between the client and the MDS can be reduced, and the consistency of the entire system is maintained to the greatest extent; the block read/write module is responsible for The final content of the file is divided into read operations in each DS. As shown in FIG. 13, the difference between the metadata server of the embodiment of the present invention and the prior art technical solution for saving files in a copy manner is:
  • the client of the embodiment of the present invention adds a redundancy check module for the content generation process of the redundancy check block when the client completes the write.
  • the present invention further provides a data storage server of a distributed file system.
  • the data storage server is in a recovery path, and the data storage server includes a recovery path information obtaining module 1401.
  • the server generates: the last data storage server on the recovery path is the replacement data storage server; the lost partition is stored in the failed data storage server; and the lost blocking processing module 1402 is configured to be used according to the recovery path.
  • the lost blocking processing module 1402 is configured to be used according to the recovery path.
  • the lost packet processing module 1402 is specifically configured to: provide the locally saved valid partition as the data content to the recovery path. The next data storage server on;
  • the shell 1J If the data storage server is the first and last data storage servers on the recovery path, and other data storage servers on the recovery path, the shell 1J:
  • the lost block processing module 1402 is specifically configured to: calculate the locally saved valid block and the received data content, and provide the calculated data content to the next data storage server on the recovery path;
  • Bay ij If the above data storage server is the last data storage server on the recovery path, Bay ij :
  • the lost block processing module 1402 is specifically configured to: save the received data content as a lost block.
  • the data storage server if the data storage server is the last data storage server on the recovery path, the data storage server further includes:
  • the metadata maintenance module 1403 is configured to generate metadata information of the lost partition and feed back to the metadata server.
  • the following describes an improvement of the technical solution of the data storage server of the distributed file system in the embodiment of the present invention for saving files in a copy manner in the prior art.
  • the data storage server includes: a data read/write interface, receives a data block read/write operation request from the client, and returns an operation result;
  • the metadata maintenance module receives the segmented data of the identified application file, and needs to maintain the identification and preservation of the segments to correctly identify;
  • the information reporting module is responsible for the registration of the DS to the distributed file system. It is responsible for the heartbeat of the DS and the MDS to indicate whether the current DS is working properly. It is responsible for reporting the dynamic data of the current DS's CPU, storage space and network traffic to the MDS.
  • the technical solution of the metadata server in the embodiment of the present invention is different from the prior art in that the file is saved in a copy manner.
  • the DS in the embodiment of the present invention adds a recovery path information obtaining module and a lost blocking processing module. Used to complete the failure recovery process with the MDS when the storage server fails.
  • the embodiment of the present invention further provides a distributed file system, and the structure thereof is as shown in FIG. 17, and may include:
  • the metadata server 1701 is configured to perform segmentation of at least one data group on the file according to the file size, and determine first mapping information of the file to the at least one data group, where each data group includes a content block and a check score of the file. Blocking; determining, by each of the data groups, second mapping information of the data storage server storing the respective data groups; transmitting the first mapping information and the second mapping information;
  • the client 1702 is configured to obtain the first mapping information and the second mapping information that are sent by the metadata server, and perform content segmentation according to the first mapping information to generate content partitioning of the file: Decoding first block information, generating a check block of each data group; and transmitting the generated content block and check block according to the second mapping information;
  • the data storage server 1703 is configured to receive and save the content block and the check block sent by the client.
  • the metadata server 1701 is further configured to: determine, according to the first mapping information and the second mapping information, a lost partition saved by the failed data storage server; select an alternative for the failed data storage server. a data storage server; generating a recovery path for the data on the recovery path according to the valid partition in the data group in which the lost chunk is located, the data storage server storing the valid partition, and the substitute data storage server The storage server performs calculation and saving of lost chunks.
  • the data storage server on the recovery path obtains information about the recovery path
  • the first data storage server on the recovery path is used to: provide the locally saved valid partition as data content to the second data storage server on the recovery path;
  • the second data storage server on the recovery path is used to: calculate the locally saved valid partition and the received data content, and provide the calculated data content to the third data storage server on the recovery path; and so on. Until the last data storage server on the recovery path;
  • the last data storage server on the recovery path serves as the alternative data storage server for: saving the received data content as a lost chunk.
  • At least one data group is divided according to a file size, where each data group includes a content block and a check block of the file, and a file is created to the at least one data group.
  • the first mapping information, and the respective data groups to the second mapping information of the data storage server storing the respective data groups the client generates the content partition of the file and the check score of each data group according to the first mapping information.
  • Blocking, according to the second mapping information, saving the content block and the check block to the corresponding data storage server, and the technical solution for saving the file in the copy mode in the prior art can greatly ensure high reliability. Improve the storage space utilization and reduce the construction cost of the distributed file system.
  • the data group is divided according to the file size, the number of data groups is flexible and the block is related to the file content, which can adapt to the distributed file system. Flexible and dynamic development needs.
  • the recovery of the distributed file system is performed by the data storage server on the recovery path through the recovery path, and the loss and block calculation and storage are performed, and the data group update is not required, but is valid according to the data group.
  • the block computing can be lost, and a large number of read, write, and compute operations can be avoided, and the availability of the distributed file system can be improved under the condition of high storage space utilization and low construction cost of the distributed file system.
  • embodiments of the present invention can be provided as a method, system, or computer program product.
  • the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware.
  • the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Description

分布式文件系统的文件处理方法及装置 本申请要求 2010年 10月 27日递交的申请号为 201010522838.9、 发明名称为 "分布 式文件系统的文件处理方法及装置"的中国专利申请的优先权, 其全部内容通过引用结 合在本申请中。 技术领域
本发明涉及存储技术领域, 尤其涉及分布式文件系统的文件处理方法及装置。 背景技术
目前操作系统所包含的文件系统功能, 负责将系统、 应用及最终用户需要持久化的 内容进行组织, 将它们保存于本地存储设备, 并提供在访问权限的控制下对这些持久化 后的内容进行读取、 修改、 删除、 转移等功能。 随着存储与网络技术的发展, 文件系统 在组成方式与实现依赖上出现了较大变化。
现有技术提供了一种分布式文件系统, 它采用将所管理文件的每个分块以多个副本 的方式来保存, 以保证文件内容的可靠性。 在整个系统中, 任何一个副本是有效的, 即 表示这个数据是有效的, 用户可以成功访问这个数据。 这种独立副本提供的可靠性方 式, 属于可靠性模型中的并联系统。 并联系统是一个可靠性增加的系统, 通过并联的方 式来提供可靠性。
但是, 上述现有技术为了保证较高的可靠性, 通过对文件分块, 然后将分块按直接 冗余方式在多个数据存储服务器上保存, 使得存储空间利用率低, 带来高昂的系统构造 成本。 特别是在单个数据存储服务器成本不菲的情况下, 直接冗余将导致较高的成本, 使得系统难以构建。 发明内容
本发明实施例提供一种分布式文件系统的文件处理方法, 用以提高存储空间利用 率, 降低分布式文件系统的构造成本, 该方法包括- 根据文件大小对文件进行至少一个数据组的分割, 确定文件至所述至少一个数据组 的第一映射信息, 其中每一数据组包括文件的内容分块和校验分块;
确定各个数据组至保存所述各个数据组的数据存储服务器的第二映射信息; 将所述第一映射信息和所述第二映射信息提供给客户端进行文件的写入操作。 本发明实施例还提供一种分布式文件系统的文件处理方法, 用以提高存储空间利用 率, 降低分布式文件系统的构造成本, 该方法包括:
获得文件至至少一个数据组的第一映射信息, 和各个数据组至保存所述各个数据组 的数据存储服务器的第二映射信息, 其中所述至少一个数据组根据文件大小对文件进行 分割形成, 每一数据组包括文件的内容分块和校验分块;
根据所述第一映射信息, 将文件进行内容分块, 生成文件的内容分块;
根据所述第一映射信息, 生成各数据组的校验分块;
根据所述第二映射信息, 将生成的内容分块及校验分块发送给数据存储服务器进行 保存。
本发明实施例还提供一种分布式文件系统的文件处理方法, 用以在分布式文件系统 的存储空间利用率较高、 构造成本较低的情况下提高分布式文件系统的可用性, 该方法 包括:
恢复路径上的数据存储服务器获得所述恢复路径的相关信息; 所述恢复路径根据丢 失分块所在数据组内的有效分块、 保存所述有效分块的数据存储服务器、 和为失效的数 据存储服务器选择的替代的数据存储服务器生成; 所述恢复路径上最后一个数据存储服 务器为所述替代的数据存储服务器; 所述丟失分块保存于失效的数据存储服务器; 所述恢复路径上的数据存储服务器根据所述恢复路径的相关信息, 进行丟失分块的 计算和保存。
本发明实施例还提供一种分布式文件系统的元数据服务器, 用以提高存储空间利用 率, 降低分布式文件系统的构造成本, 该元数据服务器包括:
数据组分割模块, 用于根据文件大小对文件进行至少一个数据组的分割, 确定文件 至所述至少一个数据组的第一映射信息, 其中每一数据组包括文件的内容分块和校验分 块;
存储映射确定模块, 用于确定各个数据组至保存所述各个数据组的数据存储服务器 的第二映射信息;
元数据维护模块, 用于将所述第一映射信息和所述第二映射信息提供给客户端进行 文件的写入操作。
本发明实施例还提供一种分布式文件系统的客户端, 用以提高存储空间利用率, 降 低分布式文件系统的构造成本, 该客户端包括: 文件处理模块, 用于获得文件至至少一个数据组的第一映射信息, 和各个数据组至 保存所述各个数据组的数据存储服务器的第二映射信息, 其中所述至少一个数据组根据 文件大小对文件进行分割形成, 每一数据组包括文件的内容分块和校验分块; 以及, 根 据所述第一映射信息, 将文件进行内容分块, 生成文件的内容分块;
冗余校验模块, 用于根据所述第一映射信息, 生成各数据组的校验分块; 块读写模块, 用于根据所述第二映射信息, 将生成的内容分块及校验分块发送给数 据存储服务器进行保存。
本发明实施例还提供一种分布式文件系统的数据存储服务器, 用以在分布式文件系 统的存储空间利用率较高、 构造成本较低的情况下提高分布式文件系统的可用性, 该数 据存储服务器包括:
恢复路径信息获得模块, 用于获得所述恢复路径的相关信息; 所述恢复路径根据丢 失分块所在数据组内的有效分块、 保存所述有效分块的数据存储服务器、 和为失效的数 据存储服务器选择的替代的数据存储服务器生成; 所述恢复路径上最后一个数据存储服 务器为所述替代的数据存储服务器; 所述丢失分块保存于失效的数据存储服务器; 丟失分块处理模块, 用于根据所述恢复路径的相关信息, 进行丢失分块的计算和保 存。
本发明实施例还提供一种分布式文件系统, 用以提高存储空间利用率, 降低分布式 文件系统的构造成本, 该分布式文件系统包括:
元数据服务器, 用于根据文件大小对文件进行至少一个数据组的分割, 确定文件至 所述至少一个数据组的第一映射信息, 其中每一数据组包括文件的内容分块和校验分 块; 确定各个数据组至保存所述各个数据组的数据存储服务器的第二映射信息; 发送所 述第一映射信息和所述第二映射信息;
客户端, 用于获得元数据服务器发送的所述第一映射信息和所述第二映射信息; 根 据所述第一映射信息, 将文件进行内容分块, 生成文件的内容分块; 根据所述第一映射 信息, 生成各数据组的校验分块; 根据所述第二映射信息, 发送生成的内容分块及校验 分块;
数据存储服务器, 用于接收并保存客户端发送的内容分块及校验分块。
本发明实施例中, 根据文件大小对文件进行至少一个数据组的分割, 其中每一数据 组包括文件的内容分块和校验分块, 建立文件至所述至少一个数据组的第一映射信息, 和各个数据组至保存所述各个数据组的数据存储服务器的第二映射信息, 客户端根据所 述第一映射信息生成文件的内容分块和各数据组的校验分块, 根据所述第二映射信息将 内容分块和校验分块保存至相应的数据存储服务器, 相对于现有技术中以副本方式保存 文件的技术方案, 可大大提高存储空间利用率, 降低分布式文件系统的构造成本。
本发明实施例中, 分布式文件系统的恢复是通过恢复路径, 由恢复路径上的数据存 储服务器进行丢失分块的计算和保存, 无需重新进行数据组的更新, 而是根据数据组内 的有效分块计算丢失分块即可, 可以避免产生大量的读写与计算操作, 在分布式文件系 统的存储空间利用率较高、 构造成本较低的情况下提高分布式文件系统的可用性。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例描述中所需要使用的 附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于 本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得 其他的附图。 在附图中:
图 1为本发明实施例中分布式文件系统的文件处理方法的流程图;
图 2为本发明实施例中数据组的组成示意图;
图 3为本发明实施例中根据文件大小对文件进行至少一个数据组的分割的流程图; 图 4为本发明实施例中另一分布式文件系统的文件处理方法的流程图;
图 5为本发明实施例中文件写入过程的示意图;
图 6为本发明实施例中数据恢复过程的示意图;
图 7为本发明实施例中又一分布式文件系统的文件处理方法的流程图;
图 8为本发明实施例中分布式文件系统的元数据服务器的结构图;
图 9为本发明实施例中以副本方式保存文件的技术方案中元数据服务器的示意图; 图 10为本发明实施例中元数据服务器的具体实例的示意图;
图 11为本发明实施例中分布式文件系统的客户端的结构图;
图 12为本发明实施例中以副本方式保存文件的技术方案中客户端的示意图; 图 13为本发明实施例中客户端的具体实例的示意图;
图 14为本发明实施例中分布式文件系统的数据存储服务器的结构图;
图 15为本发明实施例中以副本方式保存文件的技术方案中数据存储服务器的示意 图;
图 16为本发明实施例中数据存储服务器的具体实例的示意图: 图 17为本发明实施例中分布式文件系统的结构图。 具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚明白, 下面结合附图对本发明 实施例做进一步详细说明。 在此, 本发明的示意性实施例及其说明用于解释本发明, 但 并不作为对本发明的限定。
如图 1所示, 本发明实施例中, 分布式文件系统的文件处理方法可以包括: 步骤 101、 根据文件大小对文件进行至少一个数据组的分割, 确定文件至所述至少 一个数据组的第一映射信息, 其中每一数据组包括文件的内容分块和校验分块;
步骤 102、 确定各个数据组至保存所述各个数据组的数据存储服务器的第二映射信 息;
步骤 103、 将所述第一映射信息和所述第二映射信息提供给客户端进行文件的写入 操作。
由图 1所示流程可以得知, 本发明实施例中, 根据文件大小对文件进行至少一个数 据组的分割, 其中每一数据组包括文件的内容分块和校验分块, 建立文件至所述至少一 个数据组的第一映射信息, 和各个数据组至保存所述各个数据组的数据存储服务器的第 二映射信息, 将所述第一映射信息和所述第二映射信息提供给客户端进行文件的写入操 作, 相对于现有技术中以副本方式保存文件的技术方案, 可大大提高存储空间利用率, 降低分布式文件系统的构造成本。
比较而言, 若现有技术中以副本方式保存文件的技术方案, 将所管理文件的每个分 块以 N个副本的方式来保存, 则存储空间利用率为 1/N; 而本发明实施例选择文件的内 容分块和校验分块构成数据组来对文件进行管理, 数据组包含: 文件的 N个内容分块, 以及为这 N个内容分块生成的校验分块, 可以称为 N+1数据组, 存储空间利用率可达到 N/(N+1)。 这对于由较高可靠性的数据存储服务器硬件组成的分布式文件系统来说, 可以 大大降低系统的构建成本。
另外, 本发明实施例根据文件大小对文件进行至少一个数据组的分割, 数据组个数 灵活可变且分块与文件内容相关, 能够适应分布式文件系统灵活多变的发展需求。 在本 发明实施例的分布式文件系统内, 任何数据组的分块个数是变化的- 任何数据组的分块只存在于一个文件内;
不同的文件, 其内部数据组的分块个数由文件的尺寸决定。 因此, 本发明实施例中, 每个文件的冗余可能是不同的。 如图 2所示, File-i的数据 组为四个文件内容分块加一个校验分块, 这种数据组是 (4+1 ) 的冗余模式, 它所占用 的系统存储空间的利用率在 80%; File-j的数据组为三个文件内容分块加一个校验分块, 这种数据组是 (3+1 ) 的冗余模式, 它所占用的系统存储空间的利用率为 75%。
图 1 所示流程可由能够实现其功能的装置实施, 例如该装置可以是元数据服务器 等。 下面的实施例中以由元数据服务器实施图 1所示流程为例进行说明。
具体实施时, 在根据文件大小对文件进行至少一个数据组的分割, 确定文件至所述 至少一个数据组的第一映射信息时, 可以先根据文件大小和分块大小计算文件的内容分 块个数; 再根据所述文件的内容分块个数和预设的数据组内分块个数界限值, 确定所述 至少一个数据组的个数及组成。
例如, 可以按如下公式计算文件的内容分块个数:
c = {m + b— V) l b . 其中, M为文件大小, δ为分块大小, c为文件的内容分块个数;
所述根据文件的内容分块个数和预设的数据组内分块个数界限值, 确定所述至少一 个数据组的个数及组成, 包括- 若 c < , 则确定所述至少一个数据组的个数为 1, 且该数据组由 c个内容分块、 个空白块和 1个校验分块组成; 若^^ ^, 则确定所述至少一个数据组的个数为 g ^ + —s^^—1) , 其中前 g— 1 个数据组由 - 1个内容分块和 1个校验分块组成; 最后一个数据组由内容分块、 空白块 和校验分块组成, 其中内容分块个数小于< - 1、 校验分块个数为 1 ;
其中, ^, 为预设的数据组内分块个数界限值, 为预设的数据组内分块个数下限 值, 为预设的数据组内分块个数上限值。
这些数据组的个数及组成即可形成文件的管理元数据。 上述 , )可以根据针对具 体应用环境对可靠性与性能提出的不同要求而设置。 针对由较低可靠性的独立存储服务 器硬件构成的分布式文件系统, 如果需要此系统提供较高的可靠性, 则可以使用较小值 组成数据组内分块个数界限值 针对由较高可靠性的独立存储服务器硬件构成的 分布式文件系统, 如果需要此系统提供更高的性能, 则可以使用较大值组成数据组内分 块个数界限值 ( , ) 。 如图 3所示, 根据文件大小对文件进行至少一个数据组的分割的处理流程可以包 括:
步骤 301、 输入文件大小《, 分块大小6, 预设的数据组内分块个数界限值 歩骤 302、 根据文件大小 w , 分块大小 6 , 计算文件的内容分块个数 c = (m + b - l) / b . 执行步骤 303和步骤 305 ;
步骤 303、 判断文件的内容分块个数 c是否小于 若是则执行步骤 304 ;
步骤 304、 生成 1个数据组, 且该数据组由 c个内容分块、 个空白块和 1个校 验分块组成, 结束流程;
歩骤 305、 判断文件的内容分块个数 c是否大于等于 ; 若是则执行歩骤 306; 步骤 306、 生成 g个数据组, g = (e + - 2) /( - 1), 其中前 g _ l个数据组由 - 1个 内容分块和 1个校验分块组成; 最后一个数据组由内容分块、 空白块和校验分块组成, 其中内容分块个数小于< _ 1、 校验分块个数为 1, 结束流程。
具体实施时, 在确定各个数据组至保存所述各个数据组的数据存储服务器的第二映 射信息时, 可以确定同一数据组内的不同分块保存于不同的数据存储服务器; 和 /或, 确 定不同的数据组重用数据存储服务器。
同一数据组内的不同分块保存于不同的数据存储服务器, 可以避免在一个数据存储 服务器失效时, 丟失同一数据组内更多的分块, 使丟失分块的恢复计算复杂化。 当然, 实施中, 同一数据组内的不同分块保存于相同的数据存储服务器也是可以的。
不同的数据组重用数据存储服务器, 可以使得数据存储服务器的空间利用率提高, 可进一步减少所使用的数据存储服务器数据, 降低系统的构建成本。
如图 4所示, 本发明实施例还提供一种分布式文件系统的文件处理方法, 其处理流 程可以包括- 步骤 401、 获得文件至至少一个数据组的第一映射信息, 和各个数据组至保存所述 各个数据组的数据存储服务器的第二映射信息, 其中所述至少一个数据组根据文件大小 对文件进行分割形成, 每一数据组包括文件的内容分块和校验分块;
步骤 402、 根据所述第一映射信息, 将文件进行内容分块, 生成文件的内容分块; 步骤 403、 根据所述第一映射信息, 生成各数据组的校验分块;
步骤 404、 根据所述第二映射信息, 将生成的内容分块及校验分块发送给数据存储 服务器进行保存。 由图 4所示流程可以得知, 本发明实施例中, 根据第一映射信息生成文件的内容分 块和各数据组的校验分块, 根据第二映射信息将内容分块和校验分块保存至相应的数据 存储服务器, 相对于现有技术中以副本方式保存文件的技术方案, 可大大提高存储空间 利用率, 降低分布式文件系统的构造成本; 同时由于是根据文件大小对文件进行数据组 分割, 因此数据组个数灵活可变且分块与文件内容相关, 能够适应分布式文件系统灵活 多变的发展需求。
图 4所示流程可由能够实现其功能的装置实施, 例如该装置可以是客户端等。 下面 的实施例中以由客户端实施图 4所示流程为例进行说明。
下面举一例说明本发明实施例中的文件写入过程, 如图 5所示, 可以包括: 歩骤 501、 客户端向元数据服务器发送文件写入操作请求;
步骤 502、 元数据服务器接收到文件写入操作请求后, 获得文件的待写入信息, 包 括文件大小等, 并根据文件大小对文件进行至少一个数据组的分割, 形成文件至所述至 少一个数据组的第一映射信息;
步骤 503、 元数据服务器根据各数据存储服务器的容量、 存储空间利用率、 网络流 量等信息, 确定保存数据组的数据存储服务器, 形成各个数据组至保存所述各个数据组 的数据存储服务器的第二映射信息;
实施中, 同一数据组内的不同分块可保存于不同的数据存储服务器; 不同的数据组 可以重用数据存储服务器;
步骤 504、 元数据服务器将所述第一映射信息和所述第二映射信息反馈给客户端; 步骤 505、 元数据服务器向相应的数据存储服务器发送即将保存分块的命令; 其中 可以向这些数据存储服务器提供分块大小等信息;
步骤 506、 客户端在接收到所述第一映射信息和所述第二映射信息后, 根据所述第 一映射信息, 将文件进行内容分块, 生成文件的内容分块;
步骤 507、 客户端根据所述第一映射信息, 生成各数据组的校验分块;
步骤 508、 客户端根据所述第二映射信息, 将生成的内容分块及校验分块发送给数 据存储服务器进行保存;
客户端发送内容分块及校验分块时, 还可以发送这些分块的标识等信息; 步骤 509、 数据存储服务器在接收到分块及分块的标识后进行本地保存, 数据存储 服务器还可以建立分块及分块的标识与所保存的本地位置之间的映射关系;
步骤 510、 操作成功后, 数据存储服务器向客户端说明分块内容保存完毕; 歩骤 511、 客户端从相应的数据存储服务器收集本次操作的分块保存结果, 并将结 果向元数据服务器说明;
步骤 512、 元数据服务器接收到客户端操作成功信息, 将此文件的第一映射信息和 第二映射信息等信息作为元数据持久化; 这样, 客户端就可以向上层的应用程序返回文 件的写入操作的结果了; 如果客户端向元数据服务器报告的是一个失败的结果, 则元数 据服务器清除此文件的第一映射信息和第二映射信息等文件操作过程中的临时信息。
具体实施时, 客户端在获得元数据服务器提供的第一映射信息与第二映射之后, 还 可以缓存第一映射信息与第二映射信息。 通过缓存机制, 可以减少客户端与元数据服务 器的通信量。
具体实施时, 本发明实施例的分布式文件系统还可以进行数据恢复处理。 实施时, 元数据服务器可以根据所述第一映射信息和所述第二映射信息确定失效的数据存储服务 器保存的丢失分块; 为失效的数据存储服务器选择替代的数据存储服务器; 根据丢失分 块所在数据组内的有效分块、 保存有效分块的数据存储服务器、 和替代的数据存储服务 器, 生成恢复路径, 供恢复路径上的数据存储服务器进行丢失分块的计算和保存。
具体的, 恢复路径上的第一个数据存储服务器将本地保存的有效分块作为数据内容 提供给恢复路径上的第二个数据存储服务器; 恢复路径上的第二个数据存储服务器将本 地保存的有效分块与接收的数据内容进行计算, 将计算出的数据内容提供给恢复路径上 的第三个数据存储服务器; 以此类推, 直至恢复路径上的最后一个数据存储服务器作为 替代的数据存储服务器, 将接收的数据内容作为丢失分块保存。
下面举一例说明本发明实施例中的数据恢复过程, 如图 6所示, 可以包括: 步骤 601、 元数据服务器以心跳方式识别出数据存储服务器失效的发生; 步骤 602、 元数据服务器根据保存的元数据中第一映射信息和第二映射信息, 确定 失效的数据存储服务器保存的丢失分块;
步骤 603、 元数据服务器为失效的数据存储服务器选择替代的数据存储服务器; 步骤 604、 元数据服务器根据丟失分块所在数据组内的有效分块、 保存所述有效分 块的数据存储服务器、 和所述替代的数据存储服务器, 生成恢复路径, 然后通知按恢复 路径向相关的数据存储服务器发送恢复命令; 这个恢复路径, 是由保存有效分块的数据 存储服务器、 和替代的数据存储服务器组成的数据存储服务器向量, 替代的数据存储服 务器处于向量的末端; 歩骤 605、 由元数据服务器选定的恢复路径中的各数据存储服务器均参与恢复过程 的处理:
恢复路径上的第一个数据存储服务将本地保存的有效分块作为数据内容提供给恢复 路径上的第二个数据存储服务器;
恢复路径上的第二个数据存储服务器将本地保存的有效分块与接收的数据内容进行 计算, 将计算出的数据内容提供给恢复路径上的第三个数据存储服务器; 以此类推, 直 至
恢复路径上的最后一个数据存储服务器作为替代的数据存储服务器, 用于: 将接收 的数据内容作为丢失分块保存, 并生成元数据信息, 然后向元数据服务器汇报恢复结 果;
步骤 606、 元数据服务器接收到替代的数据存储服务器的恢复结果后, 将替代的数 据存储服务器相关的元数据信息持久化。
对于数据存储服务器而言, 本发明实施例提供一种文件处理方法, 即在数据恢复过 程中的处理过程, 如图 7所示, 可以包括- 步骤 701、 恢复路径上的数据存储服务器获得所述恢复路径的相关信息; 所述恢复 路径根据丟失分块所在数据组内的有效分块、 保存所述有效分块的数据存储服务器、 和 为失效的数据存储服务器选择的替代的数据存储服务器生成; 所述恢复路径上最后一个 数据存储服务器为所述替代的数据存储服务器; 所述丢失分块保存于失效的数据存储服 务器;
步骤 702、 所述恢复路径上的数据存储服务器根据所述恢复路径的相关信息, 进行 丢失分块的计算和保存。
具体实施时, 步骤 702可以包括:
所述恢复路径上的第一个数据存储服务器, 将本地保存的有效分块作为数据内容提 供给恢复路径上的下一个数据存储服务器;
除所述恢复路径上的第一个和最后一个数据存储服务器之外, 所述恢复路径上的其 它数据存储服务器, 将本地保存的有效分块与接收的数据内容进行计算, 将计算出的数 据内容提供给恢复路径上的下一个数据存储服务器;
所述恢复路径上的最后一个数据存储服务器, 将接收到的数据内容作为丢失分块进 行保存。 具体实施时, 所述恢复路径上的最后一个数据存储服务器, 还可以在保存丢失分块 后, 生成丢失分块的元数据信息并向元数据服务器反馈。
由此可见, 本发明实施例中, 分布式文件系统的恢复是通过恢复路径, 由恢复路径 上的数据存储服务器进行丢失分块的计算和保存, 无需重新进行数据组的更新, 而是根 据数据组内的有效分块计算丢失分块即可, 可以避免产生大量的读写与计算操作, 在分 布式文件系统的存储空间利用率较高、 构造成本较低的情况下提高分布式文件系统的可 用性。
基于同一发明构思, 本发明还提供一种分布式文件系统的元数据服务器, 如图 8所 示, 包括:
数据组分割模块 801, 用于根据文件大小对文件进行至少一个数据组的分割, 确定 文件至所述至少一个数据组的第一映射信息, 其中每一数据组包括文件的内容分块和校 验分块;
存储映射确定模块 802, 用于确定各个数据组至保存所述各个数据组的数据存储服 务器的第二映射信息;
元数据维护模块 803, 用于将所述第一映射信息和所述第二映射信息提供给客户端 进行文件的写入操作。
一个实施例中, 数据组分割模块 801可以包括:
计算单元, 用于根据文件大小和分块大小计算文件的内容分块个数;
确定单元, 用于根据所述文件的内容分块个数和预设的数据组内分块个数界限值, 确定所述至少一个数据组的个数及组成。
一个实施例中, 计算单元具体可以用于- 按如下公式计算文件的内容分块个数- c = ( n + b— V) i b . 其中, m为文件大小, 为分块大小, c为文件的内容分块个数;
确定单元具体可以用于:
若^ < , 则确定所述至少一个数据组的个数为 1, 且该数据组由 c个内容分块、 个空白块和 1个校验分块组成; 若 C≥ , 则确定所述至少一个数据组的个数为 g ^ + - S^ -1) , 其中前 g— 1 个数据组由 - 1个内容分块和 1个校验分块组成; 最后一个数据组由内容分块、 空白块 和校验分块组成, 其中内容分块个数小于< _ 1、 校验分块个数为 1 ; 其中, 为预设的数据组内分块个数界限值。
一个实施例中, 存储映射确定模块 802具体可以用于:
在确定各个数据组至保存所述各个数据组的数据存储服务器的第二映射信息时, 确 定同一数据组内的不同分块保存于不同的数据存储服务器; 和 /或, 确定不同的数据组重 用数据存储服务器。
一个实施例中, 图 8所示的元数据服务器还可以包括:
丟失分块确定模块 804, 用于根据所述第一映射信息和所述第二映射信息确定失效 的数据存储服务器保存的丢失分块;
选择替代模块 805, 用于为失效的数据存储服务器选择替代的数据存储服务器; 失效恢复模块 806, 用于根据丢失分块所在数据组内的有效分块、 保存所述有效分 块的数据存储服务器、 和所述替代的数据存储服务器, 生成恢复路径, 供所述恢复路径 上的数据存储服务器进行丢失分块的计算和所述替代的数据存储服务器进行丢失分块的 保存。
下面对比现有技术说明本发明实施例中的分布式文件系统的元数据服务器对现有技 术以副本方式保存文件的技术方案的改进。
如图 9所示, 现有技术以副本方式保存文件的技术方案中, 元数据服务器包括: 元数据维护模块: 实现用户逻辑文件的空间管理与维护, 以及这些文件到系统管理 的块及存储块的服务器的映射信息;
元数据持久化模块: 实现对上述元数据在永久存储上的持久化, 以及形成文件信息 的快照数据;
副本决策模块: 根据所配置 DS ( Data Storage, 数据存储服务器) 的个数、 容量, 以及系统运行中它们的利用率等信息, 决定写入文件的数据块保存在哪几个 DS中; 失效恢复模块: 此模块为每个数据块维护固定的副本因子。 当接收到某 DS失效的 信息后, 对数据块的副本因子进行检査, 对那些因为 DS失效而导致副本丢失的数据 块, 需要在副本决策模块上触发再选择这些副本新的保存 DS;
DS信息维护模块: 负责 DS的进入与离开处理, 并将这些信息上报给元数据维护模 块; 负责各 DS的 CPU、 存储空间的利用率与网络流量信息的收集, 以支持副本决策模 块的功能。
如图 10所示, 本发明实施例的元数据服务器与现有技术以副本方式保存文件的技术 方案的区别在于: 本发明实施例提供了数据组分割模块, 对文件按大小进行至少一个数据组的分割, 从而在系统内部管理中形成文件的 N/ (N+1 )表决模型的冗余; 同时还提供存储映射确 定模块, 以实现确定第二映射信息的功能; 元数据维护模块实现将第一映射信息和第二 映射信息提供给客户端进行文件的写入操作的功能。
本发明实施例还通过丢失分块确定模块、 选择替代模块和失效恢复模块增强了现有 技术以副本方式保存文件的技术方案中失效恢复模块的功能。 它的目的是保证系统管理 中数据内容的可靠性, 但它采用了完全不同的失效恢复办法, 根据 N/ (N+1 ) 表决模型 的冗余, 生成恢复路径, 使恢复路径上的数据存储服务器将所有受影响的数据组中那些 丢失的数据块以计算方式来完成恢复。
基于同一发明构思, 本发明还提供一种分布式文件系统的客户端, 如图 1 1所示, 包 括:
文件处理模块 1 101, 用于获得文件至至少一个数据组的第一映射信息, 和各个数据 组至保存所述各个数据组的数据存储服务器的第二映射信息, 其中所述至少一个数据组 根据文件大小对文件进行分割形成, 每一数据组包括文件的内容分块和校验分块; 以 及, 根据所述第一映射信息, 将文件进行内容分块, 生成文件的内容分块;
冗余校验模块 1102, 用于根据所述第一映射信息, 生成各数据组的校验分块; 块读写模块 1 103, 用于根据所述第二映射信息, 将生成的内容分块及校验分块发送 给数据存储服务器进行保存。
一个实施例中, 图 11所示的客户端还可以包括:
缓存模块 1104, 用于将所述第一映射信息与所述第二映射信息进行缓存。
下面对比现有技术说明本发明实施例中的分布式文件系统的客户端对现有技术以副 本方式保存文件的技术方案的改进。
如图 12所示, 现有技术以副本方式保存文件的技术方案中, 客户端包括- 文件处理模块, 处理应用的文件调用请求及返回文件操作结果, 是 Client (客户 端) 的中心模块, 它负责向 MDS ( Metadata Server, 元数据服务器) 发送请求操作文件 的相关信息; 将相关信息传递给驱动块读写模块, 并从取得文件各块的操作结果; 负责 文件元数据在远端 MDS与本地 Cache的连接;
缓存 (Cache ) 模块, 维护 Client最近处理文件元数据的缓存, 通过某种缓存失效策 略或者机制, 可以减少 Client与 MDS的通信量, 最大程度地保持整个系统的一致性; 块读写模块, 负责文件最终内容分块在各 DS中的读取操作。 如图 13所示, 本发明实施例的元数据服务器与现有技术以副本方式保存文件的技术 方案的区别在于:
本发明实施例的 Client增加了一个冗余校验模块, 用于在 Client完成写入时的冗余 校验分块的内容生成过程。
基于同一发明构思, 本发明还提供一种分布式文件系统的数据存储服务器, 如图 14 所示, 该数据存储服务器处于恢复路径上, 该数据存储服务器包括- 恢复路径信息获得模块 1401, 用于获得所述恢复路径的相关信息; 所述恢复路径根 据丢失分块所在数据组内的有效分块、 保存所述有效分块的数据存储服务器、 和为失效 的数据存储服务器选择的替代的数据存储服务器生成; 所述恢复路径上最后一个数据存 储服务器为所述替代的数据存储服务器; 所述丢失分块保存于失效的数据存储服务器; 丢失分块处理模块 1402, 用于根据所述恢复路径的相关信息, 进行丢失分块的计算 和保存。
一个实施例中, 若上述数据存储服务器是所述恢复路径上的第一个数据存储服务 器, 则- 丟失分块处理模块 1402具体用于: 将本地保存的有效分块作为数据内容提供给恢复 路径上的下一个数据存储服务器;
若上述数据存储服务器是除所述恢复路径上的第一个和最后一个数据存储服务器之 夕卜, 所述恢复路径上的其它数据存储服务器, 贝 1J :
丢失分块处理模块 1402具体用于: 将本地保存的有效分块与接收的数据内容进行计 算, 将计算出的数据内容提供给恢复路径上的下一个数据存储服务器;
若上述数据存储服务器是所述恢复路径上的最后一个数据存储服务器, 贝 ij :
丢失分块处理模块 1402具体用于: 将接收到的数据内容作为丢失分块进行保存。 一个实施例中, 若上述数据存储服务器是所述恢复路径上的最后一个数据存储服务 器, 则上述数据存储服务器还包括:
元数据维护模块 1403, 用于生成丟失分块的元数据信息并向元数据服务器反馈。 下面对比现有技术说明本发明实施例中的分布式文件系统的数据存储服务器对现有 技术以副本方式保存文件的技术方案的改进。
如图 15所示, 现有技术以副本方式保存文件的技术方案中, 数据存储服务器包括: 数据读写接口, 接收来自 Client的数据块读写操作请求, 并返回操作结果; 元数据维护模块, 接收的是带标识的应用文件分块后的数据片段, 它需要将这些片 段的标识与保存情况维护起来以正确识别;
信息上报模块, 负责 DS加入分布式文件系统过程中的注册操作; 负责 DS与 MDS 的心跳以说明当前 DS是否正常工作; 负责向 MDS上报当前 DS的 CPU、 存储空间及网 络流量的动态数据。
如图 16所示, 本发明实施例的元数据服务器与现有技术以副本方式保存文件的技术 方案的区别在于- 本发明实施例的 DS增加了恢复路径信息获得模块和丢失分块处理模块, 用于在存 储服务器失效时, 配合 MDS完成失效恢复处理过程。
基于同一发明构思, 本发明实施例还提供一种分布式文件系统, 其结构如图 17所 示, 可以包括:
元数据服务器 1701, 用于根据文件大小对文件进行至少一个数据组的分割, 确定文 件至所述至少一个数据组的第一映射信息, 其中每一数据组包括文件的内容分块和校验 分块; 确定各个数据组至保存所述各个数据组的数据存储服务器的第二映射信息; 发送 所述第一映射信息和所述第二映射信息;
客户端 1702, 用于获得元数据服务器发送的所述第一映射信息和所述第二映射信 息; 根据所述第一映射信息, 将文件进行内容分块, 生成文件的内容分块: 根据所述第 一映射信息, 生成各数据组的校验分块; 根据所述第二映射信息, 发送生成的内容分块 及校验分块;
数据存储服务器 1703, 用于接收并保存客户端发送的内容分块及校验分块。
一个实施例中, 所述元数据服务器 1701还可以用于- 根据所述第一映射信息和所述第二映射信息确定失效的数据存储服务器保存的丢失 分块; 为失效的数据存储服务器选择替代的数据存储服务器; 根据丢失分块所在数据组 内的有效分块、 保存所述有效分块的数据存储服务器、 和所述替代的数据存储服务器, 生成恢复路径, 供所述恢复路径上的数据存储服务器进行丢失分块的计算和保存。
恢复路径上的数据存储服务器获得所述恢复路径的相关信息;
恢复路径上的第一个数据存储服务器用于: 将本地保存的有效分块作为数据内容提 供给恢复路径上的第二个数据存储服务器; 恢复路径上的第二个数据存储服务器用于: 将本地保存的有效分块与接收的数据内 容进行计算, 将计算出的数据内容提供给恢复路径上的第三个数据存储服务器; 以此类 推, 直至恢复路径上的最后一个数据存储服务器;
所述恢复路径上的最后一个数据存储服务器作为所述替代的数据存储服务器, 用 于: 将接收的数据内容作为丢失分块保存。
综上所述, 本发明实施例中, 根据文件大小对文件进行至少一个数据组的分割, 其 中每一数据组包括文件的内容分块和校验分块, 建立文件至所述至少一个数据组的第一 映射信息, 和各个数据组至保存所述各个数据组的数据存储服务器的第二映射信息, 客 户端根据所述第一映射信息生成文件的内容分块和各数据组的校验分块, 根据所述第二 映射信息将内容分块和校验分块保存至相应的数据存储服务器, 相对于现有技术中以副 本方式保存文件的技术方案, 可以在保证高可靠性的同时大大提高存储空间利用率, 降 低分布式文件系统的构造成本; 同时由于是根据文件大小对文件进行数据组分割, 因此 数据组个数灵活可变且分块与文件内容相关, 能够适应分布式文件系统灵活多变的发展 需求。
本发明实施例中, 分布式文件系统的恢复是通过恢复路径, 由恢复路径上的数据存 储服务器进行丢失分块的计算和保存, 无需重新进行数据组的更新, 而是根据数据组内 的有效分块计算丟失分块即可, 可以避免产生大量的读写与计算操作, 在分布式文件系 统的存储空间利用率较高、 构造成本较低的情况下提高分布式文件系统的可用性。
本领域内的技术人员应明白, 本发明的实施例可提供为方法、 系统、 或计算机程序 产品。 因此, 本发明可采用完全硬件实施例、 完全软件实施例、 或结合软件和硬件方面 的实施例的形式。 而且, 本发明可采用在一个或多个其中包含有计算机可用程序代码的 计算机可用存储介质 (包括但不限于磁盘存储器、 CD-ROM、 光学存储器等) 上实施的 计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、 设备 (系统) 、 和计算机程序产品的流程 图和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图和 /或方框图中的每一 流程和 /或方框、 以及流程图和 /或方框图中的流程和 /或方框的结合。 可提供这些计算机 程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理 器以产生一个机器, 使得通过计算机或其他可编程数据处理设备的处理器执行的指令产 生用于实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功能 的装置。 这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方 式工作的计算机可读存储器中, 使得存储在该计算机可读存储器中的指令产生包括指令 装置的制造品, 该指令装置实现在流程图一个流程或多个流程和 /或方框图一个方框或多 个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计算 机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理, 从而在计算机或 其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和 /或方框图一 个方框或多个方框中指定的功能的步骤。
以上所述的具体实施例, 对本发明的目的、 技术方案和有益效果进行了进一歩详细 说明, 所应理解的是, 以上所述仅为本发明的具体实施例而已, 并不用于限定本发明的 保护范围, 凡在本发明的精神和原则之内, 所做的任何修改、 等同替换、 改进等, 均应 包含在本发明的保护范围之内。

Claims

权利要求书
1、 一种分布式文件系统的文件处理方法, 其特征在于, 包括:
根据文件大小对文件进行至少一个数据组的分割, 确定文件至所述至少一个数据组 的第一映射信息, 其中每一数据组包括文件的内容分块和校验分块;
确定各个数据组至保存所述各个数据组的数据存储服务器的第二映射信息; 将所述第一映射信息和所述第二映射信息提供给客户端进行文件的写入操作。
2、 如权利要求 1所述的方法, 其特征在于, 所述根据文件大小对文件进行至少一个 数据组的分割, 确定文件至所述至少一个数据组的第一映射信息, 包括- 根据文件大小和分块大小计算文件的内容分块个数;
根据所述文件的内容分块个数和预设的数据组内分块个数界限值, 确定所述至少一 个数据组的个数及组成。
3、 如权利要求 2所述的方法, 其特征在于, 所述根据文件大小和分块大小计算文件 的内容分块个数包括- 按如下公式计算文件的内容分块个数- c - (m + b - i) / b 其中, m为文件大小, 为分块大小, c为文件的内容分块个数;
所述根据所述文件的内容分块个数和预设的数据组内分块个数界限值, 确定所述至 少一个数据组的个数及组成, 包括:
若^ < , 则确定所述至少一个数据组的个数为 1, 且该数据组由 c个内容分块、 个空白块和 1个校验分块组成;
若 ≥ , 则确定所述至少一个数据组的个数为 g ^ + - 2) /*^ - 1) , 其中前 g— 1 个数据组由 个内容分块和 1个校验分块组成; 最后一个数据组由内容分块、 空白块 和校验分块组成, 其中内容分块个数小于< _ 1、 校验分块个数为 1 ;
其中, (^^)为预设的数据组内分块个数界限值。
4、 如权利要求 1所述的方法, 其特征在于, 所述确定各个数据组至保存所述各个数 据组的数据存储服务器的第二映射信息, 包括:
确定同一数据组内的不同分块保存于不同的数据存储服务器;
和 /或, 确定不同的数据组重用数据存储服务器。
5、 如权利要求 1至 4任一项所述的方法, 其特征在于, 还包括: 根据所述第一映射信息和所述第二映射信息确定失效的数据存储服务器保存的丢失 分块;
为失效的数据存储服务器选择替代的数据存储服务器;
根据丢失分块所在数据组内的有效分块、 保存所述有效分块的数据存储服务器、 和 所述替代的数据存储服务器, 生成恢复路径, 供所述恢复路径上的数据存储服务器进行 丢失分块的计算和保存。
6、 一种分布式文件系统的文件处理方法, 其特征在于, 包括:
获得文件至至少一个数据组的第一映射信息, 和各个数据组至保存所述各个数据组 的数据存储服务器的第二映射信息, 其中所述至少一个数据组根据文件大小对文件进行 分割形成, 每一数据组包括文件的内容分块和校验分块;
根据所述第一映射信息, 将文件进行内容分块, 生成文件的内容分块;
根据所述第一映射信息, 生成各数据组的校验分块;
根据所述第二映射信息, 将生成的内容分块及校验分块发送给数据存储服务器进行 保存。
7、 如权利要求 6所述的方法, 其特征在于, 还包括- 将所述第一映射信息与所述第二映射信息进行缓存。
8、 一种分布式文件系统的文件处理方法, 其特征在于, 包括:
恢复路径上的数据存储服务器获得所述恢复路径的相关信息; 所述恢复路径根据丢 失分块所在数据组内的有效分块、 保存所述有效分块的数据存储服务器、 和为失效的数 据存储服务器选择的替代的数据存储服务器生成; 所述恢复路径上最后一个数据存储服 务器为所述替代的数据存储服务器; 所述丢失分块保存于失效的数据存储服务器; 所述恢复路径上的数据存储服务器根据所述恢复路径的相关信息, 进行丢失分块的 计算和保存。
9、 如权利要求 8所述的方法, 其特征在于, 所述恢复路径上的数据存储服务器根据 所述恢复路径的相关信息, 进行丟失分块的计算和保存, 包括:
所述恢复路径上的第一个数据存储服务器, 将本地保存的有效分块作为数据内容提 供给恢复路径上的下一个数据存储服务器;
除所述恢复路径上的第一个和最后一个数据存储服务器之外, 所述恢复路径上的其 它数据存储服务器, 将本地保存的有效分块与接收的数据内容进行计算, 将计算出的数 据内容提供给恢复路径上的下一个数据存储服务器; 所述恢复路径上的最后一个数据存储服务器, 将接收到的数据内容作为丢失分块进 行保存。
10、 如权利要求 9所述的方法, 其特征在于, 还包括:
所述恢复路径上的最后一个数据存储服务器, 生成丢失分块的元数据信息并向元数 据服务器反馈。
11、 一种分布式文件系统的元数据服务器, 其特征在于, 包括- 数据组分割模块, 用于根据文件大小对文件进行至少一个数据组的分割, 确定文件 至所述至少一个数据组的第一映射信息, 其中每一数据组包括文件的内容分块和校验分 块;
存储映射确定模块, 用于确定各个数据组至保存所述各个数据组的数据存储服务器 的第二映射信息;
元数据维护模块, 用于将所述第一映射信息和所述第二映射信息提供给客户端进行 文件的写入操作。
12、 如权利要求 11所述的元数据服务器, 其特征在于, 所述数据组分割模块包括- 计算单元, 用于根据文件大小和分块大小计算文件的内容分块个数;
确定单元, 用于根据所述文件的内容分块个数和预设的数据组内分块个数界限值, 确定所述至少一个数据组的个数及组成。
13、 如权利要求 12所述的元数据服务器, 其特征在于, 所述计算单元具体用于: 按 如下公式计算文件的内容分块个数:
c = (m + b - l) l b ^
其中, w为文件大小, &为分块大小, c为文件的内容分块个数;
所述确定单元具体用于:
若^^ , 则确定所述至少一个数据组的个数为 1, 且该数据组由 c个内容分块、 个空白块和 1个校验分块组成; 若^≥ , 则确定所述至少一个数据组的个数为 g ^ + - ^^ -1) , 其中前 g— 1 个数据组由 个内容分块和 1个校验分块组成; 最后一个数据组由内容分块、 空白块 和校验分块组成, 其中内容分块个数小于< - 1、 校验分块个数为 1 ;
其中, (^,^)为预设的数据组内分块个数界限值。
14、 如权利要求 11所述的元数据服务器, 其特征在于, 所述存储映射确定模块具体 用于在确定各个数据组至保存所述各个数据组的数据存储服务器的第二映射信息时, 确 定同一数据组内的不同分块保存于不同的数据存储服务器; 和 /或, 确定不同的数据组重 用数据存储服务器。
15、 如权利要求 11至 14任一项所述的元数据服务器, 其特征在于, 还包括: 丢失分块确定模块, 用于根据所述第一映射信息和所述第二映射信息确定失效的数 据存储服务器保存的丢失分块;
选择替代模块, 用于为失效的数据存储服务器选择替代的数据存储服务器; 失效恢复模块, 用于根据丢失分块所在数据组内的有效分块、 保存所述有效分块的 数据存储服务器、 和所述替代的数据存储服务器, 生成恢复路径, 供所述恢复路径上的 数据存储服务器进行丢失分块的计算和所述替代的数据存储服务器进行丢失分块的保 存。
16、 一种分布式文件系统的客户端, 其特征在于, 包括- 文件处理模块, 用于获得文件至至少一个数据组的第一映射信息, 和各个数据组至 保存所述各个数据组的数据存储服务器的第二映射信息, 其中所述至少一个数据组根据 文件大小对文件进行分割形成, 每一数据组包括文件的内容分块和校验分块; 以及, 根 据所述第一映射信息, 将文件进行内容分块, 生成文件的内容分块;
冗余校验模块, 用于根据所述第一映射信息, 生成各数据组的校验分块; 块读写模块, 用于根据所述第二映射信息, 将生成的内容分块及校验分块发送给数 据存储服务器进行保存。
17、 如权利要求 16所述的客户端, 其特征在于, 还包括- 缓存模块, 用于将所述第一映射信息与所述第二映射信息进行缓存。
18、 一种分布式文件系统的数据存储服务器, 其特征在于, 所述数据存储服务器处 于恢复路径上, 所述数据存储服务器包括:
恢复路径信息获得模块, 用于获得所述恢复路径的相关信息; 所述恢复路径根据丟 失分块所在数据组内的有效分块、 保存所述有效分块的数据存储服务器、 和为失效的数 据存储服务器选择的替代的数据存储服务器生成; 所述恢复路径上最后一个数据存储服 务器为所述替代的数据存储服务器; 所述丢失分块保存于失效的数据存储服务器; 丢失分块处理模块, 用于根据所述恢复路径的相关信息, 进行丢失分块的计算和保 存。
19、 如权利要求 18所述的数据存储服务器, 其特征在于, 若所述数据存储服务器是 所述恢复路径上的第一个数据存储服务器, 贝 1J :
所述丢失分块处理模块具体用于: 将本地保存的有效分块作为数据内容提供给恢复 路径上的下一个数据存储服务器;
若所述数据存储服务器是除所述恢复路径上的第一个和最后一个数据存储服务器之 夕卜, 所述恢复路径上的其它数据存储服务器, 贝 iJ:
所述丟失分块处理模块具体用于: 将本地保存的有效分块与接收的数据内容进行计 算, 将计算出的数据内容提供给恢复路径上的下一个数据存储服务器;
若所述数据存储服务器是所述恢复路径上的最后一个数据存储服务器, 贝 1J :
所述丢失分块处理模块具体用于: 将接收到的数据内容作为丢失分块进行保存。
20、 如权利要求 19所述的数据存储服务器, 其特征在于, 若所述数据存储服务器是 所述恢复路径上的最后一个数据存储服务器, 则所述数据存储服务器还包括:
元数据维护模块, 用于生成丢失分块的元数据信息并向元数据服务器反馈。
21、 一种分布式文件系统, 其特征在于, 包括- 元数据服务器, 用于根据文件大小对文件进行至少一个数据组的分割, 确定文件至 所述至少一个数据组的第一映射信息, 其中每一数据组包括文件的内容分块和校验分 块; 确定各个数据组至保存所述各个数据组的数据存储服务器的第二映射信息; 发送所 述第一映射信息和所述第二映射信息;
客户端, 用于获得元数据服务器发送的所述第一映射信息和所述第二映射信息; 根 据所述第一映射信息, 将文件进行内容分块, 生成文件的内容分块; 根据所述第一映射 信息, 生成各数据组的校验分块; 根据所述第二映射信息, 发送生成的内容分块及校验 分块;
数据存储服务器, 用于接收并保存客户端发送的内容分块及校验分块。
22、 如权利要求 21所述的分布式文件系统, 其特征在于:
所述元数据服务器还用于:
根据所述第一映射信息和所述第二映射信息确定失效的数据存储服务器保存的丢失 分块; 为失效的数据存储服务器选择替代的数据存储服务器; 根据丢失分块所在数据组 内的有效分块、 保存所述有效分块的数据存储服务器、 和所述替代的数据存储服务器, 生成恢复路径, 供所述恢复路径上的数据存储服务器进行丢失分块的计算和保存。
23、 如权利要求 22所述的分布式文件系统, 其特征在于- 恢复路径上的数据存储服务器获得所述恢复路径的相关信息;
恢复路径上的第一个数据存储服务器用于: 将本地保存的有效分块作为数据内容提 供给恢复路径上的第二个数据存储服务器;
恢复路径上的第二个数据存储服务器用于: 将本地保存的有效分块与接收的数据内 容进行计算, 将计算出的数据内容提供给恢复路径上的第三个数据存储服务器; 以此类 推, 直至恢复路径上的最后一个数据存储服务器;
所述恢复路径上的最后一个数据存储服务器作为所述替代的数据存储服务器, 用 于: 将接收的数据内容作为丟失分块保存。
PCT/CN2011/073986 2010-10-27 2011-05-12 分布式文件系统的文件处理方法及装置 WO2011140991A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/676,559 US9229950B2 (en) 2010-10-27 2012-11-14 Method and device for processing files of distributed file system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2010105228389A CN102142006B (zh) 2010-10-27 2010-10-27 分布式文件系统的文件处理方法及装置
CN201010522838.9 2010-10-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/676,559 Continuation US9229950B2 (en) 2010-10-27 2012-11-14 Method and device for processing files of distributed file system

Publications (1)

Publication Number Publication Date
WO2011140991A1 true WO2011140991A1 (zh) 2011-11-17

Family

ID=44409529

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/073986 WO2011140991A1 (zh) 2010-10-27 2011-05-12 分布式文件系统的文件处理方法及装置

Country Status (3)

Country Link
US (1) US9229950B2 (zh)
CN (1) CN102142006B (zh)
WO (1) WO2011140991A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114936010A (zh) * 2022-07-20 2022-08-23 阿里巴巴(中国)有限公司 数据处理方法、装置、设备及介质

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10223375B2 (en) * 2011-09-20 2019-03-05 Netapp, Inc. Handling data extent size asymmetry during logical replication in a storage system
EP3196781A1 (en) * 2012-05-04 2017-07-26 Huawei Technologies Co., Ltd. Method and apparatus for deleting duplicate data
CN103180852B (zh) * 2012-08-09 2017-02-22 华为技术有限公司 分布式数据处理方法及装置
CN103778268A (zh) * 2012-10-24 2014-05-07 鸿富锦精密工业(深圳)有限公司 文件自动分类方法及系统
CN103095832A (zh) * 2013-01-15 2013-05-08 北京邮电大学 一种基于通信可靠性的分布式存储方法
CN103257934B (zh) * 2013-04-12 2016-02-10 广东数字证书认证中心有限公司 数字证书的存储、获取方法和装置
CN103530388A (zh) * 2013-10-22 2014-01-22 浪潮电子信息产业股份有限公司 一种云存储系统中提升性能的数据处理方法
CN103729225B (zh) * 2014-01-22 2016-09-28 中国人民解放军国防科学技术大学 一种基于内容分块的远程文件实时更新方法
US11921715B2 (en) 2014-01-27 2024-03-05 Microstrategy Incorporated Search integration
US10635669B1 (en) 2014-01-27 2020-04-28 Microstrategy Incorporated Data engine integration and data refinement
US11386085B2 (en) 2014-01-27 2022-07-12 Microstrategy Incorporated Deriving metrics from queries
US10255320B1 (en) 2014-01-27 2019-04-09 Microstrategy Incorporated Search integration
CN103885723B (zh) * 2014-03-04 2017-06-06 数安时代科技股份有限公司 数字证书存储方法、系统以及数字证书读取方法和系统
CN106161523B (zh) * 2015-04-02 2019-11-22 腾讯科技(深圳)有限公司 一种数据处理方法和设备
US10061674B1 (en) * 2015-06-29 2018-08-28 EMC IP Holding Company LLC Determining and managing dependencies in a storage system
US20170228285A1 (en) * 2016-02-10 2017-08-10 SwiftStack, Inc. Data durability in stored objects
CN107203559B (zh) * 2016-03-17 2021-01-01 华为技术有限公司 一种划分数据条带的方法和装置
CN108614837B (zh) * 2016-12-13 2020-10-09 杭州海康威视数字技术股份有限公司 文件存储和检索的方法及装置
CN108241552B (zh) * 2016-12-23 2022-04-12 中科星图股份有限公司 一种客户端文件恢复方法
CN106897360A (zh) * 2017-01-09 2017-06-27 深圳市中博科创信息技术有限公司 基于分布式文件系统的文件处理方法及装置
CN106897440B (zh) * 2017-02-28 2020-06-26 郑州云海信息技术有限公司 一种分布式文件系统文件读写处理方法
US10642796B2 (en) * 2017-07-18 2020-05-05 International Business Machines Corporation File metadata verification in a distributed file system
FR3076001B1 (fr) * 2017-12-27 2021-05-28 Bull Sas Procede de stockage de donnees et procede d'execution d'application avec reduction du temps d'acces aux donnees stockees
CN108881258B (zh) * 2018-06-29 2020-10-20 张家港市鸿嘉数字科技有限公司 一种用于网络文件安全传输的智能系统
CN109032536B (zh) * 2018-08-31 2021-08-10 郑州云海信息技术有限公司 基于分布式集群系统的数据存储方法、装置、系统及设备
WO2020081899A1 (en) * 2018-10-19 2020-04-23 Veriblock, Inc. Systems, methods, and storage media for using the otherwise-unutilized storage space on a storage device
US11614970B2 (en) 2019-12-06 2023-03-28 Microstrategy Incorporated High-throughput parallel data transmission
US11567965B2 (en) 2020-01-23 2023-01-31 Microstrategy Incorporated Enhanced preparation and integration of data sets

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101040282A (zh) * 2004-08-13 2007-09-19 潘纳萨斯公司 将虚拟映射存入对象属性中的分布式基于对象的存储系统
CN101158965A (zh) * 2007-10-25 2008-04-09 中国科学院计算技术研究所 一种分布式文件系统的文件读系统和方法
CN101727465A (zh) * 2008-11-03 2010-06-09 中国移动通信集团公司 分布式列存储数据库索引建立、查询方法及装置与系统

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5390327A (en) 1993-06-29 1995-02-14 Digital Equipment Corporation Method for on-line reorganization of the data on a RAID-4 or RAID-5 array in the absence of one disk and the on-line restoration of a replacement disk
US6697846B1 (en) * 1998-03-20 2004-02-24 Dataplow, Inc. Shared file system
US7043637B2 (en) * 2001-03-21 2006-05-09 Microsoft Corporation On-disk file format for a serverless distributed file system
US7360030B1 (en) 2004-06-01 2008-04-15 Sanbolic, Inc. Methods and apparatus facilitating volume management
US7502961B2 (en) * 2004-09-09 2009-03-10 Microsoft Corporation Method, system, and apparatus for providing alert synthesis in a data protection system
US7613750B2 (en) * 2006-05-29 2009-11-03 Microsoft Corporation Creating frequent application-consistent backups efficiently
US8407448B1 (en) * 2008-05-06 2013-03-26 Emc Corporation Shared storage I/O elimination through mapping client integration into a hypervisor
CN101673271A (zh) * 2008-09-09 2010-03-17 青岛海信传媒网络技术有限公司 分布式文件系统及其文件分片方法
CN101488104B (zh) * 2009-02-26 2011-05-04 北京云快线软件服务有限公司 一种实现高效安全存储的系统和方法
US8321648B2 (en) * 2009-10-26 2012-11-27 Netapp, Inc Use of similarity hash to route data for improved deduplication in a storage server cluster

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101040282A (zh) * 2004-08-13 2007-09-19 潘纳萨斯公司 将虚拟映射存入对象属性中的分布式基于对象的存储系统
CN101158965A (zh) * 2007-10-25 2008-04-09 中国科学院计算技术研究所 一种分布式文件系统的文件读系统和方法
CN101727465A (zh) * 2008-11-03 2010-06-09 中国移动通信集团公司 分布式列存储数据库索引建立、查询方法及装置与系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114936010A (zh) * 2022-07-20 2022-08-23 阿里巴巴(中国)有限公司 数据处理方法、装置、设备及介质

Also Published As

Publication number Publication date
US20130073522A1 (en) 2013-03-21
CN102142006A (zh) 2011-08-03
US9229950B2 (en) 2016-01-05
CN102142006B (zh) 2013-10-02

Similar Documents

Publication Publication Date Title
WO2011140991A1 (zh) 分布式文件系统的文件处理方法及装置
US10846178B2 (en) Hash-based remote rebuild assistance for content addressable storage systems
US10467246B2 (en) Content-based replication of data in scale out system
US9411685B2 (en) Parity chunk operating method and data server apparatus for supporting the same in distributed raid system
US9378088B1 (en) Method and system for reclamation of distributed dynamically generated erasure groups for data migration between high performance computing architectures and data storage using non-deterministic data addressing
KR101758544B1 (ko) 비휘발성 메모리 시스템에서의 동기 미러링
US8473778B2 (en) Erasure coding immutable data
US9521198B1 (en) Systems and methods for implementing an enterprise-class converged compute-network-storage appliance
US11074129B2 (en) Erasure coded data shards containing multiple data objects
CN110651246B (zh) 一种数据读写方法、装置和存储服务器
KR101374655B1 (ko) 파일 볼륨을 청크 단위로 분산 처리하는 시스템 및 방법
CN108733311B (zh) 用于管理存储系统的方法和设备
US11494103B2 (en) Memory-efficient processing of RAID metadata bitmaps
EP3404527B1 (en) Data updating technique
US11003558B2 (en) Systems and methods for sequential resilvering
US8543864B2 (en) Apparatus and method of performing error recovering process in asymmetric clustering file system
US11983438B2 (en) Technique for improving operations log indexing
CN112835511B (zh) 分布式存储集群的数据写入方法、装置、设备和介质
US11216204B2 (en) Degraded redundant metadata, DRuM, technique
CN110651262B (zh) 分层分布式存储系统以及用于边缘计算系统的技术
CN116868173A (zh) 降低在恢复操作期间网络延时的影响
CN111400098A (zh) 一种副本管理方法、装置、电子设备及存储介质
WO2023125507A1 (zh) 生成块组的方法、装置和设备
CN108491488B (zh) 媒体高速存储方法
KR101323729B1 (ko) 비대칭 클러스터링 파일 시스템에서의 오류 복구 처리 장치 및 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11780212

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11780212

Country of ref document: EP

Kind code of ref document: A1