Method, device and metadata server for managing a distributed storage system
By placing storage nodes in migration freeze and offline freeze states during the data migration process and accessing them as alternative nodes, the impact of data migration on system performance is resolved, achieving efficient data migration and access continuity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING MOMO INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2023-09-06
- Publication Date
- 2026-04-17
AI Technical Summary
Existing data migration solutions can affect system throughput and cause access latency in distributed storage systems. How to avoid this impact has become an urgent problem to be solved.
During the data migration process, the storage node is placed in a migration freeze state, and after the data migration is successful, it is placed in an offline freeze state, so that it can be accessed as a backup node to ensure the continuity of client access.
During the data migration process, access latency and system throughput issues were avoided, improving data migration efficiency and system performance.
Smart Images

Figure CN117194323B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technology, and in particular to a management method, apparatus and metadata server for a distributed storage system. Background Technology
[0002] Distributed storage systems have been widely adopted due to their advantages, such as the ability to handle data growth, provide high availability and fault tolerance, support large-scale data processing, and enable elastic scaling. Data migration is also a crucial operation in distributed storage systems.
[0003] Currently, common data migration solutions include distributed replication (DistCp) and node decomission. Existing solutions can have a certain impact on distributed storage systems during data migration, such as affecting system throughput. Therefore, how to avoid the impact of data migration on the system has become an urgent problem to be solved. Summary of the Invention
[0004] In view of this, this application provides a management method, apparatus and metadata server for a distributed storage system to avoid the impact of data migration on the system.
[0005] Specifically, this application is implemented through the following technical solution:
[0006] The first aspect of this application provides a management method for a distributed storage system, the method comprising:
[0007] Upon receiving an access request from a client to access a target data file, determine the set of storage nodes where the data block corresponding to the target data file is located;
[0008] The system searches for candidate nodes whose status information matches the target status from the set of storage nodes; wherein, the target status includes normal status, migration frozen status, and offline frozen status; the storage nodes in the distributed storage system are in migration frozen status during the data migration process and in offline frozen status after the data migration is successful.
[0009] The alternative node is returned to the client to instruct the client to obtain the target data file from the alternative node.
[0010] A second aspect of this application provides a management device for a distributed storage system, the device comprising a determining module, a searching module, and a processing module; wherein...
[0011] The determining module is used to determine the storage node set where the data block corresponding to the target data file is located when it receives an access request from the client to access the target data file.
[0012] The search module is used to search for candidate nodes whose status information is the target status from the storage node set; wherein, the target status includes normal status, migration frozen status, and offline frozen status; the storage nodes in the distributed storage system are in migration frozen status during the data migration process and in offline frozen status after the data migration is successful;
[0013] The processing module is used to return the alternative nodes to the client, so as to instruct the client to obtain the target data file from the alternative nodes.
[0014] A third aspect of this application provides a metadata server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods provided in the first aspect of this application.
[0015] A fourth aspect of this application provides a storage medium having a program stored thereon, which, when executed by a processor, implements the steps of any of the methods provided in the first aspect of this application.
[0016] This application provides a management method, apparatus, and metadata server for a distributed storage system. Upon receiving an access request from a client to access a target data file, the system determines the set of storage nodes containing the data blocks corresponding to the target data file. It then searches the storage node set for candidate nodes with status information of normal, migration-frozen, or offline-frozen states, and returns these candidate nodes to the client, instructing the client to retrieve the target data file from one of the candidate nodes. Specifically, storage nodes in the distributed storage system are in a migration-frozen state during data migration and in an offline-frozen state after successful data migration. This allows storage nodes to be in a migration-frozen state during data migration and an offline-frozen state after successful migration. Even when a storage node is in either a migration-frozen or offline-frozen state, it can still serve as a candidate node for client access; that is, the data blocks stored within a storage node can still be accessed even when it is in either state. In this way, even during the data migration process, client access will not be affected, and there will be no access delay or impact on system throughput. This avoids the problems of existing migration solutions affecting system throughput and causing access delays during data migration. Attached Figure Description
[0017] Figure 1A flowchart of an embodiment of the management method for the distributed storage system provided in this application;
[0018] Figure 2 This is a schematic diagram illustrating a distributed storage system as an exemplary embodiment of this application;
[0019] Figure 3 A flowchart of Embodiment 2 of the management method for the distributed storage system provided in this application;
[0020] Figure 4 A hardware structure diagram of the metadata server provided in this application;
[0021] Figure 5 A schematic diagram of the structure of a management device for a distributed storage system provided in this application, according to Embodiment 1;
[0022] Figure 6 A schematic diagram of the structure of the management device for the distributed storage system provided in this application, according to Embodiment 2. Detailed Implementation
[0023] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0024] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0025] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0026] This application provides a management method, apparatus, and metadata server for a distributed storage system to avoid the impact of data migration on the system.
[0027] The management method, apparatus, and metadata server for the distributed storage system provided in this application, upon receiving an access request from a client to access a target data file, determine the set of storage nodes where the data blocks corresponding to the target data file are located. Then, it searches the storage node set for candidate nodes whose status information is normal, migration frozen, or offline frozen, and returns these candidate nodes to the client, instructing the client to retrieve the target data file from the candidate nodes. Specifically, the storage nodes in the distributed storage system are in a migration frozen state during data migration and in an offline frozen state after successful data migration. This means that while a storage node is in a migration frozen state during data migration and an offline frozen state after successful migration, it can still serve as a candidate node for client access, meaning that the stored data blocks can still be accessed even when a storage node is in these states. Therefore, even during data migration, client access is not affected, and there is no access delay or impact on system throughput, avoiding the problems of existing migration schemes that affect system throughput and cause access delays during data migration.
[0028] The following specific embodiments are given to illustrate the technical solution of this application in detail.
[0029] Figure 1 This is a flowchart illustrating an embodiment of the management method for the distributed storage system provided in this application. Please refer to... Figure 1 The method provided in this embodiment may include:
[0030] S101. Upon receiving an access request from a client to access a target data file, determine the storage node set where the data block corresponding to the target data file is located.
[0031] Specifically, the method provided in this embodiment is applied to a metadata server in a distributed storage system. Figure 2 This is a schematic diagram illustrating a distributed storage system as an exemplary embodiment of this application. Please refer to... Figure 2 A distributed storage system includes a metadata server and multiple storage nodes.
[0032] In this system, storage nodes are the devices that actually store the data. A metadata server is a server in the distributed storage system responsible for managing and storing metadata. Metadata refers to data used to describe and manage data in the distributed storage system; it stores the logical structure of the entire distributed storage system and provides necessary information for data access and management. For example, the metadata server manages and maintains a mapping table between data files, the data blocks corresponding to the data files, and the storage nodes where the data blocks reside.
[0033] Specifically, when a user on the client side wants to view a target data file, they can trigger an access request to access the target data file through the client. Correspondingly, when the client detects the access request, it sends the access request to the metadata server.
[0034] It should be noted that the access request carries identification information of the target data file. When the metadata server receives the access request, it can use the identification information carried in the access request to search for the mapping relationship corresponding to the identification information in the locally recorded mapping relationship table (specifically, the mapping relationship table records the mapping relationship between data files, data blocks corresponding to data files, and storage nodes where data blocks are located), and then find the set of storage nodes where the data blocks corresponding to the target data file are located from the mapping relationship. For example, Table 1 is a schematic diagram of a mapping relationship table shown in an exemplary embodiment of this application:
[0035] Table 1 Mapping Relationship Table
[0036]
[0037] For example, in one embodiment, the identification information of the target data file carried in the access request is 2. In this case, in conjunction with Table 1, the set of storage nodes where the data block corresponding to the target data file 2 is located includes: storage node B, storage node E, and storage node F.
[0038] S102. Search for candidate nodes whose status information is the target status from the storage node set; wherein, the target status includes normal status, migration frozen status, and offline frozen status; the storage nodes in the distributed storage system are in migration frozen status during the data migration process and in offline frozen status after the data migration is successful.
[0039] Specifically, the metadata server stores a status information table that records the status information of each storage node. This status information includes normal status, migration frozen status, and migration cooldown status. It should be noted that a storage node is in a migration frozen state during data migration. Furthermore, while in a migration frozen state, a storage node can serve as a read / write backup node for clients, and the data blocks within it remain active and can be accessed by clients.
[0040] Furthermore, after successfully migrating data, the storage node is in an offline frozen state. At this time, the storage node can also serve as a read / write backup node for the client, and the data blocks within it are alive and can be accessed by the client.
[0041] For example, in one embodiment, the status information table recorded by the metadata server is shown in Table 2:
[0042] Table 2 Status Information Table
[0043] storage nodes Status information A Normal state B Migration Frozen State C Offline frozen status D Migration Frozen State E Normal state F Normal state …… ……
[0044] In practice, the status information of each storage node in the storage node set can be searched from the status information table first. Then, when the status information of the storage node is the target status, the storage node is determined to be the candidate node.
[0045] Based on the example above, the storage node set includes: storage node B, storage node E, and storage node F. In this case, referring to Table 2, we can look up the status information corresponding to storage node B, storage node E, and storage node F through the status information table shown in Table 2. The status information found is migration frozen status, normal status, and normal status, respectively. At this time, storage node B, storage node E, and storage node F are all candidate nodes.
[0046] It should be noted that if no node with the target status is found in the storage node set, the metadata server will return a prompt message to the client to inform the client that no alternative node has been found.
[0047] S103. Return the alternative node to the client to instruct the client to obtain the target data file from the alternative node.
[0048] Specifically, in one possible implementation, the alternative nodes are directly returned to the client in this step.
[0049] Alternatively, in another possible implementation, when returning candidate nodes to the client, the candidate nodes can be sorted according to a preset sorting rule before being sent to the client.
[0050] It should be noted that the preset sorting rules are set according to actual needs, and are not limited in this embodiment.
[0051] For example, in one embodiment, the preset sorting rule may be to sort the candidate nodes according to their normal state, migration frozen state, and offline frozen state; in another embodiment, the preset sorting rule may be to sort the candidate nodes according to their topology information.
[0052] By sorting the candidate nodes and then sending the sorted candidate nodes to the client, the most advantageous candidate nodes can be prioritized, thereby improving the efficiency of the client in obtaining data.
[0053] The distributed storage system management method provided in this embodiment, upon receiving an access request from a client to access a target data file, determines the set of storage nodes where the data blocks corresponding to the target data file are located. It then searches the storage node set for candidate nodes with status information of normal, migration frozen, or offline frozen states, and returns these candidate nodes to the client, instructing the client to retrieve the target data file from the candidate nodes. Specifically, the storage nodes in the distributed storage system are in a migration frozen state during data migration and in an offline frozen state after successful data migration. This means that while a storage node is in a migration frozen state during data migration and an offline frozen state after successful migration, it can still serve as a candidate node for client access. That is, the data blocks stored in a storage node can still be accessed even when it is in these states. Therefore, even during data migration, client access is not affected, and there is no access delay or impact on system throughput. This avoids the problems of existing migration schemes affecting system throughput and causing access delays during data migration.
[0054] Figure 3 This is a flowchart of a second embodiment of the management method for the distributed storage system provided in this application. Please refer to... Figure 3 The method provided in this embodiment, based on the above embodiments, is mainly used to introduce the specific implementation principle of data migration. Specifically, refer to... Figure 3 The method provided in this embodiment may include:
[0055] S301. Upon receiving a data migration instruction, update the status information of each candidate migration node indicated by the data migration instruction to a migration frozen state.
[0056] Specifically, when data migration is required, the administrator can select candidate migration nodes from the storage nodes and then trigger a data migration command. The data migration command carries the identification information of the candidate migration nodes. In this way, the data migration command can be used to instruct each candidate migration node indicated by the data migration command to perform data migration.
[0057] For example, if the data migration instruction carries candidate migration nodes such as storage node D, storage node E, and storage node F, in this step, the status information of storage node D, storage node E, and storage node F recorded in the status information table will be updated to the migration frozen status.
[0058] In practice, the state information of the storage node can be updated through a refresh command. For details on the specific implementation process of the update, please refer to the description in the relevant technologies. It will not be repeated here.
[0059] S302. For each node to be migrated, determine the migration information of the node to be migrated; wherein, the node to be migrated is the node among the candidate nodes that has successfully updated its status information to the migration frozen state.
[0060] Specifically, after updating the status information of each candidate node to the migration frozen state, the metadata server will verify whether the status information of each candidate node has been updated successfully. Furthermore, for the candidate nodes that have not successfully updated their status information to the migration frozen state, the metadata server will process these nodes separately. The specific principles of this separate processing will not be elaborated here.
[0061] Furthermore, for the candidate nodes that have successfully updated their status information to the migration frozen state, the metadata server confirms that data migration can be performed on these nodes. In this step, the migration information of these nodes (for ease of distinction, these nodes are referred to as the nodes to be migrated) is determined.
[0062] It should be noted that the migration information of a node to be migrated may include: the identification information of the node to be migrated, the identification information of the target storage node to be migrated to, the identification of the data blocks stored on the node to be migrated, and the storage capacity of the node to be migrated.
[0063] In practice, the migration information of a node to be migrated can be determined based on the mapping relationship table recorded locally.
[0064] S303. Based on the migration information, migrate the data in the node to be migrated to the target storage node.
[0065] Optionally, in one possible implementation, the metadata server can send migration information to the target storage node, instructing the target storage node to establish a connection with the corresponding node to be migrated according to the migration information upon receiving it, and then migrate the data in the node to be migrated to the device (target storage node).
[0066] Furthermore, in another possible implementation, migrating the data from the node to be migrated to the target storage node includes:
[0067] The migration data is sent to the synchronization device to instruct the synchronization device to migrate the data in the node to be migrated to the target storage node according to the migration information.
[0068] Specifically, a synchronization device can be a dedicated data migration tool or component responsible for actually performing data copying and migration operations. For example, in one embodiment, the synchronization device can be the rsync synchronization tool or other synchronization tools.
[0069] S304. After confirming that the node to be migrated has successfully migrated data, update the status information of the node to be migrated to offline frozen status.
[0070] It should be noted that during the process of migrating data from the node to be migrated to the target storage node, the administrator will check whether the node to be migrated has successfully migrated the data. After confirming that the node to be migrated has successfully migrated the data, a notification message will be triggered to notify the node to be migrated of the successful data migration. Correspondingly, after detecting the notification message, the metadata server will confirm that the node to be migrated has successfully migrated the data.
[0071] For example, following the example above, after the administrator checks and confirms that storage node D has successfully migrated data, a notification message is triggered to inform storage node D of the successful data migration. Correspondingly, after the metadata server detects the notification message, it confirms that storage node D has successfully migrated data. In this step, the status information of storage node D recorded in the status information table is updated to offline / frozen status.
[0072] It should be noted that, in practice, administrators can check the integrity of the data in the target storage node, as well as the data location and status on the target storage node. Based on this information, they can determine whether the data on the target storage node is consistent with the data on the node to be migrated. If they are consistent, the node to be migrated is determined to have successfully migrated the data; otherwise, the node to be migrated is determined to have failed to migrate the data.
[0073] S305. After successfully updating the status information of the node to be migrated to the offline frozen state, control the target storage node to come online, and after the target storage node is successfully brought online, control the node to be migrated to go offline.
[0074] It should be noted that during the process of updating the status information of the node to be migrated to the offline / frozen state, the metadata server will determine whether the status of the node to be migrated has been successfully updated to the offline / frozen state. Furthermore, if the status of the node to be migrated is not successfully updated to the offline / frozen state, the node to be migrated will be processed separately.
[0075] Accordingly, if it is confirmed that the status information of the node to be migrated has been successfully updated to the offline frozen state, this step will control the target storage node to come online.
[0076] It should be noted that controlling the target storage node to come online refers to establishing a connection with the target storage node. Furthermore, during the process of controlling the target storage node to come online, there are cases where the target storage node fails to come online. In such cases, separate handling is performed on the target storage node itself.
[0077] Correspondingly, if the target storage node successfully comes online, it can then replace the node to be migrated. At this point, the node to be migrated can be taken offline. Specifically, taking the node to be migrated offline means disconnecting the connection between this device and the node to be migrated.
[0078] Combining the above example, for instance, after confirming that the status information of storage node D has been successfully updated to the offline / frozen state, the target storage node is brought online, and when the target storage node is successfully brought online, storage node D is taken offline.
[0079] It should be noted that, in one possible implementation, after a node to be migrated goes offline, all related metadata for that node can be deleted. For example, the mapping relationship corresponding to the node to be migrated can be deleted from the mapping relationship table, and the record corresponding to the node to be migrated can be deleted from the status information table. Alternatively, in another possible implementation, after a node to be migrated goes offline, its status information can be updated to show that it is offline. Since the node's status is now offline, it will no longer be considered as a backup node and will not be accessed by clients.
[0080] Furthermore, optionally, in one possible implementation of this application, after the target storage node is successfully brought online, the method further includes:
[0081] Update the mapping table; wherein the mapping table records the mapping relationship between data files, data blocks corresponding to data files, and storage nodes where data blocks are located.
[0082] Specifically, based on the data blocks stored on the target storage node and the corresponding data files, a mapping relationship is generated for the target storage node (this mapping relationship records the correspondence between the target storage node, the data blocks stored on the target storage node, and the data files where each data block is located), and then this mapping relationship is added to the mapping relationship table.
[0083] It should be noted that the method provided in this embodiment allows the storage node to serve as a backup node for client access during data migration, or after data migration but before it goes offline (i.e., the storage node can be accessed by the client). This is significantly different from existing methods (where storage nodes cannot be accessed during data migration, thus subject to concurrency control limitations; i.e., data migration must be performed in batches for multiple storage nodes corresponding to the same data block). In this method, the data migration process is no longer subject to concurrency control limitations. Multiple storage nodes corresponding to the same data block can be migrated simultaneously, thereby improving data migration efficiency and shortening migration time.
[0084] The distributed storage system management method provided in this embodiment, upon receiving a data migration instruction, updates the status information of each candidate migration node indicated by the instruction to a migration frozen state. For each node to be migrated, migration information is determined, and data in the node to be migrated is migrated to the target storage node based on this information. After successful data migration, the status information of the node to be migrated is updated to an offline frozen state. Finally, after successfully updating the status information of the node to be migrated to an offline frozen state, the target storage node is brought online, and after the target storage node is successfully brought online, the node to be migrated is taken offline. Thus, by introducing migration frozen and offline frozen states during data migration, the storage node can still be accessed even during data migration, optimizing the impact on system throughput and access latency during data migration.
[0085] Corresponding to the aforementioned embodiments of the management method for a distributed storage system, this application also provides an embodiment of a management device for a distributed storage system.
[0086] An embodiment of a management device for a distributed storage system disclosed in this application can be applied to a metadata server of a distributed storage system. The device embodiment can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of the metadata server loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 4 The diagram shown is a hardware structure diagram of a metadata server provided in this application, except... Figure 4 In addition to the processor, memory, network interface, and non-volatile memory shown, the metadata server where the device is located in the embodiment may also include other hardware depending on the actual function of the management device of the distributed storage system, which will not be described in detail here.
[0087] Figure 5 This is a schematic diagram of the structure of a management device for a distributed storage system provided in this application, according to one embodiment. Please refer to... Figure 5 The apparatus provided in this embodiment may include a determining module 510, a searching module 520, and a processing module 530; wherein,
[0088] The determining module 510 is used to determine the storage node set where the data block corresponding to the target data file is located when it receives an access request sent by the client to access the target data file;
[0089] The search module 520 is used to search for candidate nodes whose status information is the target status from the storage node set; wherein, the target status includes normal status, migration frozen status, and offline frozen status; the storage nodes in the distributed storage system are in migration frozen status during the data migration process and in offline frozen status after the data migration is successful.
[0090] The processing module 530 is used to return the alternative node to the client, so as to instruct the client to obtain the target data file from the alternative node.
[0091] The apparatus provided in this embodiment can be used to perform... Figure 1 The steps of the method shown are similar in principle and process to those described above, and will not be repeated here.
[0092] Figure 6 This is a schematic diagram of the structure of a second embodiment of the management device for the distributed storage system provided in this application. Please refer to... Figure 2 Based on the above embodiments, the apparatus provided in this embodiment includes an update unit 5301, a determination unit 5302, and a migration unit 5303; wherein,
[0093] The update unit 5301 is used to update the status information of each candidate migration node indicated by the data migration instruction to a migration frozen state when a data migration instruction is received.
[0094] The determining unit 5302 is used to determine the migration information of each node to be migrated; wherein, the node to be migrated is the node among the candidate nodes that has successfully updated its status information to a migration frozen state.
[0095] The migration unit 5303 is used to migrate the data in the node to be migrated to the target storage node according to the migration information.
[0096] Optionally, the update unit 5301 is used to update the status information of the node to be migrated to an offline frozen state after determining that the node to be migrated has successfully migrated the data.
[0097] The determining unit 5302 is used to control the target storage node to come online after successfully updating the status information of the node to be migrated to the offline frozen state, and to control the node to be migrated to go offline after the target storage node is successfully online.
[0098] Optionally, the migration unit 5303 is specifically used to send the migration information to the synchronization device to instruct the synchronization device to migrate the data in the node to be migrated to the target storage node according to the migration information.
[0099] Optionally, the determining unit 5302 is further configured to update the mapping relationship table after the target storage node is successfully brought online; wherein the mapping relationship table records the mapping relationship between data files, data blocks corresponding to data files, and storage nodes where data blocks are located.
[0100] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0101] Please continue to refer to Figure 4 This application also provides a metadata server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods provided in the first aspect of this application.
[0102] This application also provides a storage medium storing a program thereon, characterized in that, when the program is executed by a processor, it implements the steps of any of the methods provided in this application.
[0103] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0104] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0105] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A management method of a distributed storage system, characterized by, The method is applied to the metadata server in the distributed storage system, and the method includes: Upon receiving an access request from a client to access a target data file, determine the set of storage nodes where the data block corresponding to the target data file is located; The system searches for candidate nodes whose status information matches the target status from the set of storage nodes; wherein, the target status includes normal status, migration frozen status, and offline frozen status; the storage nodes in the distributed storage system are in migration frozen status during the data migration process and in offline frozen status after the data migration is successful. The alternative node is returned to the client to instruct the client to obtain the target data file from the alternative node; The method further includes: Upon receiving a data migration instruction, the status information of each candidate migration node indicated by the data migration instruction is updated to a migration frozen state; For each node to be migrated, determine the migration information of the node to be migrated; wherein, the node to be migrated is the node among the candidate nodes that has successfully updated its status information to the migration frozen state; Based on the migration information, the data in the node to be migrated is migrated to the target storage node; After migrating the data from the node to be migrated to the target storage node, the method further includes: After confirming that the node to be migrated has successfully migrated its data, the status information of the node to be migrated is updated to offline and frozen. After successfully updating the status information of the node to be migrated to the offline / frozen state, the target storage node is brought online, and after the target storage node is successfully brought online, the node to be migrated is taken offline.
2. The method of claim 1, wherein, The step of migrating data from the node to be migrated to the target storage node according to the migration information includes: The migration information is sent to the synchronization device to instruct the synchronization device to migrate the data in the node to be migrated to the target storage node according to the migration information.
3. The method of claim 1, wherein, After the target storage node is successfully brought online, the method further includes: Update the mapping table; wherein the mapping table records the mapping relationship between data files, data blocks corresponding to data files, and storage nodes where data blocks are located.
4. A management device for a distributed storage system, characterized in that, The device includes a determining module, a searching module, and a processing module; The determining module is used to determine the storage node set where the data block corresponding to the target data file is located when it receives an access request from the client to access the target data file. The search module is used to search for candidate nodes whose status information is the target status from the storage node set; wherein, the target status includes normal status, migration frozen status, and offline frozen status; the storage nodes in the distributed storage system are in migration frozen status during the data migration process and in offline frozen status after the data migration is successful; The processing module is used to return the alternative nodes to the client, so as to instruct the client to obtain the target data file from the alternative nodes; The processing module includes an update unit, a determination unit, and a migration unit; The update unit is configured to update the status information of each candidate migration node indicated by the data migration instruction to a migration frozen state when a data migration instruction is received; the update unit is also configured to update the status information of the node to be migrated to an offline frozen state after it is determined that the node to be migrated has successfully migrated data. The determining unit is configured to determine the migration information of each node to be migrated; wherein the node to be migrated is the node among the candidate nodes that has successfully updated its status information to a migration frozen state; the determining unit is also configured to control the target storage node to come online after successfully updating the status information of the node to be migrated to an offline frozen state, and control the node to be migrated to go offline after the target storage node has successfully come online. The migration unit is used to migrate the data in the node to be migrated to the target storage node according to the migration information.
5. A metadata server, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the program, implements the steps of the method according to any one of claims 1-3.
6. A storage medium having a program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps of the method according to any one of claims 1-3.
Citation Information
Patent Citations
Hard disk migration method, distributed storage cluster system and storage medium
CN111880751A