WO2014101000A1 - 元数据管理方法及系统 - Google Patents

元数据管理方法及系统 Download PDF

Info

Publication number
WO2014101000A1
WO2014101000A1 PCT/CN2012/087519 CN2012087519W WO2014101000A1 WO 2014101000 A1 WO2014101000 A1 WO 2014101000A1 CN 2012087519 W CN2012087519 W CN 2012087519W WO 2014101000 A1 WO2014101000 A1 WO 2014101000A1
Authority
WO
WIPO (PCT)
Prior art keywords
directory
name
metadata
same
storage
Prior art date
Application number
PCT/CN2012/087519
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 PCT/CN2012/087519 priority Critical patent/WO2014101000A1/zh
Priority to CN201280002961.5A priority patent/CN103229173B/zh
Publication of WO2014101000A1 publication Critical patent/WO2014101000A1/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/13File access structures, e.g. distributed indices

Definitions

  • the present invention relates to computer technologies, and in particular, to a metadata management method and system.
  • BACKGROUND OF THE INVENTION Metadata is positioned to obtain data it manages.
  • the organizational structure of metadata in the prior art is divided into two categories: file system metadata and object system metadata, where file system metadata is in units of files/directories, and various files and directories in the metadata organization structure ⁇ The hierarchical structure of the directory tree is stored in the storage unit by the inode.
  • the inodes are used as the identifier for multiple input and output (10).
  • the object system metadata structure is in the bucket/ The object (Bucket/object) is stored for the storage unit.
  • the object is the name without the directory hierarchy.
  • the data storage management structure can realize the metadata management of the two types of systems at the same time without affecting the application characteristics and operational efficiency of the two types of systems.
  • the present invention provides a metadata management method and system for unifying metadata storage of a file system and an object system while ensuring respective application characteristics and operational efficiency of a file system and an object system.
  • a first aspect of the present invention provides a metadata management method, including: using a directory hierarchy as a metadata organization structure, and using a user name in an object system as a first layer directory in a root directory of a directory hierarchy;
  • the bucket corresponding to the user name in the object system is used as the directory under the user name directory in the directory hierarchy;
  • the object name is divided into the directory name under the corresponding bucket directory according to the separator in the object name associated with each bucket in the object system or file name;
  • the binary node of the index node in the same directory is stored in the binary tree.
  • the same storage unit corresponds to the same storage unit.
  • the directory corresponding to the different absolute path is stored in the The same hash value identifies the corresponding different storage units.
  • a second aspect of the present invention provides a metadata management system, including:
  • An organization module is configured to use a directory hierarchy as a metadata organization structure, and a user name in the object system is used as a first layer directory in a root directory of the directory hierarchy; and a bucket corresponding to a user name in the object system is used as a directory hierarchy.
  • a directory under the user name directory the object name is divided into a directory name or a file name in the corresponding bucket directory according to a separator in the object name associated with each bucket in the object system;
  • the storage module is configured to store metadata in a storage unit of the same directory as the storage unit, and store the hash value calculated by the absolute path name of the directory name or the file name as the storage unit identifier in the directory index node.
  • the storage module is further configured to: if the number of index nodes in the same directory is greater than a preset number, in the same directory The inode tree is stored in the different storage units corresponding to the same identifier.
  • the storage module is further configured to: if the same hash value is calculated according to different absolute path names, the difference is The directory corresponding to the absolute path is stored in different storage units corresponding to the same hash value identifier.
  • the present invention divides the object name into a directory name or a file name under the corresponding bucket directory by using the directory hierarchy as a metadata organization structure and dividing the object name in the object name associated with each bucket in the object system, and by using the directory
  • the hash value calculated by the absolute path name of the directory where the name or file name is stored is stored in the directory index node as the identifier of the storage unit, and the file system and the object system share a metadata management system and the metadata management method is used.
  • FIG. 1 is a flowchart of an embodiment of a metadata management method according to the present invention.
  • FIG. 2 is a schematic diagram of a specific application example of a metadata management method according to the present invention.
  • FIG. 3 is a schematic structural diagram of an embodiment of a metadata management system according to the present invention.
  • FIG. 5 is a schematic structural diagram of another application example of the metadata management system of the present invention. detailed description
  • FIG. 1 is a flowchart of an embodiment of a metadata management method according to the present invention. As shown in FIG. 1, the method in this embodiment includes:
  • Step 101 The directory hierarchy is used as the metadata organization structure, and the user name in the object system is used as the first layer directory in the root directory of the directory hierarchy; and the bucket corresponding to the user name in the object system is used as the directory hierarchy.
  • the object name is divided into the directory name or file name under the corresponding bucket directory according to the separator "/" in the object name associated with each bucket in the object system.
  • the metadata of the file system and the object system are logically unified,
  • the file system and the object system use the same piece of metadata stored.
  • the data organization structure of the metadata uses the directory hierarchy of the file system, and the object names in the object system are divided according to the partition character to obtain the directory name or file name in the corresponding bucket directory, so as to facilitate subsequent selection according to each directory or
  • the absolute path name where the file is located determines the identity of the storage unit.
  • Step 102 Store the metadata in the storage unit of the same directory as the storage unit, and store the hash value calculated by the absolute path name of the directory where the directory name or the file name is located as the storage unit identifier in the directory index node.
  • this step calculates the directory identifier (dir_id) corresponding to the absolute path name of the directory where each directory or file is located, that is, the identifier of the storage unit, and stores the directory identifier, so that According to the directory identifier, the corresponding data can be directly obtained at the time of the directory operation.
  • the corresponding directory identifier is obtained by calculating the hash value of the absolute path name of the directory where the directory name or the file name is located.
  • the hash value obtained by the path structure layered method includes the hierarchical hash algorithm, so the identifier can be reduced. conflict.
  • the identifier of the storage unit can be allocated in a non-sequential manner, and the identifier includes the allocation algorithm of the path fast positioning information, which ensures the rapid positioning of the directory operation and improves the operation efficiency. Since the metadata stored by the method of the present invention does not affect the performance of the file system and the object system and the efficiency of the directory operation, the user does not have the problem of inconvenience in using the two types of systems; and because of the two types of systems ⁇ With the same metadata storage, when the user updates the metadata in the file system, the updated data can be seen in the object system, and vice versa.
  • the file system can be directly used, and the object system can also be directly used, that is, the two types of systems uniformly use a metadata storage system for metadata management, and are stored by the method of the present invention.
  • the object system can obtain the corresponding data through the interface module of the metadata management system.
  • the binary tree fragment storage technology is further used to cooperate with the metadata management method in the foregoing embodiment, that is, if the number of index nodes in the same directory is greater than the pre- When the number is set, binary node fragmentation is performed on the index nodes in the same directory.
  • subdirectories or files belonging to the same directory are fragmented and stored in different storage units with the same identifier, so that when the directory operation is performed , can
  • the corresponding set of storage units is obtained according to the identifier, the corresponding item is found from the set of storage units according to the binary tree fragment, wherein the preset number is set according to requirements.
  • the embodiment of the present invention further calculates that the absolute path name is to be calculated according to different absolute path names.
  • the directories corresponding to the different absolute paths that are the same hash value are stored in different storage units corresponding to the same hash value identifier, that is, stored in a group of storage units corresponding to the same identifier, to avoid storage conflicts, and at the same time
  • Binary tree fragmentation storage technology guarantees the efficiency of directory operations.
  • the file system reads the storage metadata through its Metadata Server (MDS).
  • MDS Metadata Server
  • the specific process is as follows: According to the directory identifier recorded in the directory index node, that is, the identifier of the storage unit reads the data of the corresponding directory once and caches.
  • the log can be recorded in the metadata server cluster, the storage unit identifier of the corresponding subdirectory is modified, and the metadata of the modified subdirectory is written to the new location when the subsequent scan is performed. .
  • the Object store controller (0SC) of the object system can calculate the hash value of the object name of the operation request when executing the user directory operation request; and read the stored index node information 10 times according to the calculated hash value. ; Get the data requested by the user based on the index node information.
  • the updated metadata can be directly obtained through the object system, and the metadata update by the object system can also directly obtain the updated element through the file system.
  • Data, and for their respective systems, metadata is presented to the user in a corresponding form without affecting the performance of the respective system.
  • the directory hierarchy is used as the metadata organization structure, and the object name is divided into the directory name or file name in the corresponding bucket directory by using the separator "/" in the object name associated with each bucket in the object system.
  • the hash value calculated by the absolute path name of the directory name or the file name is stored as the identifier of the storage unit in the directory index node, and the file system and the object system share a metadata management system, and
  • the metadata management method has no effect on the performance of the file system and the object system and the efficiency of the directory operation, so there is no inconvenience to the users of the file system and the object system; further through the binary tree fragmentation technology Take Overcoming the query efficiency problem when the same identifier has more node indexes; at the same time, when there is a conflict in the calculated hash value, it is further overcome by storing different directories in the same set of storage units, and can also cooperate with the fragmentation technology. Avoid reducing efficiency.
  • each subdirectory or file located in the same directory belongs to the same storage unit and has the same index node information, such as an absolute path of /kobe/bucket-1.
  • the subdirectory kl, kl l and the file k_a.avi are included, and according to the metadata management method of the present invention, the three are stored in the same storage unit, and according to the absolute path/kobe/bucket-1 to which the three belong.
  • the hash calculation obtains a hash value of 23, and uses the hash value as the identifier of the storage unit.
  • the other various index nodes are similar.
  • the directory bucket-4 contains three subdirectories and one file.
  • the subdirectory or file under the directory bucket-4 is divided into two stores in Figure 2. Units, and the two storage units are stored in two storage units corresponding to the identifier 33.
  • the absolute value obtained by the hash calculation is the same, that is, when the identifier conflict occurs, the subdirectory under the bucket-4 can be used.
  • the subdirectories of the directory bucket-5 use the same identifier 33, and are respectively located in different storage units, and the storage units are further identified by 33-0, 33-1 and 33-2 respectively.
  • the central processing unit (hereinafter referred to as a CPU) performs the steps of the foregoing method embodiments; and the foregoing storage medium includes: a read-only memory (English for read-only memory, ROM for short), a random access memory (English is random access memory, referred to as RAM), disk or optical disc and other media that can store program code.
  • the system of the embodiment includes: an organization module 10 and a storage module 20, wherein the organization module 10 is configured to use a directory hierarchy as a meta The data organization structure, and the user name in the object system is used as the first layer directory in the root directory of the directory hierarchy; the bucket corresponding to the user name in the object system is used as the directory under the user name directory in the directory hierarchy; according to the object system The separator in the object name associated with each bucket is divided into the directory name or the file name in the corresponding bucket directory; the storage module 20 is configured to store the metadata in the storage unit of the same directory as the storage unit. And by directory name or file The hash value calculated by the absolute path name of the directory where the name is located is stored in the directory index node as the identifier of the storage unit.
  • the organization module 10 divides the object name associated with each bucket into a directory name or a file name in the corresponding bucket directory according to each bucket/object in the object system, and stores the storage module according to each directory name or file.
  • the hash value calculated by the absolute path name of the directory where the name is located.
  • the storage module may be further configured to: if the number of index nodes in the same directory is greater than a preset number, the index in the same directory The node performs binary tree fragmentation in different storage units corresponding to the same identifier to solve the problem of low query efficiency when there are many subdirectories in the same directory.
  • the storage module may be further configured to: if the same hash value is calculated according to different absolute path names, store the directory corresponding to the different absolute path in the The same hash value identifies the corresponding different storage units to avoid storage conflicts.
  • the actual application may further include: an interface module, which implements an interface with a file system or an object system
  • FIG. 4 is a schematic structural diagram of an application example of the metadata management system of the present invention.
  • the metadata management system of this embodiment further includes a first interface module 30 and a second interface module 40, wherein the first interface module 30 is used as a element of the file system.
  • the second interface module 40 is configured to: when the object storage controller of the object system executes the directory operation request of the user, calculate a hash value for the object name of the operation request; and read the index node information at a time according to the calculated hash value; The information acquires data requested by the user to interface with the metadata management system when the object system operates the directory.
  • the foregoing first interface module and the second interface module may also be independent of the number of elements.
  • the metadata management system is only used as a metadata storage system.
  • FIG. 5 is a schematic structural diagram of another application example of the metadata management system of the present invention.
  • the file system interacts with the metadata management system of the present invention through a Portable Operating System Interface (POSIX) interface.
  • POSIX Portable Operating System Interface
  • the object system interacts with the metadata management system of the present invention to perform directory operations through the S3 interface of Asazon, and the two types of systems share a metadata storage management system.

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)

Abstract

本发明涉及一种元数据管理方法及系统,其中,元数据管理方法包括:以目录层次结构作为元数据组织结构,并以对象系统中的用户名作为目录层次结构中根目录下的第一层目录;以对象系统中用户名对应的桶作为目录层次结构中该用户名目录下的目录;根据对象系统中与每个桶关联的对象名中的分割符"/"将对象名分割为对应桶目录下的目录名或文件名;以相同目录的索引节点集合为存储单位存储元数据,并以目录名或文件名所在目录的绝对路径名计算的hash值作为存储单位的标识存储在目录索引节点中。本发明应用于与将文件系统和对象系统的元数据进行统一存储管理的元数据存储系统中。

Description

元数据管理方法及系统 技术领域 本发明涉及计算机技术, 尤其涉及一种元数据管理方法及系统。 背景技术 元数据进行定位获取其管理的数据。
现有技术中的元数据的组织结构分为两类: 文件系统元数据和对象系统 元数据, 其中, 文件系统元数据以文件 /目录为单位, 该元数据组织结构中的 各个文件和目录釆用层级结构的目录树, 以索引节点 (inode )为存储单位进 行存储, 在查询定位时以各级 inode为标识进行逐级多次输入输出 ( 10 )定 位; 对象系统元数据组织结构以桶 /对象(Bucket/object ) 为存储单位进行存 储, object是没有目录层级结构的名称,在查询定位时以全路径名为标识进行 一次 10定位。
由于现有的元数据管理在文件系统和对象系统中的数据组织结构不同, 因此两类系统分别需要相应的元数据存储, 即需要两套元数据存储系统, 所 以, 实际应用中需要一种元数据存储管理结构在不影响两类系统各自应用特 点和操作效率的情况下, 能够同时实现两类系统的元数据管理。 发明内容
本发明提供一种元数据管理方法及系统, 用以在保证文件系统和对象系 统各自应用特点和操作效率的情况下, 统一文件系统和对象系统的元数据存 储。
本发明的第一个方面是提供一种元数据管理方法, 包括: 以目录层次结 构作为元数据组织结构, 并以对象系统中的用户名作为目录层次结构中根目 录下的第一层目录; 以对象系统中用户名对应的桶作为目录层次结构中该用 户名目录下的目录; 根据对象系统中与每个桶关联的对象名中的分割符将对 象名分割为对应桶目录下的目录名或文件名;
以相同目录的索引节点集合为存储单位存储元数据, 并以目录名或文件 名所在目录的绝对路径名计算的哈希 (hash )值作为存储单位的标识存储在 目录索引节点中。
结合第一个方面的元数据管理方法, 在第一种实现方式中, 若相同目 录中的索引节点个数大于预设的个数时, 对该相同目录中的索引节点进行二 叉树分片存储在同一标识对应的不同存储单位中。
结合第一个方面的元数据管理方法或第一种实现方式, 在第二种实现 方式中, 若根据不同绝对路径名计算得到相同的 hash值, 则将该不同绝对路 径对应的目录存放于该相同的 hash值标识对应的不同存储单位中。
本发明的第二个方面是提供一种元数据管理系统, 包括:
组织模块, 用于以目录层次结构作为元数据组织结构, 并以对象系统中 的用户名作为目录层次结构中根目录下的第一层目录; 以对象系统中用户名 对应的桶作为目录层次结构中该用户名目录下的目录; 根据对象系统中与每 个桶关联的对象名中的分割符将对象名分割为对应桶目录下的目录名或文件 名;
存储模块, 用于以相同目录的索引节点集合为存储单位存储元数据, 并 以目录名或文件名所在目录的绝对路径名计算的 hash值作为存储单位的标识 存储在目录索引节点中。
结合第二个方面的元数据管理系统, 在第一种实现方式中, 所述存储 模块, 还用于若相同目录中的索引节点个数大于预设的个数时, 对该相同目 录中的索引节点进行二叉树分片存储在同一标识对应的不同存储单位中。
结合第二个方面的元数据管理系统或第一种实现方式, 在第二种实现 方式中, 所述存储模块, 还用于若根据不同绝对路径名计算得到相同的 hash 值, 则将该不同绝对路径对应的目录存放于该相同的 hash值标识对应的不同 存储单位中。
本发明通过以目录层次结构作为元数据组织结构, 并以对象系统中与每 个桶关联的对象名中的分割符 " 将对象名分割为对应桶目录下的目录名或 文件名, 并以目录名或文件名所在目录的绝对路径名计算的 hash值作为存储 单位的标识存储在目录索引节点中, 实现了文件系统和对象系统共用一份元 数据管理系统而且由于釆用这种元数据管理方法, 对文件系统和对象系统的 各自性能和目录操作效率并没有影响, 所以对文件系统和对象系统的用户来 说, 不会出现任何使用不便的问题; 进一步通过二叉树分片技术以克服同一 标识具有较多节点索引时查询效率问题; 同时, 当出现计算的 hash值出现冲 突时, 进一步通过将不同目录存放在标识相同的一组存储单位中以克服, 还 可配合分片技术以避免降低效率。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明元数据管理方法实施例的流程图;
图 2为本发明元数据管理方法具体应用例的示意图;
图 3为本发明元数据管理系统实施例的结构示意图;
图 4为本发明元数据管理系统一个应用例的结构示意图
图 5为本发明元数据管理系统另一个应用例的结构示意图。 具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 1为本发明元数据管理方法实施例的流程图, 如图 1所示, 本实施例 的方法包括:
步骤 101、 以目录层次结构作为元数据组织结构, 并以对象系统中的用 户名作为目录层次结构中根目录下的第一层目录; 以对象系统中用户名对应 的桶作为目录层次结构中该用户名目录下的目录; 根据对象系统中与每个桶 关联的对象名中的分割符 "/" 将对象名分割为对应桶目录下的目录名或文件 名。
本发明实施例中, 逻辑上将文件系统和对象系统的元数据进行了统一, 文件系统和对象系统使用存储的同一份元数据。 该元数据的数据组织结构釆 用文件系统的目录层次结构, 而将对象系统中各个对象名按照分割符 " 进 行分割, 得到对应桶目录下的目录名或文件名, 以便于后续根据各个目录或 文件所在的绝对路径名确定存储单位的标识。
步骤 102、 以相同目录的索引节点集合为存储单位存储元数据, 并以目 录名或文件名所在目录的绝对路径名计算的 hash值作为存储单位的标识存储 在目录索引节点中。
在上述步骤的目录组织结构的基础上, 本步骤计算获取各个目录或文件 所在的目录的绝对路径名对应的目录标识(dir— id ) , 即存储单位的标识, 并 存储该目录标识, 使后续目录操作时根据该目录标识可直接一次获取对应的 数据。 本实施例中, 通过计算目录名或文件名所在目录的绝对路径名的 hash 值获取相应的目录标识, 由于以路径结构层次化的方法获取的 hash值中包含 层次化 hash算法,所以能够减少标识冲突。 而且通过计算 hash值的方法可以 非顺序分配存储单位的标识, 且标识中含有路径快速定位信息的分配算法, 保证了目录操作的快速定位, 提高了操作效率。 由于釆用本发明的方法存储 的元数据, 并不影响文件系统和对象系统的各自性能和目录操作效率, 因此 用户在使用两类系统时不会出现使用不便的问题; 而且由于两类系统釆用同 一份元数据存储, 当用户在文件系统中进行元数据更新时, 在对象系统中可 以看到更新的数据, 反之亦然。 根据上述方法存储的元数据, 文件系统可以 直接使用, 对象系统也可以直接使用, 即两类系统统一釆用一份元数据存储 系统进行元数据管理, 而且, 对釆用本发明的方法存储的元数据进行操作时, 对象系统可通过其与元数据管理系统的接口模块一次 10操作即可获取相应 的数据。
在实际应用中, 以相同目录的索引节点集合为存储单位存储元数据时, 相同目录的索引节点可能为多个, 当进行目录操作时, 需要逐个比较以找出 要操作的项目, 从而出现目录应用中操作效率较低的问题, 为解决这个问题, 本发明实施例中还进一步通过二叉树分片存储技术配合上述实施例中的元数 据管理方法, 即若相同目录中的索引节点个数大于预设的个数时, 对该相同 目录中的索引节点进行二叉树分片存储, 如将属于同一目录的子目录或文件 进行分片, 存储在标识相同的不同存储单位中, 从而当进行目录操作时, 可 根据标识获取相应的一组存储单位时, 从该一组存储单位中根据二叉树分片 找到相应的项目, 其中预设的个数为根据需要设定。
在实际元数据存储中, 存在根据不同绝对路径名计算得到相同的 hash值 的情况, 即存在存储冲突的问题, 在这种情况下, 本发明实施例还进一步釆 用将根据不同绝对路径名计算得到相同的 hash值的该不同绝对路径对应的目 录存放于该相同的 hash值标识对应的不同存储单位中, 即存放在相同标识对 应的一组存储单位中, 以避免存储冲突, 同时配合上述的二叉树分片存储技 术保证目录操作效率。
根据上述元数据管理方法存储的元数据, 在目录操作时, 由于文件系统 的重命名或移动操作需要多次 10, 效率较低, 因此, 文件系统可通过系统的 日志进行改善时延, 即文件系统通过其元数据服务器(Metadata server, 简称 MDS )读取存储元数据, 具体过程为: 根据记录在目录索引节点中的目录标 识, 即存储单位的标识一次 10读取对应目录的数据, 并緩存在内存中, 当执 行重命名或移动操作时, 可在元数据服务器集群中记录日志, 修改对应子目 录的存储单位标识, 当后续刷日志时将修改后的子目录的元数据写到新位置。 对象系统的对象存储控制器 (Object store controller,简称 0SC)在执行用户的目录 操作请求时, 可以对操作请求的对象名计算 hash值; 根据计算得到的 hash 值一次 10读取存储的索引节点信息; 根据索引节点信息获取用户请求的数 据。
在上述的目录操作中, 若通过文件系统进行的元数据更新, 可通过对象 系统直接得到更新后的元数据, 同时通过对象系统进行的元数据更新, 也可 通过文件系统直接得到更新后的元数据, 而且针对各自的系统, 元数据以相 应的形态呈现给用户, 从而不影响各自系统的性能。
本发明实施例通过以目录层次结构作为元数据组织结构, 并以对象系统 中与每个桶关联的对象名中的分割符 "/" 将对象名分割为对应桶目录下的目 录名或文件名, 并以目录名或文件名所在目录的绝对路径名计算的 hash值作 为存储单位的标识存储在目录索引节点中, 实现了文件系统和对象系统共用 一份元数据管理系统, 而且由于釆用这种元数据管理方法, 对文件系统和对 象系统的各自性能和目录操作效率并没有影响, 所以对文件系统和对象系统 的用户来说, 不会出现任何使用不便的问题; 进一步通过二叉树分片技术以 克服同一标识具有较多节点索引时查询效率问题; 同时, 当出现计算的 hash 值出现冲突时, 进一步通过将不同目录存放在标识相同的一组存储单位中以 克服, 还可配合分片技术以避免降低效率。
图 2为本发明元数据管理方法具体应用例的示意图, 图 2中位于同一目 录下的各个子目录或文件属于同一存储单位, 并具有同一索引节点信息, 如 绝对路径为 /kobe/bucket— 1下包含子目录 kl, kl l和文件 k— a.avi,依照本发明 的元数据管理方法, 将三者存放于同一存储单位中, 并根据三者所属的绝对 路径 /kobe/bucket— 1进行 hash计算,获取 hash值为 23 , 以该 hash值作为该存 储单位的标识。 其他各个索引节点类似。 图 2中目录 bucket— 4下包含三个子 目录和一个文件, 为降氐目录操作时的查询效率, 图 2中将目录 bucket— 4下 的子目录或文件进行了二叉树分片, 分成两个存储单位, 且这两个存储单位 存放于标识 33对应的两个存储单位中。另外, 当出现目录 bucket— 4下的子目 录和目录 bucket— 5的子目录所在的绝对路径通过 hash计算获取的 hash值相 同, 即出现标识冲突的问题时, 可以将 bucket— 4下的子目录和目录 bucket— 5 的子目录釆用相同的标识 33 , 并且使其分别位于不同的存储单位中, 存储单 位再分别用 33—0, 33—1和 33—2标识以区分。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读 取存储介质中, 该程序在执行时, 处理器, 如中央处理单元(英文为 Central Processing Unit, 简称 CPU ) , 执行包括上述方法实施例的步骤; 而前述的存 储介质包括: 只读存储器(英文为 read-only memory, 简称 ROM ) 、 随机存 储器(英文为 random access memory, 简称 RAM ) 、 磁碟或者光盘等各种可 以存储程序代码的介质。
图 3为本发明元数据管理系统实施例的结构示意图, 如图 3所示, 本实 施例的系统包括: 组织模块 10和存储模块 20, 其中, 组织模块 10, 用于以 目录层次结构作为元数据组织结构, 并以对象系统中的用户名作为目录层次 结构中根目录下的第一层目录; 以对象系统中用户名对应的桶作为目录层次 结构中该用户名目录下的目录; 根据对象系统中与每个桶关联的对象名中的 分割符 " 将对象名分割为对应桶目录下的目录名或文件名; 存储模块 20, 用于以相同目录的索引节点集合为存储单位存储元数据, 并以目录名或文件 名所在目录的绝对路径名计算的 hash值作为存储单位的标识存储在目录索引 节点中。
本实施例中, 组织模块 10根据对象系统中各个桶 /对象将与每个桶关联 的对象名分割为对应桶目录下的目录名或文件名, 并由存储模块存储根据每 个目录名或文件名所在目录的绝对路径名计算的 hash值, 当后续进行目录操 作时, 可以根据相应的 hash值通过一次 10即可获取目录操作对应的数据。
在另一元数据管理系统实施例中, 在上述图 2所示实施例中存储模块还 可进一步用于若相同目录中的索引节点个数大于预设的个数时, 对该相同目 录中的索引节点进行二叉树分片存储在同一标识对应的不同存储单位中, 以 解决同一目录中的子目录较多时查询效率较低的问题。
在又一元数据管理系统实施例中, 在上述图 2所示实施例中存储模块还 可进一步用于若根据不同绝对路径名计算得到相同的 hash值, 则将该不同绝 对路径对应的目录存放于该相同的 hash值标识对应的不同存储单位中, 以避 免出现的存储冲突问题。
在上述元数据管理系统的任一实施例中, 实际应用中还可以进一步包括: 接口模块, 实现与文件系统或对象系统的接口, 图 4为本发明元数据管理系 统一个应用例的结构示意图, 如图 4所示, 在上述实施例的基础上, 本实施 例的元数据管理系统还包括第一接口模块 30和第二接口模块 40, 其中第一 接口模块 30, 用于当文件系统的元数据服务器读元数据时, 根据存储的存储 单位的标识一次读取对应目录的数据, 并緩存在内存中; 且当文件系统的元 数据服务器执行重命名或移动操作时, 修改对应子目录的存储单位标识, 并 记录日志, 以使刷日志时将修改后的子目录的元数据写到新位置, 以实现文 件系统操作目录时与元数据管理系统接口。
第二接口模块 40, 用于当对象系统的对象存储控制器执行用户的目录操 作请求时,对操作请求的对象名计算 hash值;根据计算得到的 hash值一次读 取索引节点信息; 根据索引节点信息获取用户请求的数据, 以实现对象系统 操作目录时与元数据管理系统接口。 到的技术效果类似, 不再详细赘述。
在实际应用中, 上述第一接口模块和第二接口模块也可以是独立于元数 据管理系统的功能模块, 元数据管理系统仅作为元数据存储系统使用。
图 5为本发明元数据管理系统另一应用例的结构示意图, 如图 5所示, 文件系统通过可移植操作系统接口 ( Portable Operating System Interface, 简称 POSIX )接口与本发明元数据管理系统进行交互执行目录操作, 对象系统通 过 Asazon的 S3接口与本发明元数据管理系统进行交互执行目录操作, 两类 系统共用一份元数据存储管理系统。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要 求 书
1、 一种元数据管理方法,应用于计算机存储系统中, 其特征在于, 包括: 以目录层次结构作为元数据组织结构, 并以对象系统中的用户名作为目 录层次结构中根目录下的第一层目录; 以对象系统中用户名对应的桶作为目 录层次结构中该用户名目录下的目录; 根据对象系统中与每个桶关联的对象 名中的分割符将对象名分割为对应桶目录下的目录名或文件名;
以相同目录的索引节点集合为存储单位存储元数据, 并以目录名或文件 名所在目录的绝对路径名计算的 hash值作为存储单位的标识存储在目录索引 节点中。
2、 根据权利要求 1所述的方法, 其特征在于, 若相同目录中的索引节点 个数大于预设的个数时, 对该相同目录中的索引节点进行二叉树分片存储在 同一标识对应的不同存储单位中。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 若根据不同绝对路径 名计算得到相同的 hash值, 则将该不同绝对路径对应的目录存放于该相同的 hash值标识对应的不同存储单位中。
4、 根据权利要求 1或 2所述的方法, 其特征在于, 当文件系统的元数据 服务器读元数据时, 根据存储的存储单位的标识一次读取对应目录的数据, 并緩存在内存中。
5、 根据权利要求 4所述的方法, 其特征在于, 当文件系统的元数据服务 器执行重命名或移动操作时, 修改对应子目录的存储单位标识, 并记录曰志, 以使刷日志时将修改后的子目录的元数据写到新位置。
6、 根据权利要求 1或 2所述的方法, 其特征在于, 当对象系统的对象存 储控制器执行用户的目录操作请求时, 对操作请求的对象名计算 hash值; 根 据计算得到的 hash值一次读取索引节点信息; 根据索引节点信息获取用户请 求的数据。
7、 一种元数据管理系统,应用于计算机存储系统中, 其特征在于, 包括: 组织模块, 用于以目录层次结构作为元数据组织结构, 并以对象系统中 的用户名作为目录层次结构中根目录下的第一层目录; 以对象系统中用户名 对应的桶作为目录层次结构中该用户名目录下的目录; 根据对象系统中与每 个桶关联的对象名中的分割符将对象名分割为对应桶目录下的目录名或文件 名;
存储模块, 用于以相同目录的索引节点集合为存储单位存储元数据, 并 以目录名或文件名所在目录的绝对路径名计算的 hash值作为存储单位的标识 存储在目录索引节点中。
8、 根据权利要求 7所述的系统, 其特征在于, 所述存储模块, 还用于若 相同目录中的索引节点个数大于预设的个数时, 对该相同目录中的索引节点 进行二叉树分片存储在同一标识对应的不同存储单位中。
9、 根据权利要求 7或 8所述的系统, 其特征在于, 所述存储模块, 还用 于若根据不同绝对路径名计算得到相同的 hash值, 则将该不同绝对路径对应 的目录存放于该相同的 hash值标识对应的不同存储单位中。
10、 根据权利要求 7或 8所述的系统, 其特征在于, 还包括:
第一接口模块, 用于当文件系统的元数据服务器读元数据时, 根据存储 的存储单位的标识一次读取对应目录的数据, 并緩存在内存中。
11、 根据权利要求 10所述的系统, 其特征在于, 第一接口模块, 还用于 当文件系统的元数据服务器执行重命名或移动操作时, 修改对应子目录的存 储单位标识, 并记录日志, 以使刷日志时将修改后的子目录的元数据写到新 位置。
12、 根据权利要求 7或 8所述的系统, 其特征在于, 还包括:
第二接口模块, 用于当对象系统的对象存储控制器执行用户的目录操作 请求时,对操作请求的对象名计算 hash值;根据计算得到的 hash值一次读取 索引节点信息; 根据索引节点信息获取用户请求的数据。
PCT/CN2012/087519 2012-12-26 2012-12-26 元数据管理方法及系统 WO2014101000A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2012/087519 WO2014101000A1 (zh) 2012-12-26 2012-12-26 元数据管理方法及系统
CN201280002961.5A CN103229173B (zh) 2012-12-26 2012-12-26 元数据管理方法及系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/087519 WO2014101000A1 (zh) 2012-12-26 2012-12-26 元数据管理方法及系统

Publications (1)

Publication Number Publication Date
WO2014101000A1 true WO2014101000A1 (zh) 2014-07-03

Family

ID=48838332

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/087519 WO2014101000A1 (zh) 2012-12-26 2012-12-26 元数据管理方法及系统

Country Status (2)

Country Link
CN (1) CN103229173B (zh)
WO (1) WO2014101000A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530299A (zh) * 2015-12-12 2016-04-27 天津南大通用数据技术股份有限公司 目录服务日志的实现方法

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424238B (zh) * 2013-08-27 2018-12-14 华为技术有限公司 一种海量文件生成的方法、装置
US10210191B2 (en) * 2014-03-20 2019-02-19 International Business Machines Corporation Accelerated access to objects in an object store implemented utilizing a file storage system
CN104123359B (zh) * 2014-07-17 2017-03-22 江苏省邮电规划设计院有限责任公司 一种分布式对象存储系统的资源管理方法
US20160063021A1 (en) * 2014-08-28 2016-03-03 Futurewei Technologies, Inc. Metadata Index Search in a File System
CN105701096A (zh) * 2014-11-25 2016-06-22 腾讯科技(深圳)有限公司 索引生成方法、数据查询方法、装置及系统
CN106682003B (zh) * 2015-11-06 2019-09-20 中国电信股份有限公司 分布式存储命名空间的路径分割映射方法和装置
CN107818113B (zh) * 2016-09-13 2023-08-11 中兴通讯股份有限公司 文件访问位置的确定方法及装置
CN106484820B (zh) * 2016-09-26 2020-01-17 华为技术有限公司 一种重命名方法、访问方法及装置
CN106599102A (zh) * 2016-11-29 2017-04-26 郑州云海信息技术有限公司 一种基于目录切分机制的元数据性能提升方法
CN107346338B (zh) * 2017-06-30 2021-01-01 武汉斗鱼网络科技有限公司 文件目录排序方法及装置
CN107357929B (zh) * 2017-07-27 2020-06-23 Oppo广东移动通信有限公司 文件读取方法、移动终端及可读存储介质
CN107678981A (zh) * 2017-08-24 2018-02-09 北京盛和大地数据科技有限公司 数据处理方法及装置
CN107885829A (zh) * 2017-11-08 2018-04-06 郑州云海信息技术有限公司 对象存储对接Hadoop的重命名方法、装置、设备和存储介质
CN110659154A (zh) * 2018-06-28 2020-01-07 北京京东尚科信息技术有限公司 一种数据处理方法和装置
CN109299190B (zh) * 2018-09-10 2020-11-17 华为技术有限公司 分布式存储系统中处理对象的元数据的方法及装置
CN109446160A (zh) * 2018-11-06 2019-03-08 郑州云海信息技术有限公司 一种文件读取方法、系统、装置及计算机可读存储介质
CN109756484B (zh) * 2018-12-12 2021-10-15 杭州数梦工场科技有限公司 基于对象存储的网关的控制方法、控制装置、网关和介质
CN109582644B (zh) * 2018-12-21 2023-04-07 深圳前海微众银行股份有限公司 文件存储方法、装置、设备及计算机可读存储介质
CN111008185B (zh) * 2019-10-29 2023-08-18 厦门网宿有限公司 一种数据共享方法、系统及设备
CN111324799B (zh) * 2020-02-05 2021-05-04 星辰天合(北京)数据科技有限公司 搜索请求的处理方法及装置
CN113448921A (zh) * 2020-03-28 2021-09-28 华为技术有限公司 一种存储管理方法、装置及存储系统
CN113282551B (zh) * 2021-07-22 2022-05-31 阿里云计算有限公司 数据处理方法、系统及设备
CN114138725A (zh) * 2021-12-08 2022-03-04 北京志凌海纳科技有限公司 一种层次化的日志存储处理方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033308A1 (en) * 2001-08-03 2003-02-13 Patel Sujal M. System and methods for providing a distributed file system utilizing metadata to track information about data stored throughout the system
CN1545047A (zh) * 2003-11-24 2004-11-10 华中科技大学 一种存储虚拟化系统的元数据层次管理方法及其系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719141B (zh) * 2009-12-24 2011-09-07 成都市华为赛门铁克科技有限公司 基于目录对象的文件处理方法和系统

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033308A1 (en) * 2001-08-03 2003-02-13 Patel Sujal M. System and methods for providing a distributed file system utilizing metadata to track information about data stored throughout the system
CN1545047A (zh) * 2003-11-24 2004-11-10 华中科技大学 一种存储虚拟化系统的元数据层次管理方法及其系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530299A (zh) * 2015-12-12 2016-04-27 天津南大通用数据技术股份有限公司 目录服务日志的实现方法
CN105530299B (zh) * 2015-12-12 2019-04-23 天津南大通用数据技术股份有限公司 目录服务日志的实现方法

Also Published As

Publication number Publication date
CN103229173A (zh) 2013-07-31
CN103229173B (zh) 2016-08-03

Similar Documents

Publication Publication Date Title
WO2014101000A1 (zh) 元数据管理方法及系统
Vora Hadoop-HBase for large-scale data
US9798728B2 (en) System performing data deduplication using a dense tree data structure
US8874850B1 (en) Hierarchically tagged cache
JP6046260B2 (ja) MapReduceシステムのためのテーブル・フォーマット
EP3103025B1 (en) Content based organization of file systems
US9043540B2 (en) Systems and methods for tracking block ownership
CN103577123B (zh) 一种基于hdfs的小文件优化存储方法
US8484259B1 (en) Metadata subsystem for a distributed object store in a network storage system
US8180813B1 (en) Content repository implemented in a network storage server system
US20170123931A1 (en) Object Storage System with a Distributed Namespace and Snapshot and Cloning Features
CN103282899B (zh) 文件系统中数据的存储方法、访问方法及装置
US9069710B1 (en) Methods and systems for replicating an expandable storage volume
EP2615566A2 (en) Unified local storage supporting file and cloud object access
US10108644B1 (en) Method for minimizing storage requirements on fast/expensive arrays for data mobility and migration
EP2718858A1 (en) Hybrid data management system and method for managing large, varying datasets
JP2015503777A (ja) ファイルクローンを利用したシングルインスタンス化方法及びそれを用いたファイルストレージ装置
Fu et al. Performance optimization for managing massive numbers of small files in distributed file systems
US10229127B1 (en) Method and system for locality based cache flushing for file system namespace in a deduplicating storage system
CN113535670B (zh) 一种虚拟化资源镜像存储系统及其实现方法
JP6245700B2 (ja) 計算機システム、データの検査方法及び計算機
JP2012168781A (ja) 分散型データストアシステム及び分散型データストアシステムにおけるレコード管理方法
Renner et al. Addressing hadoop's small file problem with an appendable archive file format
US10387384B1 (en) Method and system for semantic metadata compression in a two-tier storage system using copy-on-write
US11016946B1 (en) Method and apparatus for processing object metadata

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

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

Country of ref document: EP

Kind code of ref document: A1