WO2014114089A1 - Method and system for optimizing load balance of distributed file system - Google Patents

Method and system for optimizing load balance of distributed file system Download PDF

Info

Publication number
WO2014114089A1
WO2014114089A1 PCT/CN2013/083227 CN2013083227W WO2014114089A1 WO 2014114089 A1 WO2014114089 A1 WO 2014114089A1 CN 2013083227 W CN2013083227 W CN 2013083227W WO 2014114089 A1 WO2014114089 A1 WO 2014114089A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
file
storage server
hard disk
abnormal
Prior art date
Application number
PCT/CN2013/083227
Other languages
French (fr)
Chinese (zh)
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 WO2014114089A1 publication Critical patent/WO2014114089A1/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
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • G06F16/1827Management specifically adapted to NAS

Definitions

  • the present invention relates to the field of distributed file system load balancing technology, and in particular, to a method and system for optimizing load balancing by automatically adjusting the distribution of distributed file system file fragments.
  • distributed file systems are compatible with different types of devices, easy to access, and easy to expand.
  • Distributed file systems are highly demanding for load balancing because they work together to provide a large number of storage devices.
  • the metadata server when a user requests to write or read, the metadata server must balance the resource information of the existing storage server, and select a storage server that is more conducive to overall optimization to provide services for the user. Second, the location of file fragmentation must be reasonable. Otherwise, no matter how the metadata server optimizes the storage server, it must obtain data from the storage server that stores the corresponding data.
  • a related solution is to report the hard disk space utilization by the storage server, and the metadata server periodically polls. After the hard disk space utilization is found to be greater than a certain threshold, the metadata server initiates the fragment migration.
  • this solution has the following drawbacks:
  • the hard disk space utilization can only reflect the number of shards on the hard disk, and does not represent the distribution of files on all hard disks. Therefore, after shard migration, a large number of files will be stored in less On the hard disk, it is not possible to make all the hard disks work together for the user.
  • the hard disk space utilization cannot reflect the storage information of the first fragment of the file.
  • the migration may cause the first fragment of many files to be stored in a small number of hard disks.
  • the user reads the file, it starts from the first slice, which results in insufficient capacity.
  • the main object of the present invention is to provide a method and system for optimizing load balancing of a distributed file system, which aims to solve the problem of load balancing failure after migration fragmentation.
  • the present invention provides a method for optimizing load balancing in a distributed file system, including:
  • the device When the metadata server monitors that the status of the storage server is abnormal, the device initiates a fragment migration request to the storage server; performs the abnormal information carried, redistributes the fragmentation location, and initiates the migration; after the migration succeeds, the fragmentation is new.
  • the location information is reported to the database server.
  • the method further includes:
  • the database server receives a file write request sent by the client, writes a file according to the file write request, and tags each fragment of each file.
  • the database server labels each fragment of each file, including: when the database server writes the first file, label the file with a label of 1, and each time a file is added, the label is incremented by one. The label is recycled when the label reaches 65535.
  • the storage server status abnormality includes at least an addition, deletion, and hard disk failure or expansion of the storage server.
  • the monitoring, by the metadata server, that the hard disk fault comprises:
  • the storage server sends the hard disk abnormality information to the metadata server when detecting the hard disk failure
  • the metadata server After receiving the hard disk abnormality information, the metadata server monitors the hard disk failure.
  • initiating a fragment migration request to the storage server includes:
  • the invention also provides a distributed file system for optimizing load balancing, comprising: a metadata server, a storage server and a database server, wherein:
  • the metadata server is configured to: initiate a fragment migration request to the storage server when monitoring that the storage server status is abnormal;
  • the storage server is configured to: re-allocate the fragmentation location according to the label of each fragment of the local storage file and the abnormal information carried by the fragment migration request, and initiate a migration; after the migration succeeds, the fragmentation is new.
  • the location information is reported to the database server.
  • the database server is further configured to: receive a file write request sent by the client, write a file according to the file write request, and label each fragment of each file.
  • the database server is further configured to: label the file when the first file is written, and increase the label by 1 for each subsequent file, and then cycle the label when the label reaches 65535.
  • the storage server status abnormality includes at least an addition, deletion, and hard disk failure or expansion of the storage server.
  • the storage server is further configured to: send a hard disk abnormality information to the metadata server when detecting a hard disk failure;
  • the metadata server is further configured to: after receiving the abnormal information of the hard disk, monitor the fault of the hard disk.
  • the metadata server is further configured to: initiate a fragment migration request to the storage server when the storage server status is abnormal and the abnormal time is greater than a predetermined threshold.
  • the method and system for optimizing load balancing of a distributed file system according to an embodiment of the present invention, when the metadata server monitors that the storage server is abnormal, initiates a fragment migration request to the storage server; and the storage server stores the files according to the local storage file. The label of the slice and the exception information carried by the fragment migration request, reallocate the fragmentation location, and initiate the migration; when the migration is successful, the fragmentation will be new.
  • the location information is reported to the database server, so that the fragmentation is re-adjusted in the case of the storage server abnormality and the hard disk failure and capacity expansion, thereby achieving the effect of optimizing the load balancing, saving the expenditure of the metadata server, and improving the small file model.
  • FIG. 1 is a schematic structural diagram of an embodiment of a distributed file system for optimizing load balancing according to the present invention
  • FIG. 2 is a flowchart of a hard disk fault fragmentation migration according to an embodiment of the present invention
  • FIG. 3 is a flowchart of migration of a hard disk expansion fragment in the embodiment of the present invention.
  • FIG. 4 is a flow chart showing an embodiment of a method for optimizing load balancing of a distributed file system according to the present invention.
  • a distributed file system for optimizing load balancing includes: a metadata server 10, a storage server 20, and a database server 30, wherein: the database server 30 is configured to receive a client. a file write request sent by the terminal 40, writing a file according to the file write request, and labeling each slice of each file;
  • the metadata server 10 is configured to initiate a fragment migration request to the storage server 20 when the storage server 20 is abnormal in status; the abnormal information carried by the slice migration request, reallocate the fragmentation location, and initiate migration; After the migration is successful, the new location information of the fragment is reported to the database server 30.
  • the storage server 20 includes a storage server monitoring module 202, The storage server reporting module 201 and the reset fragmentation module 203, wherein:
  • the storage server monitoring module 202 is configured to monitor the hard disk and network resource information on the storage server 20, and immediately report the storage server reporting module 201 when the status is abnormal;
  • the storage server reporting module 201 is configured to receive the message of the storage server monitoring module 202, and report the information monitored by the storage server monitoring module 202 to the metadata server 10 when the hard disk and the network are abnormal.
  • the reset fragmentation module 203 is configured to determine the optimal location information that the fragment should be stored according to the label of the fragment when the file is first stored, and the current storage server 20 and the hard disk state parameter delivered by the trigger mechanism of the metadata server 10, and initiate fragmentation. migrate.
  • the metadata server 10 includes a metadata server monitoring module 101 and a migration triggering module 102, wherein:
  • the metadata server monitoring module 101 is configured to monitor the status of each storage server 20, and find that the storage server 20 is offline or newly added, that is, it is responsible for monitoring the change information of all storage servers 20, such as addition, deletion, abnormality, etc., and receiving the storage server report.
  • the hard disk status information of the module 201 is used by the migration triggering module 102 to initiate a request for resizing the storage server 20 after the specified threshold time period when the storage server 20 is offline or newly added, or the hard disk is abnormal or the expansion occurs. , triggers fragment migration.
  • the database server 30 includes: a labeling module 301 and a database module 302, wherein: the labeling module 301 is configured to send a label to each fragment of the file when the client 40 requests to write a file for the first time, and all the fragments are Label it.
  • the labeling module 301 is configured to send a label to each fragment of the file when the client 40 requests to write a file for the first time, and all the fragments are Label it.
  • each file is tagged with a range of 1-65535, and is incremented one by one in the order in which the request is written.
  • the file is tagged 1 , and the tag is incremented by 1 for each additional file, and the tag is recycled when the tag reaches 65535.
  • the database module 302 is configured to record the storage information of the fragment and the status information of the storage server 20 and the hard disk.
  • Step 1 After the hard disk is abnormal, the storage server monitoring module 202 sends the abnormal information of the hard disk to the storage server reporting module 201.
  • Step 2 The storage server reporting module 201 collects all the hard disks on the storage server 20 The message is forwarded to the metadata server monitoring module 101.
  • Step 3 After collecting the abnormality of the hard disk, the metadata server monitoring module 101 sends a message to the migration triggering module 102 and carries the abnormal hard disk information when the abnormal time is greater than the threshold.
  • Step 4 The migration triggering module 102 sends a migration request to the reset distribution module, and carries the abnormal hard disk information.
  • Step 5 The reset fragmentation module 203 of the storage server 20 recalculates the location information that the fragment should be stored according to the abnormal hard disk information and the label, and directly initiates the migration.
  • Step 6 After the migration is successful, the new location information of the fragment is reported to the database module 302 for storage.
  • the hard disk expansion trigger fragment automatic migration process is as follows:
  • Step 1 The metadata server monitoring module 101 finds that the hard disk is expanded or there is a storage server 20 abnormality (it is found to increase or decrease) and exceeds the time threshold.
  • Step 2 After the abnormality is found, the metadata server monitoring module 101 sends a migration request to the migration triggering module 102, and carries the abnormal storage server 20 information.
  • Step 3 The migration triggering module 102 sends a migration request to the reset allocation module, and carries the abnormal storage server 20 information.
  • Step 4 The reset fragmentation module 203 determines which fragments need to be re-adjusted based on the abnormal storage server 20 information and tags, thereby reallocating the fragmentation locations and initiating the migration.
  • Step 5 The storage server 20 initiates a migration request, and after the migration succeeds, the new location information is sent to the database module 302.
  • the foregoing embodiment achieves the improvement of the storage server 20 abnormality and the re-adjustment and equalization of the fragmentation in the case of the hard disk failure and the expansion, and achieves the effect of optimizing the load balancing, thereby saving the expenditure of the metadata server 10. Improved overall performance under the small file model.
  • a method for optimizing load balancing of a distributed file system is implemented based on the distributed file system of the foregoing embodiment, and the method includes:
  • Step S101 When the metadata server monitors that the storage server status is abnormal, initiate a fragment migration request to the storage server.
  • Step S102 the storage server re-allocates the fragmentation location according to the label of each fragment of the local storage file and the abnormal information carried by the fragment migration request, and initiates migration; After the work, the new location information of the fragment is reported to the database server.
  • the database server receives the file write request sent by the client, writes the file according to the file write request, and tags each fragment of each file.
  • the database server labels each fragment of each file the following scheme is specifically used: When the database server writes the first file, the file is labeled 1 , and each subsequent file is added, the label is increased by 1. Recycle the label when the label reaches 65535.
  • the storage server monitoring module monitors the hard disk and network resource information on the storage server in real time. When the status is abnormal, the storage server reports the module. The storage server reports the module to receive the message from the storage server monitoring module. When the hard disk and the network are abnormal, the data server is sent to the metadata server. Report the information monitored by the storage server monitoring module.
  • the metadata server monitoring module is responsible for monitoring the change information of all storage server additions, deletions, exceptions, and the like, and receiving the hard disk status information of the storage server reporting module; when receiving the hard disk status change (including hard disk failure or expansion) or the server is abnormal, After the migration trigger module sends a request for resizing the fragment to the storage server after the specified threshold time, the migration triggers the fragment migration.
  • the storage server's reset fragmentation module determines the best location information that the fragment should be stored according to the label of the fragment when the file is first stored, and the current storage server and disk state parameters delivered by the metadata server trigger mechanism, and initiates the fragment migration. After the migration is successful, the new location information of the fragment is reported to the database module for storage.
  • the following describes the hard disk abnormal migration process and the capacity expansion process respectively.
  • Step 1 After the hard disk is abnormal, the storage server monitoring module sends the abnormal information of the hard disk to the storage server reporting module.
  • Step 2 The storage server reporting module collects all the hard disk abnormal messages on the storage server, and forwards the hard disk abnormality information to the metadata server monitoring module.
  • Step 3 After collecting the abnormality of the hard disk, the metadata server monitoring module sends a message to the migration trigger module and carries the abnormal hard disk information when the abnormal time is greater than the threshold.
  • Step 4 The migration trigger module sends a migration request to the reset distribution module, and carries the abnormal hard disk information.
  • Step 5 The storage server's reset fragmentation module recalculates based on the abnormal hard disk information and labels. Calculate the location information that the shard should store and initiate the migration directly.
  • Step 6 After the migration is successful, the new location information of the fragment is reported to the database module for storage.
  • the hard disk expansion trigger fragment automatic migration process is as follows:
  • Step 1 The metadata server monitoring module finds that the hard disk is expanded or has a storage server abnormality (recovering its increase or decrease) and exceeding the time threshold.
  • Step 2 After the abnormality is found, the metadata server monitoring module sends a migration request to the migration triggering module, and carries the abnormal storage server information.
  • Step 3 The migration trigger module sends a migration request to the reset distribution module, and carries the abnormal storage server information.
  • Step 4 The reset fragmentation module determines which fragments need to be re-adjusted based on the abnormal storage server information and labels, and then reallocates the fragmentation locations and initiates the migration.
  • Step 5 The migration request is initiated between the storage servers. After the migration is successful, the new location information is reported to the database module.
  • the fragment is re-adjusted to achieve the effect of optimizing the load balancing, saving the expenditure of the metadata server, and improving the overall size of the small file model. performance.
  • a method and system for optimizing load balancing of a distributed file system when a metadata server monitors that the storage server is abnormal, initiates a fragment migration request to the storage server; and the storage server stores the file according to the local storage file.
  • the label of each fragment and the exception information carried by the fragment migration request reallocate the fragmentation location, and initiate the migration; after the migration succeeds, the new location information of the fragment is reported to the database server, thereby the storage server exception and the hard disk
  • the shards are re-adjusted to achieve the effect of optimizing load balancing, saving the cost of the metadata server and improving the overall performance under the small file model.

Abstract

A method and system for optimizing the load balance of a distributed file system. The system comprises a metadata server, a storage server and a database server, and the database server receives a file write-in request sent from a client, writes in a file according to the file write-in request, and labels each fragment of each file; the metadata server initiates a fragment migration request to the storage server when it is monitored that the state of the storage server is abnormal; according to the labels of the each fragment of a local storage file and abnormal information carried by the fragment migration request, the storage server reallocates fragment positions and initiates migration; and when the migration succeeds, new position information about the fragments is reported to the database server. In the embodiments of the present invention, fragments are readjusted in the case of an abnormal storage server, hard disk failure and capacity expansion, achieving the effects of optimizing the load balance, saving the expense of a metadata server and improving the entire performance under a small file model.

Description

分布式文件系统优化负载均衡的方法及系统  Method and system for optimizing load balancing of distributed file system
技术领域 Technical field
本发明涉及分布式文件系统负载均衡技术领域, 尤其涉及一种通过自动 调整分布式文件系统文件分片的分布来优化负载均衡的方法及系统。  The present invention relates to the field of distributed file system load balancing technology, and in particular, to a method and system for optimizing load balancing by automatically adjusting the distribution of distributed file system file fragments.
背景技术 Background technique
与传统磁阵设备相比, 分布式文件系统具有兼容不同型号设备、 易于接 入、 易于扩容等优点。 由于协同大量的存储设备共同为用户提供服务, 因此 分布式文件系统对于负载均衡要求很高。  Compared with traditional magnetic array devices, distributed file systems are compatible with different types of devices, easy to access, and easy to expand. Distributed file systems are highly demanding for load balancing because they work together to provide a large number of storage devices.
分布式文件系统通常将大文件切割成相同大小的分片, 然后将这些分片 分别存放在待提供服务的存储设备中。 如果需要实现负载均衡, 必须解决以 下两个问题:  Distributed file systems typically cut large files into shards of the same size and then store the shards separately in the storage device to be served. If you need to achieve load balancing, you must solve the following two problems:
第一, 当用户请求写或者读时, 元数据服务器必须权衡现有存储服务器 的资源信息, 选择一个更有利于整体优化的存储服务器为用户提供服务; 第二, 文件分片存放的位置必须合理, 否则无论元数据服务器如何优化 选择存储服务器, 还是必须从存放相应数据的存储服务器获取数据。  First, when a user requests to write or read, the metadata server must balance the resource information of the existing storage server, and select a storage server that is more conducive to overall optimization to provide services for the user. Second, the location of file fragmentation must be reasonable. Otherwise, no matter how the metadata server optimizes the storage server, it must obtain data from the storage server that stores the corresponding data.
针对上述第二个问题, 当文件分片存放位置已经不合理的情况下, 如何 进行二次调整, 优化负载均衡成为待解决的问题。  For the second problem mentioned above, how to perform secondary adjustment and optimize load balancing becomes a problem to be solved when the file storage location is unreasonable.
文件分片存放位置会产生不合理绝大多数情况是因为硬盘故障和扩容而 造成的。在硬盘故障和扩容的过程中,有两种情况会影响文件分片分布均匀。 一种情况是, 硬盘状态正常, 但读写慢, 这样原先数据库根据负载均衡分配 的方案, 会被迫重新调整; 另外一种情况是, 硬盘状态坏和扩容, 需要将部 分分片重新调整到新增加或者换上的硬盘上。  File shard storage location is unreasonable. The vast majority of cases are caused by hard disk failure and expansion. In the process of hard disk failure and capacity expansion, there are two situations that affect the even distribution of file fragments. In one case, the state of the hard disk is normal, but the reading and writing is slow, so that the original database is forced to readjust according to the load balancing allocation scheme; in another case, the hard disk state is bad and the capacity is expanded, and some fragments need to be re-adjusted to Newly added or replaced on the hard drive.
相关的解决方法是, 由存储服务器上报硬盘空间利用率, 元数据服务器 定时轮询, 当发现硬盘空间利用率大于一定的阔值后, 由元数据服务器发起 分片迁移。 但是, 这种解决方法存在以下缺陷:  A related solution is to report the hard disk space utilization by the storage server, and the metadata server periodically polls. After the hard disk space utilization is found to be greater than a certain threshold, the metadata server initiates the fragment migration. However, this solution has the following drawbacks:
第一、 硬盘空间利用率只能反映硬盘上分片的数量, 并不能代表文件在 所有硬盘上的分布情况。 因此, 分片迁移后, 会造成大量的文件只存放于少 量硬盘上, 而不能使得所有硬盘协同为用户服务。 First, the hard disk space utilization can only reflect the number of shards on the hard disk, and does not represent the distribution of files on all hard disks. Therefore, after shard migration, a large number of files will be stored in less On the hard disk, it is not possible to make all the hard disks work together for the user.
第二、 硬盘空间利用率不能反映文件的第一块分片的存放信息, 迁移可 能造成许多文件的第一块分片集中存放到少数硬盘上。 当用户读文件时, 都 是从第一块分片开始, 由此会产生能力不足的现象。  Second, the hard disk space utilization cannot reflect the storage information of the first fragment of the file. The migration may cause the first fragment of many files to be stored in a small number of hard disks. When the user reads the file, it starts from the first slice, which results in insufficient capacity.
第三、 所有的迁移由元数据服务器完成, 这无疑增加了元数据服务器的 负担。 尤其在小文件占比例较大的模型下, 会影响文件系统的整体性能。  Third, all migrations are done by the metadata server, which undoubtedly increases the burden on the metadata server. Especially in the model with a large proportion of small files, it will affect the overall performance of the file system.
发明内容 Summary of the invention
本发明的主要目的在于提供一种分布式文件系统优化负载均衡的方法及 系统, 旨在解决迁移分片后, 负载均衡失效的问题。  The main object of the present invention is to provide a method and system for optimizing load balancing of a distributed file system, which aims to solve the problem of load balancing failure after migration fragmentation.
为了达到上述目的, 本发明提出一种分布式文件系统优化负载均衡的方 法, 包括:  In order to achieve the above object, the present invention provides a method for optimizing load balancing in a distributed file system, including:
当元数据服务器监控到存储服务器状态异常时, 向所述存储服务器发起 分片迁移请求; 求携带的异常信息, 重新分配分片位置, 并发起迁移; 当迁移成功后, 将所 述分片新的位置信息上报数据库服务器。  When the metadata server monitors that the status of the storage server is abnormal, the device initiates a fragment migration request to the storage server; performs the abnormal information carried, redistributes the fragmentation location, and initiates the migration; after the migration succeeds, the fragmentation is new. The location information is reported to the database server.
优选地, 所述当元数据服务器监控到存储服务器状态异常时, 向所述存 储服务器发起分片迁移请求之前还包括:  Preferably, when the metadata server monitors that the storage server status is abnormal, before the sending the fragment migration request to the storage server, the method further includes:
所述数据库服务器接收客户端发送的文件写入请求, 根据所述文件写入 请求写入文件, 并为每一文件的各分片打上标签。  The database server receives a file write request sent by the client, writes a file according to the file write request, and tags each fragment of each file.
优选地, 所述数据库服务器为每一文件的各分片打上标签包括: 所述数据库服务器写入第一个文件时, 给该文件打上标签 1 , 后续每增 加一个文件, 标签则增加 1 , 当标签达到 65535时再循环打标签。  Preferably, the database server labels each fragment of each file, including: when the database server writes the first file, label the file with a label of 1, and each time a file is added, the label is incremented by one. The label is recycled when the label reaches 65535.
优选地, 所述存储服务器状态异常至少包括存储服务器的增加、 删除以 及硬盘故障或者扩容。  Preferably, the storage server status abnormality includes at least an addition, deletion, and hard disk failure or expansion of the storage server.
优选地, 所述元数据服务器监控到所述硬盘故障包括:  Preferably, the monitoring, by the metadata server, that the hard disk fault comprises:
所述存储服务器在侦听到硬盘故障时, 将硬盘异常信息发送给所述元数 据服务器;  The storage server sends the hard disk abnormality information to the metadata server when detecting the hard disk failure;
所述元数据服务器接收到所述硬盘异常信息后, 监控到所述硬盘故障。 优选地, 所述当元数据服务器监控到存储服务器状态异常时, 向所述存 储服务器发起分片迁移请求包括: After receiving the hard disk abnormality information, the metadata server monitors the hard disk failure. Preferably, when the metadata server monitors that the storage server status is abnormal, initiating a fragment migration request to the storage server includes:
当元数据服务器监控到存储服务器状态异常, 且异常时间大于预定阔值 时, 向所述存储服务器发起分片迁移请求。 本发明还提出一种优化负载均衡的分布式文件系统, 包括: 元数据服务 器、 存储服务器及数据库服务器, 其中:  When the metadata server monitors that the storage server status is abnormal and the abnormal time is greater than the predetermined threshold, the fragment migration request is initiated to the storage server. The invention also provides a distributed file system for optimizing load balancing, comprising: a metadata server, a storage server and a database server, wherein:
所述元数据服务器设置为: 当监控到所述存储服务器状态异常时, 向所 述存储服务器发起分片迁移请求;  The metadata server is configured to: initiate a fragment migration request to the storage server when monitoring that the storage server status is abnormal;
所述存储服务器设置为: 根据本地存储文件的各分片的标签以及所述分 片迁移请求携带的异常信息, 重新分配分片位置, 并发起迁移; 当迁移成功 后, 将所述分片新的位置信息上报至所述数据库服务器。  The storage server is configured to: re-allocate the fragmentation location according to the label of each fragment of the local storage file and the abnormal information carried by the fragment migration request, and initiate a migration; after the migration succeeds, the fragmentation is new. The location information is reported to the database server.
优选地,所述数据库服务器还设置为:接收客户端发送的文件写入请求, 根据所述文件写入请求写入文件, 并为每一文件的各分片打上标签。  Preferably, the database server is further configured to: receive a file write request sent by the client, write a file according to the file write request, and label each fragment of each file.
优选地, 所述数据库服务器还设置为: 在写入第一个文件时, 给该文件 打上标签 1 ,后续每增加一个文件, 标签则增加 1 , 当标签达到 65535时再循 环打标签。  Preferably, the database server is further configured to: label the file when the first file is written, and increase the label by 1 for each subsequent file, and then cycle the label when the label reaches 65535.
优选地, 所述存储服务器状态异常至少包括存储服务器的增加、 删除以 及硬盘故障或者扩容。  Preferably, the storage server status abnormality includes at least an addition, deletion, and hard disk failure or expansion of the storage server.
优选地, 所述存储服务器还设置为: 在侦听到硬盘故障时, 将硬盘异常 信息发送给所述元数据服务器;  Preferably, the storage server is further configured to: send a hard disk abnormality information to the metadata server when detecting a hard disk failure;
所述元数据服务器还设置为: 在接收到所述硬盘异常信息后, 监控到所 述硬盘故障。  The metadata server is further configured to: after receiving the abnormal information of the hard disk, monitor the fault of the hard disk.
优选地, 所述元数据服务器还设置为: 当监控到存储服务器状态异常, 且异常时间大于预定阔值时, 向所述存储服务器发起分片迁移请求。 本发明实施例提出的一种分布式文件系统优化负载均衡的方法及系统, 当元数据服务器监控到存储服务器状态异常时, 向存储服务器发起分片迁移 请求; 存储服务器根据本地存储文件的各分片的标签以及分片迁移请求携带 的异常信息, 重新分配分片位置, 并发起迁移; 当迁移成功后, 将分片新的 位置信息上报数据库服务器, 由此在存储服务器异常以及硬盘故障和扩容情 况下, 对分片进行重新调整, 达到了优化负载均衡的效果, 节省了元数据服 务器的开支, 提高了小文件模型下的整体性能。 附图概述 Preferably, the metadata server is further configured to: initiate a fragment migration request to the storage server when the storage server status is abnormal and the abnormal time is greater than a predetermined threshold. The method and system for optimizing load balancing of a distributed file system according to an embodiment of the present invention, when the metadata server monitors that the storage server is abnormal, initiates a fragment migration request to the storage server; and the storage server stores the files according to the local storage file. The label of the slice and the exception information carried by the fragment migration request, reallocate the fragmentation location, and initiate the migration; when the migration is successful, the fragmentation will be new. The location information is reported to the database server, so that the fragmentation is re-adjusted in the case of the storage server abnormality and the hard disk failure and capacity expansion, thereby achieving the effect of optimizing the load balancing, saving the expenditure of the metadata server, and improving the small file model. Overall performance. BRIEF abstract
图 1是本发明优化负载均衡的分布式文件系统一实施例的结构示意图; 图 2是本发明实施例中硬盘故障分片迁移流程图;  1 is a schematic structural diagram of an embodiment of a distributed file system for optimizing load balancing according to the present invention; FIG. 2 is a flowchart of a hard disk fault fragmentation migration according to an embodiment of the present invention;
图 3是本发明实施例中硬盘扩容分片迁移流程图;  3 is a flowchart of migration of a hard disk expansion fragment in the embodiment of the present invention;
图 4是本发明分布式文件系统优化负载均衡的方法一实施例的流程示意 图。  4 is a flow chart showing an embodiment of a method for optimizing load balancing of a distributed file system according to the present invention.
本发明的较佳实施方式 Preferred embodiment of the invention
本发明实施例的解决方案主要思路是: 当元数据服务器监控到存储服务 器状态异常时, 向存储服务器发起分片迁移请求; 存储服务器根据本地存储 文件的各分片的标签以及分片迁移请求携带的异常信息,重新分配分片位置, 并发起迁移; 当迁移成功后, 将分片新的位置信息上报数据库服务器, 以达 到优化负载均衡的目的, 节省元数据服务器的开支, 提高小文件模型下的整 体性能。 如图 1所示, 本发明一实施例提出的一种优化负载均衡的分布式文件系 统, 包括: 元数据服务器 10、 存储服务器 20及数据库服务器 30, 其中: 所述数据库服务器 30用于接收客户端 40发送的文件写入请求, 根据所 述文件写入请求写入文件, 并为每一文件的各分片打上标签;  The main idea of the solution in the embodiment of the present invention is: when the metadata server monitors that the storage server is abnormal, the device initiates a fragment migration request to the storage server; the storage server carries the label according to each fragment of the local storage file and the fragment migration request. The abnormal information, reallocate the fragmentation location, and initiate the migration; when the migration is successful, report the new location information to the database server to optimize the load balancing, save the cost of the metadata server, and improve the small file model. Overall performance. As shown in FIG. 1 , a distributed file system for optimizing load balancing according to an embodiment of the present invention includes: a metadata server 10, a storage server 20, and a database server 30, wherein: the database server 30 is configured to receive a client. a file write request sent by the terminal 40, writing a file according to the file write request, and labeling each slice of each file;
所述元数据服务器 10用于当监控到所述存储服务器 20状态异常时, 向 所述存储服务器 20发起分片迁移请求; 片迁移请求携带的异常信息, 重新分配分片位置, 并发起迁移; 当迁移成功 后, 将所述分片新的位置信息上报至所述数据库服务器 30。  The metadata server 10 is configured to initiate a fragment migration request to the storage server 20 when the storage server 20 is abnormal in status; the abnormal information carried by the slice migration request, reallocate the fragmentation location, and initiate migration; After the migration is successful, the new location information of the fragment is reported to the database server 30.
具体地, 在本实施例中, 存储服务器 20包括存储服务器监控模块 202、 存储服务器上报模块 201以及重置分片模块 203 , 其中: Specifically, in this embodiment, the storage server 20 includes a storage server monitoring module 202, The storage server reporting module 201 and the reset fragmentation module 203, wherein:
存储服务器监控模块 202用于监控存储服务器 20上硬盘、网络资源信息, 当状态发生异常时立即上报存储服务器上报模块 201;  The storage server monitoring module 202 is configured to monitor the hard disk and network resource information on the storage server 20, and immediately report the storage server reporting module 201 when the status is abnormal;
存储服务器上报模块 201用于接收存储服务器监控模块 202的消息, 在 硬盘和网络异常时,向元数据服务器 10上报存储服务器监控模块 202监控的 信息。  The storage server reporting module 201 is configured to receive the message of the storage server monitoring module 202, and report the information monitored by the storage server monitoring module 202 to the metadata server 10 when the hard disk and the network are abnormal.
重置分片模块 203用于根据首次存放文件时分片的标签,以及元数据服务 器 10触发机制下发的当前存储服务器 20和硬盘状态参数, 判断分片应该存 放的最佳位置信息, 发起分片迁移。  The reset fragmentation module 203 is configured to determine the optimal location information that the fragment should be stored according to the label of the fragment when the file is first stored, and the current storage server 20 and the hard disk state parameter delivered by the trigger mechanism of the metadata server 10, and initiate fragmentation. migrate.
元数据服务器 10包括元数据服务器监控模块 101和迁移触发模块 102, 其中:  The metadata server 10 includes a metadata server monitoring module 101 and a migration triggering module 102, wherein:
元数据服务器监控模块 101用于监控每个存储服务器 20的状态,发现存 储服务器 20离线或者新增的情况, 即负责监控所有存储服务器 20的增加、 删除、异常等改变信息,以及接收存储服务器上报模块 201的硬盘状态信息; 迁移触发模块 102用于当存储服务器 20离线或者新增,或者硬盘异常或 者扩容发生时,在规定的阔值范围时间后,向存储服务器 20发起重新调整分 片的请求, 触发分片迁移。  The metadata server monitoring module 101 is configured to monitor the status of each storage server 20, and find that the storage server 20 is offline or newly added, that is, it is responsible for monitoring the change information of all storage servers 20, such as addition, deletion, abnormality, etc., and receiving the storage server report. The hard disk status information of the module 201 is used by the migration triggering module 102 to initiate a request for resizing the storage server 20 after the specified threshold time period when the storage server 20 is offline or newly added, or the hard disk is abnormal or the expansion occurs. , triggers fragment migration.
数据库服务器 30包括: 打标签模块 301和数据库模块 302, 其中: 打标签模块 301用于在客户端 40请求首次写入某文件时,向文件的每个 分片下发一个标签, 将所有分片打上标签。 在打标签时, 对每个文件打上 1-65535范围内的标签, 且按照请求写入的顺序逐个循环增加。  The database server 30 includes: a labeling module 301 and a database module 302, wherein: the labeling module 301 is configured to send a label to each fragment of the file when the client 40 requests to write a file for the first time, and all the fragments are Label it. When tagging, each file is tagged with a range of 1-65535, and is incremented one by one in the order in which the request is written.
具体地, 在写入第一个文件时, 给该文件打上标签 1 , 后续每增加一个 文件, 标签则增加 1 , 当标签达到 65535时再循环打标签。  Specifically, when the first file is written, the file is tagged 1 , and the tag is incremented by 1 for each additional file, and the tag is recycled when the tag reaches 65535.
数据库模块 302用于记录分片的存放信息和存储服务器 20、硬盘的状态 信息。  The database module 302 is configured to record the storage information of the fragment and the status information of the storage server 20 and the hard disk.
下面以硬盘异常迁移流程和扩容迁移流程分别举例进行说明。  The following describes the hard disk abnormal migration process and the capacity expansion process respectively.
如图 2所示, 硬盘故障触发分片自动迁移的流程具体如下:  As shown in Figure 2, the process of automatic disk fragmentation triggered by automatic disk failure is as follows:
步骤一: 在硬盘异常后, 存储服务器监控模块 202将硬盘异常的信息发 送给存储服务器上报模块 201。  Step 1: After the hard disk is abnormal, the storage server monitoring module 202 sends the abnormal information of the hard disk to the storage server reporting module 201.
步骤二:存储服务器上报模块 201搜集该存储服务器 20上的所有硬盘异 常消息, 并将硬盘异常信息转发给元数据服务器监控模块 101。 Step 2: The storage server reporting module 201 collects all the hard disks on the storage server 20 The message is forwarded to the metadata server monitoring module 101.
步骤三: 元数据服务器监控模块 101在搜集到硬盘异常后, 在异常时间 大于阔值的情况下,发送消息给迁移触发模块 102 ,并且携带异常硬盘信息。  Step 3: After collecting the abnormality of the hard disk, the metadata server monitoring module 101 sends a message to the migration triggering module 102 and carries the abnormal hard disk information when the abnormal time is greater than the threshold.
步骤四: 迁移触发模块 102向重置分配模块发送迁移请求, 并携带异常 硬盘信息。  Step 4: The migration triggering module 102 sends a migration request to the reset distribution module, and carries the abnormal hard disk information.
步骤五: 存储服务器 20的重置分片模块 203根据异常硬盘信息和标签, 重新计算分片应该存放的位置信息, 并直接发起迁移。  Step 5: The reset fragmentation module 203 of the storage server 20 recalculates the location information that the fragment should be stored according to the abnormal hard disk information and the label, and directly initiates the migration.
步骤六: 在迁移成功后, 将分片新的位置信息上报给数据库模块 302存 储。  Step 6: After the migration is successful, the new location information of the fragment is reported to the database module 302 for storage.
如图 3所示, 硬盘扩容触发分片自动迁移流程具体如下:  As shown in Figure 3, the hard disk expansion trigger fragment automatic migration process is as follows:
步骤一: 元数据服务器监控模块 101 发现硬盘扩容或有存储服务器 20 异常(发现其增加或者减少) , 且超过时间阔值。  Step 1: The metadata server monitoring module 101 finds that the hard disk is expanded or there is a storage server 20 abnormality (it is found to increase or decrease) and exceeds the time threshold.
步骤二:元数据服务器监控模块 101在发现异常后,向迁移触发模块 102 发送迁移请求, 并且携带异常存储服务器 20信息。  Step 2: After the abnormality is found, the metadata server monitoring module 101 sends a migration request to the migration triggering module 102, and carries the abnormal storage server 20 information.
步骤三: 迁移触发模块 102向重置分配模块发送迁移请求, 并携带异常 存储服务器 20信息。  Step 3: The migration triggering module 102 sends a migration request to the reset allocation module, and carries the abnormal storage server 20 information.
步骤四: 重置分片模块 203根据异常存储服务器 20信息和标签, 决定哪 些分片需要重新调整, 进而重新分配分片位置, 并发起迁移。  Step 4: The reset fragmentation module 203 determines which fragments need to be re-adjusted based on the abnormal storage server 20 information and tags, thereby reallocating the fragmentation locations and initiating the migration.
步骤五: 存储服务器 20之间发起迁移请求, 在迁移成功后, 将分片新的 位置信息上报数据库模块 302。  Step 5: The storage server 20 initiates a migration request, and after the migration succeeds, the new location information is sent to the database module 302.
相比现有技术,本实施例通过上述方案取得了存储服务器 20异常以及硬 盘故障和扩容情况下分片重新调整均衡的进步,达到了优化负载均衡的效果, 节省了元数据服务器 10的开支, 提高了小文件模型下的整体性能。 如图 4所示, 本发明一实施例提出的一种分布式文件系统优化负载均衡 的方法, 基于上述实施例分布式文件系统而实施, 该方法包括:  Compared with the prior art, the foregoing embodiment achieves the improvement of the storage server 20 abnormality and the re-adjustment and equalization of the fragmentation in the case of the hard disk failure and the expansion, and achieves the effect of optimizing the load balancing, thereby saving the expenditure of the metadata server 10. Improved overall performance under the small file model. As shown in FIG. 4, a method for optimizing load balancing of a distributed file system according to an embodiment of the present invention is implemented based on the distributed file system of the foregoing embodiment, and the method includes:
步骤 S101 , 当元数据服务器监控到存储服务器状态异常时, 向所述存储 服务器发起分片迁移请求;  Step S101: When the metadata server monitors that the storage server status is abnormal, initiate a fragment migration request to the storage server.
步骤 S102,所述存储服务器根据本地存储文件的各分片的标签以及所述 分片迁移请求携带的异常信息, 重新分配分片位置, 并发起迁移; 当迁移成 功后, 将所述分片新的位置信息上报数据库服务器。 Step S102, the storage server re-allocates the fragmentation location according to the label of each fragment of the local storage file and the abnormal information carried by the fragment migration request, and initiates migration; After the work, the new location information of the fragment is reported to the database server.
具体地, 在本实施例中, 数据库服务器在接收客户端发送的文件写入请 求, 根据所述文件写入请求写入文件, 并为每一文件的各分片打上标签。 其 中, 数据库服务器在为每一文件的各分片打上标签时, 具体釆用以下方案: 数据库服务器写入第一个文件时, 给该文件打上标签 1 , 后续每增加一个文 件, 标签则增加 1 , 当标签达到 65535时再循环打标签。  Specifically, in this embodiment, the database server receives the file write request sent by the client, writes the file according to the file write request, and tags each fragment of each file. When the database server labels each fragment of each file, the following scheme is specifically used: When the database server writes the first file, the file is labeled 1 , and each subsequent file is added, the label is increased by 1. Recycle the label when the label reaches 65535.
存储服务器监控模块实时监控存储服务器上硬盘、 网络资源信息, 当状 态发生异常时立即上报存储服务器上报模块; 存储服务器上报模块接收存储 服务器监控模块的消息, 在硬盘和网络异常时, 向元数据服务器上报存储服 务器监控模块监控的信息。  The storage server monitoring module monitors the hard disk and network resource information on the storage server in real time. When the status is abnormal, the storage server reports the module. The storage server reports the module to receive the message from the storage server monitoring module. When the hard disk and the network are abnormal, the data server is sent to the metadata server. Report the information monitored by the storage server monitoring module.
元数据服务器监控模块负责监控所有存储服务器的增加、 删除、 异常等 改变信息, 以及接收存储服务器上报模块的硬盘状态信息; 在接收到硬盘状 态改变 (包括硬盘故障或扩容)或服务器异常时, 由迁移触发模块在规定的 阔值范围时间后, 向存储服务器发起重新调整分片的请求, 触发分片迁移。  The metadata server monitoring module is responsible for monitoring the change information of all storage server additions, deletions, exceptions, and the like, and receiving the hard disk status information of the storage server reporting module; when receiving the hard disk status change (including hard disk failure or expansion) or the server is abnormal, After the migration trigger module sends a request for resizing the fragment to the storage server after the specified threshold time, the migration triggers the fragment migration.
存储服务器的重置分片模块根据首次存放文件时分片的标签,以及元数据 服务器触发机制下发的当前存储服务器和硬盘状态参数, 判断分片应该存放 的最佳位置信息, 发起分片迁移, 在迁移成功后, 将分片新的位置信息上报 给数据库模块存储。 下面以硬盘异常迁移流程和扩容迁移流程分别举例进行说明。  The storage server's reset fragmentation module determines the best location information that the fragment should be stored according to the label of the fragment when the file is first stored, and the current storage server and disk state parameters delivered by the metadata server trigger mechanism, and initiates the fragment migration. After the migration is successful, the new location information of the fragment is reported to the database module for storage. The following describes the hard disk abnormal migration process and the capacity expansion process respectively.
如图 2所示, 硬盘故障触发分片自动迁移的流程具体如下:  As shown in Figure 2, the process of automatic disk fragmentation triggered by automatic disk failure is as follows:
步骤一: 在硬盘异常后, 存储服务器监控模块将硬盘异常的信息发送给 存储服务器上报模块。  Step 1: After the hard disk is abnormal, the storage server monitoring module sends the abnormal information of the hard disk to the storage server reporting module.
步骤二:存储服务器上报模块搜集该存储服务器上的所有硬盘异常消息, 并将硬盘异常信息转发给元数据服务器监控模块。  Step 2: The storage server reporting module collects all the hard disk abnormal messages on the storage server, and forwards the hard disk abnormality information to the metadata server monitoring module.
步骤三: 元数据服务器监控模块在搜集到硬盘异常后, 在异常时间大于 阔值的情况下, 发送消息给迁移触发模块, 并且携带异常硬盘信息。  Step 3: After collecting the abnormality of the hard disk, the metadata server monitoring module sends a message to the migration trigger module and carries the abnormal hard disk information when the abnormal time is greater than the threshold.
步骤四: 迁移触发模块向重置分配模块发送迁移请求, 并携带异常硬盘 信息。  Step 4: The migration trigger module sends a migration request to the reset distribution module, and carries the abnormal hard disk information.
步骤五: 存储服务器的重置分片模块根据异常硬盘信息和标签, 重新计 算分片应该存放的位置信息, 并直接发起迁移。 Step 5: The storage server's reset fragmentation module recalculates based on the abnormal hard disk information and labels. Calculate the location information that the shard should store and initiate the migration directly.
步骤六: 在迁移成功后, 将分片新的位置信息上报给数据库模块存储。 如图 3所示, 硬盘扩容触发分片自动迁移流程具体如下:  Step 6: After the migration is successful, the new location information of the fragment is reported to the database module for storage. As shown in Figure 3, the hard disk expansion trigger fragment automatic migration process is as follows:
步骤一: 元数据服务器监控模块发现硬盘扩容或有存储服务器异常(发 现其增加或者减少) , 且超过时间阔值。  Step 1: The metadata server monitoring module finds that the hard disk is expanded or has a storage server abnormality (recovering its increase or decrease) and exceeding the time threshold.
步骤二: 元数据服务器监控模块在发现异常后, 向迁移触发模块发送迁 移请求, 并且携带异常存储服务器信息。  Step 2: After the abnormality is found, the metadata server monitoring module sends a migration request to the migration triggering module, and carries the abnormal storage server information.
步骤三: 迁移触发模块向重置分配模块发送迁移请求, 并携带异常存储 服务器信息。  Step 3: The migration trigger module sends a migration request to the reset distribution module, and carries the abnormal storage server information.
步骤四: 重置分片模块根据异常存储服务器信息和标签, 决定哪些分片 需要重新调整, 进而重新分配分片位置, 并发起迁移。  Step 4: The reset fragmentation module determines which fragments need to be re-adjusted based on the abnormal storage server information and labels, and then reallocates the fragmentation locations and initiates the migration.
步骤五: 存储服务器之间发起迁移请求, 在迁移成功后, 将分片新的位 置信息上报数据库模块。  Step 5: The migration request is initiated between the storage servers. After the migration is successful, the new location information is reported to the database module.
本实施例通过上述方案,在存储服务器异常以及硬盘故障和扩容情况下, 对分片进行重新调整, 达到了优化负载均衡的效果, 节省了元数据服务器的 开支, 提高了小文件模型下的整体性能。 以上所述仅为本发明的优选实施例, 并非因此限制本发明的专利范围, 凡是利用本发明说明书及附图内容所作的等效结构或流程变换, 或直接或间 接运用在其它相关的技术领域, 均同理包括在本发明的专利保护范围内。  In this embodiment, after the storage server is abnormal and the hard disk is faulty and expanded, the fragment is re-adjusted to achieve the effect of optimizing the load balancing, saving the expenditure of the metadata server, and improving the overall size of the small file model. performance. The above is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and equivalent structural or process changes made by the present specification and drawings may be directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.
工业实用性 本发明实施例提出的一种分布式文件系统优化负载均衡的方法及系统, 当元数据服务器监控到存储服务器状态异常时, 向存储服务器发起分片迁移 请求; 存储服务器根据本地存储文件的各分片的标签以及分片迁移请求携带 的异常信息, 重新分配分片位置, 并发起迁移; 当迁移成功后, 将分片新的 位置信息上报数据库服务器, 由此在存储服务器异常以及硬盘故障和扩容情 况下, 对分片进行重新调整, 达到了优化负载均衡的效果, 节省了元数据服 务器的开支, 提高了小文件模型下的整体性能。 Industrial Applicability A method and system for optimizing load balancing of a distributed file system according to an embodiment of the present invention, when a metadata server monitors that the storage server is abnormal, initiates a fragment migration request to the storage server; and the storage server stores the file according to the local storage file. The label of each fragment and the exception information carried by the fragment migration request, reallocate the fragmentation location, and initiate the migration; after the migration succeeds, the new location information of the fragment is reported to the database server, thereby the storage server exception and the hard disk In the case of faults and capacity expansion, the shards are re-adjusted to achieve the effect of optimizing load balancing, saving the cost of the metadata server and improving the overall performance under the small file model.

Claims

权 利 要 求 书 Claim
1、 一种分布式文件系统优化负载均衡的方法, 包括:  A method for optimizing load balancing in a distributed file system, comprising:
当元数据服务器监控到存储服务器状态异常时, 向所述存储服务器发起 分片迁移请求; 求携带的异常信息, 重新分配分片位置, 并发起迁移; 当迁移成功后, 将所 述分片新的位置信息上报数据库服务器。  When the metadata server monitors that the status of the storage server is abnormal, the device initiates a fragment migration request to the storage server; performs the abnormal information carried, redistributes the fragmentation location, and initiates the migration; after the migration succeeds, the fragmentation is new. The location information is reported to the database server.
2、根据权利要求 1所述的方法, 其中, 所述当元数据服务器监控到存储 服务器状态异常时, 向所述存储服务器发起分片迁移请求之前还包括: 所述数据库服务器接收客户端发送的文件写入请求, 根据所述文件写入 请求写入文件, 并为每一文件的各分片打上标签。 The method according to claim 1, wherein, when the metadata server monitors that the storage server is in an abnormal state, before the sending the fragment migration request to the storage server, the method further includes: the database server receiving the sending by the client A file write request writes a file according to the file write request and tags each shard of each file.
3、根据权利要求 2所述的方法, 其中, 所述数据库服务器为每一文件的 各分片打上标签包括: The method according to claim 2, wherein the database server tags each fragment of each file to include:
所述数据库服务器写入第一个文件时, 给该文件打上标签 1 , 后续每增 加一个文件, 标签则增加 1 , 当标签达到 65535时再循环打标签。  When the database server writes the first file, it tags the file 1 , and each time a file is added, the tag is incremented by 1, and the tag is recycled when the tag reaches 65535.
4、 根据权利要求 1、 2或 3所述的方法, 其中, 所述存储服务器状态异 常至少包括存储服务器的增加、 删除以及硬盘故障或者扩容。 The method according to claim 1, 2 or 3, wherein the storage server status abnormality includes at least an addition, deletion, and hard disk failure or expansion of the storage server.
5、根据权利要求 4所述的方法, 其中, 所述元数据服务器监控到所述硬 盘故障包括: The method according to claim 4, wherein the monitoring, by the metadata server, that the hard disk failure comprises:
所述存储服务器在侦听到硬盘故障时, 将硬盘异常信息发送给所述元数 据服务器;  The storage server sends the hard disk abnormality information to the metadata server when detecting the hard disk failure;
所述元数据服务器接收到所述硬盘异常信息后, 监控到所述硬盘故障。  After receiving the hard disk abnormality information, the metadata server monitors the hard disk failure.
6、根据权利要求 1所述的方法, 其中, 所述当元数据服务器监控到存储 服务器状态异常时, 向所述存储服务器发起分片迁移请求包括: The method of claim 1, wherein when the metadata server monitors that the storage server status is abnormal, initiating a fragment migration request to the storage server includes:
当元数据服务器监控到存储服务器状态异常, 且异常时间大于预定阔值 时, 向所述存储服务器发起分片迁移请求。 When the metadata server monitors that the storage server is abnormal, and the abnormal time is greater than the predetermined threshold At this time, a fragment migration request is initiated to the storage server.
7、 一种优化负载均衡的分布式文件系统, 包括: 元数据服务器、 存储服 务器及数据库服务器, 其中: 7. A distributed file system for optimizing load balancing, comprising: a metadata server, a storage server, and a database server, wherein:
所述元数据服务器设置为: 当监控到所述存储服务器状态异常时, 向所 述存储服务器发起分片迁移请求;  The metadata server is configured to: initiate a fragment migration request to the storage server when monitoring that the storage server status is abnormal;
所述存储服务器设置为: 根据本地存储文件的各分片的标签以及所述分 片迁移请求携带的异常信息, 重新分配分片位置, 并发起迁移; 当迁移成功 后, 将所述分片新的位置信息上报至所述数据库服务器。  The storage server is configured to: re-allocate the fragmentation location according to the label of each fragment of the local storage file and the abnormal information carried by the fragment migration request, and initiate a migration; after the migration succeeds, the fragmentation is new. The location information is reported to the database server.
8、 根据权利要求 7所述的系统, 其中, 所述数据库服务器还设置为: 接 收客户端发送的文件写入请求, 根据所述文件写入请求写入文件, 并为每一 文件的各分片打上标签。 8. The system according to claim 7, wherein the database server is further configured to: receive a file write request sent by the client, write a file according to the file write request, and assign each file to each file The film is tagged.
9、 根据权利要求 8所述的系统, 其中, 所述数据库服务器还设置为: 在 写入第一个文件时, 给该文件打上标签 1 , 后续每增加一个文件, 标签则增 加 1 , 当标签达到 65535时再循环打标签。 9. The system according to claim 8, wherein the database server is further configured to: when the first file is written, label the file 1 , and each time a file is added, the label is incremented by 1 when the label is added. Recycled and tagged when it reaches 65535.
10、 根据权利要求 7、 8或 9所述的系统, 其中, 所述存储服务器状态异 常至少包括存储服务器的增加、 删除以及硬盘故障或者扩容。 The system according to claim 7, 8 or 9, wherein the storage server status abnormality includes at least an addition, deletion, and hard disk failure or expansion of the storage server.
11、 根据权利要求 10所述的系统, 其中, 11. The system of claim 10, wherein
所述存储服务器还设置为: 在侦听到硬盘故障时, 将硬盘异常信息发送 给所述元数据服务器;  The storage server is further configured to: send a hard disk abnormality information to the metadata server when detecting a hard disk failure;
所述元数据服务器还设置为: 在接收到所述硬盘异常信息后, 监控到所 述硬盘故障。  The metadata server is further configured to: after receiving the abnormal information of the hard disk, monitor the fault of the hard disk.
12、 根据权利要求 7所述的系统, 其中, 所述元数据服务器还设置为: 当监控到存储服务器状态异常, 且异常时间大于预定阔值时, 向所述存储服 务器发起分片迁移请求。 The system according to claim 7, wherein the metadata server is further configured to: initiate a fragment migration request to the storage server when the storage server status is abnormal and the abnormal time is greater than a predetermined threshold.
PCT/CN2013/083227 2013-01-28 2013-09-10 Method and system for optimizing load balance of distributed file system WO2014114089A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310032918.X 2013-01-28
CN201310032918.XA CN103973583B (en) 2013-01-28 2013-01-28 Distributed file system optimizes the method and system of load balancing

Publications (1)

Publication Number Publication Date
WO2014114089A1 true WO2014114089A1 (en) 2014-07-31

Family

ID=51226881

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/083227 WO2014114089A1 (en) 2013-01-28 2013-09-10 Method and system for optimizing load balance of distributed file system

Country Status (2)

Country Link
CN (1) CN103973583B (en)
WO (1) WO2014114089A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159925B (en) * 2015-08-04 2019-08-30 北京京东尚科信息技术有限公司 A kind of data-base cluster data distributing method and system
CN105847352B (en) * 2016-03-22 2019-09-17 聚好看科技股份有限公司 Expansion method, device and distributed cache system based on distributed cache system
CN106254470B (en) * 2016-08-08 2019-06-14 广州品唯软件有限公司 Distributed job fragment distribution method and device
CN106599046B (en) * 2016-11-09 2020-06-30 北京同有飞骥科技股份有限公司 Writing method and device of distributed file system
CN107395721B (en) * 2017-07-20 2021-06-29 郑州云海信息技术有限公司 Method and system for expanding metadata cluster
CN112118314B (en) * 2020-09-18 2023-05-05 北京百度网讯科技有限公司 Load balancing method and device
CN112947333B (en) * 2021-02-05 2022-08-02 天津市普迅电力信息技术有限公司 Socket long connection-based balanced load fragmentation method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102150150A (en) * 2008-09-11 2011-08-10 微软公司 Techniques for resource location and migration across data centers
CN102841931A (en) * 2012-08-03 2012-12-26 中兴通讯股份有限公司 Storage method and storage device of distributive-type file system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9201745B2 (en) * 2008-01-23 2015-12-01 Omx Technology Ab Method of improving replica server performance and a replica server system
CN101610287B (en) * 2009-06-16 2012-03-14 浙江大学 Method for balancing load applied in distributed mass memory system
CN101997884B (en) * 2009-08-18 2014-05-14 升东网络科技发展(上海)有限公司 Distributed storage system and method
CN101706805B (en) * 2009-10-30 2011-11-09 中国科学院计算技术研究所 Method and system for storing object
CN102004797A (en) * 2010-12-24 2011-04-06 深圳市同洲电子股份有限公司 Method, device and system for processing data
CN102307221A (en) * 2011-03-25 2012-01-04 国云科技股份有限公司 Cloud storage system and implementation method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102150150A (en) * 2008-09-11 2011-08-10 微软公司 Techniques for resource location and migration across data centers
CN102841931A (en) * 2012-08-03 2012-12-26 中兴通讯股份有限公司 Storage method and storage device of distributive-type file system

Also Published As

Publication number Publication date
CN103973583A (en) 2014-08-06
CN103973583B (en) 2017-11-07

Similar Documents

Publication Publication Date Title
WO2014114089A1 (en) Method and system for optimizing load balance of distributed file system
CN102981931B (en) Backup method and device for virtual machine
US10261853B1 (en) Dynamic replication error retry and recovery
CN102033786B (en) Method for repairing consistency of copies in object storage system
US8868858B2 (en) Method and apparatus of continuous data backup and access using virtual machines
CN108984107B (en) Increasing availability of storage systems
US9450700B1 (en) Efficient network fleet monitoring
CN102394774B (en) Service state monitoring and failure recovery method for controllers of cloud computing operating system
US7925856B1 (en) Method and apparatus for maintaining an amount of reserve space using virtual placeholders
CN100426247C (en) Data recovery method
CN103929500A (en) Method for data fragmentation of distributed storage system
CN103516549B (en) A kind of file system metadata log mechanism based on shared object storage
CN102968360B (en) There is storage system and the method for N+1 redundancy feature
US20110239050A1 (en) System and Method of Collecting and Reporting Exceptions Associated with Information Technology Services
US9164849B2 (en) Backup jobs scheduling optimization
CN113051104B (en) Method and related device for recovering data between disks based on erasure codes
CN103605585A (en) Intelligent backup method based on data discovery
US20240104089A1 (en) Methods, systems, electronic devices, and storage media for database transaction processing
CN104407940A (en) Method for quickly recovering CDP system
CN114003439B (en) Data backup method, device, equipment and storage medium
CN114064374A (en) Fault detection method and system based on distributed block storage
JP5556192B2 (en) Storage system
JP5154843B2 (en) Cluster system, computer, and failure recovery method
US11042454B1 (en) Restoration of a data source
CN106445729A (en) Backup virtualization-based method

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

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

Country of ref document: EP

Kind code of ref document: A1