WO2022063322A1 - Hard drive migration method, distributed storage cluster system and storage medium - Google Patents

Hard drive migration method, distributed storage cluster system and storage medium Download PDF

Info

Publication number
WO2022063322A1
WO2022063322A1 PCT/CN2021/121441 CN2021121441W WO2022063322A1 WO 2022063322 A1 WO2022063322 A1 WO 2022063322A1 CN 2021121441 W CN2021121441 W CN 2021121441W WO 2022063322 A1 WO2022063322 A1 WO 2022063322A1
Authority
WO
WIPO (PCT)
Prior art keywords
hard drive
migrated
data node
information
node server
Prior art date
Application number
PCT/CN2021/121441
Other languages
French (fr)
Inventor
Yaofei KOU
Xin Luo
Zhihao Wang
Original Assignee
Zhejiang Dahua Technology Co., Ltd.
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 Zhejiang Dahua Technology Co., Ltd. filed Critical Zhejiang Dahua Technology Co., Ltd.
Publication of WO2022063322A1 publication Critical patent/WO2022063322A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0617Improving the reliability of storage systems in relation to availability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms

Definitions

  • the present disclosure relates to the field of communication, and in particular to a hard drive migration method, a distributed storage cluster system and a storage medium.
  • a metadata server may assign unique tag information to the data node server and the hard drive thereof. In this way, within the cluster, physically migrating the data node server and the hard drive may be supported. That is, as long as a cluster identifier carried by the data node server and the hard drive is not changed, the data node server and the hard drive may be sensed by the metadata server of the cluster, ensuring integrity of cluster data while the hard drive is being migrated.
  • the present disclosure provides a hard drive migration method, a distributed storage cluster system and a storage medium, which improves reliability and availability of the distributed storage cluster system.
  • the present disclosure provides a hard drive migration method, applied to a metadata server and includes: establishing correspondence between a user file, data node information, hard drive information and data block storage information to obtain a data relationship table, and storing the data relationship table; restricting an operation performed on a data block in a to-be-migrated hard drive through a current data node server after a hard drive migration instruction being received, wherein the current data node server is a data node server where the to-be-migrated hard drive is currently located; receiving updated information reported by a new data node server after the hard drive migration is completed, wherein the new data node server is a data node server into which the to-be-migrated hard drive is going to be migrated, and the updated information comprises new data node information and new hard drive information; and updating information corresponding to the to-be-migrated hard drive in the data relationship table based on the updated information, and eliminating restriction to the data block in the to-be-migrated hard drive.
  • the present disclosure provides a distributed storage cluster system, including a metadata server, a plurality of data node servers connected to the metadata server, and a plurality of to-be-migrated hard drives connected to the plurality of data node servers.
  • the metadata server includes a memory and a processor connected to the memory, the memory is configured to store a computer program, and the computer program, when being executed by the processor, is configured to implement the hard drive migration method as described in the above.
  • the present disclosure provides a computer-readable storage medium, configured for storing a computer program.
  • the computer program when being executed by a processor, is configured to perform the hard drive migration method as described in the above.
  • correspondence between a user file, data node information, hard drive information and data block storage information is pre-established, such that a data relationship table is generated.
  • a reading operation and/or a writing operation performed on a to-be-migrated hard drive that is to be pulled out may be restricted, such that data in the to-be-migrated hard drive remains consistent while the hard drive is being migrated.
  • the new data node server may send updated information to the metadata server, and the updated information records new data node information and new hard drive information.
  • the metadata server updates the data relationship table stored in the metadata server based on the information that is reported by the new data node server.
  • the data node server only needs to report a hot swap event of the hard drive to the metadata node server.
  • data migration signaling may be simplified, an impact of scanning and reporting on a normal service of the cluster caused by data migration may be reduced.
  • the reading and the writing operations may be failed only when the to-be-migrated hard drive is unplugged from the current data node server but is not inserted into the new data node server yet.
  • the reading and the writing operations of the to-be-migrated hard drive may not be affected at other times. In this way, the availability and the reliability of distributed storage cluster system may be improved effectively. It is not required to report all information in the to-be-migrated hard drive to the metadata server, the amount of data to be reported may be reduced, and occupied bandwidth and memory resources may be reduced.
  • FIG. 1 is a structural schematic view of a distributed storage cluster system according to an embodiment of the present disclosure.
  • FIG. 2 is a flow chart of a hard drive migration method according to an embodiment of the present disclosure.
  • FIG. 3 is a flow chart of a hard drive migration method according to another embodiment of the present disclosure.
  • FIG. 4 is a structural schematic view of a distributed storage cluster system according to another embodiment of the present disclosure.
  • FIG. 5 is a structural schematic view of a computer-readable storage medium according to an embodiment of the present disclosure.
  • Hard drive online migration refers to a process of hot swapping the hard drive between different data node servers without disturbing a storage cluster service. Background of applying the hard drive online migration includes the following aspects.
  • the metadata server enables load balance to be achieved based on available capacity of the data node server, that is, a front-end video stream is written into a data node server having large available capacity as much as possible, in a short term, a quite high service pressure may be applied to a new data node server and a hard drive of the new data node server that join the storage cluster system. Therefore, a system resource and memory capacity may be insufficient, service processing capacity may be reduced, or a network response may be timed out, and the like, which may affect user experience.
  • the new data node server and the new hard drive of the new data node server may be added.
  • the new hard drive may be exchanged with the original hard drive in the original data node server, such that the available capacity of all data node servers may be substantially the same.
  • the technical solution of the present disclosure may be applied to the distributed storage cluster system.
  • Management of the data node server and a storage format of the data block in the metadata server may be optimized, and the cluster signaling may be enriched, such that real-time migration of hard drive in the distributed storage cluster system may be supported, and the service pressure of the distributed storage cluster system being increased caused by migration of a large number of hard drives may be avoided. In this way, the availability and the reliability of the distributed storage cluster system may be improved effectively.
  • FIG. 1 is a structural schematic view of a distributed storage cluster system according to an embodiment of the present disclosure.
  • the distributed storage cluster system 10 may include a metadata server 11, a plurality of data node servers 12 connected to the metadata server 11, and a plurality of to-be-migrated hard drives 13 connected to the plurality of data node servers 12.
  • FIG. 2 is a flow chart of a hard drive migration method according to an embodiment of the present disclosure. The method may be applied to the metadata server and includes following operations.
  • correspondence between a user file, data node information, hard drive information, and data block storage information may be established to obtain a data relationship table, and the data relationship table may be stored.
  • the metadata server may pre-establish the correspondence between the user file, the data node information, the hard drive information, and the data block storage information to generate the data relationship table. In this way, the data relationship table may be updated directly while the hard drive is being migrated.
  • the user file may be a file that is stored locally and is related to the user.
  • the data node information may be name information (Identity, ID) of the data node server, configured to distinguish various data node servers.
  • the hard drive information may be slot information of the hard drive in the data node server where the hard drive is currently located. In detail, at least one slot is configured in the data node server, and the hard drive information is configured to indicate the slot in which the hard drive is inserted.
  • the data block storage information may be configured to record the information stored in the data block in the hard drive.
  • the data relationship table may be shown as follows.
  • the File 1 includes information stored in the data block A1, the data block A2, the data block B1, the data block B2, and the data block B3.
  • the File 2 includes information stored in the data block C1, the data block D1, and the data block D2.
  • a size of the user file may determine the number of data blocks divided from the user file. The larger the user file, the more data blocks the storage cluster system may divide the user file into. Distribution of each data block may be determined based on the extent of the data node server and the hard drive of the data node server being busy or idle, and based on the available capacity of the data node server and the hard drive of the data node server. Preferably, the data node server and the hard drive, which have less pressure of being written or have relatively large remaining storage capacity, may be selected for performing the writing operation.
  • operations performed on the data block in the to-be-migrated hard drive may be restricted through the current data node server.
  • the to-be-migrated hard drive is a hard drive that needs to be pulled out and inserted by the user, and is a hard drive connected to the data node server in the distributed storage cluster system.
  • the number of to-be-migrated hard drives may be one or more, and may be adjusted according to application demands.
  • the current data node server is the data node server where the to-be-migrated hard drive is currently located. When the hard drive needs to be migrated, the user may pull out the to-be-migrated hard drive from the current data node server.
  • the current data node server may report a hard drive pull-out event to the metadata server after detecting the to-be-migrated hard drive being pulled out by the user, such that the current data node server may notify the metadata server that a hard drive is currently pulled out from the current data node server.
  • the metadata server may restrict the reading operation and/or the writing operation performed on the to-be-migrated hard drive after receiving the hard drive migration instruction from the user.
  • updated information reported by the new data node server may be received after the hard drive migration is completed.
  • the new data node server is a data node server into which the to-be-migrated hard drive is going to be migrated.
  • the user may pull out the to-be-migrated hard drive from the current data node server and insert the to-be-migrated hard drive into the new data node server.
  • the new data node server may generate the updated information after detecting that to-be-migrated the hard drive is inserted into a slot of the new data node server.
  • the new data node server may report the updated information to the metadata server.
  • the updated information may include new data node information, new hard drive information and an event of the new hard drive being online.
  • the new hard drive being online may be configured to indicate that the hard drive is currently inserted into the new data node server.
  • information that is in the data relationship table and corresponds to the to-be-migrated hard drive may be updated based on the updated information, and the restriction to the data block in the to-be-migrated hard drive may be removed.
  • the metadata server may update the information that is associated with the to-be-migrated hard drive and recorded in the data relationship table stored in the metadata server.
  • the data node information associated with the to-be-migrated hard drive is a data node server A
  • the hard drive information associated with the to-be-migrated hard drive is a second slot. That is, the to-be-migrated hard drive is inserted in the second slot of the data node server A.
  • the data relationship table is updated.
  • the data node information associated with the to-be-migrated hard drive is updated to be the data node server B
  • the hard drive information associated with the to-be-migrated hard drive is updated to be the first slot.
  • the hard drive migration method is provided.
  • the data relationship table which includes the user file, the data node information, the hard drive information and the data block storage information, is generated.
  • the data relationship table may be dynamically updated as the writing service or the deletion service is executed.
  • the data node server may restrict the to-be-migrated hard drive to avoid data information in the to-be-migrated hard drive from being modified by a subsequent service. Only in the process of migrating the hard drive, i.e., in a time period after the to-be-migrated hard drive is pulled out of the current data node server and before the to-be-migrated hard drive is inserted into the new data node server, the metadata server cannot provide the reading service and the writing service of relevant files for the user.
  • the impact on user services caused by migrating the hard drive may be reduced significantly, and the availability of the distributed storage cluster system may be improved.
  • the only required operation is the metadata server modifying the data relationship table, full-scanning the to-be-migrated hard drive in the new data node server is not required, and reporting the data block of the to-be-migrated hard drive in the new data node server is not required. In this way, after the hard drive is migrated, a pressure on the network load, the memory, and the system where the new data node server is located may be avoided, and the reliability of the distributed storage cluster system may be improved.
  • FIG. 3 is a flow chart of a hard drive migration method according to another embodiment of the present disclosure.
  • the correspondence between the user file, the data node information, the hard drive information, and the data block storage information is established to obtain the data relationship table, and the data relationship table is stored.
  • the metadata server includes a first storage device and a second storage device.
  • the data relationship table is stored in the first storage device.
  • the data relationship table may be read into the second storage device while initiating the metadata server.
  • the first storage device may be the hard drive
  • the second storage device may be a memory.
  • the metadata server is configured for maintaining the data relationship table which includes the user file, the data node information, the hard drive information and the data block storage information. While migrating the hard drive, only the data node information and the hard drive information in the data relationship table need to be modified, without waiting for the data node server to finish scanning and reporting the data block storage information in the newly migrated hard drive.
  • the metadata server may synchronize the updated data relationship table to the first storage device after updating the data relationship table stored in the second storage device.
  • a status of the data block in the to-be-migrated hard drive is marked as read-only through the current data node server, and the hard drive migration command is sent to the current data node server.
  • the user may send the hard drive migration instruction to the metadata server.
  • the metadata server may send the hard drive migration command to the current data node server where the to-be-migrated hard drive is located.
  • the hard drive migration command is configured to indicate that the status of the data block in the to-be-migrated hard drive is marked as readable.
  • the metadata server may set the user file associated with the to-be-migrated hard drive to be the read-only status. In the read-only status, the reading operation of the user file is not affected.
  • the writing operation of the user file may be performed by other online hard drives. Therefore, the hard drive migration may not affect normal services of the distributed storage cluster system.
  • the data block in the to-be-migrated hard drive may be set as read-only on the metadata server, and the hard drive migration command may be sent to the current data node server.
  • the current data node server ensures that the to-be-migrated hard drive is read-only and cannot be written. In this way, the data block remains consistent in the to-be-migrated hard drive before and after the hard drive is migrated.
  • cluster identification information which is in the to-be-migrated hard drive and is reported by the current data node server, is received, and the current data node server is notified to remove the to-be-migrated hard drive from a task queue, such that the writing operation performed on the to-be-migrated hard drive is restricted.
  • the current data node server may report the cluster identification information associated with the to-be-migrated hard drive to the metadata server.
  • the cluster identification information includes cluster information, the data node information, and the hard drive information.
  • the cluster information is configured to indicate which distributed storage cluster system the to-be-migrated hard drive currently locates in.
  • the metadata server may notify the current data node server to eliminate the to-be-migrated hard drive from a writing and deleting service table. That is, to-be-migrated hard drive does not accept the writing operation. In this way, the data block storage information in the to-be-migrated hard drive may be avoided from being modified by any subsequent service.
  • the metadata server supports the following two modes of hard drive migration.
  • Concurrent hard drive migration may be denoted as a concurrent migration mode and is applied to migrate a plurality of to-be-migrated hard drives at once, when the cluster identification information recorded in the to-be-migrated hard drives is not corrupted.
  • Serial hard drive migration may be denoted as a serial migration mode and is applied when the cluster identification information recorded on the to-be-migrated hard drive is corrupted. In this case, in order to ensure that the metadata server may correctly modify the data relationship table, the hard drive migration needs to be performed block by block.
  • the metadata server may detect whether the cluster identification information on the to-be-migrated hard drive is normal. That is, the metadata server may determine whether the cluster identification information is corrupted or missing.
  • the mode of the hard drive migration is the concurrent migration mode
  • the user may perform a concurrent migration operation. For example, the user may pull out a plurality of to-be-migrated hard drives from the current data node server, such that migrating one or more to-be-migrated hard drives is performed.
  • the current data node server forwards the concurrent migration operation to the metadata server after detecting the concurrent migration operation performed by the user.
  • the metadata server may prompt the user to select all to-be-migrated hard drives at one time and to migrate all the selected to-be-migrated hard drives at the same time.
  • the storage cluster system While performing the migration operation, the storage cluster system is configured to maintain the status of the data block in each to-be-migrated hard drive, and configured to update the cluster identification information. That is, the status of the data block in each to-be-migrated hard drive is marked as readable. In this way, errors that cause failure of the concurrent migration operation may be prevented.
  • the mode of the hard drive migration is the serial hard drive migration mode.
  • the user may perform a serial hard drive migration operation. That is, only one to-be-migrated hard drive can be migrated at once.
  • the hard drive migration operation may be performed on a next to-be-migrated hard drive only after the operation of migrating the current to-be-migrated hard drive is completed.
  • the current data node server forwards the serial hard drive migration operation to the metadata server after detecting the serial hard drive migration operation performed by the user.
  • the metadata server may prompt the user to migrate other to-be-migrated hard drives only after the operation of migrating the current to-be-migrated hard drive is completed. In this way, errors caused by the operation of the user may be prevented.
  • the metadata server may prompt the user to perform the hard drive migration operation. That is, the user starts to perform the operation of pulling out the to-be-migrated hard drive from the current data node server and inserting the to-be-migrated hard drive into the new data node server.
  • the status of the data block in the to-be-migrated hard drive is marked as in a process of being migrated, such that the reading operation performed on the to-be-migrated hard drive is restricted until migration of the to-be-migrated hard drive is completed.
  • the current data node server may report the data node information and the hard drive information to the metadata server.
  • the metadata server may mark the data block associated with the to-be-migrated hard drive in the data relationship table as in the process of being migrated.
  • a reading request for the data block in the to-be-migrated hard drive sent from the service layer cannot be responded until the migration of the to-be-migrated hard drive is completed. Therefore, the user needs to complete the hard drive migration operation as soon as possible.
  • the updated information reported by the new data node server is received, the data node information corresponding to the to-be-migrated hard drive in the data relationship table is modified into the new data node information, the hard drive information corresponding to the to-be-migrated hard drive is modified into the new hard drive information, and the status of the data block in the to-be-migrated hard drive is modified into a normal status.
  • the new data node server may report the old cluster identification information in the to-be-migrated hard drive (the old cluster identification information is reported only when the concurrent migration mode is performed) , the new data node information, the new slot information, and the event of the hard drive being online, to the metadata server.
  • the old cluster identification information is the cluster identification information corresponding to the to-be-migrated hard drive before the hard drive is being migrated.
  • the metadata server may modify the data relationship table maintained in the memory based on the information reported by the new data node server. That is, the data node information and the hard drive information in the original data relationship table is modified into the new data node information and the new hard drive information after the migration.
  • the data block associated with the to-be-migrated hard drive is marked as the normal status. In this way, the normal reading operation and the normal writing operation performed on the to-be-migrated hard drive may be performed.
  • the metadata server may further generate new cluster identification information based on the information reported by the new data node server, and write the new cluster identification information to the to-be-migrated hard drive to update the cluster identification information on the to-be-migrated hard drive.
  • the mode of the hard drive migration is the serial hard drive migration mode
  • the data relationship table may be updated based on only the new data node information and the new slot information, and without based on the old cluster identification information.
  • the mode of the hard drive migration is the concurrent migration mode
  • a plurality of pieces of information in the data relationship table may need to be updated at the same time.
  • the old cluster identification information is not obtained, the new cluster identification information cannot correspond to the old cluster identification, and updating cannot be performed. Therefore, when the old cluster identification information is abnormal, only serial hard drive migration can be performed.
  • the present embodiment provides two scenarios of hard drive migration.
  • the concurrent migration mode is applicable when the cluster identification information in the to-be-migrated hard drive is normal. In this case, time spent for migrating the to-be-migrated hard drive may be significantly reduced.
  • the serial hard drive migration mode is applicable when the cluster identification information is corrupted. As long as the data block in the to-be-migrated hard drive is not corrupted, the migration can be done. In this way, the availability of the distributed storage cluster system may be improved. Even when the cluster identification information saved in the hard drive is corrupted (or missing) , serial hard drive migration may still be performed. In this way, migration of the hard drive may be achieved, and the availability of the distributed storage cluster system may be improved.
  • the data node information, the hard drive information and the data block storage information may be centrally managed through the metadata server.
  • Writing offset of a current object may be searched and found directly from the metadata server before each reading and writing operation. In this way, a service path may be shortened effectively, and performance of the cluster may be improved.
  • the metadata server only needs to update the data relationship table in the memory. Therefore, data migration may be performed rapidly, and concurrent migration of a plurality of hard drives may be supported. Further, time spent for migrating the hard drive may be saved.
  • the distributed storage cluster system does not the user to perform the reading operation and the writing operation on the to-be-migrated hard drive only when the hard drive is pulled out of a server but is not inserted into a server yet. While in any other time period, the entire distributed storage cluster system supports the reading operation and the writing operation. In this way, the availability of the distributed storage cluster system may be improved.
  • the new data node server is not required to scan and report the data block storage information on the to-be-migrated hard drive to the metadata server. In this way, a system load on the data node server may be reduced, and the reliability of the distributed storage cluster system may be improved.
  • signaling capacity between the data node server and the metadata server may be simplified while migrating the hard drive. The reliability of a communication process may be improved, and a network load may be reduced.
  • FIG. 4 is a structural schematic view of a distributed storage cluster system according to another embodiment of the present disclosure.
  • the distributed storage cluster system 40 includes a metadata server 41, a plurality of data node servers 42, and a to-be-migrated hard drive 43.
  • Each of the plurality of data node servers 42 is connected to the metadata server 41.
  • the to-be-migrated hard drove 43 is connected to one of the plurality of data node servers 42.
  • the metadata server 41 includes a memory 411 and a processor 412 connected to the memory 411.
  • the memory 411 is configured to store a computer program.
  • the computer program when being executed by the processor 412, is configured to implement the hard drive migration method as stated in the above embodiments.
  • FIG. 5 is a structural schematic view of a computer-readable storage medium according to an embodiment of the present disclosure.
  • the computer-readable storage medium 50 is configured to store a computer program 51.
  • the computer program 51 when being executed by a processor, is configured to implement the hard drive migration method as stated in the above embodiments.
  • the computer readable storage medium 50 may be a server, a universal serial bus disk, a removable hard disk, a read-only memory (ROM) , a random access memory (RAM) , a magnetic disk or an optical disk, and other kinds of media that can store program codes.
  • Units illustrated as separate components may or may not be physically separated.
  • Components displayed as units may or may not be physical units. That is, the components or the units may locate at one place, or may be distributed to multiple network units. Some or all of these units may be selected according to practical needs to achieve the purpose of the present disclosure.
  • each functional unit in each embodiment of the present disclosure may be integrated into a single processing unit, or each unit may be physically present separately.
  • two or more units may be integrated in a single unit.
  • the above integrated units may be implemented either in the form of hardware or in the form of software functional units.

Abstract

A hard drive migration method, applied to a metadata server, includes: establishing correspondence between a user file, data node information, hard drive information and data block storage information to obtain and store a data relationship table; after receiving a hard drive migration instruction, restricting an operation performed on a data block in the to-be-migrated hard drive through a current data node server, wherein the current data node server is a data node server where the to-be-migrated hard drive is currently located; receiving updated information reported by a new data node server after the hard drive migration is completed, wherein the new data node server is a data node server into which the to-be-migrated hard drive is going to be migrated; updating information corresponding to the to-be-migrated hard drive in the data relationship table based on the updated information, and eliminating restriction to the data block in the to-be-migrated hard drive.

Description

HARD DRIVE MIGRATION METHOD, DISTRIBUTED STORAGE CLUSTER SYSTEM AND STORAGE MEDIUM
The present application claims foreign priority of China Patent Application No. 202011037231.1, filed on September 28, 2020, in the China National Intellectual Property Administration, the entire contents of which are hereby incorporated by reference
TECHNICAL FIELD
The present disclosure relates to the field of communication, and in particular to a hard drive migration method, a distributed storage cluster system and a storage medium.
BACKGROUND
In a distributed storage cluster system, when each data node server and a hard drive thereof come online for a first time, a metadata server may assign unique tag information to the data node server and the hard drive thereof. In this way, within the cluster, physically migrating the data node server and the hard drive may be supported. That is, as long as a cluster identifier carried by the data node server and the hard drive is not changed, the data node server and the hard drive may be sensed by the metadata server of the cluster, ensuring integrity of cluster data while the hard drive is being migrated.
However, in the art, while the hard drive is being migrated, some data blocks may be invalid when the hard drive is offline. Only after the hard drive migration is completed and all data blocks of the migrated hard drive is reported, the invalid data blocks may be updated. While the data blocks are invalid and the hard drive is offline, any reading and writing operation performed by the service layer may fail, affecting user experience.
SUMMARY OF THE DISCLOSURE
The present disclosure provides a hard drive migration method, a distributed storage cluster system and a storage medium, which improves reliability and availability of the distributed storage cluster system.
To achieve the above purpose, the present disclosure provides a hard drive migration method, applied to a metadata server and includes: establishing correspondence between a user file, data node information, hard drive information and data block storage information to obtain a data relationship table, and storing the data relationship table; restricting an operation performed on a data block in a to-be-migrated hard drive through a current data node server after a hard drive migration instruction being received, wherein the current data node server is a data node server where the to-be-migrated hard drive is currently located; receiving updated information reported by a new data node server after the hard drive migration is completed, wherein the new  data node server is a data node server into which the to-be-migrated hard drive is going to be migrated, and the updated information comprises new data node information and new hard drive information; and updating information corresponding to the to-be-migrated hard drive in the data relationship table based on the updated information, and eliminating restriction to the data block in the to-be-migrated hard drive.
To achieve the above purpose, the present disclosure provides a distributed storage cluster system, including a metadata server, a plurality of data node servers connected to the metadata server, and a plurality of to-be-migrated hard drives connected to the plurality of data node servers. The metadata server includes a memory and a processor connected to the memory, the memory is configured to store a computer program, and the computer program, when being executed by the processor, is configured to implement the hard drive migration method as described in the above.
To achieve the above purpose, the present disclosure provides a computer-readable storage medium, configured for storing a computer program. The computer program, when being executed by a processor, is configured to perform the hard drive migration method as described in the above.
According to the present disclosure, correspondence between a user file, data node information, hard drive information and data block storage information is pre-established, such that a data relationship table is generated. A reading operation and/or a writing operation performed on a to-be-migrated hard drive that is to be pulled out may be restricted, such that data in the to-be-migrated hard drive remains consistent while the hard drive is being migrated. After the user pull the to-be-migrated hard drive out of a current data node server and insert the to-be-migrated hard drive into a new data node server, the new data node server may send updated information to the metadata server, and the updated information records new data node information and new hard drive information. In this way, the metadata server updates the data relationship table stored in the metadata server based on the information that is reported by the new data node server. As the data in the hard drive is not changed, the data node server only needs to report a hot swap event of the hard drive to the metadata node server. In this way, data migration signaling may be simplified, an impact of scanning and reporting on a normal service of the cluster caused by data migration may be reduced. The reading and the writing operations may be failed only when the to-be-migrated hard drive is unplugged from the current data node server but is not inserted into the new data node server yet. The reading and the writing operations of the to-be-migrated hard drive may not be affected at other times. In this way, the availability and the reliability of distributed storage cluster system may be improved effectively.  It is not required to report all information in the to-be-migrated hard drive to the metadata server, the amount of data to be reported may be reduced, and occupied bandwidth and memory resources may be reduced.
BRIEF DESCRIPTION OF THE DRAWINGS
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, accompanying drawings for illustrating the embodiments will be briefly introduced. Obviously, the following drawings show only some of the embodiments of the present disclosure, and any ordinary skilled person in the art may obtain other drawings based on the following drawings without any creative work.
FIG. 1 is a structural schematic view of a distributed storage cluster system according to an embodiment of the present disclosure.
FIG. 2 is a flow chart of a hard drive migration method according to an embodiment of the present disclosure.
FIG. 3 is a flow chart of a hard drive migration method according to another embodiment of the present disclosure.
FIG. 4 is a structural schematic view of a distributed storage cluster system according to another embodiment of the present disclosure.
FIG. 5 is a structural schematic view of a computer-readable storage medium according to an embodiment of the present disclosure.
DETAILED DESCRIPTION
Technical solutions in the embodiments of the present disclosure will be clearly and completely described by referring to the accompanying drawings of the embodiments of the present disclosure. Obviously, the described embodiments are only a part of, but not all of, the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by an ordinary skilled person in the art without any creative work shall fall within the scope of the present disclosure.
Hard drive online migration refers to a process of hot swapping the hard drive between different data node servers without disturbing a storage cluster service. Background of applying the hard drive online migration includes the following aspects.
(1) In an application scenario, as a service scale increases, the storage cluster system inevitably encounters a situation of insufficient capacity. In this case, the capacity of the storage cluster system needs to be expanded.
(2) In a field of security video surveillance, a service pressure from a front-end camera is always present. Therefore, the storage cluster system is required to be expanded online, that is,  the expansion of the cluster shall not affect the normal service.
As the metadata server enables load balance to be achieved based on available capacity of the data node server, that is, a front-end video stream is written into a data node server having large available capacity as much as possible, in a short term, a quite high service pressure may be applied to a new data node server and a hard drive of the new data node server that join the storage cluster system. Therefore, a system resource and memory capacity may be insufficient, service processing capacity may be reduced, or a network response may be timed out, and the like, which may affect user experience.
Therefore, while expanding the storage cluster system, the new data node server and the new hard drive of the new data node server may be added. Besides, the new hard drive may be exchanged with the original hard drive in the original data node server, such that the available capacity of all data node servers may be substantially the same.
The technical solution of the present disclosure may be applied to the distributed storage cluster system. Management of the data node server and a storage format of the data block in the metadata server may be optimized, and the cluster signaling may be enriched, such that real-time migration of hard drive in the distributed storage cluster system may be supported, and the service pressure of the distributed storage cluster system being increased caused by migration of a large number of hard drives may be avoided. In this way, the availability and the reliability of the distributed storage cluster system may be improved effectively.
As shown in FIG. 1 and FIG. 2, FIG. 1 is a structural schematic view of a distributed storage cluster system according to an embodiment of the present disclosure. The distributed storage cluster system 10 may include a metadata server 11, a plurality of data node servers 12 connected to the metadata server 11, and a plurality of to-be-migrated hard drives 13 connected to the plurality of data node servers 12. FIG. 2 is a flow chart of a hard drive migration method according to an embodiment of the present disclosure. The method may be applied to the metadata server and includes following operations.
In an operation 21, correspondence between a user file, data node information, hard drive information, and data block storage information may be established to obtain a data relationship table, and the data relationship table may be stored.
The metadata server may pre-establish the correspondence between the user file, the data node information, the hard drive information, and the data block storage information to generate the data relationship table. In this way, the data relationship table may be updated directly while the hard drive is being migrated.
Further, the user file may be a file that is stored locally and is related to the user. The  data node information may be name information (Identity, ID) of the data node server, configured to distinguish various data node servers. The hard drive information may be slot information of the hard drive in the data node server where the hard drive is currently located. In detail, at least one slot is configured in the data node server, and the hard drive information is configured to indicate the slot in which the hard drive is inserted. The data block storage information may be configured to record the information stored in the data block in the hard drive. For example, the data relationship table may be shown as follows.
Figure PCTCN2021121441-appb-000001
The File 1 includes information stored in the data block A1, the data block A2, the data block B1, the data block B2, and the data block B3. The File 2 includes information stored in the data block C1, the data block D1, and the data block D2.
It should be understood that a size of the user file may determine the number of data blocks divided from the user file. The larger the user file, the more data blocks the storage cluster  system may divide the user file into. Distribution of each data block may be determined based on the extent of the data node server and the hard drive of the data node server being busy or idle, and based on the available capacity of the data node server and the hard drive of the data node server. Preferably, the data node server and the hard drive, which have less pressure of being written or have relatively large remaining storage capacity, may be selected for performing the writing operation.
In an operation 22, after receiving a hard drive migration instruction, operations performed on the data block in the to-be-migrated hard drive may be restricted through the current data node server.
The to-be-migrated hard drive is a hard drive that needs to be pulled out and inserted by the user, and is a hard drive connected to the data node server in the distributed storage cluster system. The number of to-be-migrated hard drives may be one or more, and may be adjusted according to application demands. The current data node server is the data node server where the to-be-migrated hard drive is currently located. When the hard drive needs to be migrated, the user may pull out the to-be-migrated hard drive from the current data node server. The current data node server may report a hard drive pull-out event to the metadata server after detecting the to-be-migrated hard drive being pulled out by the user, such that the current data node server may notify the metadata server that a hard drive is currently pulled out from the current data node server.
Further, before the metadata server receives the event of the hard drive being pulled out reported by the current data node server, i.e., when the user is ready to pull out the to-be-migrated hard drive from the current data node server but has not yet done so, in order to ensure consistency of the data in the to-be-migrated hard drive before and after the hard drive being migrated, the metadata server may restrict the reading operation and/or the writing operation performed on the to-be-migrated hard drive after receiving the hard drive migration instruction from the user.
In an operation 23, updated information reported by the new data node server may be received after the hard drive migration is completed.
The new data node server is a data node server into which the to-be-migrated hard drive is going to be migrated. The user may pull out the to-be-migrated hard drive from the current data node server and insert the to-be-migrated hard drive into the new data node server. The new data node server may generate the updated information after detecting that to-be-migrated the hard drive is inserted into a slot of the new data node server. The new data node server may report the updated information to the metadata server. The updated information may include new  data node information, new hard drive information and an event of the new hard drive being online. The new hard drive being online may be configured to indicate that the hard drive is currently inserted into the new data node server.
In an operation 24, information that is in the data relationship table and corresponds to the to-be-migrated hard drive may be updated based on the updated information, and the restriction to the data block in the to-be-migrated hard drive may be removed.
After receiving the updated information reported by the new data server, the metadata server may update the information that is associated with the to-be-migrated hard drive and recorded in the data relationship table stored in the metadata server. For example, before updating, the data node information associated with the to-be-migrated hard drive is a data node server A, and the hard drive information associated with the to-be-migrated hard drive is a second slot. That is, the to-be-migrated hard drive is inserted in the second slot of the data node server A. After the user pulls out the to-be-migrated hard drive from the data node server A and inserts the to-be-migrated hard drive into a first slot of a data node server B, the data relationship table is updated. The data node information associated with the to-be-migrated hard drive is updated to be the data node server B, and the hard drive information associated with the to-be-migrated hard drive is updated to be the first slot.
According to the present embodiment, the hard drive migration method is provided. The data relationship table, which includes the user file, the data node information, the hard drive information and the data block storage information, is generated. The data relationship table may be dynamically updated as the writing service or the deletion service is executed. Before performing the hard drive migration, the data node server may restrict the to-be-migrated hard drive to avoid data information in the to-be-migrated hard drive from being modified by a subsequent service. Only in the process of migrating the hard drive, i.e., in a time period after the to-be-migrated hard drive is pulled out of the current data node server and before the to-be-migrated hard drive is inserted into the new data node server, the metadata server cannot provide the reading service and the writing service of relevant files for the user. In this way, the impact on user services caused by migrating the hard drive may be reduced significantly, and the availability of the distributed storage cluster system may be improved. In addition, the only required operation is the metadata server modifying the data relationship table, full-scanning the to-be-migrated hard drive in the new data node server is not required, and reporting the data block of the to-be-migrated hard drive in the new data node server is not required. In this way, after the hard drive is migrated, a pressure on the network load, the memory, and the system where the new data node server is located may be avoided, and the reliability of the distributed  storage cluster system may be improved.
As shown in FIG. 3, FIG. 3 is a flow chart of a hard drive migration method according to another embodiment of the present disclosure.
In an operation 31, the correspondence between the user file, the data node information, the hard drive information, and the data block storage information is established to obtain the data relationship table, and the data relationship table is stored.
The metadata server includes a first storage device and a second storage device. The data relationship table is stored in the first storage device. The data relationship table may be read into the second storage device while initiating the metadata server. In detail, the first storage device may be the hard drive, and the second storage device may be a memory.
The metadata server is configured for maintaining the data relationship table which includes the user file, the data node information, the hard drive information and the data block storage information. While migrating the hard drive, only the data node information and the hard drive information in the data relationship table need to be modified, without waiting for the data node server to finish scanning and reporting the data block storage information in the newly migrated hard drive.
It should be understood that, in response to the data relationship table in the second storage device being updated, when a pressure on a service layer is low, the metadata server may synchronize the updated data relationship table to the first storage device after updating the data relationship table stored in the second storage device.
In an operation 32, after the hard drive migration instruction is received, a status of the data block in the to-be-migrated hard drive is marked as read-only through the current data node server, and the hard drive migration command is sent to the current data node server.
Before the hard drive is migrated, the user may send the hard drive migration instruction to the metadata server. After receiving the hard drive migration instruction, the metadata server may send the hard drive migration command to the current data node server where the to-be-migrated hard drive is located. The hard drive migration command is configured to indicate that the status of the data block in the to-be-migrated hard drive is marked as readable.
The metadata server may set the user file associated with the to-be-migrated hard drive to be the read-only status. In the read-only status, the reading operation of the user file is not affected. The writing operation of the user file may be performed by other online hard drives. Therefore, the hard drive migration may not affect normal services of the distributed storage cluster system.
Further, the data block in the to-be-migrated hard drive may be set as read-only on the  metadata server, and the hard drive migration command may be sent to the current data node server. The current data node server ensures that the to-be-migrated hard drive is read-only and cannot be written. In this way, the data block remains consistent in the to-be-migrated hard drive before and after the hard drive is migrated.
In an operation 33, cluster identification information, which is in the to-be-migrated hard drive and is reported by the current data node server, is received, and the current data node server is notified to remove the to-be-migrated hard drive from a task queue, such that the writing operation performed on the to-be-migrated hard drive is restricted.
After the user pulls out the to-be-migrated hard drive from the current data node server, the current data node server may report the cluster identification information associated with the to-be-migrated hard drive to the metadata server. In detail, the cluster identification information includes cluster information, the data node information, and the hard drive information. The cluster information is configured to indicate which distributed storage cluster system the to-be-migrated hard drive currently locates in.
The metadata server may notify the current data node server to eliminate the to-be-migrated hard drive from a writing and deleting service table. That is, to-be-migrated hard drive does not accept the writing operation. In this way, the data block storage information in the to-be-migrated hard drive may be avoided from being modified by any subsequent service.
In one embodiment, the metadata server supports the following two modes of hard drive migration.
a) . Concurrent hard drive migration may be denoted as a concurrent migration mode and is applied to migrate a plurality of to-be-migrated hard drives at once, when the cluster identification information recorded in the to-be-migrated hard drives is not corrupted.
b) . Serial hard drive migration may be denoted as a serial migration mode and is applied when the cluster identification information recorded on the to-be-migrated hard drive is corrupted. In this case, in order to ensure that the metadata server may correctly modify the data relationship table, the hard drive migration needs to be performed block by block.
Further, the metadata server may detect whether the cluster identification information on the to-be-migrated hard drive is normal. That is, the metadata server may determine whether the cluster identification information is corrupted or missing.
When the cluster identification information in the to-be-migrated hard drive is normal, the mode of the hard drive migration is the concurrent migration mode, and the user may perform a concurrent migration operation. For example, the user may pull out a plurality of to-be-migrated hard drives from the current data node server, such that migrating one or more  to-be-migrated hard drives is performed. The current data node server forwards the concurrent migration operation to the metadata server after detecting the concurrent migration operation performed by the user. When the metadata server receives the concurrent migration operation forwarded by the current data node server, the metadata server may prompt the user to select all to-be-migrated hard drives at one time and to migrate all the selected to-be-migrated hard drives at the same time. While performing the migration operation, the storage cluster system is configured to maintain the status of the data block in each to-be-migrated hard drive, and configured to update the cluster identification information. That is, the status of the data block in each to-be-migrated hard drive is marked as readable. In this way, errors that cause failure of the concurrent migration operation may be prevented.
When the cluster identification information in the to-be-migrated hard drive is abnormal, the mode of the hard drive migration is the serial hard drive migration mode. The user may perform a serial hard drive migration operation. That is, only one to-be-migrated hard drive can be migrated at once. The hard drive migration operation may be performed on a next to-be-migrated hard drive only after the operation of migrating the current to-be-migrated hard drive is completed. The current data node server forwards the serial hard drive migration operation to the metadata server after detecting the serial hard drive migration operation performed by the user. When the metadata server receives the serial hard drive migration operation forwarded by the current data node server, the metadata server may prompt the user to migrate other to-be-migrated hard drives only after the operation of migrating the current to-be-migrated hard drive is completed. In this way, errors caused by the operation of the user may be prevented.
After the metadata server marks all the to-be-migrated hard drives, the metadata server may prompt the user to perform the hard drive migration operation. That is, the user starts to perform the operation of pulling out the to-be-migrated hard drive from the current data node server and inserting the to-be-migrated hard drive into the new data node server.
In an operation 34, after an event of the hard drive being pulled out is received, the status of the data block in the to-be-migrated hard drive is marked as in a process of being migrated, such that the reading operation performed on the to-be-migrated hard drive is restricted until migration of the to-be-migrated hard drive is completed.
After the to-be-migrated hard drive is pulled out from the current data node server, the current data node server may report the data node information and the hard drive information to the metadata server. The metadata server may mark the data block associated with the to-be-migrated hard drive in the data relationship table as in the process of being migrated. At  this time, a reading request for the data block in the to-be-migrated hard drive sent from the service layer cannot be responded until the migration of the to-be-migrated hard drive is completed. Therefore, the user needs to complete the hard drive migration operation as soon as possible.
In an operation 35, after the hard drive migration is completed, the updated information reported by the new data node server is received, the data node information corresponding to the to-be-migrated hard drive in the data relationship table is modified into the new data node information, the hard drive information corresponding to the to-be-migrated hard drive is modified into the new hard drive information, and the status of the data block in the to-be-migrated hard drive is modified into a normal status.
After the user completes the operation of the hard drive migration, the new data node server may report the old cluster identification information in the to-be-migrated hard drive (the old cluster identification information is reported only when the concurrent migration mode is performed) , the new data node information, the new slot information, and the event of the hard drive being online, to the metadata server. In detail, the old cluster identification information is the cluster identification information corresponding to the to-be-migrated hard drive before the hard drive is being migrated.
The metadata server may modify the data relationship table maintained in the memory based on the information reported by the new data node server. That is, the data node information and the hard drive information in the original data relationship table is modified into the new data node information and the new hard drive information after the migration. The data block associated with the to-be-migrated hard drive is marked as the normal status. In this way, the normal reading operation and the normal writing operation performed on the to-be-migrated hard drive may be performed. The metadata server may further generate new cluster identification information based on the information reported by the new data node server, and write the new cluster identification information to the to-be-migrated hard drive to update the cluster identification information on the to-be-migrated hard drive.
Further, when the mode of the hard drive migration is the serial hard drive migration mode, only one piece of information in the data relationship table needs to be updated. Therefore, the data relationship table may be updated based on only the new data node information and the new slot information, and without based on the old cluster identification information. When the mode of the hard drive migration is the concurrent migration mode, a plurality of pieces of information in the data relationship table may need to be updated at the same time. In this case, when the old cluster identification information is not obtained, the new cluster identification  information cannot correspond to the old cluster identification, and updating cannot be performed. Therefore, when the old cluster identification information is abnormal, only serial hard drive migration can be performed.
The present embodiment provides two scenarios of hard drive migration. The concurrent migration mode is applicable when the cluster identification information in the to-be-migrated hard drive is normal. In this case, time spent for migrating the to-be-migrated hard drive may be significantly reduced. The serial hard drive migration mode is applicable when the cluster identification information is corrupted. As long as the data block in the to-be-migrated hard drive is not corrupted, the migration can be done. In this way, the availability of the distributed storage cluster system may be improved. Even when the cluster identification information saved in the hard drive is corrupted (or missing) , serial hard drive migration may still be performed. In this way, migration of the hard drive may be achieved, and the availability of the distributed storage cluster system may be improved. Furthermore, the data node information, the hard drive information and the data block storage information may be centrally managed through the metadata server. Writing offset of a current object may be searched and found directly from the metadata server before each reading and writing operation. In this way, a service path may be shortened effectively, and performance of the cluster may be improved. In addition, in the process of migrating the hard drive, the metadata server only needs to update the data relationship table in the memory. Therefore, data migration may be performed rapidly, and concurrent migration of a plurality of hard drives may be supported. Further, time spent for migrating the hard drive may be saved. The distributed storage cluster system does not the user to perform the reading operation and the writing operation on the to-be-migrated hard drive only when the hard drive is pulled out of a server but is not inserted into a server yet. While in any other time period, the entire distributed storage cluster system supports the reading operation and the writing operation. In this way, the availability of the distributed storage cluster system may be improved. In addition, after the to-be-migrated hard drive is migrated to the new data node server, the new data node server is not required to scan and report the data block storage information on the to-be-migrated hard drive to the metadata server. In this way, a system load on the data node server may be reduced, and the reliability of the distributed storage cluster system may be improved. In addition, compared to solutions that require complicated interactions, in the present disclosure, signaling capacity between the data node server and the metadata server may be simplified while migrating the hard drive. The reliability of a communication process may be improved, and a network load may be reduced.
As shown in FIG. 4, FIG. 4 is a structural schematic view of a distributed storage cluster  system according to another embodiment of the present disclosure. The distributed storage cluster system 40 includes a metadata server 41, a plurality of data node servers 42, and a to-be-migrated hard drive 43. Each of the plurality of data node servers 42 is connected to the metadata server 41. The to-be-migrated hard drove 43 is connected to one of the plurality of data node servers 42. The metadata server 41 includes a memory 411 and a processor 412 connected to the memory 411. The memory 411 is configured to store a computer program. The computer program, when being executed by the processor 412, is configured to implement the hard drive migration method as stated in the above embodiments.
As shown in FIG. 5, FIG. 5 is a structural schematic view of a computer-readable storage medium according to an embodiment of the present disclosure. The computer-readable storage medium 50 is configured to store a computer program 51. The computer program 51, when being executed by a processor, is configured to implement the hard drive migration method as stated in the above embodiments.
The computer readable storage medium 50 may be a server, a universal serial bus disk, a removable hard disk, a read-only memory (ROM) , a random access memory (RAM) , a magnetic disk or an optical disk, and other kinds of media that can store program codes.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed methods and the apparatus may be implemented in other ways. For example, the above-described embodiments of the device are merely exemplary. For example, division of modules or units is only based on logical functions. Practically, the modules and the units may be divided in another way. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
Units illustrated as separate components may or may not be physically separated. Components displayed as units may or may not be physical units. That is, the components or the units may locate at one place, or may be distributed to multiple network units. Some or all of these units may be selected according to practical needs to achieve the purpose of the present disclosure.
In addition, each functional unit in each embodiment of the present disclosure may be integrated into a single processing unit, or each unit may be physically present separately. Alternatively, two or more units may be integrated in a single unit. The above integrated units may be implemented either in the form of hardware or in the form of software functional units.
The above illustration shows only embodiments of the present disclosure and does not limit the scope of the present disclosure. Any equivalent structure or equivalent process transformation based on the specification and the accompanying drawings of the present  disclosure, directly or indirectly applied in other related fields, shall be included in the scope of the present disclosure.

Claims (20)

  1. A hard drive migration method, applied to a metadata server and comprising:
    establishing correspondence between a user file, data node information, hard drive information and data block storage information to obtain a data relationship table, and storing the data relationship table;
    restricting an operation performed on a data block in a to-be-migrated hard drive through a current data node server after a hard drive migration instruction being received, wherein the current data node server is a data node server where the to-be-migrated hard drive is currently located;
    receiving updated information reported by a new data node server after the hard drive migration is completed, wherein the new data node server is a data node server into which the to-be-migrated hard drive is going to be migrated, and the updated information comprises new data node information and new hard drive information; and
    updating information corresponding to the to-be-migrated hard drive in the data relationship table based on the updated information, and eliminating restriction to the data block in the to-be-migrated hard drive.
  2. The hard drive migration method according to claim 1, wherein the restricting an operation performed on a data block in a to-be-migrated hard drive through a current data node server, comprises:
    marking a status of the data block in the to-be-migrated hard drive as a read-only status through the current data node server;
    the updating information corresponding to the to-be-migrated hard drive in the data relationship table based on the updated information, and eliminating restriction to the data block in the to-be-migrated hard drive, comprises:
    modifying the data node information corresponding to the to-be-migrated hard drive in the data relationship table to be the new data node information, modifying the hard drive information corresponding to the to-be-migrated hard drive to be the new hard drive information, modifying the status of the data block in the to-be-migrated hard drive to be a normal status.
  3. The hard drive migration method according to claim 1, wherein before the receiving updated information reported by a new data node server after the hard drive migration is completed, the method further comprises:
    notifying the current data node server to remove the to-be-migrated hard drive from a task queue to restrict a writing operation performed on the to-be-migrated hard drive.
  4. The hard drive migration method according to claim 1, wherein before the restricting an operation performed on a data block in a to-be-migrated hard drive through a current data node server after a hard drive migration instruction being received, the method further includes:
    sending a hard drive migration command to the current data node server after receiving the hard drive migration instruction, wherein the hard drive migration command is configured to indicate marking a status of the data block in the to-be-migrated hard drive as a readable status; and
    receiving cluster identification information that is in the to-be-migrated hard drive and reported by the current data node server;
    wherein the cluster identification information comprises cluster information, the data node information and the hard drive information, the data node information is name information of the data node server, and the hard drive information is slot information of the to-be-migrated hard drive in the data node server where the hard drive is currently located.
  5. The hard drive migration method according to claim 4, further comprising:
    performing a concurrent migration mode when the cluster identification information in the to-be-migrated hard drive is normal, and receiving a concurrent migration operation forwarded by the current data node server; and
    performing a serial migration mode when the cluster identification information in the to-be-migrated hard drive is abnormal, and receiving a serial migration operation forwarded by the current data node server.
  6. The hard drive migration method according to claim 5, further comprising:
    prompting a user to select all to-be-migrated hard drives at once and to migrate all the selected hard drives at the same time, when the concurrent migration mode is performed;
    prompting the user to migrate another to-be-migrated hard drive after migrating a current to-be-migrated hard drive is completed, when the serial migration mode is performed.
  7. The hard drive migration method according to claim 1, wherein before the receiving updated information reported by a new data node server after the hard drive migration is completed, the method further comprises:
    marking a status of the data block in the to-be-migrated hard drive as in a process of being migrated after receiving a hard drive pull-out event, such that a reading operation performed on the to-be-migrated hard drive is restricted until the migration of to-be-migrated hard drive is completed.
  8. The hard drive migration method according to claim 1, wherein the metadata server comprises a first storage device and a second storage device, the first storage device stores the data relationship table, and the method further comprises:
    reading the data relationship table into the second storage device in a process of initiating; and
    updating the data relationship table in the second storage device, and synchronizing the updated data relationship table to the first storage device.
  9. A distributed storage cluster system, comprising a metadata server, a plurality of data node servers connected to the metadata server, and a plurality of to-be-migrated hard drives connected to the plurality of data node servers, wherein the metadata server comprises a memory and a processor connected to the memory, the memory is configured to store a computer program, and the computer program, when being executed by the processor, is configured to implement operations of:
    establishing correspondence between a user file, data node information, hard drive information and data block storage information to obtain a data relationship table, and storing the data relationship table;
    restricting an operation performed on a data block in a to-be-migrated hard drive through a current data node server after a hard drive migration instruction being received, wherein the current data node server is a data node server where the to-be-migrated hard drive is currently located;
    receiving updated information reported by a new data node server after the hard drive migration is completed, wherein the new data node server is a data node server into which the to-be-migrated hard drive is going to be migrated, and the updated information comprises new data node information and new hard drive information; and
    updating information corresponding to the to-be-migrated hard drive in the data relationship table based on the updated information, and eliminating restriction to the data block in the to-be-migrated hard drive.
  10. The distributed storage cluster system according to claim 9, wherein while restricting the operation performed on the data block in the to-be-migrated hard drive through the current data node server, the computer program, when being executed by the processor, is configured to implement operations of:
    marking a status of the data block in the to-be-migrated hard drive as a read-only status through the current data node server;
    while updating information corresponding to the to-be-migrated hard drive in the data relationship table based on the updated information, and eliminating restriction to the data block in the to-be-migrated hard drive, the computer program, when being executed by the processor, is configured to implement operations of:
    modifying the data node information corresponding to the to-be-migrated hard drive in the data relationship table to be the new data node information, modifying the hard drive information corresponding to the to-be-migrated hard drive to be the new hard drive information, modifying the status of the data block in the to-be-migrated hard drive to be a normal status.
  11. The distributed storage cluster system according to claim 9, wherein before receiving updated information reported by a new data node server after the hard drive migration is completed, the computer program, when being executed by the processor, is configured to implement operations of:
    notifying the current data node server to remove the to-be-migrated hard drive from a task queue to restrict a writing operation performed on the to-be-migrated hard drive.
  12. The distributed storage cluster system according to claim 9, wherein before restricting the operation performed on the data block in the to-be-migrated hard drive through the current data node server after the hard drive migration instruction being received, the computer program, when being executed by the processor, is configured to implement operations of:
    sending a hard drive migration command to the current data node server after receiving the hard drive migration instruction, wherein the hard drive migration command is configured to indicate marking a status of the data block in the to-be-migrated hard drive as a readable status; and
    receiving cluster identification information that is in the to-be-migrated hard drive and reported by the current data node server;
    wherein the cluster identification information comprises cluster information, the data node information and the hard drive information, the data node information is name information of the  data node server, and the hard drive information is slot information of the to-be-migrated hard drive in the data node server where the hard drive is currently located.
  13. The distributed storage cluster system according to claim 12, wherein the computer program, when being executed by the processor, is configured to implement operations of:
    performing a concurrent migration mode when the cluster identification information in the to-be-migrated hard drive is normal, and receiving a concurrent migration operation forwarded by the current data node server; and
    performing a serial migration mode when the cluster identification information in the to-be-migrated hard drive is abnormal, and receiving a serial migration operation forwarded by the current data node server.
  14. The distributed storage cluster system according to claim 13, wherein the computer program, when being executed by the processor, is configured to implement operations of:
    prompting a user to select all to-be-migrated hard drives at once and to migrate all the selected hard drives at the same time, when the concurrent migration mode is performed;
    prompting the user to migrate another to-be-migrated hard drive after migrating a current to-be-migrated hard drive is completed, when the serial migration mode is performed.
  15. The distributed storage cluster system according to claim 9, wherein before receiving updated information reported by the new data node server after the hard drive migration is completed, the computer program, when being executed by the processor, is configured to implement operations of:
    marking a status of the data block in the to-be-migrated hard drive as in a process of being migrated after receiving a hard drive pull-out event, such that a reading operation performed on the to-be-migrated hard drive is restricted until the migration of to-be-migrated hard drive is completed.
  16. The distributed storage cluster system according to claim 9, wherein the metadata server comprises a first storage device and a second storage device, the first storage device stores the data relationship table, and the computer program, when being executed by the processor, is configured to implement operations of:
    reading the data relationship table into the second storage device in a process of initiating; and
    updating the data relationship table in the second storage device, and synchronizing the updated data relationship table to the first storage device.
  17. A computer-readable storage medium, configured for storing a computer program, wherein the computer program, when being executed by a processor, is configured to perform operations of:
    establishing correspondence between a user file, data node information, hard drive information and data block storage information to obtain a data relationship table, and storing the data relationship table;
    restricting an operation performed on a data block in a to-be-migrated hard drive through a current data node server after a hard drive migration instruction being received, wherein the current data node server is a data node server where the to-be-migrated hard drive is currently located;
    receiving updated information reported by a new data node server after the hard drive migration is completed, wherein the new data node server is a data node server into which the to-be-migrated hard drive is going to be migrated, and the updated information comprises new data node information and new hard drive information; and
    updating information corresponding to the to-be-migrated hard drive in the data relationship table based on the updated information, and eliminating restriction to the data block in the to-be-migrated hard drive.
  18. The computer-readable storage medium according to claim 17, wherein while restricting the operation performed on the data block in the to-be-migrated hard drive through the current data node server, the computer program, when being executed by the processor, is configured to implement operations of:
    marking a status of the data block in the to-be-migrated hard drive as a read-only status through the current data node server;
    while updating information corresponding to the to-be-migrated hard drive in the data relationship table based on the updated information, and eliminating restriction to the data block in the to-be-migrated hard drive, the computer program, when being executed by the processor, is configured to implement operations of:
    modifying the data node information corresponding to the to-be-migrated hard drive in the data relationship table to be the new data node information, modifying the hard drive information  corresponding to the to-be-migrated hard drive to be the new hard drive information, modifying the status of the data block in the to-be-migrated hard drive to be a normal status.
  19. The computer-readable storage medium according to claim 17, wherein before receiving updated information reported by a new data node server after the hard drive migration is completed, the computer program, when being executed by the processor, is configured to implement operations of:
    notifying the current data node server to remove the to-be-migrated hard drive from a task queue to restrict a writing operation performed on the to-be-migrated hard drive.
  20. The computer-readable storage medium according to claim 17, wherein before restricting the operation performed on the data block in the to-be-migrated hard drive through the current data node server after the hard drive migration instruction being received, the computer program, when being executed by the processor, is configured to implement operations of:
    sending a hard drive migration command to the current data node server after receiving the hard drive migration instruction, wherein the hard drive migration command is configured to indicate marking a status of the data block in the to-be-migrated hard drive as a readable status; and
    receiving cluster identification information that is in the to-be-migrated hard drive and reported by the current data node server;
    wherein the cluster identification information comprises cluster information, the data node information and the hard drive information, the data node information is name information of the data node server, and the hard drive information is slot information of the to-be-migrated hard drive in the data node server where the hard drive is currently located.
PCT/CN2021/121441 2020-09-28 2021-09-28 Hard drive migration method, distributed storage cluster system and storage medium WO2022063322A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011037231.1 2020-09-28
CN202011037231.1A CN111880751B (en) 2020-09-28 2020-09-28 Hard disk migration method, distributed storage cluster system and storage medium

Publications (1)

Publication Number Publication Date
WO2022063322A1 true WO2022063322A1 (en) 2022-03-31

Family

ID=73199960

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/121441 WO2022063322A1 (en) 2020-09-28 2021-09-28 Hard drive migration method, distributed storage cluster system and storage medium

Country Status (2)

Country Link
CN (1) CN111880751B (en)
WO (1) WO2022063322A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979153A (en) * 2022-04-07 2022-08-30 浙江大华技术股份有限公司 Load balancing method, computer equipment and storage device
CN115952005A (en) * 2023-02-24 2023-04-11 浪潮电子信息产业股份有限公司 Metadata load balancing method, device, equipment and readable storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463050A (en) * 2020-11-26 2021-03-09 新华三技术有限公司成都分公司 Storage system capacity expansion method, device, equipment and machine-readable storage medium
CN112988062B (en) * 2021-01-28 2023-02-14 腾讯科技(深圳)有限公司 Metadata reading limiting method and device, electronic equipment and medium
CN113590586B (en) * 2021-07-29 2022-03-22 东方微银科技股份有限公司 Method and device for migrating fragmented data among nodes of distributed graph database system
CN113596172B (en) * 2021-08-04 2023-11-14 百度在线网络技术(北京)有限公司 Method and device for updating nodes in distributed cluster
CN114816278B (en) * 2022-06-30 2022-11-11 苏州浪潮智能科技有限公司 Data migration method, system, equipment and storage medium of storage server

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050108485A1 (en) * 2003-11-18 2005-05-19 Perego Robert M. Data set level mirroring to accomplish a volume merge/migrate in a digital data storage system
CN105278882A (en) * 2015-10-26 2016-01-27 创新科存储技术有限公司 Disk management method of distributed file system
US9250823B1 (en) * 2014-05-20 2016-02-02 Emc Corporation Online replacement of physical storage in a virtual storage system
CN107807794A (en) * 2017-10-31 2018-03-16 新华三技术有限公司 A kind of date storage method and device
CN108595119A (en) * 2018-03-30 2018-09-28 浙江大华技术股份有限公司 A kind of method of data synchronization and distributed system
CN109189326A (en) * 2018-07-25 2019-01-11 华为技术有限公司 The management method and device of distributed type assemblies
CN111381766A (en) * 2018-12-28 2020-07-07 杭州海康威视系统技术有限公司 Method for dynamically loading disk and cloud storage system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364474B (en) * 2011-11-17 2014-08-20 中国科学院计算技术研究所 Metadata storage system for cluster file system and metadata management method
CN102622315B (en) * 2012-02-24 2014-08-13 华为技术有限公司 Method, device and system for controlling disc visiting
CN106528005B (en) * 2017-01-12 2019-12-31 苏州浪潮智能科技有限公司 Disk adding method and device of distributed storage system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050108485A1 (en) * 2003-11-18 2005-05-19 Perego Robert M. Data set level mirroring to accomplish a volume merge/migrate in a digital data storage system
US9250823B1 (en) * 2014-05-20 2016-02-02 Emc Corporation Online replacement of physical storage in a virtual storage system
CN105278882A (en) * 2015-10-26 2016-01-27 创新科存储技术有限公司 Disk management method of distributed file system
CN107807794A (en) * 2017-10-31 2018-03-16 新华三技术有限公司 A kind of date storage method and device
CN108595119A (en) * 2018-03-30 2018-09-28 浙江大华技术股份有限公司 A kind of method of data synchronization and distributed system
CN109189326A (en) * 2018-07-25 2019-01-11 华为技术有限公司 The management method and device of distributed type assemblies
CN111381766A (en) * 2018-12-28 2020-07-07 杭州海康威视系统技术有限公司 Method for dynamically loading disk and cloud storage system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979153A (en) * 2022-04-07 2022-08-30 浙江大华技术股份有限公司 Load balancing method, computer equipment and storage device
CN114979153B (en) * 2022-04-07 2023-10-27 浙江大华技术股份有限公司 Load balancing method, computer equipment and storage device
CN115952005A (en) * 2023-02-24 2023-04-11 浪潮电子信息产业股份有限公司 Metadata load balancing method, device, equipment and readable storage medium
CN115952005B (en) * 2023-02-24 2023-05-30 浪潮电子信息产业股份有限公司 Metadata load balancing method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN111880751B (en) 2020-12-25
CN111880751A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
WO2022063322A1 (en) Hard drive migration method, distributed storage cluster system and storage medium
CN109842651B (en) Uninterrupted service load balancing method and system
CN104202375A (en) Method and system for synchronous data
CN107919977B (en) Online capacity expansion and online capacity reduction method and device based on Paxos protocol
US10055445B2 (en) Transaction processing method and apparatus
CN108595119B (en) Data synchronization method and distributed system
CN104346373A (en) Partition log queue synchronization management method and device
CN109582686B (en) Method, device, system and application for ensuring consistency of distributed metadata management
CN105988895A (en) Snapshot processing method and device
CN111198845A (en) Data migration method, readable storage medium and computing device
US20130318059A1 (en) Transfer of data from transactional data sources to partitioned databases in restartable environment
CN108762982A (en) A kind of database restoring method, apparatus and system
CN112000850A (en) Method, device, system and equipment for data processing
CN112749147A (en) Method and device for merging and migrating data tables in database
CN111399753B (en) Method and device for writing pictures
CN106997305B (en) Transaction processing method and device
CN110569231B (en) Data migration method, device, equipment and medium
CN112256202A (en) Distributed storage system and method for deleting volume in distributed storage system
CN108614873B (en) Data processing method and device
CN114442943B (en) Data migration method, system and equipment
CN115328880B (en) Distributed file online recovery method, system, computer equipment and storage medium
CN117033085B (en) kvm virtual machine backup method and device, computer equipment and storage medium
CN111400302B (en) Modification method, device and system for continuous storage data
WO2023193495A1 (en) Method for processing read request, distributed database and server
CN115268777A (en) Capacity expansion method and device for storage nodes

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

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

Country of ref document: EP

Kind code of ref document: A1