WO2014015782A1 - 分布式文件***、文件访问方法以及客户端 - Google Patents

分布式文件***、文件访问方法以及客户端 Download PDF

Info

Publication number
WO2014015782A1
WO2014015782A1 PCT/CN2013/079855 CN2013079855W WO2014015782A1 WO 2014015782 A1 WO2014015782 A1 WO 2014015782A1 CN 2013079855 W CN2013079855 W CN 2013079855W WO 2014015782 A1 WO2014015782 A1 WO 2014015782A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
server
meta
access
information
Prior art date
Application number
PCT/CN2013/079855
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 腾讯科技(深圳)有限公司
Priority to JP2015523398A priority Critical patent/JP2015528957A/ja
Priority to US14/414,501 priority patent/US20150169623A1/en
Publication of WO2014015782A1 publication Critical patent/WO2014015782A1/zh

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
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • G06F16/183Provision of network file services by network file servers, e.g. by using NFS, CIFS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2094Redundant storage or storage space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • 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/13File access structures, e.g. distributed indices
    • G06F16/134Distributed indices
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Definitions

  • This application relates to data storage technologies, and more particularly to distributed file systems, file access methods, and clients. Background of the invention
  • the representative distributed file system in the industry is Google's distributed file system, called GFS (Global File System).
  • GFS Global File System
  • the GFS consists mainly of a Master Server and a number of Chunk Servers.
  • the Master Server is mainly responsible for storing the file directory and the meta information of each file in the file directory.
  • the meta information mainly includes: the size of the file, the number of data blocks into which the file is divided, the Chunk Server in which the data block into which the file is divided, and the like.
  • Chunk Server is mainly responsible for storing the data blocks into which the files are divided.
  • a file is divided into multiple data blocks according to a certain size. Each data block is called a Chunk, and these data blocks are distributed and stored in different Chunk Servers.
  • the embodiment of the present application provides a distributed file system, a file access method, and a client, so as to increase the number of files in a single cluster and the concurrent access amount of files.
  • a distributed file system including:
  • the master server is used to store the file directory and the routing information of the Meta Server associated with each file in the file directory.
  • the stored routing information is found in the stored routing information.
  • the routing information of the Meta Server associated with the file is provided to the client, so that the client accesses the Meta Server by using the routing information provided by the Master Server;
  • Meta Server which is used to store the meta information of the associated file, the number of Meta Servers is greater than or equal to 1; when receiving the access of the client, providing the meta information of the file that the client needs to access to the client, so that the client can utilize
  • the meta information provided by the Meta Server accesses the files that need to be accessed from the Node Server.
  • the node server is used to store backups of data blocks and/or data blocks into which files are divided.
  • the number of Node Servers is greater than or equal to 1.
  • a file access method including:
  • a client applied to file access including:
  • a first access unit configured to access a file directory stored by the master server, and obtain, from the master server, routing information of the meta information server Meta Server associated with the file that the client needs to access;
  • a second access unit configured to access the Meta Server by using the routing information obtained by the first access unit, and obtain meta information of the file that the client needs to access from the Meta Server;
  • the third access unit is configured to use the acquired meta information to access the file that needs to be accessed from the multiple node server Node Server.
  • the file directory and the file meta information are separately stored, that is, the client only accesses the file directory of the Master Server and the routing information of the Meta Server associated with each file in the file directory. And go to the Meta Server to access the meta-information of the specific file, which provides a higher number of visits per second (QPS) than a single Master Server that provides both file directory access and file meta-information access. It is possible to provide a higher number of concurrent accesses.
  • the master server only stores file directories, which ensures that the distributed file system in the embodiment of the present invention stores more files.
  • FIG. 1 is a schematic structural diagram of a distributed file system according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a file access method according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a client according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a client according to another embodiment of the present invention. Mode for carrying out the invention
  • the distributed file system provided by the embodiment of the present invention has the structure shown in FIG. 1, and includes: a master server, at least one meta information server ( Meta Server), and at least one node server (Node Server).
  • Meta Server meta information server
  • Node Server node server
  • the number of the Meta Server and the Node Server may be set according to the cluster size, which is not specifically limited in the embodiment of the present invention.
  • the distributed system provided by the embodiment of the present invention The three-layer architecture is adopted, wherein the upper layer is the master server, the middle layer is at least one meta server, and the lower layer is at least one Node server. Based on this, the distributed system provided by the embodiment of the present invention may be referred to as a three-layer architecture. Distributed file system.
  • the number of Meta Servers and Node Servers may be set according to the cluster size.
  • the distributed system provided by the embodiment of the present invention may also be referred to as an extended distributed file system, which is called XFS (extensible file system).
  • the storage of the file meta-information is much larger than the storage of the file directory.
  • the file directory and the file meta-information are separately stored in the embodiment of the present invention.
  • Server stores, and the file meta information is stored in Meta Server.
  • the storage in the Master Server is also associated with each file in the file directory. Meta Server routing information.
  • Master Server used to store the file directory, and the routing information of the Meta Server associated with each file in the file directory;
  • each Meta Server is configured to store meta information of a file associated with the file, where the meta information of the file includes at least: a length of the file, a number of data blocks into which the file is divided, and each data block into which the file is divided, and
  • the meta information of the file may further include: a file creation time, a file creator, and summary information of each data block into which the file is divided.
  • the embodiment of the present invention is not specifically limited.
  • Each Node Server is used to store backups of data blocks and/or other data blocks. Wherein, each Node Server can store only one or more of the same file divided into A data block, but it is forbidden to simultaneously store a certain data block into which the same file is divided and a backup of the data block. That is, a block of data cannot be stored on the same Node Server as its backup.
  • the file 1 for the file in the file directory stored by the Master Server (referred to as file 1), if the file 1 is divided into 5 data blocks, in order to improve the fault tolerance of the system.
  • the five data blocks and their backups may be dispersed in different manners according to the characteristics of the backup of the Node Server storage data block and the data block described above.
  • how the file 1 is divided into data blocks can be based on the existing division manner, and the present invention will not repeat them.
  • multiple backups of one data block may exist.
  • the embodiment of the present invention does not store the multiple backups in the same
  • the Node Server is distributed on different Node Servers, that is, all backups of the same data block are not stored in the same Node Server.
  • backups of different data blocks into which the same file is divided are not stored in the same Node Server based on fault tolerance considerations.
  • the Master Server finds the file that the client needs to access in the stored file directory, and finds the stored routing information.
  • the routing information of the Meta Server associated with the file is provided to the client, so that the client accesses the Meta Server by using the routing information provided by the Master Server; and when the Meta Server receives the access of the client, providing the client needs
  • the meta information of the accessed file is sent to the client, so that the client accesses the file that needs to be accessed by using the meta information provided by the Meta Server.
  • the client's file access can be completed. It can be seen that the client only accesses the file directory of the Master Server and the route of the Meta Server associated with each file in the file directory. Information, and go to Meta Server to access the meta-information of specific files, which provides a higher number of visits per second (QPS) than a single Master Server that provides both file directory access and file meta-information access. It is also possible to provide a higher number of concurrent accesses.
  • the master server only stores the file directory, which can expand the file directory stored by the master server, and ensure that the distributed file system provided by the embodiment of the present invention stores more files.
  • the Master Server since the Master Server only stores the file directory and the routing information of the Meta Server associated with each file in the file directory, the meta information of the file is not stored, which is compared to a single Master Server.
  • the number of files in the cluster is no longer limited due to the limited memory of a single Master Server. Instead, the number of files can be flexibly expanded, and the number of Meta Servers and Node Servers can be flexibly expanded accordingly. .
  • each Meta Server of the extension is similar to the original Meta Server function of the distributed file system. For example, if the currently extended Meta Server is recorded as Server 1 and Server 2, Server1 is For example, the principle of Server2 is similar, Bay' J,
  • the Server1 can store the meta information of the file associated with it, wherein the file associated with Server1 can be a file existing in the file directory of the Master Server, and the file associated with Server1 exists in the file directory of the Master Server.
  • the server 1 stores the meta information of the file 1, wherein the server 1 stores the meta information of the file 1, and can provide a backup for the Meta Server that has stored the meta information of the file 1 to improve the system. Fault tolerance.
  • the file associated with the Server1 may also be a file that does not exist in the file directory of the Master Server, but a file that needs to be expanded according to requirements.
  • Serverl stores the meta information of the file that needs to be expanded.
  • the Master Server is also used to add a force to the file directory and the extended Meta Server.
  • the Node Server which is extended according to requirements in the embodiment of the present invention, it is similar to the existing Node Server function of the distributed file system, and is used for storing backups of data blocks and/or data blocks into which files are divided.
  • the extended data block of each Node Server may be a data block or a data block that is divided into a file that exists in the file directory of the Master Server, or may be a data block or data that is divided into a newly extended file.
  • Block backup how to store data blocks in detail, can be set according to the current actual situation, and will not be described here.
  • the Master Server only stores the file directory and the routing information of the Meta Server associated with each file in the file directory, and the file directory and the Meta Server associated with each file in the file directory.
  • the storage space occupied by the routing information is not large, especially when the name of the file in the file directory is short, such as a short number or character encoding, which ensures that the Master Server stores more file directories and files associated with the files in the file directory.
  • the routing information of the linked Meta Server expands the cluster size.
  • the file directory on the Master Server and the routing information of the Meta Server associated with each file in the file directory may be stored to other quick accesses.
  • the storage space of the distributed system is much larger than that of the Master Server. This ensures that more file directories are stored, and more Meta Server routing information associated with each file in the file directory. The concurrent access capability of the entire cluster will be Further improvement.
  • Meta Servers since the number of Meta Servers is not unique, if one or more Meta Servers fail, and other normal Meta Servers are not affected, some files can still be read and written, and the fault tolerance is stronger. .
  • FIG. 2 is a flowchart of a file access method according to an embodiment of the present invention.
  • the process shown in Figure 2 can be performed by the client.
  • the method includes the following steps: Step 201: Access a file directory stored by the Master Server, and obtain a Meta Server associated with the file to be accessed from the Master Server. Routing information;
  • Step 202 Access the Meta Server by using the obtained routing information, and obtain meta information of the file to be accessed from the Meta Server.
  • the meta information of the file includes at least: a length of the file, a number of data blocks into which the file is divided, each data block into which the file is divided, and a Node where the backup of each data block is located. Server.
  • Step 203 Access the file to be accessed from the plurality of Node Servers by using the obtained meta information.
  • the client only accesses the file directory and the Meta Server routing information associated with each file in the file directory, and goes to Meta Server to access the meta information of the specific file, which is compared to a single
  • the Master Server provides both higher file access times (QPS) and higher concurrent access in terms of file directory access and access to file meta information.
  • FIG. 3 is a structural diagram of a client according to an embodiment of the present invention.
  • the client includes:
  • a first access unit configured to access a file directory stored by the Master Server, and obtain, from the Master Server, routing information of a Meta Server associated with a file that the client needs to access;
  • a second access unit configured to access by using routing information acquired by the first access unit Meta Server, and obtain meta information of the files that the client needs to access from the Meta Server.
  • the meta information of the file includes at least: a length of the file, a number of data blocks into which the file is divided, each data block into which the file is divided, and a Node Server where the backup of each data block is located;
  • the third access unit is configured to access the file that needs to be accessed from the plurality of Node Servers by using the meta information obtained by the second access unit.
  • FIG. 4 is a schematic structural diagram of a client according to another embodiment of the present invention.
  • the client includes at least: a memory and a processor in communication with the memory, wherein the memory includes first access instructions, second access instructions, and third access instructions executable by the processor.
  • the first access instruction is used to access a file directory stored by the master server, and obtain, from the master server, routing information of the meta information server Meta Server associated with the file that the client needs to access;
  • a second access instruction configured to access the Meta Server by using the routing information obtained by the first access instruction, and obtain, from the Meta Server, meta information of a file that the client needs to access;
  • a third access instruction configured to access the file to be accessed from the plurality of node servers Node Server by using the meta information obtained by the second access instruction.
  • the meta information of the file includes at least: a length of the file, a number of data blocks into which the file is divided, each data block into which the file is divided, and a Node Server where the backup of each data block is located.
  • the file directory and the file meta information are separately stored, that is, the client only accesses the file directory of the Master Server and the routing information of the Meta Server associated with each file in the file directory. , and go to the Meta Server access
  • the meta-information of the file which provides a higher QPS and provides a higher amount of concurrent access than a single Master Server that provides both file directory access and file meta-information access.

Landscapes

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

Abstract

本申请实施例提供了分布式文件***、文件访问方法以及客户端。其中,该方法包括:访问主服务器Master Server存储的文件目录,并从Master Server获取与需要访问的文件相关联的元信息服务器Meta Server的路由信息;利用获取的路由信息访问Meta Server,并从该Meta Server中获取需要访问的文件的元信息,利用获取的元信息从多个节点服务器Node Server上访问需要访问的文件。

Description

分布式文件***、 文件访问方法以及客户端
技术领域
本申请涉及数据存储技术, 特别涉及分布式文件***、 文件访问方 法以及客户端。 发明背景
目前,在工业界具有典型代表性的分布式文件***是 Google公司的 分布式文件***, 筒称 GFS ( Global File System )。 该 GFS主要由一个 主服务器( Master Server )和众多块服务器( Chunk Server )组成。 其中, Master Server 主要负责存储文件目录、 以及文件目录中各文件的元 ( meta )信息。 这里, meta信息主要包括: 文件的大小、 文件被分成的 数据块的数量、 文件被分成的数据块所处的 Chunk Server 等。 Chunk Server主要负责存储文件被分成的数据块。 通常, 一个文件会按照一定 大小划分为多个数据块, 每一个数据块称为一个 Chunk, 这些数据块分 散存储在不同的 Chunk Server。
但是, 由于 GFS只有一个 Master Server提供文件目录和文件 meta 信息的查询, 这会限制文件的并发访问量, 并且, 因单一 Master Server 的内存限制, 也会限制 GFS存储的文件数目。 发明内容
本申请实施例提供了分布式文件***、 文件访问方法以及客户端, 以提高单一集群(cluster ) 的文件数目以及文件的并发访问量。
本申请实施例提供的技术方案包括:
一种分布式文件***, 包括: 主服务器 Master Server, 用于存储文件目录、 以及与文件目录中各 文件相关联的 Meta Server的路由信息;在存储的文件目录中存在客户端 需要访问的文件时, 从存储的路由信息中找到与该文件相关联的 Meta Server的路由信息并提供给客户端, 以使客户端利用所述 Master Server 提供的路由信息访问 Meta Server;
Meta Server , 用于存储相关联的文件的元信息, Meta Server的数量 大于等于 1 ; 在接收到客户端的访问时, 提供该客户端需要访问的文件 的元信息给客户端, 以使客户端利用所述 Meta Server提供的元信息从 Node Server访问需要访问的文件。
节点服务器 Node Server, 用于存储文件被划分成的数据块和 /或数 据块的备份, Node Server的数量大于等于 1。
一种文件访问方法, 包括:
访问主月良务器 Master Server存者的文件目录,并从 Master Server获 取与需要访问的文件相关联的元信息服务器 Meta Server的路由信息; 利用获取的路由信息访问 Meta Server, 并从该 Meta Server中获取 需要访问的文件的元信息;
利用获取的元信息从多个节点服务器 Node Server上访问需要访问 的文件。
一种应用于文件访问的客户端, 包括:
第一访问单元, 用于访问主服务器 Master Server存储的文件目录, 并从 Master Server获取与本客户端需要访问的文件相关联的元信息服务 器 Meta Server的路由信息;
第二访问单元, 用于利用所述第一访问单元获取的路由信息访问 Meta Server,并从该 Meta Server中获取本客户端需要访问的文件的元信 息; 第三访问单元, 用于利用获取的元信息从多个节点服务器 Node Server上访问需要访问的文件。
由以上技术方案可以看出, 在本发明实施例中, 文件目录和文件元 信息分开存储, 即, 客户端只在 Master Server访问文件目录和与文件目 录中各文件相关联的 Meta Server的路由信息, 而去 Meta Server访问具 体文件的元信息, 这相比单个 Master Server既要提供文件目录访问, 又 要提供文件元信息的访问而言, 能提供更高的每秒访问次数(QPS ), 也 能提供更高的并发访问量, 同时由于本发明实施例中 Master Server只存 储文件目录, 这能保证本发明实施例中的分布式文件***存储更多的文 件。 附图简要说明
图 1为本发明实施例提供的分布式文件***结构示意图;
图 2为本发明实施例提供的文件访问方法流程示意图;
图 3为本发明实施例提供的客户端结构示意图;
图 4为本发明另一实施例提供的客户端结构示意图。 实施本发明的方式
为了使本发明的目的、 技术方案和优点更加清楚, 下面结合附图和 具体实施例对本发明进行详细描述。
本发明实施例提供的分布式文件***具有图 1所示的结构,其包括: 一个主服务器( Master Server )、 至少一个元信息服务器( Meta Server )、 以及至少一个节点服务器( Node Server )。 其中, Meta Server以及 Node Server的数量可根据集群规模设置, 本发明实施例并不具体限定。
从图 1所示的分布式***可以看出, 本发明实施例提供的分布式系 统采用了三层架构, 其中, 最上层为 Master Server, 中间层为至少一个 Meta Server, 最下层为至少一个 Node Server, 基于此, 本发明实施例提 供的分布式***可称为三层架构的分布式文件***。
另外, 由于本发明实施例提供的分布式文件***中, Meta Server以 及 Node Server的数量可根据集群规模设置, 当根据需求需要扩展集群 规模时, 该 Meta Server以及 Node Server的数量也需要扩展, 基于此, 还可将本发明实施例提供的分布式***称为扩展的分布式文件***, 筒 称 XFS ( extensible File System )。
正常情况下, 文件元信息的存储量会比文件目录的存储量大很多, 为了扩展分布式文件***, 本发明实施例将文件目录和文件元信息分开 存储, 具体为: 将文件目录单独用 Master Server存储, 而将文件元信息 用 Meta Server存储, 其中, 为了将文件目录中的文件与 Meta Server存 储的该文件的元信息关联起来,还需要在 Master Server中存储与文件目 录中各文件相关联的 Meta Server的路由信息。
下面对图 1所示分布式文件***中各个功能单元进行描述:
Master Server , 用于存储文件目录、 以及与文件目录中各文件相关 联的 Meta Server的路由信息;
而每一 Meta Server, 用于存储与其相关联的文件的元信息, 所述文 件的元信息至少包括: 文件的长度、 文件被划分成的数据块的数量、 文 件被划分成的各数据块以及各数据块的备份所处的 Node Server; 优选 地, 本发明实施例中, 所述文件的元信息还可进一步包括: 文件创建时 间、 文件创建者、 文件被划分成的各个数据块的摘要信息等, 本发明实 施例并不具体限定。
而每一 Node Server, 用于存储数据块和 /或其它数据块的备份。 其中,每一 Node Server可以仅存储同一文件被划分成的一个或多个 数据块, 但禁止同时存储同一文件被划分成的某一数据块和该数据块的 备份。 也就是说, 一个数据块不能和其备份同时存储在同一 Node Server 上。
以图 1所示分布式文件***为例, 则, 针对 Master Server存储的文 件目录中的文件(记为文件 1 ) , 如果该文件 1被划分成 5个数据块, 则 为了提高***的容错能力, 还需要针对这 5个数据块进行备份, 基于上 面描述的 Node Server存储数据块及数据块的备份的特点, 在本发明实 施例中, 可将该 5个数据块和其备份分散放在不同的 Node Server上即 可。 其中, 文件 1如何被划分成数据块可依据现有划分方式, 本发明不 再赘述。
在本发明实施例中, 一个数据块可存在多个备份, 针对一个数据块 的多个备份, 为了提高***容错能力, 优选地, 本发明实施例并不将该 多个备份同时存放在同一个 Node Server, 而是分散存放在不同的 Node Server上, 即同一数据块的所有备份不存放在同一 Node Server。 并且, 针对同一文件被划分成的不同数据块的备份, 基于容错能力的考虑, 也 不存放在同一个 Node Server。
基于上述 Master Server, Meta Server以及 Node Server存者的信息, 则, 当客户端需要访问一文件时, Master Server在存储的文件目录中存 在客户端需要访问的文件时, 从存储的路由信息中找到与该文件相关联 的 Meta Server的路由信息并提供给客户端,以使客户端利用所述 Master Server提供的路由信息访问 Meta Server;而当 Meta Server接收到客户端 的访问时, 提供该客户端需要访问的文件的元信息给客户端, 以使客户 端利用所述 Meta Server提供的元信息访问需要访问的文件。
如此, 即可完成客户端的文件访问。 可以看出, 客户端只在 Master Server访问文件目录和与文件目录中各文件相关联的 Meta Server的路由 信息,而去 Meta Server访问具体文件的元信息,这相比单个 Master Server 既要提供文件目录访问, 又要提供文件元信息的访问而言, 能提供更高 的每秒访问次数(QPS ), 也能提供更高的并发访问量, 同时由于 Master Server仅存储文件目录, 这能够扩展该 Master Server存储的文件目录, 保证本发明实施例提供的分布式文件***存储更多的文件。
需要说明的是, 在本发明实施例中, 由于 Master Server仅存储文件 目录和与文件目录中各文件相关联的 Meta Server的路由信息,并不存储 文件的元信息, 这相比单个 Master Server既要提供文件目录, 又要提供 文件元信息而言, 不再因单一 Master Server的内存有限而限制集群的文 件数目, 而是可以灵活扩展文件数目, 也可相应灵活扩展 Meta Server 和 Node Server的数量。
以根据需求需要扩展 Meta Server的数量为例, 该扩展的每一 Meta Server与分布式文件***原有的 Meta Server功能类似, 比如,假如当前 扩展的 Meta Server记为 Server 1和 Server2, 以 Serverl为例, Server2 原理类似, 贝' J ,
该 Serverl 可以存储与其相关联的文件的元信息, 其中, 与 Serverl 相关联的文件可为 Master Server 的文件目录中已存在的文件, 以与 Serverl相关联的文件为 Master Server的文件目录中已存在的一文件(记 为文件 1 ) 为例, 则 Serverl存储文件 1的元信息, 其中, Serverl存储 文件 1的元信息,能够为已存储了文件 1的元信息的 Meta Server提供备 份, 以提高***容错能力。
当然, 作为本发明实施例的扩展, 与该 Serverl 相关联的文件也可 以为 Master Server的文件目录中不存在的一文件, 而是根据需求需要扩 展的文件。基于此, Serverl就存储该需要扩展的文件的元信息。相应地, Master Server 还用于在文件目录中添力口与扩展的 Meta Server 比如 Serverl 相关联的文件, 以及接收并存储该扩展的 Meta Server 比如 Serverl之间的路由信息。
至于本发明实施例中根据需求扩展的每一 Node Server,其与分布式 文件***已有的 Node Server功能类似, 用于存储文件被划分的数据块 和 /或数据块的备份。 其中, 扩展的每一 Node Server存储的数据块可为 Master Server的文件目录中已存在的一文件被划分的数据块或数据块备 份, 也可为新扩展的一文件被划分的数据块或数据块备份, 具体如何存 放数据块, 可依据当前实际情况设定, 这里不再赘述。
还有, 在本发明实施例中, 由于 Master Server只存储文件目录和与 文件目录中各个文件相关联的 Meta Server的路由信息,而该文件目录和 与文件目录中各个文件相关联的 Meta Server的路由信息占用的存储空 间不大, 尤其是当文件目录中文件的名称筒短比如为筒短的数字或字符 编码时, 这能够保证 Master Server存储更多的文件目录和与文件目录中 各个文件相关联的 Meta Server的路由信息, 扩展集群规模。 另外, 作为 本发明实施例的一个扩展, 在本发明实施例中, 还可将 Master Server上 的文件目录、以及与文件目录中各文件相关联的 Meta Server的路由信息 存储至其他可快速访问的分布***上, 该分布***的存储空间远大于 Master Server, 这能保证存储更多的文件目录、 以及更多与文件目录中 各个文件相关联的 Meta Server的路由信息,整个集群的并发访问能力将 进一步提升。
另夕卜, 在本发明实施例中, 因 Meta Server的数量并非唯一, 这样, 若其中一个或多个 Meta Server出现故障, 不影响其他正常 Meta Server, 部分文件仍能读写, 容错能力更强。
至此, 完成图 1所示分布式文件***的描述。
下面对本发明实施例提供的方法进行描述: 基于图 1所示的分布式文件***, 本发明实施例提供了一种文件访 问方法。 参见图 2, 图 2为本发明实施例提供的文件访问方法流程图。 该图 2所示的流程可由客户端执行, 具体如图 2所示, 包括以下步骤: 步骤 201 , 访问 Master Server存储的文件目录, 并从 Master Server 获取与需要访问的文件相关联的 Meta Server的路由信息;
步骤 202,利用获取的路由信息访问 Meta Server,并从该 Meta Server 中获取需要访问的文件的元信息。
优选地, 本发明实施例中, 所述文件的元信息至少包括: 文件的长 度、 文件被划分成的数据块的数量、 文件被划分成的各数据块以及各数 据块的备份所处的 Node Server。
步骤 203 ,利用获取的元信息从多个 Node Server上访问需要访问的 文件。
至此, 完成图 2所示方法的描述。 从图 2所示流程可以看出, 客户 端只在 Master Server访问文件目录和与文件目录中各文件相关联的 Meta Server的路由信息, 而去 Meta Server访问具体文件的元信息, 这 相比单个 Master Server既要提供文件目录访问, 又要提供文件元信息的 访问而言, 能提供更高的每秒访问次数(QPS ), 也能提供更高的并发访 问量。
优选地, 本发明实施例还提供了一种应用于文件访问的客户端。 参见图 3 , 图 3为本发明实施例提供的客户端结构图。 如图 3所示, 所述客户端包括:
第一访问单元,用于访问 Master Server存储的文件目录,并从 Master Server获取与本客户端需要访问的文件相关联的 Meta Server的路由信 息;
第二访问单元, 用于利用所述第一访问单元获取的路由信息访问 Meta Server,并从该 Meta Server中获取本客户端需要访问的文件的元信 息。 其中, 所述文件的元信息至少包括: 文件的长度、 文件被划分成的 数据块的数量、 文件被划分成的各数据块以及各数据块的备份所处的 Node Server;
第三访问单元, 用于利用第二访问单元获取的元信息从多个 Node Server上访问需要访问的文件。
至此, 完成图 3所示的客户端描述。
图 4为本发明另一实施例提供的客户端结构示意图。如图 4所示, 该客户端至少包括: 存储器以及与存储器通信的处理器, 其中该存储 器中包括可由处理器执行的第一访问指令、第二访问指令和第三访问 指令。
该第一访问指令,用于访问主服务器 Master Server存储的文件目录, 并从 Master Server获取与本客户端需要访问的文件相关联的元信息服务 器 Meta Server的路由信息;
第二访问指令, 用于利用所述第一访问指令获取的路由信息访问 Meta Server,并从该 Meta Server中获取本客户端需要访问的文件的元信 息;
第三访问指令, 用于利用所述第二访问指令获取的元信息从多个节 点服务器 Node Server上访问需要访问的文件。
优选地, 所述文件的元信息至少包括: 文件的长度、 文件被划分成 的数据块的数量、 文件被划分成的各数据块以及各数据块的备份所处的 Node Server。
由以上技术方案可以看出, 在本发明实施例中, 文件目录和文件元 信息分开存储, 即, 客户端只在 Master Server访问文件目录和与文件目 录中各文件相关联的 Meta Server的路由信息, 而去 Meta Server访问具 体文件的元信息, 这相比单个 Master Server既要提供文件目录访问 , 又 要提供文件元信息的访问而言, 能提供更高的 QPS , 也能提供更高的并 发访问量。
以上所述仅为本发明的较佳实施例而已, 并不用以限制本发明, 凡 在本发明的精神和原则之内, 所做的任何修改、 等同替换、 改进等, 均 应包含在本发明保护的范围之内。

Claims

权利要求书
1、 一种分布式文件***, 其特征在于, 所述分布式文件***包括: 主服务器 Master Server, 用于存储文件目录、 以及与文件目录中各 文件相关联的元信息服务器 Meta Server的路由信息;在存储的文件目录 中存在客户端需要访问的文件时, 从存储的路由信息中找到与该文件相 关联的 Meta Server的路由信息并提供给客户端, 以使客户端利用所述 Master Server提供的路由信息访问 Meta Server;
Meta Server , 用于存储与其相关联的文件的元信息, Meta Server的 数量大于等于 1 ; 在接收到客户端的访问时, 提供该客户端需要访问的 文件的元信息给客户端,以使客户端利用所述 Meta Server提供的元信息 从 Node Server访问需要访问的文件;
节点服务器 Node Server, 用于存储文件被划分成的数据块和 /或该 文件其它数据块的备份, Node Server的数量大于等于 1。
2、根据权利要求 1所述的***, 其特征在于, 所述文件的元信息至 少包括: 文件的长度、 文件被划分成的数据块的数量、 文件被划分成的 各数据块以及各数据块的备份所处的 Node Server。
3、 根据权利要求 1所述的***, 其特征在于, 每一 Node Server禁 止同时存储数据块和该数据块的备份; 和 /或,
每一 Node Server禁止同时存储同一数据块的所有备份。
4、根据权利要求 1至 3任一所述的***, 其特征在于, 所述分布式 文件***进一步包括扩展的 Meta Server和 /或 Node Server;
Master Server还用于在文件目录中添加与扩展的 Meta Server相关联 的文件, 以及接收并存储该扩展的 Meta Server的路由信息;
扩展的每一 Meta Server用于存储与其相关联的文件的元信息; 扩展的每一 Node Server用于存放数据块和 /或其它数据块的备份。
5、 一种文件访问方法, 其特征在于, 该方法包括:
访问主月良务器 Master Server存者的文件目录,并从 Master Server获 取与需要访问的文件相关联的元信息服务器 Meta Server的路由信息; 利用获取的路由信息访问 Meta Server , 并从该 Meta Server中获取 需要访问的文件的元信息;
利用获取的元信息从多个节点服务器 Node Server上访问需要访问 的文件。
6、根据权利要求 5所述的方法, 其特征在于, 所述文件的元信息至 少包括: 文件的长度、 文件被划分成的数据块的数量、 文件被划分成的 各数据块以及各数据块的备份所处的 Node Server。
7、 根据权利要求 5所述的方法, 其特征在于, 每一 Node Server禁 止同时存储数据块和该数据块的备份; 和 /或,
每一 Node Server禁止同时存储同一数据块的所有备份。
8、 一种应用于文件访问的客户端, 其特征在于, 所述客户端包括: 第一访问单元, 用于访问主服务器 Master Server存储的文件目录, 并从 Master Server获取与本客户端需要访问的文件相关联的元信息服务 器 Meta Server的路由信息;
第二访问单元, 用于利用所述第一访问单元获取的路由信息访问 Meta Server ,并从该 Meta Server中获取本客户端需要访问的文件的元信 息;
第三访问单元, 用于利用所述第二访问单元获取的元信息从多个节 点服务器 Node Server上访问需要访问的文件。
9、根据权利要求 8所述的客户端, 其特征在于, 所述文件的元信息 至少包括: 文件的长度、 文件被划分成的数据块的数量、 文件被划分成 的各数据块以及各数据块的备份所处的 Node Server。
PCT/CN2013/079855 2012-07-26 2013-07-23 分布式文件***、文件访问方法以及客户端 WO2014015782A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2015523398A JP2015528957A (ja) 2012-07-26 2013-07-23 分散ファイルシステム、ファイルアクセス方法及びクライアントデバイス
US14/414,501 US20150169623A1 (en) 2012-07-26 2013-07-23 Distributed File System, File Access Method and Client Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210261331.1A CN103581229B (zh) 2012-07-26 2012-07-26 分布式文件***、文件访问方法以及客户端
CN201210261331.1 2012-07-26

Publications (1)

Publication Number Publication Date
WO2014015782A1 true WO2014015782A1 (zh) 2014-01-30

Family

ID=49996586

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/079855 WO2014015782A1 (zh) 2012-07-26 2013-07-23 分布式文件***、文件访问方法以及客户端

Country Status (4)

Country Link
US (1) US20150169623A1 (zh)
JP (1) JP2015528957A (zh)
CN (1) CN103581229B (zh)
WO (1) WO2014015782A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10691478B2 (en) 2016-08-15 2020-06-23 Fujitsu Limited Migrating virtual machine across datacenters by transferring data chunks and metadata

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105635196B (zh) * 2014-10-27 2019-08-09 中国电信股份有限公司 一种获取文件数据的方法、***和应用服务器
CN104462335B (zh) * 2014-12-03 2017-12-29 北京和利时***工程有限公司 一种访问数据的方法和服务器代理
CN106470163B (zh) * 2015-08-17 2020-07-07 腾讯科技(北京)有限公司 一种信息处理方法、装置和***
CN108804711B (zh) * 2018-06-27 2022-12-06 郑州云海信息技术有限公司 一种数据处理的方法、装置和计算机可读存储介质
CN109756573B (zh) * 2019-01-15 2022-02-08 苏州链读文化传媒有限公司 一种基于区块链的文件***
US11768954B2 (en) 2020-06-16 2023-09-26 Capital One Services, Llc System, method and computer-accessible medium for capturing data changes

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7487228B1 (en) * 2003-01-30 2009-02-03 Red Hat, Inc. Metadata structures and related locking techniques to improve performance and scalability in a cluster file system
WO2010005460A1 (en) * 2008-07-11 2010-01-14 Avere Systems, Inc. Media aware distributed data layout
CN101997823A (zh) * 2009-08-17 2011-03-30 联想(北京)有限公司 一种分布式文件***及其数据访问方法
CN101576915B (zh) * 2009-06-18 2011-06-08 北京大学 一种分布式b+树索引***及构建方法
CN102420854A (zh) * 2011-11-14 2012-04-18 西安电子科技大学 面向云存储的分布式文件***

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9413825B2 (en) * 2007-10-31 2016-08-09 Emc Corporation Managing file objects in a data storage system
US8346824B1 (en) * 2008-05-21 2013-01-01 Translattice, Inc. Data distribution system
WO2010036889A1 (en) * 2008-09-25 2010-04-01 Bakbone Software, Inc. Remote backup and restore
US9239843B2 (en) * 2009-12-15 2016-01-19 Symantec Corporation Scalable de-duplication for storage systems
US8468135B2 (en) * 2010-04-14 2013-06-18 International Business Machines Corporation Optimizing data transmission bandwidth consumption over a wide area network
US9128626B2 (en) * 2010-10-01 2015-09-08 Peter Chacko Distributed virtual storage cloud architecture and a method thereof
CN102158546B (zh) * 2011-02-28 2013-05-08 中国科学院计算技术研究所 一种集群文件***及其文件服务方法
CN102307221A (zh) * 2011-03-25 2012-01-04 国云科技股份有限公司 一种云存储***及其实现方法
US8533231B2 (en) * 2011-08-12 2013-09-10 Nexenta Systems, Inc. Cloud storage system with distributed metadata
JP5174255B2 (ja) * 2012-02-28 2013-04-03 株式会社インテック ストレージサービス提供装置、システム、サービス提供方法、及びサービス提供プログラム

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7487228B1 (en) * 2003-01-30 2009-02-03 Red Hat, Inc. Metadata structures and related locking techniques to improve performance and scalability in a cluster file system
WO2010005460A1 (en) * 2008-07-11 2010-01-14 Avere Systems, Inc. Media aware distributed data layout
CN101576915B (zh) * 2009-06-18 2011-06-08 北京大学 一种分布式b+树索引***及构建方法
CN101997823A (zh) * 2009-08-17 2011-03-30 联想(北京)有限公司 一种分布式文件***及其数据访问方法
CN102420854A (zh) * 2011-11-14 2012-04-18 西安电子科技大学 面向云存储的分布式文件***

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10691478B2 (en) 2016-08-15 2020-06-23 Fujitsu Limited Migrating virtual machine across datacenters by transferring data chunks and metadata

Also Published As

Publication number Publication date
JP2015528957A (ja) 2015-10-01
US20150169623A1 (en) 2015-06-18
CN103581229B (zh) 2018-06-15
CN103581229A (zh) 2014-02-12

Similar Documents

Publication Publication Date Title
US11809726B2 (en) Distributed storage method and device
CN107547653B (zh) 一种分布式文件存储***
JP6538780B2 (ja) 分散型データベースシステムのシステム全体のチェックポイント回避
WO2014015782A1 (zh) 分布式文件***、文件访问方法以及客户端
US20220284046A1 (en) Application Programming Interface-based Writing of Data to a Directory of a File Structure Layer of a Data Storage System
US8694564B2 (en) Method and system for providing on-demand services through a virtual file system at a computing device
US8301654B2 (en) Geographical distributed storage system based on hierarchical peer to peer architecture
US10031933B2 (en) Peer to peer ownership negotiation
US10210167B1 (en) Multi-level page caching for distributed object store
US9031906B2 (en) Method of managing data in asymmetric cluster file system
US20130218934A1 (en) Method for directory entries split and merge in distributed file system
US11080253B1 (en) Dynamic splitting of contentious index data pages
JP2009533759A (ja) 分散データを再構築するためのシステム
CN109302448B (zh) 一种数据处理方法及装置
US7533133B1 (en) Externally managed file versions
WO2014107901A1 (zh) 数据存储方法、数据库存储节点故障处理方法及装置
US11334456B1 (en) Space efficient data protection
WO2018000618A1 (zh) 对象文件的追加、截断方法及服务器
US10684786B2 (en) Methods for performing global deduplication on data blocks and devices thereof
JP5890452B2 (ja) クラスタシステムのサーバ装置およびそのプログラム
JP2012508411A (ja) デジタルデータ集合の仮想ストレージ方法および仮想ストレージシステム

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: 13823833

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14414501

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2015523398

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 24/06/2015)

122 Ep: pct application non-entry in european phase

Ref document number: 13823833

Country of ref document: EP

Kind code of ref document: A1