Data storage method, product, device and medium
Patent Information
- Application Number
- CN202410931650.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-12
AI Technical Summary
In the case of node failure, while waiting for data recovery, the business efficiency of IO write operations is reduced, affecting the data recovery process.
In the distributed storage system, healthy copy nodes and degraded copy nodes are determined through the distributed hash table algorithm, the degraded copy list and data bitmap mark are used to perform data reading and writing services, and data recovery is performed according to the delayed recovery strategy to ensure Data fault tolerance and IO performance after downgrade.
It realizes normal reading and writing services without the need for IO recovery when a node fails, removes the dependence between IO and data recovery, ensures that data fault tolerance does not decrease after downgrade, optimizes IO performance, improves IO reading and writing efficiency, and reduces the impact of failures on business IO performance. .
Smart Images

Figure CN118466862B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data storage, and in particular to a data storage method, product, device and medium. Background Art
[0002] The replication mechanism in Software Defined Storage (SDS) is a key data protection technology used to improve data reliability and availability.
[0003] Multiple copies are used to protect data by storing multiple copies of the same data on different nodes. In a failure scenario, if a node fails, the system can store or read copies in the remaining nodes. It is necessary to wait for the lost or erroneous copy to be restored before the input and output (IO) can be used to complete the write operation. While waiting for data recovery, the IO write operation business and efficiency are affected due to node failure; data recovery is required for the node that is interrupted by the failure, which occupies additional bandwidth during the data recovery process and affects the IO write process.
[0004] Therefore, how to reduce the impact of IO processes and improve the efficiency of IO write operations in the event of a node failure is an urgent problem to be solved by those skilled in the art. Summary of the invention
[0005] The purpose of the present invention is to provide a data storage method, product, device and medium to solve the problem of reduced IO write operation service and efficiency during the process of waiting for data recovery in the event of a node failure.
[0006] In order to solve the above technical problems, the present invention provides a data storage method, comprising:
[0007] When the health status of the current cluster node in the distributed storage system is degraded, obtain the faulty node and the replica data corresponding to the faulty node;
[0008] Determine a healthy replica node and a downgraded replica node storing the replica data corresponding to the failed node according to a distributed hash table algorithm, so as to perform the replica data read and write business corresponding to the failed node in the healthy replica node and the downgraded replica node; wherein the time that the downgraded replica of the downgraded replica node occupies the input and output read and write capabilities during the data recovery process is less than the time that the healthy replica of the healthy replica node occupies the input and output read and write capabilities; the downgraded replica of the downgraded replica node is obtained through a downgraded replica list and a data bitmap mark;
[0009] Data is recovered on the downgraded replica of the downgraded replica node according to the delayed recovery strategy to complete data storage.
[0010] On the one hand, the replica data writing service corresponding to the faulty node is performed in the healthy replica node and the degraded replica node, including:
[0011] When the current faulty node enters a degraded state, the current faulty node is calculated according to the distributed hash table algorithm to determine the node positions of the healthy replica nodes and the degraded replica nodes where the replica data of the current faulty node is located;
[0012] Forwarding the replica data corresponding to the failed node to the healthy replica node and the downgraded replica node to complete the write service;
[0013] Wherein, during the writing process of the downgraded replica node, the mark and metadata attribute information of the downgraded replica data corresponding to the replica data are correspondingly counted into the downgraded replica list and the valid data bitmap to facilitate the reading of the reading service.
[0014] On the other hand, before the current faulty node fails and enters the degraded state, the method further includes:
[0015] Since the current faulty node fails, retry reading the replica data of the current faulty node according to a first preset time;
[0016] Until the first preset time ends and the degraded state is entered, the write service of the replica data of the current failed node is executed.
[0017] On the other hand, performing a replica data reading service corresponding to the faulty node in the healthy replica node and the degraded replica node includes:
[0018] When the current faulty node enters a degraded state, obtain the degraded event record;
[0019] Screening each cluster node of the distributed storage system according to the distributed hash table algorithm and the degradation event record to obtain the position corresponding to the healthy replica node, so as to facilitate reading the replica data of the healthy replica node;
[0020] If the number of healthy replica nodes is 0, read the downgraded replica node;
[0021] Obtaining a valid data bitmap corresponding to the downgraded replica node;
[0022] Reading is performed according to the valid data bitmap corresponding to the downgraded replica node, so as to read the replica data of the downgraded replica node.
[0023] On the other hand, before the current faulty node fails and enters the degraded state, the method further includes:
[0024] Since the current faulty node fails, healthy copy data on other faulty nodes except the current faulty node is read.
[0025] On the other hand, performing data recovery on the downgraded replica of the downgraded replica node according to the delayed recovery strategy to complete data storage includes:
[0026] Checking whether data recovery is required in the cluster node according to a second preset time;
[0027] If yes, determine the list of data to be restored corresponding to the cluster node according to the distributed hash table algorithm;
[0028] The degraded replica of the degraded replica node is restored according to the data object recovery request in the to-be-restored data list to complete data recovery.
[0029] On the other hand, checking whether data recovery is required in the cluster node according to the second preset time includes:
[0030] Determining whether the cluster node meets a preset condition according to the second preset time;
[0031] If the preset conditions are met, determining that the cluster node needs to perform data recovery;
[0032] The preset condition is at least one of the following:
[0033] There is no data recovery task being executed in the cluster node;
[0034] There is no data migration task being executed in the cluster node;
[0035] Each node of the cluster node is not in a degraded state.
[0036] On the other hand, restoring the degraded replica of the degraded replica node according to the data object recovery request of the to-be-restored data list includes:
[0037] Determine whether the data object needs to be restored;
[0038] If yes, read the corresponding replica data from the healthy replica node;
[0039] Overwrite the node location where the downgraded replica node is located;
[0040] The data object is updated from the degraded state to a healthy state to complete the recovery task of the data object recovery request.
[0041] On the other hand, restoring the degraded replica of the degraded replica node according to the data object recovery request of the to-be-restored data list includes:
[0042] Obtain the corresponding levels of the business priority strategy and the recovery task priority strategy;
[0043] The degraded replica of the degraded replica node is restored according to the priority policy corresponding to the highest level and the data object recovery request of the to-be-restored data list.
[0044] On the other hand, determining that the health status of the current cluster node is a degraded state includes:
[0045] Monitoring the status information corresponding to each cluster node in the distributed storage system according to the third preset time; wherein the status information at least includes one or more of disk status information, node status information and network fault information;
[0046] If there is a fault in the state information, a fault event is generated and the task trigger is triggered;
[0047] The task trigger is controlled to generate a cluster degradation task, and the health status of the cluster node corresponding to the fault event is set to a degraded state.
[0048] On the other hand, after determining that the health status of the current cluster node is a degraded state, before obtaining the failed node and the replica data corresponding to the failed node, it also includes:
[0049] Get the downgraded tasks generated by the fault event;
[0050] The status information corresponding to the downgrade task is updated to facilitate the step of obtaining the faulty node and the replica data corresponding to the faulty node; wherein the status information corresponding to the downgrade task includes at least one or more of a distributed hash table, a version number corresponding to the distributed hash table, a disk epoch, the status of each node, a disk status, and a cluster node status.
[0051] On the other hand, determining that the health status of the current cluster node is a degraded state includes:
[0052] Monitoring status information corresponding to each cluster node in the distributed storage system according to a fourth preset time;
[0053] Obtaining operation and maintenance instructions, and triggering corresponding operation and maintenance events according to the operation and maintenance instructions; wherein the operation and maintenance events at least include disk mounting and unmounting events and / or cluster node addition and deletion events;
[0054] Triggering a task trigger according to the operation and maintenance event;
[0055] The task trigger is controlled to generate a cluster degradation task, and the health status of the cluster node corresponding to the operation and maintenance event is set to a degraded state.
[0056] In order to solve the above technical problem, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the data storage method when executed by a processor.
[0057] In order to solve the above technical problems, the present invention further provides a data storage device, comprising:
[0058] Memory for storing computer programs;
[0059] A processor is used to implement the steps of the data storage method when executing the computer program.
[0060] In order to solve the above technical problem, the present invention also provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the data storage method are implemented.
[0061] The present invention provides a data storage method, comprising: when the health status of a current cluster node in a distributed storage system is a degraded state, obtaining a faulty node and replica data corresponding to the faulty node; determining a healthy replica node and a degraded replica node for storing replica data corresponding to the faulty node according to a distributed hash table algorithm, so as to perform replica data reading and writing services corresponding to the faulty node in the healthy replica node and the degraded replica node; wherein the time that a degraded replica of a degraded replica node occupies input and output reading and writing capabilities during data recovery is shorter than the time that a healthy replica of a healthy replica node occupies input and output reading and writing capabilities; the degraded replica of a degraded replica node is obtained through a degraded replica list and a data bitmap mark; and data recovery is performed on the degraded replica of a degraded replica node according to a delayed recovery strategy to complete data storage.
[0062] The beneficial effects of the present invention are that the corresponding downgraded replica nodes are designed by using the data distribution for the distributed hash table algorithm, and the normal read and write business without IO recovery is realized. The downgraded replica list and the valid data bitmap mark are used to realize the IO reading and writing after the cluster is downgraded, and the dependency between IO and data recovery is eliminated, so as to ensure that the data fault tolerance does not decrease after the downgrade. It supports data delayed recovery in fault scenarios to complete the data recovery process, ensure that the performance impact of the faulty device on the business IO is minimized, optimize the IO performance, and improve the IO reading and writing efficiency.
[0063] Secondly, an event-aware cluster downgrade framework is established under fault scenarios to facilitate timely entry into the cluster downgrade state and ensure the subsequent data recovery process of the faulty node. The specific process of downgrading the write service, through the setting of the downgraded copy list and the marking of the valid data bitmap, ensures that the data fault tolerance does not decrease after the downgrade, and ensures that the data is written in an orderly manner. Monitor according to the second preset time to ensure the accuracy of the delayed recovery task, to ensure that the subsequent data recovery process provides protection, and to reduce the impact on IO performance. The data recovery request process ensures the effectiveness of the data recovery task, delays the direct data recovery impact caused by the failure, and ensures IO performance and consistency after the failure. By writing healthy copies + downgraded copies ≥ the number of data copies, the fault tolerance of the data after the downgrade is guaranteed. Set corresponding priority strategies based on different application scenarios to improve the flexibility and diversity of data recovery and improve user experience.
[0064] In addition, the present invention also provides a computer program product, a data storage device and a medium, which have the same beneficial effects as the above-mentioned data storage method. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0066] Figure 1 A flowchart of a data storage method provided by an embodiment of the present invention;
[0067] Figure 2 A schematic diagram of operation and maintenance and failure scenarios corresponding to a degradation state provided in an embodiment of the present invention;
[0068] Figure 3 A schematic diagram of a data storage scenario provided by an embodiment of the present invention;
[0069] Figure 4 A schematic diagram of a write business scenario of a downgraded replica node provided in an embodiment of the present invention;
[0070] Figure 5 A schematic diagram of a read business scenario of a downgraded replica node provided in an embodiment of the present invention;
[0071] Figure 6 A schematic diagram of a process of restoring data using a delay strategy provided by an embodiment of the present invention;
[0072] Figure 7 A structural diagram of a data storage device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0073] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0074] The core of the present invention is to provide a data storage method, product, device and medium to solve the problem of reduced IO write operation service and efficiency during the process of waiting for data recovery in the event of a node failure.
[0075] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0076] At present, SDS usually uses the replica mechanism to ensure high data reliability. The existing replica distribution strategy and index mechanism are often implemented based on the Distributed Hash Table (DHT) algorithm. The mapping relationship between data replicas and nodes and disks can be constructed according to the DHT algorithm, and then the replica replication module can be used to ensure the consistency of replicas and data synchronization between replicas. The distributed storage system based on the DHT data distribution algorithm can save the construction of metadata management services, and implement the indexing of replicas through a lightweight two-level mapping relationship. It can also deal with common disk failures (unplugging, unmounting, mounting, etc.) and node failures (node power failure, node restart, node disconnection, etc.). The recovery task is triggered by the failure, and the task flow generates batch data recovery requests, which are submitted to the recovery queue, and then the data is recovered from other available data object replicas to achieve the purpose of high data availability. In addition, in general, in order to ensure the fault tolerance of the replica, SDS has a strong consistency requirement for IO. Only when all replicas complete the write operation, the IO will be completed and returned. In the case of a failure in the distributed storage cluster, it is necessary to wait for the lost or erroneous replica to be restored before the IO can complete the write operation. However, the process of waiting for data recovery will cause IO interruption and a significant drop in performance, amplifying the original IO write to data recovery write, which in turn affects the upper-layer business. For example, there are 100 nodes, 30 of which are faulty and need to recover data for 30 nodes. At this time, the IO write capacity will be occupied by data recovery, and the IO write capacity of the 30 nodes will be interrupted, affecting the write efficiency. It has been verified that the IO performance drops by more than 90% in typical disk failure and host failure scenarios. The data storage method provided by the present invention can solve the above technical problems.
[0077] Figure 1A flowchart of a data storage method provided by an embodiment of the present invention is as follows Figure 1 As shown, including:
[0078] S11: when the health status of the current cluster node in the distributed storage system is a degraded state, obtaining the faulty node and the replica data corresponding to the faulty node;
[0079] S12: determining a healthy replica node and a downgraded replica node storing the replica data corresponding to the faulty node according to a distributed hash table algorithm, so as to perform a read and write service of the replica data corresponding to the faulty node in the healthy replica node and the downgraded replica node;
[0080] The time that the downgraded replica of the downgraded replica node occupies the input-output read-write capability during the data recovery process is shorter than the time that the healthy replica of the healthy replica node occupies the input-output read-write capability; the downgraded replica of the downgraded replica node is obtained through the downgraded replica list and the data bitmap mark;
[0081] S13: Perform data recovery on the downgraded replica of the downgraded replica node according to the delayed recovery strategy to complete data storage.
[0082] Specifically, the degradation state of the current cluster node in the distributed storage system can trigger the subsequent data recovery process. This embodiment can set the degradation state of its current cluster node for any scenario where data recovery is required, and is not limited here. For the determination of the degradation state, a timer can be used for monitoring, or it can be set based on different application scenarios, and it can be set according to the actual situation.
[0083] The event-aware cluster degradation framework detects node and disk anomalies as soon as possible, allowing the cluster to enter a degraded state in a timely manner, shortening IO interruption events, ensuring IO continuity, and supporting IO read and write processes after degradation.
[0084] The cluster health state means that the cluster is in a healthy state and can provide services normally. In this cluster state, IO continues to use the strong consistency solution, and IO must be written to all replicas to complete. The cluster degraded state means that the cluster degrade task is triggered by operation and maintenance or failure events, and the cluster enters the degraded state. In this state, IO uses the degraded write solution, and IO can only be completed by writing to healthy replicas and degraded replicas.
[0085] In some embodiments, determining that the health status of the current cluster node is a degraded state includes:
[0086] Monitoring the status information corresponding to each cluster node in the distributed storage system according to the third preset time; wherein the status information at least includes one or more of disk status information, node status information and network fault information;
[0087] If there is a fault in the state information, a fault event is generated and the task trigger is triggered;
[0088] The control task trigger generates a cluster degradation task, and the health state of the cluster node corresponding to the fault event is set to a degraded state.
[0089] Specifically, the degradation perception module is oriented to typical fault and operation and maintenance scenarios, and builds an event-aware cluster degradation framework to support the execution of the degradation write solution through the cluster degradation status. In the fault scenario, the status information corresponding to each cluster node is monitored and identified through the anomaly detection module, and the status information is at least one or more of the disk status information, node status information and network fault information. After the fault is identified, a fault event is generated and notified to the task trigger, which generates a cluster degradation task. The task trigger is used to trigger each task in the cluster node based on the trigger instruction.
[0090] After generating the cluster degradation task, in some embodiments, after determining that the health status of the current cluster node is a degraded state, and before obtaining the failed node and the replica data corresponding to the failed node, the method further includes:
[0091] Get the downgraded tasks generated by the fault event;
[0092] The status information corresponding to the downgrade task is updated to facilitate the step of obtaining the faulty node and the replica data corresponding to the faulty node; wherein the status information corresponding to the downgrade task includes at least one or more of the distributed hash table, the version number corresponding to the distributed hash table, the disk epoch, the status of each node, the disk status and the cluster node status.
[0093] After the cluster downgrade task is triggered, the task notifies all nodes to enter the cluster downgrade state, which will affect the IO strategy. The downgrade task needs to record the events and nodes that caused the downgrade, which are used to troubleshoot faults during IO reading and writing. Since the data will be directly restored and reconstructed in the fault scenario, it is necessary to update the status information corresponding to the downgrade task at this time. It should be noted that the status information corresponding to the downgrade task of the fault event in this embodiment and the status information corresponding to the cluster node in the above embodiment have different meanings. The status information corresponding to the downgrade task of the fault event includes the status information corresponding to the cluster node (cluster node status).
[0094] The distributed hash table here is a commonly used data distribution algorithm, which is divided into node DHT and disk DHT. The data object can calculate the node and disk location based on the two-level DHT. The version number corresponding to the distributed hash table is the cluster epoch. The epoch corresponding to the cluster DHT in the cluster health state can be understood as the version number of the DHT, which means that all nodes in the cluster are normal. The data replica can calculate the correct node location through this epoch, and all data is up to date. The disk epoch, the epoch corresponding to the disk DHT in the cluster health state, means that all disks in the node are normal. The data can calculate the correct disk location through this disk epoch, and all data on the disk is up to date. The status of each node and the status of the cluster node are different. The former is based on its own independent node status, and the latter is the total node status corresponding to all nodes in the cluster system.
[0095] The event-aware cluster degradation framework established in the fault scenario provided in this embodiment facilitates timely entry into the cluster degradation state to ensure the subsequent data recovery process of the faulty node.
[0096] In some other embodiments, determining that the health status of the current cluster node is a degraded state includes:
[0097] Monitoring status information corresponding to each cluster node in the distributed storage system according to a fourth preset time;
[0098] Obtaining operation and maintenance instructions, and triggering corresponding operation and maintenance events according to the operation and maintenance instructions; wherein the operation and maintenance events at least include disk mounting and unmounting events and / or cluster node addition and deletion events;
[0099] Trigger task triggers based on operation and maintenance events;
[0100] The control task trigger generates a cluster degradation task, and the health status of the cluster node corresponding to the operation and maintenance event is set to the degraded state.
[0101] Specifically, the operation and maintenance scenario is actively triggered by operation and maintenance instructions, such as mounting and unmounting disks, adding and deleting cluster nodes, etc. The operation and maintenance instructions will form operation and maintenance events and notify the task trigger, which will generate cluster degradation tasks.
[0102] In some embodiments, after determining that the health status of the current cluster node is a degraded state, before obtaining the failed node and the replica data corresponding to the failed node, the method further includes:
[0103] Obtain the downgrade tasks generated by operation and maintenance events;
[0104] The status information corresponding to the downgrade task is updated; wherein the status information corresponding to the downgrade task includes at least one or more of a distributed hash table, a version number corresponding to the distributed hash table, a disk epoch, each node status, a disk status, and a cluster node status;
[0105] The data migration task is obtained and executed to meet the operation and maintenance requirements of the operation and maintenance event and enter the step of obtaining the faulty node and the replica data corresponding to the faulty node.
[0106] Specifically, unlike the above-mentioned failure scenarios, the operation and maintenance scenario in this embodiment cannot immediately perform the data recovery process, and data recovery can only be completed through data migration tasks. Therefore, status information such as operation and maintenance requirements corresponding to the data migration tasks is updated.
[0107] Figure 2 A schematic diagram of operation and maintenance and failure scenarios corresponding to a degradation state provided by an embodiment of the present invention, such as Figure 2 As shown in the figure, the degradation awareness framework triggers operation and maintenance events through operation and maintenance instructions, monitors the status information of operation and maintenance events, and triggers cluster degradation tasks. For fault events, the cluster degradation tasks corresponding to the fault events are triggered through abnormal monitoring.
[0108] The event-aware cluster degradation framework established in the operation and maintenance scenario provided in this embodiment facilitates timely entry into the cluster degradation state to ensure the subsequent data recovery process of the faulty node.
[0109] The downgraded replica node in step S12 is used to store the downgraded replica. The downgraded replica is in the cluster downgraded device and is responsible for writing and reading new data. The replica is located in the new cluster epoch node or the disk where the new disk epoch is located. It is created or marked when the downgraded write IO type is written. Compared with the healthy replica, its downgraded replica is only for the writing and reading of new data, which reduces the ability of IO read and write services. This can be reflected by the fact that the time occupied by the input and output read and write capabilities during the data recovery process is less than the time occupied by the healthy replica of the healthy replica node. In addition, the downgraded replica is obtained by marking the downgraded replica list and the data bitmap. It should be noted that the downgraded replica list stores the data corresponding to each downgraded replica, and its data bitmap is the metadata attribute information corresponding to the replica data, for example, the size of the storage space occupied by the node.
[0110] The read and write business here is only for specific business. When writing in a real failure scenario, if a node fails, the system will detect this and store new copies on the remaining healthy nodes. For example, in a three-copy system, if a node fails, the system will store data copies on the other two healthy nodes. The write operation ensures that the number of data copies is restored to the expected number to maintain data redundancy and reliability. During the reading process, if a node fails, the system will read data copies from other healthy nodes. The system will select the best node for reading based on the availability and performance indicators of the remaining copies. The system may automatically trigger the reconstruction process of the data on the failed node, rebuilding the data copy to a new or repaired node to restore the full number of copies. Data reconstruction is performed during reading. It starts data reconstruction based on a preset strategy, copies data from other healthy nodes to new hard disks or nodes, or in some cases, uses erasure coding technology to reconstruct complete data from partial data and checksum information.
[0111] The healthy replica nodes and downgraded replica nodes of the replica data storage corresponding to the failed node are calculated according to the distributed hash table algorithm. This algorithm is an improved distributed hash table structure that improves the scalability, fault tolerance and efficiency of the system. Data is distributed to different nodes in the network to achieve fast data location and retrieval. A hash function is used to map the key to an address space of a fixed size (usually 128 bits or 160 bits). This address space is divided into multiple segments, each corresponding to a node in the network. Each node is responsible for storing and managing a specific segment in the hash table. The node ID is usually also generated by a hash function to ensure the uniform distribution of nodes. When data is added to the DHT, its key is mapped to a specific node through a hash function. The data is then stored on this node or further routed to the node responsible for the data. Each node maintains a routing table that records the location information of other nodes. This enables the node to know how to route requests to the correct node. The DHT is designed to be fault-tolerant, and the system can continue to work even if some nodes fail. Data usually has multiple copies distributed on different nodes to improve data reliability.
[0112] In step S12, the data of the downgraded replica node is used for read and write services, that is, the read and write time corresponding to the IO read and write capabilities is reduced. After the actual writing, the data is restored based on the delayed recovery strategy, sharing part of the tasks of the original IO read and write services, so that it can perform data recovery later. It should be noted that the data recovery here does not occupy the current IO read and write services, but recovers data based on the process inside the node.
[0113] Figure 3 A schematic diagram of a data storage scenario provided by an embodiment of the present invention, such as Figure 3 As shown, in a normal scenario of a distributed storage system, the cluster is in a healthy state, and data A writes IO to two replicas (replica 1 and replica 2). In the degraded perception module, a cluster health status failure is issued, causing the cluster to change to a degraded state. In the degraded perception module, data A is not written to replica 2, but is written to degraded replica 2. The degraded replica 2 is written to the degraded replica list, and at the same time, the valid data bitmap of data A on the corresponding storage node is also updated. When the recovery task is delayed and the recovery task is triggered, the downgraded replica recovery is triggered, so that replica 1 performs data recovery. At this time, downgraded replica 2 is restored to a healthy replica to obtain replica 2'. The current cluster degraded state recovery is completed, and the cluster is in a healthy state. It should be noted that Figure 3 The corresponding 1. Write input and output; 2. Count into the downgraded replica list; 3. Update the valid data bitmap are all the corresponding operation steps after downgrade perception. In addition, a. Trigger downgraded replica recovery; b. Perform data recovery; c. Restore to healthy data are all the corresponding replica situation steps in the replica downgrade process. The letter numbers at this time are the order of the steps. In addition, Figure 3 The step numbers 1-3 in the Figure 3 The steps in the figure are not related to the step numbers in other figures.
[0114] The embodiment of the present invention provides a data storage method, including: when the health state of the current cluster node in the distributed storage system is a degraded state, obtaining the faulty node and the replica data corresponding to the faulty node; determining the healthy replica node and the degraded replica node storing the replica data corresponding to the faulty node according to the distributed hash table algorithm, so as to perform the replica data reading and writing business corresponding to the faulty node in the healthy replica node and the degraded replica node; wherein the time that the degraded replica of the degraded replica node occupies the input and output reading and writing capabilities during the data recovery process is less than the time that the healthy replica of the healthy replica node occupies the input and output reading and writing capabilities; the degraded replica of the degraded replica node is obtained through the degraded replica list and the data bitmap mark; and the degraded replica of the degraded replica node is restored according to the delayed recovery strategy to complete the data storage. The corresponding degraded replica node is designed by using the data distribution oriented to the distributed hash table algorithm, so as to realize the normal reading and writing business without IO recovery, realize the IO reading and writing after the cluster is degraded through the degraded replica list and the valid data bitmap mark, release the dependency between IO and data recovery, and ensure that the data fault tolerance does not decrease after the degrade. Supports delayed data recovery in fault scenarios to complete the data recovery process, minimize the impact of faulty devices on business IO performance, optimize IO performance, and improve IO read and write efficiency.
[0115] In some embodiments, writing the replica data corresponding to the failed node in the healthy replica node and the degraded replica node includes:
[0116] When the current faulty node enters a degraded state, the current faulty node is calculated according to a distributed hash table algorithm to determine the node positions of the healthy replica nodes and the degraded replica nodes where the replica data of the current faulty node is located;
[0117] Forward the replica data corresponding to the failed node to the healthy replica node and the downgraded replica node to complete the write business;
[0118] In the process of writing to the downgraded replica node, the mark and metadata attribute information of the downgraded replica data corresponding to the replica data are correspondingly included in the downgraded replica list and the valid data bitmap to facilitate the reading of the reading business.
[0119] Specifically, when the current faulty node enters the degraded state, the node location of the replica is determined based on the DHT algorithm. The node location here includes healthy replica nodes and degraded replica nodes, and the business is written completely. During the writing process, it is necessary to include the degraded replica list and record the valid data bitmap. The degraded replica list records the marks of multiple degraded replica data to facilitate the subsequent direct call of the data object. The valid data bitmap records the metadata attribute information corresponding to the replica data to facilitate the determination of the occupied space size.
[0120] Figure 4 A schematic diagram of a write service scenario of a downgraded replica node provided by an embodiment of the present invention, such as Figure 4 As shown, in a normal scenario of a distributed storage system, the cluster is in a healthy state, and IO is written to two replicas (replica 1 and replica 2) through data A. In the downgrade perception module, a cluster health status failure is issued, causing the cluster to change to a downgraded state. In the downgrade perception module, data A is not written to replica 2, but is written to downgraded replica 2. The downgraded replica 2 is written to the downgraded replica list. After the downgraded replica list returns the data object, downgraded replica 2 writes the data and marks it as a downgraded replica to the storage engine. After the storage engine updates it to a valid data bitmap, it successfully returns to downgraded replica 2. Downgraded replica 2 then returns to data A, and the downgrade write is completed. The core idea is that IO writes to all replicas, and all need to be completed and returned. Here, it may not be required that all are successful. Data object management corresponds to IO that is completed when all returns are completed, and it is judged to be successful if all returns are successful. For downgraded data objects, if all IOs are completed and returned, and any one returns successfully and returns a downgrade flag, it is judged to be successful. It should be noted that Figure 4 The corresponding steps after the downgrade perception in are: 1. Write input and output; 2. Count into the downgraded replica list; 3. Return data object; 4. Write data and mark as downgraded replica; 5. Update valid data bitmap; 6. Successful return; 7. Return downgrade write completion. The sequence number here is based on the entire process of writing business corresponding to the downgraded replica node in the cluster downgraded state, where Figure 4 Step numbers 1-7 in the Figure 4 The steps in the figure are not related to the step numbers in other figures.
[0121] It is understandable that after downgrading, for normal data objects, if one replica completes writing, the IO can be considered returned. Here, there may be inconsistencies caused by power failure or restart of the corresponding storage node when the other replica is not written. Therefore, in order to avoid this phenomenon, the number of replicas actually written needs to be greater than the number of replicas actually required to be written in some scenarios.
[0122] In some embodiments, before the current faulty node fails and does not enter a degraded state, the process further includes:
[0123] Since the current faulty node fails, retry reading the replica data of the current faulty node according to a first preset time;
[0124] Until the first preset time ends and the node enters the degraded state, the write service of the replica data of the current failed node is executed.
[0125] Specifically, there is a certain time interval between the failure of the current faulty node and entering the degraded state. Before entering the degraded state, the cluster maintains consistency in health status, and IO will be in a continuous retry state until it enters the degraded state and executes the writing of the degraded replica through the IO exception handling logic.
[0126] The specific process of the downgraded write service provided in this embodiment ensures that the data fault tolerance does not decrease after the downgrade through the setting of the downgraded replica list and the marking of the valid data bitmap, thereby ensuring that the data is written in an orderly manner.
[0127] In some embodiments, performing a replica data reading service corresponding to a failed node in a healthy replica node and a degraded replica node includes:
[0128] When the current faulty node enters a degraded state, obtain the degraded event record;
[0129] According to the distributed hash table algorithm and the degradation event record, each cluster node of the distributed storage system is screened to obtain the corresponding position of the healthy replica node, so as to facilitate reading the replica data of the healthy replica node;
[0130] If the number of healthy replica nodes is 0, read the downgraded replica nodes;
[0131] Get the valid data bitmap corresponding to the downgraded replica node;
[0132] Reading is performed according to the valid data bitmap corresponding to the downgraded replica node, so as to facilitate reading of the replica data of the downgraded replica node.
[0133] Specifically, in the cluster degraded state, the cluster epoch node corresponding to the healthy state is read first and is not a non-fault-occurring node, that is, the position corresponding to the healthy replica node, so as to facilitate the subsequent reading of the replica data of the healthy replica node. The reading process here is also determined based on the cluster DHT algorithm and the position corresponding to the healthy replica node corresponding to the degraded event record. In addition, if there are multiple faults at present and the maintenance state has been entered, that is, the number of current healthy replica nodes is not 0, the part of the bitmap marked with valid data in the degraded replica can be read to ensure the validity of the data, so as to facilitate subsequent data recovery.
[0134] In some embodiments, before the current faulty node fails and does not enter a degraded state, the process further includes:
[0135] Since the failure of the current failed node, the healthy replica data on other failed nodes except the current failed node is read.
[0136] Specifically, when the cluster is in a healthy state, when a failure occurs and the cluster has not entered a degraded state, IO read failures will be forwarded to another healthy replica node for reading to ensure the validity of the data reading process and the integrity of data reconstruction during subsequent data recovery.
[0137] Figure 5 A schematic diagram of a read business scenario of a downgraded replica node provided by an embodiment of the present invention, such as Figure 5 As shown, in a normal scenario of a distributed storage system, the cluster is in a healthy state, and data A writes IO to two replicas (replica 1 and replica 2). In the degraded perception module, a cluster health status failure is issued, causing the cluster to change to a degraded state. In the degraded perception module, data A corresponding to replica 2 is not written. In super-fault domain perception, that is, the scenario of data loss, data A is written to degraded replica 2, and the degraded replica 2 reads the request to the storage engine. After the storage engine queries the corresponding valid data bitmap, it successfully returns to the degraded replica 2, and the degraded replica 2 returns to data A, and the degraded write is completed. Figure 5 The corresponding steps in the cluster maintenance state are: 1. Read input and output; 2. Read request; 3. Query valid data bitmap; 4. Confirm as valid data; 5. Return read result; 6. Complete return. It should be noted that Figure 5 Step numbers 1-6 in the Figure 5 The steps in the figure are not related to the step numbers in other figures.
[0138] In some embodiments, performing data recovery on the downgraded replica of the downgraded replica node according to the delayed recovery strategy in step S13 to complete data storage includes:
[0139] Checking whether data recovery is required in the cluster node according to a second preset time;
[0140] If so, determine the list of data to be recovered corresponding to the cluster node according to the distributed hash table algorithm;
[0141] The downgraded replica of the downgraded replica node is restored according to the data object recovery request in the to-be-restored data list to complete data recovery.
[0142] Specifically, the core idea of checking whether data recovery is needed in the cluster node according to the second preset time is to reduce the impact of direct data recovery on IO performance by delaying data recovery. The checking process can be checked through a timing device or a watchdog mechanism.
[0143] In some embodiments, checking whether data recovery is required in the cluster node according to the second preset time includes:
[0144] Determining whether the cluster node meets a preset condition according to a second preset time;
[0145] If the preset conditions are met, it is determined that the cluster node needs to perform data recovery;
[0146] The preset condition is at least one of the following:
[0147] There is no data recovery task being executed in the cluster node;
[0148] There is no data migration task being executed in the cluster node;
[0149] The cluster nodes are not in a degraded state.
[0150] Specifically, by configuring the timer, it is checked regularly whether the cluster nodes can perform data recovery. If the preset conditions are met, a recovery task is generated. The preset condition is that there must be no data recovery tasks being executed to avoid occupying bandwidth; there are no data migration tasks being executed. The data migration tasks here are data migrations generated under data operation and maintenance conditions, which conflict with the delayed recovery tasks in this embodiment. The nodes of the cluster nodes are not in a degraded state. It should be noted that this embodiment only performs data recovery in a degraded state. If it is in other healthy states, data recovery will not be performed. Of course, there are other situations that may occur, which are not limited here and can be set according to actual conditions.
[0151] This embodiment performs monitoring according to the second preset time to ensure the accuracy of the delayed recovery task, to ensure that protection is provided in the subsequent data recovery process, and to reduce the impact on IO performance.
[0152] When data recovery is required, a list of data to be recovered corresponding to the cluster node is determined according to a distributed hash table algorithm, and recovery work of the downgraded replica node is performed on the data object recovery request based on the list of data to be recovered.
[0153] In some embodiments, restoring the degraded replica of the degraded replica node according to the data object recovery request of the to-be-restored data list includes:
[0154] Determine whether the data object needs to be restored;
[0155] If yes, read the corresponding replica data from the healthy replica node;
[0156] Overwrite the node location where the downgraded replica node is located;
[0157] Update the data object from a degraded state to a healthy state to complete the recovery task of the data object recovery request.
[0158] Specifically, the recovery list generates data recovery requests for multiple specific data objects (object, OBJ). The request must first check whether the data object can be recovered through the data object management module. If it can be recovered, it goes to the node where the healthy copy is located to read the copy data, and then overwrites the location of the downgraded copy and updates the data object to a healthy state, thus completing the recovery task of a data object request. Figure 6 A schematic diagram of a process of restoring data using a delay strategy provided by an embodiment of the present invention, such as Figure 6 As shown in the figure, the process of the recovery task is represented by the dotted arrow of the task flow, which specifically includes:
[0159] 1. The delayed recovery task generates a recovery data list to store the recovery requests for each data object;
[0160] 2. Traverse the list to generate data object recovery requests in batches;
[0161] 3. After the recovery is complete, the cluster returns to a healthy state.
[0162] The process of restoring a request is represented by a solid arrow of the restore request flow, which is as follows:
[0163] a. Generate a data object recovery request;
[0164] b. Check and obtain data objects;
[0165] c. Return the data object through the data object management module;
[0166] d. Read the healthy copy in copy 1;
[0167] e. Return data;
[0168] f. Modify the data object status of the downgraded replica 2 and resume writing;
[0169] g. Recovery writing completed;
[0170] h. Update data objects;
[0171] i. Complete the recovery request.
[0172] It should be noted that Figure 6 The numerical sequence of the steps in the task flow and the alphabetical sequence of the steps in the recovery request flow are distinguished. Figure 6 The step numbers 1-3 in the Figure 6 Steps, Figure 6 The step letter ai in the Figure 6 The steps in the figure are independent of the step numbers in other figures.
[0173] The data recovery request process provided in this embodiment ensures the effectiveness of the data recovery task, delays the direct data recovery impact caused by the failure, and guarantees the IO performance and consistency after the failure. By writing the healthy copy + the degraded copy ≥ the number of data copies, the fault tolerance of the data after the degradation is guaranteed.
[0174] In some embodiments, restoring the degraded replica of the degraded replica node according to the data object recovery request of the to-be-restored data list includes:
[0175] Obtain the corresponding levels of the business priority strategy and the recovery task priority strategy;
[0176] The downgraded replica of the downgraded replica node is restored according to the priority policy corresponding to the highest level and the data object recovery request of the to-be-restored data list.
[0177] It should be noted that in this embodiment, multiple application scenarios are considered in the data recovery process, including business priority and recovery task priority, which need to be considered according to the actual situation. For example, the recovery task priority can be considered based on the bandwidth situation. If the business priority strategy is considered based on the current upper-layer business situation, the bandwidth occupied by different strategies in this embodiment is also different, which can be analyzed according to the actual situation.
[0178] In this embodiment, corresponding priority strategies are set based on different application scenarios to improve the flexibility and diversity of data recovery and enhance user experience.
[0179] In some embodiments, the list of data to be restored includes a list of degraded copies.
[0180] It should be noted that, considering that all the data in the downgraded replica list need to be written to the downgraded replica node, when corresponding to other downgraded replica data except the replica data in the downgraded replica list, in order to ensure that the data is not lost, a corresponding replica mechanism is established to facilitate the redundancy of subsequent data.
[0181] The above describes in detail various embodiments corresponding to the data storage method. On this basis, the present invention also discloses a data storage device corresponding to the above method, the device comprising:
[0182] A first acquisition module is used to acquire a faulty node and replica data corresponding to the faulty node when the health status of the current cluster node in the distributed storage system is a degraded state;
[0183] A determination module is used to determine the healthy replica node and the downgraded replica node storing the replica data corresponding to the failed node according to the distributed hash table algorithm, so as to perform the replica data reading and writing business corresponding to the failed node in the healthy replica node and the downgraded replica node; wherein the time that the downgraded replica of the downgraded replica node occupies the input and output reading and writing capabilities during the data recovery process is less than the time that the healthy replica of the healthy replica node occupies the input and output reading and writing capabilities; the downgraded replica of the downgraded replica node is obtained through the downgraded replica list and the data bitmap mark;
[0184] The data recovery module is used to recover the data of the downgraded replica of the downgraded replica node according to the delayed recovery strategy to complete the data storage.
[0185] In some embodiments, after determining that the health status of the current cluster node is a degraded state, before obtaining the failed node and the replica data corresponding to the failed node, the method further includes:
[0186] A first acquisition submodule is used to acquire the downgraded task generated by the fault event;
[0187] The first update submodule is used to update the status information corresponding to the downgrade task to facilitate the step of obtaining the faulty node and the replica data corresponding to the faulty node; wherein the status information corresponding to the downgrade task includes at least one or more of the distributed hash table, the version number corresponding to the distributed hash table, the disk epoch, the status of each node, the disk status and the cluster node status.
[0188] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.
[0189] For an introduction to a data storage device provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. It has the same beneficial effects as the above data storage method.
[0190] Figure 7 A structural diagram of a data storage device provided by an embodiment of the present invention, such as Figure 7 As shown, the device comprises:
[0191] A memory 21, used for storing computer programs;
[0192] The processor 22 is used to implement the steps of the data storage method when executing a computer program.
[0193] The data storage device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0194] Among them, the processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 22 may be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 22 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 22 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 22 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0195] The memory 21 may include one or more non-volatile storage media, which may be non-transitory. The memory 21 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 21 is at least used to store the following computer program 211, wherein, after the computer program is loaded and executed by the processor 22, it can implement the relevant steps of the data storage method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 21 may also include an operating system 212 and data 213, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 212 may include Windows, Unix, Linux, etc. Data 213 may include but is not limited to data involved in the data storage method, etc.
[0196] In some embodiments, the data storage device may further include a display screen 23 , an input / output interface 24 , a communication interface 25 , a power supply 26 , and a communication bus 27 .
[0197] Those skilled in the art can understand that Figure 7 The structure shown in the figure does not constitute a limitation on the data storage device, and may include more or fewer components than shown in the figure.
[0198] The processor 22 implements the data storage method provided by any of the above embodiments by calling the instructions stored in the memory 21 .
[0199] For an introduction to a data storage device provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. It has the same beneficial effects as the above data storage method.
[0200] Furthermore, the present invention also provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by the processor 22, the steps of the above-mentioned data storage method are implemented.
[0201] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0202] For an introduction to a non-volatile storage medium provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. The non-volatile storage medium has the same beneficial effects as the above data storage method.
[0203] Furthermore, the present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above data storage method when executed by a processor.
[0204] For an introduction to a computer program product provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. It has the same beneficial effects as the above data storage method.
[0205] The above is a detailed introduction to a data storage method, product, device and medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
[0206] It should also be noted that, in this specification, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A data storage method, characterized in that: include: When the health status of the current cluster node in the distributed storage system is degraded, obtain the faulty node and the replica data corresponding to the faulty node; Determine a healthy replica node and a downgraded replica node storing the replica data corresponding to the failed node according to a distributed hash table algorithm, so as to perform the replica data read and write business corresponding to the failed node in the healthy replica node and the downgraded replica node; wherein the time that the downgraded replica of the downgraded replica node occupies the input and output read and write capabilities during the data recovery process is less than the time that the healthy replica of the healthy replica node occupies the input and output read and write capabilities; the downgraded replica of the downgraded replica node is obtained through a downgraded replica list and a data bitmap mark; Data is recovered on the downgraded replica of the downgraded replica node according to the delayed recovery strategy to complete data storage.
2. The data storage method according to claim 1, characterized in that: Writing the replica data corresponding to the faulty node in the healthy replica node and the degraded replica node includes: When the current faulty node enters a degraded state, the current faulty node is calculated according to the distributed hash table algorithm to determine the node positions of the healthy replica nodes and the degraded replica nodes where the replica data of the current faulty node is located; Forwarding the replica data corresponding to the failed node to the healthy replica node and the downgraded replica node to complete the write service; Wherein, during the writing process of the downgraded replica node, the mark and metadata attribute information of the downgraded replica data corresponding to the replica data are correspondingly counted into the downgraded replica list and the valid data bitmap to facilitate the reading of the reading service.
3. The data storage method according to claim 2, characterized in that: Before the current faulty node fails and enters the degraded state, the method further includes: Since the current faulty node fails, retry reading the replica data of the current faulty node according to a first preset time; Until the first preset time ends and the degraded state is entered, the write service of the replica data of the current failed node is executed.
4. The data storage method according to claim 1, characterized in that: The replica data reading service corresponding to the faulty node is performed in the healthy replica node and the degraded replica node, including: When the current faulty node enters a degraded state, obtain the degraded event record; Screening each cluster node of the distributed storage system according to the distributed hash table algorithm and the degradation event record to obtain the position corresponding to the healthy replica node, so as to facilitate reading the replica data of the healthy replica node; If the number of healthy replica nodes is 0, read the downgraded replica node; Obtaining a valid data bitmap corresponding to the downgraded replica node; Reading is performed according to the valid data bitmap corresponding to the downgraded replica node, so as to read the replica data of the downgraded replica node.
5. The data storage method according to claim 4, characterized in that: Before the current faulty node fails and enters the degraded state, the method further includes: Since the current faulty node fails, healthy copy data on other faulty nodes except the current faulty node is read.
6. The data storage method according to claim 1, characterized in that: Performing data recovery on the downgraded replica of the downgraded replica node according to the delayed recovery strategy to complete data storage includes: Checking whether data recovery is required in the cluster node according to a second preset time; If yes, determine the list of data to be restored corresponding to the cluster node according to the distributed hash table algorithm; The degraded replica of the degraded replica node is restored according to the data object recovery request in the to-be-restored data list to complete data recovery.
7. The data storage method according to claim 6, characterized in that: Checking whether data recovery is required in the cluster node according to the second preset time includes: Determining whether the cluster node meets a preset condition according to the second preset time; If the preset conditions are met, determining that the cluster node needs to perform data recovery; The preset condition is at least one of the following: There is no data recovery task being executed in the cluster node; There is no data migration task being executed in the cluster node; Each node of the cluster node is not in a degraded state.
8. The data storage method according to claim 6 or 7, characterized in that: Restoring the degraded replica of the degraded replica node according to the data object recovery request of the to-be-restored data list includes: Determine whether the data object needs to be restored; If yes, read the corresponding replica data from the healthy replica node; Overwrite the node location where the downgraded replica node is located; The data object is updated from the degraded state to a healthy state to complete the recovery task of the data object recovery request.
9. The data storage method according to claim 8, characterized in that: Restoring the degraded replica of the degraded replica node according to the data object recovery request of the to-be-restored data list includes: Obtain the corresponding levels of the business priority strategy and the recovery task priority strategy; The degraded replica of the degraded replica node is restored according to the priority policy corresponding to the highest level and the data object recovery request of the to-be-restored data list.
10. The data storage method according to claim 1, characterized in that: Determine that the health status of the current cluster node is degraded, including: Monitoring the status information corresponding to each cluster node in the distributed storage system according to the third preset time; wherein the status information at least includes one or more of disk status information, node status information and network fault information; If there is a fault in the state information, a fault event is generated and the task trigger is triggered; The task trigger is controlled to generate a cluster degradation task, and the health status of the cluster node corresponding to the fault event is set to a degraded state.
11. The data storage method according to claim 10, characterized in that: After determining that the health status of the current cluster node is a degraded state, before obtaining the failed node and the replica data corresponding to the failed node, the following is also included: Get the downgraded tasks generated by the fault event; The status information corresponding to the downgrade task is updated to facilitate the step of obtaining the faulty node and the replica data corresponding to the faulty node; wherein the status information corresponding to the downgrade task includes at least one or more of a distributed hash table, a version number corresponding to the distributed hash table, a disk epoch, the status of each node, a disk status, and a cluster node status.
12. The data storage method according to claim 1, characterized in that: Determine that the health status of the current cluster node is degraded, including: Monitoring status information corresponding to each cluster node in the distributed storage system according to a fourth preset time; Obtaining operation and maintenance instructions, and triggering corresponding operation and maintenance events according to the operation and maintenance instructions; wherein the operation and maintenance events at least include disk mounting and unmounting events and / or cluster node addition and deletion events; Triggering a task trigger according to the operation and maintenance event; The task trigger is controlled to generate a cluster degradation task, and the health status of the cluster node corresponding to the operation and maintenance event is set to a degraded state.
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the data storage method according to any one of claims 1 to 12 are implemented.
14. A data storage device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the data storage method according to any one of claims 1 to 12 when executing the computer program.
15. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data storage method according to any one of claims 1 to 12 are implemented.
Citation Information
Cited By
Data processing system for multi-channel storage cluster
CN123089768A
