Data asynchronous replication method and device, computer device and storage medium

By selecting business-bearing nodes in the storage system and creating high-precision timers, the problem of insufficient precision of CSM timers was solved, enabling second-level asynchronous data replication and improving data recovery capabilities and system stability.

CN119211257BActive Publication Date: 2026-01-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411214922.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-01-27
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

In existing technologies, due to the poor precision of CSM's timer, the recovery point target for periodic asynchronous remote replication is large, resulting in poor data recovery capability.

Method used

By selecting business-bearing nodes from multiple nodes in the storage system, creating high-precision timers on these nodes, determining the data synchronization time based on the timers, and publishing data synchronization information at that time, second-level asynchronous data replication can be achieved.

Benefits of technology

It improves the periodic accuracy of asynchronous data replication, reduces data differences between primary and secondary volumes, and enhances data recovery capabilities and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211257B_ABST
    Figure CN119211257B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data storage, and discloses a data asynchronous replication method and device, computer equipment and a storage medium, the method comprises the following steps: screening a service bearing node from a plurality of nodes of a storage system, and creating a timer on the service bearing node; obtaining configuration information of an asynchronous replication relationship, configuring the asynchronous replication relationship of the plurality of nodes based on the configuration information, determining a configuration state of the plurality of nodes and a data synchronization period of data asynchronous replication of the plurality of nodes based on the configuration information, starting the timer on the service bearing node in the case that the configuration state is a starting state, determining whether a data synchronization moment of the data synchronization period is reached based on the timer, and publishing data synchronization information to the plurality of nodes through the service bearing node in the case that the data synchronization moment of the data synchronization period is reached, so that the plurality of nodes perform data asynchronous replication based on the data synchronization information. The application improves the precision of the timer, and has strong data recovery capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data storage technology, and more specifically to asynchronous data replication methods, apparatus, computer equipment, and storage media. Background Technology

[0002] Remote copy (RC) defines the relationship between volumes on the primary and secondary systems, allowing user data on the primary volume to be synchronized to the secondary volume. Remote copy relationships include periodic asynchronous remote copy, which synchronizes differences generated on the primary volume to the secondary volume according to a set periodic interval.

[0003] In related technologies, the periodic asynchronous remote replication cycle is usually triggered by a timer in the configuration management module (Control State Machines, or CSM) of the storage system. Every fixed period, the difference data generated by the primary volume within the cycle is synchronized to the secondary volume.

[0004] However, due to the poor precision of CSM's timer, the minimum granularity of the fixed period is 5 seconds, and the large Recovery Point Objective (RPO) results in poor data recovery capability. Summary of the Invention

[0005] In view of this, the present invention provides a method, apparatus, computer device and storage medium for asynchronous data replication, in order to solve the problem in the related art that the poor timer accuracy of CSM results in a large recovery point target and poor data recovery capability.

[0006] In a first aspect, the present invention provides a method for asynchronous data replication, the method comprising:

[0007] Select the service-bearing node from multiple nodes in the storage system, and create a timer on the service-bearing node;

[0008] In response to the configuration operation of the asynchronous replication relationship, the configuration information of the asynchronous replication relationship is obtained, and the asynchronous replication relationship is configured for multiple nodes based on the configuration information;

[0009] Based on the configuration information, the configuration status of multiple nodes and the data synchronization cycle for asynchronous data replication among multiple nodes are determined.

[0010] When the configuration state is in the start state, start the timer on the service bearer node, and determine whether the data synchronization time of the data synchronization period has been reached based on the timer;

[0011] When the data synchronization time of the data synchronization period arrives, the service bearer node publishes data synchronization information to multiple nodes so that the multiple nodes can perform asynchronous data replication based on the data synchronization information.

[0012] The asynchronous data replication method provided in this embodiment selects a service-bearing node from multiple nodes in the storage system and creates a timer on the service-bearing node. With multiple nodes configured to be in an "on" state, the timer on the service-bearing node is started. Based on the timer, it determines whether the data synchronization period has arrived. If the data synchronization period has arrived, the service-bearing node publishes data synchronization information to multiple nodes, enabling them to perform asynchronous data replication based on this information. By selecting a service-bearing node and starting a high-precision timer on the designated node, second-level asynchronous data replication can be achieved, improving the periodic accuracy of asynchronous data replication, significantly reducing data differences between the primary and secondary volumes, lowering the recovery point target, and improving data recovery capabilities.

[0013] In one optional implementation, the step of selecting the service-bearing node from multiple nodes of the storage system includes:

[0014] Obtain the node with the largest index sequence number among multiple nodes in the storage system;

[0015] Determine whether the node with the largest index number is a configuration node;

[0016] If the node with the largest index number is not a configuration node, the node with the largest index number will be used as the service carrying node.

[0017] If the node with the largest index number is a configuration node, exclude the node with the largest index number, filter out the node with the largest index number from the remaining nodes, and return to the step of determining whether the node with the largest index number is a configuration node.

[0018] The asynchronous data replication method provided in this embodiment achieves node load balancing and maximizes system performance by selecting the node with the largest index number (not a configured node) as the service-bearing node. This ensures system stability.

[0019] In an optional implementation, the method further includes:

[0020] If the node with the largest index number is the configuration node and there are no remaining nodes, then the node with the largest index number is determined to be the service carrying node.

[0021] The asynchronous data replication method provided in this embodiment enhances the system's self-adjustment capability under special configurations and ensures system stability by using the node with the largest index number as the configuration node and, when there are no remaining nodes, the node with the largest index number as the service carrying node.

[0022] In an optional implementation, the method further includes:

[0023] Perform online monitoring of multiple nodes in the storage system;

[0024] If at least one node in the storage system is offline, it is determined to stop asynchronous data replication across the multiple nodes.

[0025] Select a new service bearer node from multiple nodes in the storage system and return to the step of creating a timer on the service bearer node.

[0026] The asynchronous data replication method provided in this embodiment can promptly detect abnormal node states (such as offline status) by monitoring nodes in the storage system online. This triggers a response mechanism, namely, stopping asynchronous data replication across multiple nodes, selecting a new service-bearing node from among the nodes in the storage system, and returning to the step of creating a timer on the service-bearing node. This prevents service interruptions caused by single points of failure and improves the overall stability and reliability of the system.

[0027] In an optional implementation, the method further includes:

[0028] If the configuration status is stopped, determine to stop asynchronous data replication across multiple nodes;

[0029] When the configuration status is "delete", delete the asynchronous replication relationship of multiple nodes.

[0030] The asynchronous data replication method provided in this embodiment achieves fine-grained control over asynchronous data replication by taking corresponding processing measures according to different configuration states, thereby ensuring the security of data management and the effective utilization of storage resources.

[0031] In an optional implementation, the method further includes:

[0032] For any of the multiple nodes, if the data synchronization time of the data synchronization cycle has not been reached and the host writes data to the primary volume corresponding to the node, the first-order graph is used to record the data difference between the primary volume and the secondary volume corresponding to the primary volume.

[0033] When the data synchronization time of the data synchronization cycle is reached, for any bit in the first bitmap, the difference status of the data block on the main volume corresponding to that bit is determined based on the value corresponding to that bit.

[0034] If the difference status of the data block on the corresponding primary volume is changed, read the difference data in the data block from the primary volume and synchronize the difference data to the secondary volume corresponding to the primary volume;

[0035] Clear the value corresponding to that bit in the first bitmap;

[0036] For any data synchronization cycle, if the data synchronization time of the current data synchronization cycle has arrived but the data synchronization time of the next data synchronization cycle has not arrived, and the host writes data to the primary volume corresponding to the node, a second bitmap is used to record the data differences between the primary volume and the secondary volume corresponding to the primary volume. When the data synchronization time of the next data synchronization cycle arrives, for any bit in the second bitmap, the difference status of the data block on the primary volume corresponding to that bit is determined based on the value of that bit. If the difference status of the data block on the primary volume corresponding to that bit is changed, the difference data in the data block is read from the primary volume, and the difference data is synchronized to the secondary volume corresponding to the primary volume. The value corresponding to that bit in the second bitmap is then cleared.

[0037] The asynchronous data replication method provided in this embodiment eliminates the system consumption caused by starting and stopping the snapshot of the changed volume by removing the changed volume and using the first bit map and the second bit map to record the data differences between the primary volume and the secondary volume. This further ensures that the data synchronization of the primary and secondary volumes in the asynchronous data replication can be completed within 1 second, thereby realizing high-precision periodic asynchronous remote replication with a cycle duration of 1 second, reducing the RPO of periodic asynchronous remote replication, and improving the reliability of the disaster recovery function of the storage device.

[0038] In an optional implementation, the method further includes:

[0039] For any given data synchronization period, the first bitmap in the preceding data synchronization period is used as the second bitmap in the current data synchronization period, and the second bitmap in the preceding data synchronization period is used as the first bitmap in the current data synchronization period.

[0040] The asynchronous data replication method provided in this embodiment solves the performance loss problem of the changed volume through the rotation mechanism of the first bit map and the second bit map, further ensuring that the synchronization of primary and secondary volumes in asynchronous data replication can be completed within 1 second, reducing the RPO of periodic asynchronous remote replication, and improving the reliability of the disaster recovery function of the storage device.

[0041] In a second aspect, the present invention provides an asynchronous data replication apparatus, the apparatus comprising:

[0042] The filtering module is used to filter out the service-bearing nodes from multiple nodes in the storage system and create timers on the service-bearing nodes.

[0043] The acquisition module is used to acquire configuration information of asynchronous replication relationship in response to configuration operation of asynchronous replication relationship, and to configure asynchronous replication relationship for multiple nodes based on the configuration information.

[0044] The determination module is used to determine the configuration status of multiple nodes and the data synchronization period for asynchronous data replication of multiple nodes based on the configuration information.

[0045] The startup module is used to start a timer on the service bearer node when the configuration state is in the startup state, and to determine whether the data synchronization time of the data synchronization period has been reached based on the timer.

[0046] The publishing module is used to publish data synchronization information to multiple nodes through the service bearer node when the data synchronization time of the data synchronization period arrives, so that the multiple nodes can perform asynchronous data replication based on the data synchronization information.

[0047] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the asynchronous data copying method described in the first aspect or any corresponding embodiment thereof.

[0048] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the asynchronous data copying method described in the first aspect or any corresponding embodiment thereof.

[0049] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the asynchronous data copying method described in the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of the present invention, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0051] Figure 1 This is a schematic diagram illustrating periodic asynchronous remote replication in related technologies;

[0052] Figure 2 This is a flowchart illustrating an asynchronous data replication method according to an embodiment of the present invention;

[0053] Figure 3 This is a schematic diagram illustrating the asynchronous replication relationship configuration of multiple nodes according to an embodiment of the present invention;

[0054] Figure 4 This is a schematic diagram illustrating asynchronous data replication between multiple nodes according to an embodiment of the present invention;

[0055] Figure 5 This is a flowchart illustrating another asynchronous data replication method according to an embodiment of the present invention;

[0056] Figure 6 This is a flowchart of the process for selecting service bearer nodes according to an embodiment of the present invention;

[0057] Figure 7 This is a schematic diagram illustrating online monitoring of multiple nodes in a storage system according to an embodiment of the present invention;

[0058] Figure 8 This is a schematic diagram illustrating asynchronous data replication according to an embodiment of the present invention;

[0059] Figure 9 This is a schematic diagram illustrating the implementation of second-level periodic asynchronous remote replication according to an embodiment of the present invention;

[0060] Figure 10 This is a structural block diagram of an asynchronous data replication apparatus according to an embodiment of the present invention;

[0061] Figure 11 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0063] Remote replication defines the relationship between volumes on two storage systems. Typically, one storage system is designated as the primary system (or master storage system), which receives user input / output (I / O) data, and its volumes are designated as primary volumes. The other storage system is designated as the secondary system (or master storage system), which does not directly receive user I / O data, and its volumes are designated as secondary volumes. User data on the primary volume is synchronized to the secondary volume through remote replication.

[0064] Based on the different data synchronization times, remote replication relationships are divided into three types: synchronous remote replication relationship, asynchronous remote replication relationship, and periodic asynchronous remote replication relationship.

[0065] In synchronous remote replication, after the host writes data to the primary volume, the data is simultaneously synchronized to the secondary volume, and then the host is notified that I / O is complete. The RPO for synchronous remote replication is 0. RPO refers to the maximum amount of data loss an enterprise can tolerate during disaster recovery; it is an indicator of data recovery capability.

[0066] In asynchronous remote replication, the host writes data to the primary volume, indicating that the I / O is complete, and then immediately synchronizes the data to the secondary volume according to the I / O order. The RPO of asynchronous remote replication is greater than 0 and is generally less than 1 second.

[0067] Periodic asynchronous remote replication involves writing host data to the primary volume, indicating that the host I / O is complete, but not immediately synchronizing the data to the secondary volume. Instead, according to a set periodic time, the difference data generated by the primary volume within the period is synchronized to the secondary volume according to the bitmap. The RPO of periodic asynchronous remote replication is greater than 0 and is generally less than twice the periodic time.

[0068] Figure 1 This is a schematic diagram illustrating periodic asynchronous remote replication in related technologies. For example... Figure 1 As shown, periodic asynchronous remote replication consists of a primary volume, a primary volume change volume, a secondary volume, and a secondary volume change volume. The primary volume automatically initiates a data replication at fixed intervals, with a default interval of 300 seconds, but the interval can range from 60 seconds to 24 hours.

[0069] The cycle of periodic asynchronous remote replication includes the following process:

[0070] During the periodic synchronization process, the primary volume change volume snapshot in the primary volume change volume is in the startup state. When the host I / O writes data to the primary volume, the data differences between the primary and secondary volumes are recorded by the primary volume change volume snapshot bitmap.

[0071] When periodic synchronization is not started, the primary volume change volume snapshot in the primary volume change volume is in a stopped state. When host I / O writes data to the primary volume, the remote replication bitmap in the primary volume records the data differences between the primary and secondary volumes.

[0072] At the end of each synchronization cycle, the snapshot bitmap of the primary volume change volume is synchronized to the remote replication bitmap and merged. During each data synchronization cycle, incremental data synchronization within the cycle is performed based on the merged remote replication bitmap.

[0073] It should be noted that the secondary volume change volume is used for data backup and recovery. It is used to start a secondary volume change volume snapshot before the start of each data synchronization cycle, and use the secondary volume change volume snapshot to back up the data of the secondary volume in order to realize the data recovery of the secondary volume.

[0074] However, the cycle of periodic asynchronous remote replication is usually triggered by a timer on the CSM side of the storage system. Since the timer on the CSM side has poor precision and the smallest granularity is 5 seconds, the cycle period of periodic asynchronous remote replication must be an integer multiple of 5 seconds, resulting in a large RPO and poor data recovery capability.

[0075] Furthermore, the current periodic asynchronous remote replication data synchronization is achieved through change volume snapshots. Each data synchronization cycle requires starting and stopping change volume snapshots twice. Starting and stopping change volume snapshots consumes a lot of central processing unit (CPU) and memory resources. Even if the cycle of periodic asynchronous remote replication is achieved with a precision of 1 second, the pressure on the system caused by starting and stopping change volume snapshots often makes it impossible to truly achieve the 1-second precision requirement.

[0076] This invention provides a method for asynchronous data replication, aiming to achieve true 1-second precision periodic asynchronous remote replication. By selecting a service bearer node and starting a high-precision timer on the specified service bearer node, second-level asynchronous data replication can be achieved, thereby improving the periodic precision of asynchronous data replication, greatly reducing the data difference between the primary and secondary volumes in asynchronous data replication, lowering the recovery point target, and improving the data recovery capability.

[0077] According to an embodiment of the present invention, an embodiment of an asynchronous data replication method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0078] This embodiment provides an asynchronous data replication method that can be used in a primary storage system. Figure 2This is a flowchart of an asynchronous data replication method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0079] Step S201: Select the service bearer node from multiple nodes in the storage system and create a timer on the service bearer node.

[0080] Most current storage systems consist of 2 or 4 nodes. In this embodiment, the CSM (Configuration Management System) selects one node from the multiple nodes of the storage system as the service-carrying node. The CSM is commonly used to represent the configuration and status information of each component of the system.

[0081] After selecting the service-bearing nodes, a high-precision timer is created on the service processing end (agent end) of the service-bearing nodes.

[0082] It should be noted that, due to the poor accuracy of the timer on the CSM side and the inability to improve its accuracy, this embodiment abandons the timer on the CSM side and creates a high-precision timer on the agent side of the service bearer node. In this embodiment, the timer is started every 100ms, and each scan covers 1 / 10 of the total number of asynchronous remote replication data in the cycle. A complete scan of all cycle asynchronous remote replications is performed once per second, achieving cycle asynchronous remote replication with second-level accuracy.

[0083] Step S202: In response to the configuration operation of the asynchronous replication relationship, obtain the configuration information of the asynchronous replication relationship, and configure the asynchronous replication relationship for multiple nodes based on the configuration information.

[0084] in, Figure 3 This is a schematic diagram illustrating the asynchronous replication configuration of multiple nodes according to an embodiment of the present invention. Figure 3 As shown, the CSM (Center Manager Service) of the storage system responds to configuration operations related to asynchronous replication by obtaining configuration information for the asynchronous replication relationship. This configuration information includes two categories: one is configuration information related to the periodic asynchronous remote replication status, such as the creation, start, stop, and deletion of the asynchronous replication relationship; the other is configuration information related to primary and secondary volume data synchronization, such as changes to the period duration and data synchronization rate. Specifically, the period duration change refers to the data synchronization cycle, and the data synchronization rate change refers to the rate at which data synchronization is performed. It should be noted that both types of information are notified to the agents of all nodes by the CSM through the UTAR (Universal Transmission and Replication) mechanism.

[0085] After obtaining the configuration information for the asynchronous replication relationship, the CSM end configures the asynchronous replication relationship for multiple nodes in the storage system based on the configuration information. In other words, it configures the asynchronous replication relationship for the agent end (ALL NODE AGENT) of all nodes in the storage system based on the configuration information.

[0086] It should be noted that the CSM (Client Management System) notifies the agent ends of all nodes of the asynchronous replication configuration information through the UTAR (University Agent Receive) mechanism. The node agents then adjust the control of periodic asynchronous remote replication based on the changes in the configuration information. UTAR refers to the data received by the agent end from the CSM.

[0087] This includes the CSM (Center Management System) configuration information in the storage system. Asynchronous replication refers to periodic asynchronous remote replication.

[0088] Step S203: Based on the configuration information, determine the configuration status of multiple nodes and the data synchronization cycle for asynchronous data replication among multiple nodes.

[0089] Specifically, after configuring asynchronous replication relationships for multiple nodes based on configuration information, the configuration status of multiple nodes and the data synchronization cycle for asynchronous data replication of multiple nodes are determined according to the configuration information.

[0090] It should be noted that the configuration status of multiple nodes can be creation completed, start, stop, or deletion.

[0091] Step S204: If the configuration status is in the start state, start the timer on the service bearer node, and determine whether the data synchronization time of the data synchronization cycle has been reached based on the timer.

[0092] It's important to note that the configuration status in the configuration information represents the creation, startup, stop, and deletion of asynchronous replication relationships across all nodes. First, asynchronous replication relationships must be created on all nodes. After this is complete, the configuration status of all nodes will be in the "creation complete" state, i.e., the "STOP" state. The timer will only be triggered and asynchronous data replication to the primary volume will begin after the user issues configuration information indicating the status is "started."

[0093] After the user sends configuration information with the configuration status set to "Started", the CSM terminal notifies all nodes via the UTAR mechanism that the configuration status has changed from "Created" to "Started". The "Started" status is equivalent to the "READY" status.

[0094] With all nodes configured to be in the "started" state, a timer is started on the service-bearing node to determine whether the data synchronization period has been reached.

[0095] Step S205: When the data synchronization time of the data synchronization cycle is reached, data synchronization information is published to multiple nodes through the service bearer node so that multiple nodes can perform asynchronous data replication based on the data synchronization information.

[0096] in, Figure 4 This is a schematic diagram illustrating asynchronous data replication between multiple nodes according to an embodiment of the present invention. Figure 4 As shown, when the data synchronization time of the current data synchronization period is determined based on the timer, the timer on the service bearer node triggers data synchronization. The service bearer node publishes data synchronization information to multiple nodes, that is, it sends message notifications to multiple nodes. The configuration status of all nodes changes from the start state to the replication state. Multiple nodes perform asynchronous data replication based on the data synchronization information, that is, they perform asynchronous data synchronization for this period.

[0097] Understandably, after multiple nodes complete asynchronous data replication within each data synchronization cycle, the configuration status of these nodes changes from replication to startup, and they continue executing the steps based on a timer to determine whether the current data synchronization cycle has reached its designated time. In other words, after the agent on each node completes data synchronization for the current cycle, it continues to wait for the startup notification for the next cycle.

[0098] The asynchronous data replication method provided in this embodiment selects a service-bearing node from multiple nodes in the storage system and creates a timer on the service-bearing node. With multiple nodes configured to be in an "on" state, the timer on the service-bearing node is started. Based on the timer, it determines whether the data synchronization period has arrived. If the data synchronization period has arrived, the service-bearing node publishes data synchronization information to multiple nodes, enabling them to perform asynchronous data replication based on this information. By selecting a service-bearing node and starting a high-precision timer on the designated node, second-level asynchronous data replication can be achieved, improving the periodic accuracy of asynchronous data replication, significantly reducing data differences between the primary and secondary volumes, lowering the recovery point target, and improving data recovery capabilities.

[0099] This embodiment provides an asynchronous data replication method that can be used in a primary storage system. Figure 5 This is a flowchart of an asynchronous data replication method according to an embodiment of the present invention, such as... Figure 5 As shown, the process includes the following steps:

[0100] Step S501: Select the service bearer node from multiple nodes in the storage system and create a timer on the service bearer node.

[0101] Specifically, step S501 includes:

[0102] Step S5011: Obtain the node with the largest index sequence number among multiple nodes in the storage system.

[0103] in, Figure 6 This is a flowchart illustrating the selection of service-bearing nodes according to an embodiment of the present invention. Figure 6 As shown, the node with the largest index number is selected from multiple nodes in the storage system.

[0104] It should be noted that each node in the storage system corresponds to an index number. For example, in this embodiment, the storage system includes 4 nodes, with index numbers 1, 2, 3, and 4 respectively. The node with the largest index number is the node with index number 4, i.e., max{1,2,3,4} = 4.

[0105] Step S5012: Determine whether the node with the largest index number is a configuration node.

[0106] After obtaining the node with the largest index number, it is determined whether the node with the largest index number is a configuration node. For example, it is determined whether the node with the index number 4 is a configuration node.

[0107] Configuration nodes are nodes that execute various configuration commands issued by the server, and may include nodes that execute asynchronous replication commands issued by the server.

[0108] It should be noted that the configuration node is not selected as the business node mainly because the configuration node is responsible for processing command lines and is generally quite busy. If it is also used as the business node, it will increase the pressure on the node, cause uneven node load, and prevent the system from achieving its best performance.

[0109] Step S5013: If the node with the largest index sequence number is not a configuration node, then the node with the largest index sequence number shall be used as the service carrying node.

[0110] If the node with the largest index number is not a configuration node, then the node with the largest index number will be directly used as the service carrying node.

[0111] Step S5014: If the node with the largest index number is a configuration node, exclude the node with the largest index number, filter out the node with the largest index number from the remaining nodes, and return to the step of determining whether the node with the largest index number is a configuration node.

[0112] Among them, such as Figure 6As shown, if the node with the largest index number is a configuration node, the node with the largest index number is excluded. The node with the largest index number is then selected from the remaining nodes. The process of determining whether the node with the largest index number is a configuration node and subsequent steps is then repeated until the service-bearing node is selected.

[0113] For example, if the node with index number 4 is a configuration node, exclude that node, filter out the node with the largest index number from the nodes corresponding to index numbers 1, 2, and 3, that is, the node with index number 3 max{1,2,3}=3, and return the step of determining whether the node with index number 3 is a configuration node and the steps after that step.

[0114] Step S502: In response to the configuration operation of the asynchronous replication relationship, obtain the configuration information of the asynchronous replication relationship, and configure the asynchronous replication relationship for multiple nodes based on the configuration information. For details, please refer to [link to details]. Figure 2 Step S202 of the illustrated embodiment will not be described again here.

[0115] Step S503: Based on the configuration information, determine the configuration status of multiple nodes and the data synchronization period for asynchronous data replication among the multiple nodes. For details, please refer to [link to relevant documentation]. Figure 2 Step S203 of the illustrated embodiment will not be described again here.

[0116] Step S504: If the configuration status is "Started," start the timer on the service bearer node and determine whether the data synchronization period has arrived based on the timer. For details, please refer to [link to relevant documentation]. Figure 2 Step S204 of the illustrated embodiment will not be described again here.

[0117] Step S505: When the data synchronization time of the data synchronization cycle arrives, the service bearer node publishes data synchronization information to multiple nodes, enabling the multiple nodes to asynchronously replicate data based on the data synchronization information. For details, please refer to [link to relevant documentation]. Figure 2 Step S205 of the illustrated embodiment will not be described again here.

[0118] The asynchronous data replication method provided in this embodiment achieves node load balancing and maximizes system performance by selecting the node with the largest index number (not a configured node) as the service-bearing node. This ensures system stability.

[0119] In some alternative implementations, the asynchronous data replication method further includes:

[0120] Step a1: If the node with the largest index sequence number is the configuration node and there are no remaining nodes, determine the node with the largest index sequence number as the service carrying node.

[0121] In this process, after obtaining the node with the largest index sequence number, if the node with the largest index sequence number is a configuration node and there are no remaining nodes, it means that there are no nodes in the storage system that are not configuration nodes. Therefore, the node with the largest index sequence number is determined to be the business carrying node.

[0122] It should be noted that if the node with the largest index number is the configuration node and there is only one remaining node, then the remaining node is determined to be the business-bearing node.

[0123] The CSM client notifies the agent on the service bearer node to prepare for the start of periodic asynchronous remote replication by calling a gate message.

[0124] The asynchronous data replication method provided in this embodiment enhances the system's self-adjustment capability under special configurations and ensures system stability by using the node with the largest last determined index sequence number as the service carrying node when all nodes are configuration nodes.

[0125] By using the node with the largest index number as the configuration node and having only one remaining node, the remaining node will be used as the business-carrying node regardless of whether it is a configuration node or not. This enhances the system's self-adjustment capability under special configurations and ensures the system's stability.

[0126] In some alternative implementations, the asynchronous data replication method further includes:

[0127] Step b1 involves online monitoring of multiple nodes in the storage system.

[0128] During the operation of the storage system, failures may occur, such as a node going offline due to hardware failure. The offline node may be a service-bearing node, requiring a new service-bearing node to be elected.

[0129] Therefore, it is necessary to monitor multiple nodes in the storage system online to obtain their online status, and then determine whether it is necessary to re-select the service-bearing nodes based on their online status.

[0130] Step b2: If at least one node in the storage system is offline, determine to stop asynchronous data replication across multiple nodes.

[0131] in, Figure 7 This is a schematic diagram illustrating online monitoring of multiple nodes in a storage system according to an embodiment of the present invention. Figure 7As shown, after the CSM (Customer Service Provider) selects and elects the service bearer nodes, it notifies the agent of the service bearer nodes via a call gate message to prepare for initiating periodic asynchronous remote replication. This means that the configuration status of multiple nodes is set to "started." At this time, a timer is started on the service bearer node. Based on the timer, it determines whether the data synchronization time of the data synchronization cycle has been reached. If the data synchronization time of the data synchronization cycle has been reached, the service bearer node publishes data synchronization information to multiple nodes, enabling multiple nodes to perform asynchronous data replication based on this information. For example, as... Figure 7 As shown, the service-carrying node is the node with index number 4, namely NODE4.

[0132] In the case of asynchronous data replication across multiple nodes based on data synchronization information, if at least one node in the storage system is offline, then the asynchronous data replication across multiple nodes will be stopped.

[0133] For example, such as Figure 7 As shown, when the CSM detects that node NODE3 (index number 3) is offline, it notifies all nodes except the offline node to stop asynchronous data replication via a callgate message. Understandably, the timer on the service-bearing node also stops counting.

[0134] Step b3: Select new service bearer nodes from multiple nodes in the storage system and return to the step of creating a timer on the service bearer node.

[0135] After multiple nodes stop asynchronous data replication, a new business bearer node is re-elected, that is, a new business bearer node is selected from multiple nodes in the storage system, and the process returns to the step of creating a timer on the business bearer node and subsequent steps.

[0136] Understandably, the method for selecting new business-carrying nodes is the same as described above, and will not be repeated here.

[0137] After selecting a new service bearer node, the CSM terminal notifies the agent of the new service bearer node via a call gate message to prepare to start the periodic asynchronous remote replication.

[0138] It should be noted that the new service-carrying nodes are selected from multiple nodes in the storage system, including:

[0139] When an offline node returns to online status, a new service-carrying node is selected from multiple nodes in the storage system.

[0140] In cases where offline nodes can be restored to online status after fault repair, new business-carrying nodes are selected from multiple nodes in the storage system.

[0141] Understandably, when at least one node in a storage system is offline, an offline alarm message is sent so that users can determine that a node is offline based on the offline alarm message, check for possible faults, and repair the faults.

[0142] Offline nodes are nodes that are offline in the storage system.

[0143] The asynchronous data replication method provided in this embodiment sends an offline alarm message when at least one node is offline, enabling users to promptly detect offline nodes, check for potential faults, and repair them, thereby improving the stability and reliability of the system.

[0144] The asynchronous data replication method provided in this embodiment can promptly detect abnormal node states (such as offline status) by monitoring nodes in the storage system online. This triggers a response mechanism, namely, stopping asynchronous data replication across multiple nodes, selecting a new service-bearing node from among the nodes in the storage system, and returning to the step of creating a timer on the service-bearing node. This prevents service interruptions caused by single points of failure and improves the overall stability and reliability of the system.

[0145] In some alternative implementations, the asynchronous data replication method further includes:

[0146] Step c1: If the configuration status is stopped, determine to stop asynchronous data replication across multiple nodes.

[0147] In this process, the CSM sends configuration information to multiple nodes through the UTAR mechanism. If the configuration status determined based on the configuration information is a stopped state, then the asynchronous data replication of multiple nodes is stopped.

[0148] Step c2: If the configuration status is "delete", delete the asynchronous replication relationship of multiple nodes.

[0149] In this process, the CSM sends configuration information to multiple nodes through the UTAR mechanism. If the configuration status determined based on the configuration information is a deletion status, then the asynchronous replication relationship between multiple nodes is deleted.

[0150] The asynchronous data replication method provided in this embodiment achieves fine-grained control over asynchronous data replication by taking corresponding processing measures according to different configuration states, thereby ensuring the security of data management and the effective utilization of storage resources.

[0151] In some alternative implementations, the asynchronous data replication method further includes:

[0152] Step d1: For any of the multiple nodes, if the data synchronization time of the data synchronization cycle has not been reached and the host writes data to the primary volume corresponding to the node, the first graph is used to record the data difference between the primary volume and the secondary volume corresponding to the primary volume.

[0153] To eliminate the performance overhead of starting and stopping change volume snapshots on the storage system, this embodiment removes change volumes and change volume snapshots, and periodic asynchronous remote replication consists only of the primary volume and the secondary volume. The primary volume records two bitmaps, one for each volume. Figure 1 and position Figure 2 This refers to the first bitmap and the second bitmap. User-issued host read / write (I / O) data is sent to the agent on different nodes for data read / write operations according to the logical block address (LBA) of the storage system. The logical block address is a common mechanism for describing the block where data is located on a computer storage device.

[0154] Figure 8 This is a schematic diagram illustrating asynchronous data replication according to an embodiment of the present invention. Figure 8 As shown, for any node among multiple nodes in the main system, during data synchronization before the data synchronization cycle is reached, and when the host writes data to the primary volume corresponding to the node (i.e., the host performs host I / O), the first bit diagram is used to record the data difference between the primary volume and the secondary volume corresponding to the primary volume. Figure 1 Record the differences between the main and supplementary volumes.

[0155] Step d2: When the data synchronization time of the data synchronization cycle is reached, for any bit in the first bit diagram, determine the difference status of the data block on the main volume corresponding to that bit based on the value of that bit.

[0156] Specifically, when the data synchronization time of the data synchronization cycle is reached, i.e., when periodic synchronization is initiated, the data is synchronized according to the bit sequence. Figure 1 The differences between the primary and secondary ends are synchronized to the secondary volume block by block, which means that IO is written to the secondary volume.

[0157] Among them, according to position Figure 1 The differences are synchronized from the primary and secondary volumes block by block. For any bit in the first bit diagram, the difference status of the data block on the primary volume corresponding to that bit is determined based on the value of that bit.

[0158] Step d3: If the difference status of the data block on the corresponding primary volume is changed, read the difference data from the data block in the primary volume and synchronize the difference data to the corresponding secondary volume.

[0159] If the difference status of the data block on the corresponding primary volume is "changed", it means that there is a difference between the data in the data block on the corresponding primary volume and the data on the secondary volume. In this case, it is necessary to read the difference data of the data block from the primary volume and synchronize the difference data to the secondary volume corresponding to the primary volume.

[0160] Step d4: Clear the value corresponding to that bit in the first image.

[0161] Specifically, after synchronizing the difference data to the corresponding auxiliary volume of the main volume, the value corresponding to the first bit in the first graph is cleared, that is, the value corresponding to the first bit is modified to a value that indicates that the difference status of the data block on the main volume corresponding to the first bit is no difference.

[0162] Understandably, the periodic asynchronous remote replication of the primary and secondary volumes will be based on bit... Figure 1 The recorded data differences are incrementally synchronized, and the bits are cleared after synchronization is complete. Figure 1 The corresponding bit position.

[0163] Step d5: For any data synchronization cycle, if the data synchronization time of the current data synchronization cycle has arrived but the data synchronization time of the next data synchronization cycle has not arrived, and the host writes data to the primary volume corresponding to the node, the second bitmap is used to record the data differences between the primary volume and the secondary volume corresponding to the primary volume. When the data synchronization time of the next data synchronization cycle arrives, for any bit in the second bitmap, the difference status of the data block on the primary volume corresponding to that bit is determined based on the value of that bit. If the difference status of the data block on the primary volume corresponding to that bit is changed, the difference data in the data block is read from the primary volume, and the difference data is synchronized to the secondary volume corresponding to the primary volume. The value corresponding to that bit in the second bitmap is then cleared.

[0164] For any data synchronization period, such as Figure 8 As shown, when the data synchronization time of the current data synchronization cycle has arrived but the data synchronization time of the next data synchronization cycle has not arrived, and the host writes data to the primary volume corresponding to the node, the second bitmap is used to record the data differences between the primary volume and the secondary volume corresponding to the primary volume.

[0165] In other words, during data synchronization in any data synchronization cycle, bits are no longer used. Figure 1 Record the data differences caused by host I / O, by bit Figure 2 Record data discrepancies caused by host I / O. During data synchronization, if there is host I / O write, it is recorded via bits. Figure 1 Determine if there are any differences between the main document and the supplementary document; if there are no differences, proceed directly to the correct document. Figure 2 New differences are recorded and written to the main volume; if there are differences, the corresponding data in the main volume is first read out and synchronized to the secondary volume, and the bits are cleared after synchronization is complete. Figure 1 The corresponding bit, then in the bit Figure 2 Record new differences and write host I / O to the main volume until bit-based. Figure 1 Complete the incremental data synchronization between the primary and secondary volumes.

[0166] Understandably, when the data synchronization time of the next data synchronization cycle arrives, since the previous data synchronization cycle used the second bitmap to record the differences between the primary and secondary volumes, in the current data synchronization cycle, for any bit in the second bitmap, based on the value corresponding to that bit, the difference status of the data block on the primary volume corresponding to that bit is determined. If the difference status of the data block on the primary volume corresponding to that bit is changed, the difference data in the data block is read from the primary volume, and the difference data is synchronized to the secondary volume corresponding to the primary volume, and the value corresponding to that bit in the second bitmap is cleared.

[0167] The asynchronous data replication method provided in this embodiment eliminates the system consumption caused by starting and stopping the snapshot of the changed volume by removing the changed volume and using the first bit map and the second bit map to record the data differences between the primary volume and the secondary volume. This further ensures that the data synchronization of the primary and secondary volumes in the asynchronous data replication can be completed within 1 second, thereby realizing high-precision periodic asynchronous remote replication with a cycle duration of 1 second, reducing the RPO of periodic asynchronous remote replication, and improving the reliability of the disaster recovery function of the storage device.

[0168] In some alternative implementations, the asynchronous data replication method further includes:

[0169] Step e1: For any data synchronization period, the first bitmap in the previous data synchronization period is used as the second bitmap of the current data synchronization period, and the second bitmap in the previous data synchronization period is used as the first bitmap of the current data synchronization period.

[0170] Specifically, for any given data synchronization period, within that period, the first bitmap of the preceding data synchronization period is used as the second bitmap of that period, and the second bitmap of the preceding data synchronization period is used as the first bitmap of that period. In other words, at the beginning of each data synchronization period, the bitmap... Figure 1 and position Figure 2 The roles will be swapped once.

[0171] It should be noted that the first image in the previous data synchronization cycle, which is the first image in the second image of this data synchronization cycle, is the first image after the synchronization of the difference data is completed and the values ​​of the corresponding bits of the difference data are cleared.

[0172] Among them, the bits corresponding to the difference data are the bits indicating that the difference status of the data block on the corresponding main volume has been changed.

[0173] In the previous data synchronization cycle, upon reaching the data synchronization time of the current cycle, for any bit in the first bit diagram, the difference status of the data block on the corresponding primary volume is determined based on the value corresponding to that bit. If the difference status of the data block on the primary volume corresponding to that bit is changed, the difference data in the data block is read from the primary volume and synchronized to the corresponding secondary volume. The value corresponding to that bit in the first bit diagram is then cleared.

[0174] During the data synchronization cycle, when the data synchronization time of the data synchronization cycle is reached, for any bit in the second bitmap, the difference status of the data block on the corresponding primary volume is determined based on the value corresponding to that bit. If the difference status of the data block on the corresponding primary volume is changed, the difference data in the data block is read from the primary volume, and the difference data is synchronized to the secondary volume corresponding to the primary volume. The value corresponding to that bit in the second bitmap is cleared.

[0175] The previous data synchronization cycle uses the first bitmap to record the primary and secondary volume differences during data synchronization, while the current data synchronization cycle uses the second bitmap to record these differences. The previous data synchronization cycle uses the second bitmap to record the primary and secondary volume differences from the completion of data synchronization to the next data synchronization cycle, while the current data synchronization cycle uses the first bitmap to record these differences. In other words, in this embodiment, for any given data synchronization cycle, within that cycle, the first bitmap from the previous data synchronization cycle is used as the second bitmap for that data synchronization cycle, and the second bitmap from the previous data synchronization cycle is used as the first bitmap for that data synchronization cycle.

[0176] The asynchronous data replication method provided in this embodiment solves the performance loss problem of the changed volume through the rotation mechanism of the first bit map and the second bit map, further ensuring that the synchronization of primary and secondary volumes in asynchronous data replication can be completed within 1 second, reducing the RPO of periodic asynchronous remote replication, and improving the reliability of the disaster recovery function of the storage device.

[0177] In conclusion, Figure 9 This is a schematic diagram illustrating the principle of asynchronous remote replication with a second-level cycle according to an embodiment of the present invention. Figure 9 As shown, this embodiment of the invention addresses the issues of poor timer accuracy on the CSM side and excessive consumption of operating system resources caused by two changes to volume snapshot start and stop. This embodiment of the invention achieves the transformation from minute-level periodic asynchronous remote replication to second-level periodic asynchronous remote replication through four parts.

[0178] Among them, such as Figure 9 As shown, the four parts are: 1. Election of service bearer nodes; 2. Transmission of configuration information; 3. Timer change; 4. Change of data synchronization method.

[0179] The election of the service bearer node corresponds to the relevant description in step S501 above, and will not be repeated here. The transmission of configuration information corresponds to the relevant description in step S502 above, and will not be repeated here. The timer change is that the timer on the CSM end is changed to a high-precision timer on the service bearer node, which can achieve periodic asynchronous remote replication with second-level precision. The data synchronization method is changed to remove the change volume and change volume snapshot, consisting only of the primary volume and the secondary volume, and the data differences between the primary and secondary volumes are recorded by the first bit map and the second bit map.

[0180] By electing service-bearing nodes and starting high-precision timers on designated nodes, the periodic accuracy of asynchronous remote replication is improved. Simultaneously, changed volumes are removed, further eliminating the system overhead caused by starting and stopping changed volume snapshots. This allows asynchronous replication to achieve high-precision operation with one cycle per second. This significantly reduces data discrepancies between primary and secondary volumes in asynchronous remote replication, lowering the RPO (Recovery Point Objective) of asynchronous remote replication to less than one second.

[0181] This embodiment also provides an asynchronous data replication apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0182] This embodiment provides an asynchronous data replication device, such as... Figure 10 As shown, it includes:

[0183] The filtering module 1001 is used to filter out the business-bearing nodes from multiple nodes in the storage system and create timers on the business-bearing nodes.

[0184] The acquisition module 1002 is used to respond to the configuration operation of the asynchronous replication relationship, acquire the configuration information of the asynchronous replication relationship, and configure the asynchronous replication relationship for multiple nodes based on the configuration information.

[0185] The determination module 1003 is used to determine the configuration status of multiple nodes and the data synchronization period for asynchronous data replication among multiple nodes based on configuration information.

[0186] The startup module 1004 is used to start a timer on the service bearer node when the configuration state is in the startup state, and to determine whether the data synchronization time of the data synchronization cycle has been reached based on the timer.

[0187] The publishing module 1005 is used to publish data synchronization information to multiple nodes through the service bearer node when the data synchronization time of the data synchronization cycle is reached, so that multiple nodes can perform asynchronous data replication based on the data synchronization information.

[0188] In some alternative implementations, the filtering module 1001 includes:

[0189] The first acquisition unit is used to acquire the node with the largest index number among multiple nodes in the storage system.

[0190] The first judgment unit is used to determine whether the node with the largest index number is a configuration node.

[0191] The first determining unit is used to determine the node with the largest index number as the service carrying node when the node with the largest index number is not a configuration node.

[0192] The first return execution unit is used to exclude the node with the largest index number when the node with the largest index number is a configuration node, filter out the node with the largest index number from the remaining nodes, and return to execute the step of determining whether the node with the largest index number is a configuration node.

[0193] In some alternative implementations, the asynchronous data replication apparatus further includes:

[0194] The second determining unit is used to determine the node with the largest index sequence number as the service carrying node when the node with the largest index sequence number is the configuration node and there are no remaining nodes.

[0195] In some alternative implementations, the asynchronous data replication apparatus further includes:

[0196] The monitoring unit is used for online monitoring of multiple nodes in the storage system.

[0197] The third determining unit is used to determine to stop asynchronous data replication across multiple nodes when at least one node in the storage system is offline.

[0198] The second return execution unit is used to select a new service bearer node from multiple nodes in the storage system and return to execute the step of creating a timer on the service bearer node.

[0199] In some alternative implementations, the asynchronous data replication apparatus further includes:

[0200] The fourth determining unit is used to determine to stop asynchronous data replication of multiple nodes when the configuration state is stopped.

[0201] The fifth determining unit is used to delete the asynchronous replication relationship of multiple nodes when the configuration status is deleted.

[0202] In some alternative implementations, the asynchronous data replication apparatus further includes:

[0203] The first recording unit is used to record the data differences between the primary volume and the secondary volume corresponding to the primary volume for any of the multiple nodes, when the data synchronization time of the data synchronization cycle has not been reached and the host writes data to the primary volume corresponding to the node.

[0204] The sixth determining unit is used to determine the difference status of the data block on the main volume corresponding to any bit in the first bit diagram, based on the value corresponding to that bit, when the data synchronization time of the data synchronization cycle is reached.

[0205] The data synchronization unit is used to read the difference data in the data block on the corresponding primary volume when the difference status of the data block on the primary volume is changed, and synchronize the difference data to the secondary volume corresponding to the primary volume.

[0206] The clearing unit is used to clear the value corresponding to the bit in the first bit diagram.

[0207] The second recording unit is used to record the data differences between the primary volume and the secondary volume corresponding to the primary volume using a second bitmap when the data synchronization time of the current data synchronization period has arrived but the data synchronization time of the next data synchronization period has not arrived, and the host writes data to the primary volume corresponding to the node. When the data synchronization time of the next data synchronization period arrives, for any bit in the second bitmap, the difference status of the data block on the primary volume corresponding to that bit is determined based on the value of that bit. If the difference status of the data block on the primary volume corresponding to that bit is changed, the difference data in the data block is read from the primary volume, and the difference data is synchronized to the secondary volume corresponding to the primary volume. The value corresponding to that bit in the second bitmap is then cleared.

[0208] In some alternative implementations, the asynchronous data replication apparatus further includes:

[0209] The seventh determining unit is used to, for any data synchronization period, take the first bit map in the previous data synchronization period as the second bit map of the data synchronization period, and take the second bit map in the previous data synchronization period as the first bit map of the data synchronization period.

[0210] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0211] In this embodiment, the asynchronous data replication device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0212] This invention also provides a computer device having the above-described features. Figure 10 The data asynchronous replication device shown.

[0213] Please see Figure 11 , Figure 11 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 11 As shown, the computer device includes one or more processors 1101, memory 1102, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 11 Take a processor 1101 as an example.

[0214] Processor 1101 may be a central processing unit, a network processor, or a combination thereof. Processor 1101 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0215] The memory 1102 stores instructions executable by at least one processor 1101 to cause at least one processor 1101 to perform the method shown in the above embodiments.

[0216] The memory 1102 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 1102 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 1102 may optionally include memory remotely located relative to the processor 1101, and these remote memories can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0217] The memory 1102 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 1102 may also include a combination of the above types of memory.

[0218] The computer device also includes a communication interface 1103 for communicating with other devices or communication networks.

[0219] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0220] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0221] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for asynchronous data replication, characterized in that, The method includes: Select the service-bearing node from multiple nodes in the storage system, and create a timer on the service-bearing node; In response to the configuration operation of the asynchronous replication relationship, the configuration information of the asynchronous replication relationship is obtained, and the asynchronous replication relationship is configured for multiple nodes based on the configuration information; Based on the configuration information, the configuration status of multiple nodes and the data synchronization cycle for asynchronous data replication among multiple nodes are determined. When the configuration state is in the start state, a timer is started on the service bearer node, and the data synchronization time of the data synchronization period is determined based on the timer. When the data synchronization time of the data synchronization period is reached, the service bearer node publishes data synchronization information to multiple nodes so that the multiple nodes can perform asynchronous data replication based on the data synchronization information. The method further includes: For any of the multiple nodes, if the data synchronization time of the data synchronization cycle has not been reached and the host writes data to the primary volume corresponding to the node, the first-order graph is used to record the data difference between the primary volume and the secondary volume corresponding to the primary volume. For any data synchronization period, if the data synchronization time of the data synchronization period is reached but the data synchronization time of the next data synchronization period has not been reached, and the host writes data to the primary volume corresponding to the node, the second bitmap is used to record the data difference between the primary volume and the secondary volume corresponding to the primary volume. For any given data synchronization period, the first bitmap in the preceding data synchronization period is used as the second bitmap in the current data synchronization period, and the second bitmap in the preceding data synchronization period is used as the first bitmap in the current data synchronization period.

2. The method according to claim 1, characterized in that, The process of selecting service-bearing nodes from multiple nodes in the storage system includes: Obtain the node with the largest index sequence number among multiple nodes in the storage system; Determine whether the node with the largest index number is a configuration node; If the node with the largest index number is not a configuration node, the node with the largest index number will be used as the service carrying node. If the node with the largest index number is a configuration node, exclude the node with the largest index number, filter out the node with the largest index number from the remaining nodes, and return to the step of determining whether the node with the largest index number is a configuration node.

3. The method according to claim 2, characterized in that, The method further includes: If the node with the largest index number is the configuration node and there are no remaining nodes, then the node with the largest index number is determined to be the service carrying node.

4. The method according to claim 1, characterized in that, The method further includes: Perform online monitoring of multiple nodes in the storage system; If at least one node in the storage system is offline, it is determined to stop asynchronous data replication across the multiple nodes. Select a new service bearer node from multiple nodes in the storage system and return to the step of creating a timer on the service bearer node.

5. The method according to claim 1, characterized in that, The method further includes: If the configuration status is stopped, determine to stop asynchronous data replication across multiple nodes; When the configuration status is "delete", delete the asynchronous replication relationship of multiple nodes.

6. The method according to claim 1, characterized in that, The method further includes: When the data synchronization time of the data synchronization cycle is reached, for any bit in the first bitmap, the difference status of the data block on the main volume corresponding to that bit is determined based on the value corresponding to that bit. If the difference status of the data block on the corresponding primary volume is changed, read the difference data in the data block from the primary volume and synchronize the difference data to the secondary volume corresponding to the primary volume; Clear the value corresponding to that bit in the first bitmap; When the data synchronization time of the next data synchronization cycle arrives, for any bit in the second bitmap, based on the value corresponding to the bit, the difference status of the data block on the primary volume corresponding to the bit is determined. If the difference status of the data block on the primary volume corresponding to the bit has been changed, the difference data in the data block is read from the primary volume, and the difference data is synchronized to the secondary volume corresponding to the primary volume. The value corresponding to the bit in the second bitmap is cleared.

7. An asynchronous data replication device, characterized in that, The device includes: The filtering module is used to filter out the service-bearing nodes from multiple nodes in the storage system and create timers on the service-bearing nodes; The acquisition module is used to acquire configuration information of asynchronous replication relationship in response to configuration operation of asynchronous replication relationship, and to configure asynchronous replication relationship for multiple nodes based on the configuration information; The determination module is used to determine the configuration status of multiple nodes and the data synchronization period for asynchronous data replication of multiple nodes based on the configuration information. The startup module is used to start a timer on the service bearer node when the configuration state is in the startup state, and to determine whether the data synchronization time of the data synchronization period has been reached based on the timer. The publishing module is used to publish data synchronization information to multiple nodes through the service bearer node when the data synchronization time of the data synchronization period is reached, so that the multiple nodes can perform asynchronous data replication based on the data synchronization information. The asynchronous data replication apparatus also includes: The first recording unit is used to record the data differences between the main volume and the corresponding auxiliary volume of the main volume for any of the multiple nodes when the data synchronization time of the data synchronization cycle has not been reached and the host writes data to the main volume corresponding to the node. The second recording unit is used to record the data differences between the main volume and the auxiliary volume corresponding to the main volume using a second bitmap when the data synchronization time of the data synchronization period has arrived but the data synchronization time of the next data synchronization period has not arrived, and the host writes data to the main volume corresponding to the node for any data synchronization period. The seventh determining unit is used to, for any data synchronization period, take the first bit map in the previous data synchronization period as the second bit map of the data synchronization period, and take the second bit map in the previous data synchronization period as the first bit map of the data synchronization period.

8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the asynchronous data copying method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the asynchronous data copying method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Periodic asynchronous replication method and device and storage medium

    CN116414623A

  • User snapshot synchronization method and device based on periodic asynchronous remote replication relationship

    CN118170716A