Asynchronous remote replication method, device and medium
By creating consistency groups in distributed block storage scenarios and determining the synchronization method of pairs, the problem of the inability to achieve consistency processing of asynchronous remote replication in the prior art is solved, and the consistency processing and batch operation management requirements of asynchronous remote data backup are realized.
Patent Information
- Application Number
- CN202210612215.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-05-31
AI Technical Summary
The existing remote replication technology cannot realize the consistent processing of asynchronous remote replication in distributed block storage scenarios, and cannot meet the customer's batch operation and management needs.
By creating a consistency group, add multiple pairs to the consistency group, and determine whether each pair has been fully synchronized, and synchronize the master volume information to the slave volume by incremental synchronization or full synchronization. At the same time, the synchronization method of all pairs is judged and determined to realize the consistency processing of asynchronous remote data backup.
It realizes consistent processing of asynchronous remote replication, meets customers' batch operation and management needs, and improves the efficiency and consistency of data backup and recovery.
Smart Images

Figure CN114996284B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of remote replication, and in particular to an asynchronous remote replication method, device and medium. Background Art
[0002] With the rapid development of the Internet, the amount of data and information has increased explosively, and the requirements for data storage are getting higher and higher. At the same time, major banks, securities companies, insurance institutions, communication operators, government systems at all levels, etc., these users have a relatively high pursuit of data security, so backup and disaster recovery technologies are indispensable for these users. Asynchronous remote replication, as a safe and efficient asynchronous disaster recovery technology, is widely used in customer groups such as banks, securities companies, and communication operators. And in these customer groups, there are often such requirements: multiple back-end storage devices are used to provide services for a group of usage scenarios at the same time, and these back-end devices are preferably managed in a unified manner, such as unified backup and unified data recovery.
[0003] The current remote replication technology can only realize individual replication in distributed block storage scenarios, and cannot meet customers' batch operations and management of asynchronous remote replication.
[0004] It can be seen that how to achieve consistency processing of asynchronous remote replication in distributed storage is an urgent problem to be solved by those skilled in the art. Summary of the invention
[0005] The purpose of the present application is to provide an asynchronous remote replication method, device and medium for implementing consistency processing of asynchronous remote replication.
[0006] To solve the above technical problems, the present application provides an asynchronous remote replication method, comprising:
[0007] Create a consistency group and add multiple pairs to the consistency group;
[0008] Determine whether the current pair has been fully synchronized;
[0009] If yes, it is determined to synchronize the primary volume information of the current pair to the secondary volume by incremental synchronization;
[0010] If not, determine to use full synchronization to synchronize the primary volume information of the current pair to the secondary volume;
[0011] Determine whether the synchronization mode of all pairs is determined;
[0012] If yes, synchronize the master volume information of each pair to the slave volume according to the synchronization method corresponding to each pair;
[0013] If not, one of the pairs whose synchronization mode has not been determined among all pairs is used as the current pair, and the process proceeds to the step of determining whether the current pair has been fully synchronized.
[0014] Preferably, after adding multiple pairs to the consistency group and before determining whether the current pair has been fully synchronized, the following steps are further included:
[0015] A mapping relationship between a consistency group and each pair is established; there are multiple consistency groups.
[0016] Preferably, after creating a consistency group and before adding multiple pairs to the consistency group, the method further includes:
[0017] Create consistency group objects and pair objects; there are multiple pair objects, and each pair object corresponds to each consistency group one by one;
[0018] Write the basic information of the consistency group into the consistency group object; the basic information of the consistency group includes the names of the master and slave ends of the consistency group, the data and uuid of the master and slave ends.
[0019] Preferably, after creating the pair object and before adding multiple pairs to the consistency group, the method further includes:
[0020] The configuration information of the consistency group entered by the user is written into the pair object corresponding to the consistency group, where the configuration information includes synchronization policy, synchronization period, bandwidth and cluster name.
[0021] Preferably, establishing a mapping relationship between a consistency group and each pair includes:
[0022] Write the basic information of each pair into the pair object corresponding to the consistency group to which each pair belongs; the basic information of the pair includes the local storage pool, the local volume name, the remote storage pool and the remote volume name;
[0023] Write the basic information of the consistency group into the metadata object of each pair belonging to the consistency group.
[0024] Preferably, after synchronizing the master-side volume information of each pair to the slave-side volume according to the synchronization mode corresponding to each pair, the method further includes:
[0025] Perform periodic data synchronization on each pair in the consistency group according to the synchronization cycle.
[0026] Preferably, after creating a consistency group and before adding multiple pairs to the consistency group, the method further includes:
[0027] Create a history object; the history object corresponds to the consistency group;
[0028] Move the basic information of the consistency group to be removed from the consistency group object to the history object, and move the configuration information of the consistency group to be removed from the pair object to the history object.
[0029] In order to solve the above technical problems, the present application also provides an asynchronous remote replication device, comprising:
[0030] Create a module to create a consistency group and add multiple pairs to the consistency group;
[0031] The first judgment module is used to judge whether the current pair has been fully synchronized; if so, the first determination module is triggered; if not, the second determination module is triggered;
[0032] The first determination module is used to determine whether to synchronize the primary-end volume information of the current pair to the secondary-end volume by means of incremental synchronization;
[0033] The second determination module is used to determine whether to synchronize the master-end volume information of the current pair to the slave-end volume by means of full synchronization;
[0034] The second judgment module is used to judge whether the synchronization mode of all pairs is determined; if so, the synchronization module is triggered; if not, the operation module is triggered;
[0035] A synchronization module is used to synchronize the master-side volume information of each pair to the slave-side volume according to the synchronization mode corresponding to each pair;
[0036] As a module, it is used to take one of all pairs whose synchronization mode has not been determined as the current pair, and trigger the first judgment module.
[0037] In order to solve the above technical problems, the present application also provides an asynchronous remote replication device, comprising:
[0038] Memory for storing computer programs;
[0039] The processor is used to implement the steps of the above asynchronous remote replication method when executing a computer program.
[0040] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above asynchronous remote replication method are implemented.
[0041] The present application provides an asynchronous remote replication method, which creates a consistency group, adds multiple pairs to the consistency group; determines whether the current pair has been fully synchronized; if so, determines to synchronize the primary volume information of the current pair to the secondary volume by incremental synchronization; if not, determines to synchronize the primary volume information of the current pair to the secondary volume by full synchronization; determines whether the synchronization method of all pairs is determined; if so, synchronizes the primary volume information of each pair to the secondary volume according to the synchronization method corresponding to each pair; if not, takes one of the pairs whose synchronization method has not been determined as the current pair, and enters the step of determining whether the current pair has been fully synchronized. It can be seen that the present application can realize the functions of creating a consistency group, adding pairs, etc. In addition, the present application first determines the synchronization method of each pair, and then batch-copies data of multiple pairs according to the synchronization method of each pair, so that multiple pairs perform the same processing operation at the same time, thereby realizing the consistency processing of asynchronous remote data backup and meeting the needs of customers for batch operation and management of asynchronous remote replication.
[0042] In addition, the asynchronous remote replication device and medium provided by the present application have the same beneficial effects as the above-mentioned asynchronous remote replication method. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0044] Figure 1 A flowchart of an asynchronous remote replication method provided by this application;
[0045] Figure 2 A structural diagram of an asynchronous remote replication device provided by the present application;
[0046] Figure 3 This is a structural diagram of another asynchronous remote replication device provided by the present application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0048] The core of this application is to provide an asynchronous remote replication method, device and medium for implementing consistent processing of asynchronous remote replication.
[0049] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0050] It should be noted that asynchronous remote replication refers to periodically synchronizing the data on the business side to the disaster recovery side. When the synchronization period is not reached, the business side will read the data, and when the synchronization period is reached, the business side will synchronize the data to the disaster recovery side. Compared with synchronous remote replication, asynchronous remote replication can reduce resource usage to the greatest extent. In addition, the asynchronous remote replication method provided in this application is suitable for distributed block storage scenarios. It is based on the existing remote replication function and can be implemented in the distributed object storage (Reliable Autonomic Distributed Object Store) block device (Rados Block Device, RBD) layer of the distributed storage system.
[0051] Figure 1 A flowchart of an asynchronous remote replication method provided by this application, such as Figure 1 As shown, the method includes:
[0052] S1: Create a consistency group and add multiple pairs to the consistency group.
[0053] In this embodiment, a consistency group refers to a group of volumes that are managed in a unified manner, and a pair includes the primary volume information and the secondary volume information of an asynchronous remote replication. To achieve batch processing of asynchronous remote replication, multiple pairs can be added to a consistency group, so that data synchronization of each pair can be achieved by synchronizing data in the consistency group.
[0054] S2: Determine whether the current pair has been fully synchronized; if so, enter S3; if not, enter S4.
[0055] Full synchronization refers to synchronizing all the information of the pair's master volume to the slave volume at one time, and incremental synchronization refers to synchronizing only the different parts of the pair's master volume and slave volume to the slave volume. It can be understood that if the current pair has been fully synchronized, then in order to improve the efficiency of information synchronization and reduce resource usage, it is only necessary to synchronize the information read by the master volume after the last synchronization to the slave volume, that is, enter step S3, and determine to use incremental synchronization to synchronize the current pair's master volume information to the slave volume; and if the current pair has not been fully synchronized, in order to ensure the synchronization of the pair's master volume and slave volume information, it is necessary to synchronize all the pair's master volume information to the slave volume, that is, enter step S4, and determine to use full synchronization to synchronize the current pair's master volume information to the slave volume.
[0056] S3: Determine to use incremental synchronization to synchronize the primary volume information of the current pair to the secondary volume.
[0057] S4: Determine to use full synchronization to synchronize the primary volume information of the current pair to the secondary volume.
[0058] S5: Determine whether the synchronization mode of all pairs is determined; if so, enter S6; if not, enter S7.
[0059] In the specific implementation, each time after the synchronization mode of a pair is determined, it is necessary to determine whether the synchronization mode of all pairs in the consistency group has been determined. In this embodiment, the master end of the pair is used as the service end. If the synchronization mode of all pairs has been determined, step S6 is entered to synchronize the master end volume information of each pair to the slave end volume according to the synchronization mode corresponding to each pair, thereby realizing the consistency processing of asynchronous remote data backup; if the synchronization mode of all pairs has not been determined, step S7 is entered to take one of the pairs whose synchronization mode has not been determined as the current pair, and step S2 is entered to determine the synchronization mode of the new current pair.
[0060] S6: Synchronize the primary-end volume information of each pair to the secondary-end volume according to the synchronization mode corresponding to each pair.
[0061] S7: One of the pairs whose synchronization mode has not been determined is taken as the current pair, and the process goes to S2.
[0062] This embodiment provides an asynchronous remote replication method, which creates a consistency group, adds multiple pairs to the consistency group; determines whether the current pair has been fully synchronized; if so, determines to synchronize the primary volume information of the current pair to the secondary volume by incremental synchronization; if not, determines to synchronize the primary volume information of the current pair to the secondary volume by full synchronization; determines whether the synchronization method of all pairs is determined; if so, synchronizes the primary volume information of each pair to the secondary volume according to the synchronization method corresponding to each pair; if not, takes one of the pairs whose synchronization method has not been determined as the current pair, and enters the step of determining whether the current pair has been fully synchronized. It can be seen that the present application can realize the functions of creating a consistency group, adding pairs, etc. In addition, the present application first determines the synchronization method of each pair, and then batch-copies data of multiple pairs according to the synchronization method of each pair, so that multiple pairs perform the same processing operation at the same time, thereby realizing the consistency processing of asynchronous remote data backup and meeting the needs of customers for batch operation and management of asynchronous remote replication.
[0063] Based on the above embodiment, since there are usually multiple consistency groups and each consistency group includes multiple pairs, in order to determine the subordinate relationship between each consistency group and each pair, after adding multiple pairs to the consistency group, it is also necessary to establish a mapping relationship between the consistency group and each pair in the group. This step includes:
[0064] A mapping relationship between a consistency group and each pair is established; there are multiple consistency groups.
[0065] In a specific implementation, after adding multiple pairs to a consistency group, a mapping relationship between the consistency group and each pair in the group can be established. Specifically, the mapping relationship between the consistency group and the pair can be established by constructing a key-value pair. For example, the name of the consistency group can be used as the key value, and then a set can be constructed with the names of all pairs in the consistency group, and the set can be used as the value to construct a key-value pair, so that the user can query the names of all pairs contained in the consistency group through the key value; similarly, the name of each pair can be used as the key value, and the name of the consistency group to which each pair belongs can be used as the value to construct a key-value pair, so that the user can query the name of the consistency group to which each pair belongs through the key value.
[0066] Based on the above embodiment, since there are usually multiple consistency groups, in order to facilitate users to obtain information about each consistency group, after creating the first consistency group, it is necessary to create a consistency group object to save the information of the consistency group and the information of the subsequently added consistency groups. This step includes:
[0067] Create consistency group objects and pair objects; there are multiple pair objects, and each pair object corresponds to each consistency group one by one;
[0068] Write the basic information of the consistency group into the consistency group object; the basic information of the consistency group includes the names of the master and slave ends of the consistency group, the data and uuid of the master and slave ends.
[0069] It should be noted that, since the consistency group has a master and a slave, it is necessary to create consistency group objects at both the master and slave ends of the first consistency group created, wherein the consistency group object at the master end is used to save the basic information of the master end of the current consistency group and the subsequently created consistency group, and the consistency group object at the slave end is used to save the basic information of the slave end of the current consistency group and the subsequently created consistency group. The pair object corresponds to the consistency group one by one, that is, each time a consistency group is created, a corresponding pair object needs to be created to store the configuration information of the corresponding consistency group. It can be understood that in a specific implementation, the basic information of the consistency group includes but is not limited to the name of the master and slave ends of the consistency group, the master and slave information and the universally unique identifier (Universally Unique Identifier, UUID), and may also include other information, such as the storage pools at both the master and slave ends. In addition, the basic information of the consistency group can be written into the consistency group object in the form of omap, that is, in the form of key-value pairs, so that the basic information of each consistency group is mapped to each other. For example, the UUID can be set as the key value, and the set of the remaining basic information of the consistency group is used as the value value, so that it is convenient for users to query the basic information of the consistency group through the UUID.
[0070] It is worth noting that if the data on the primary side of a pair is abnormal, the data of all pairs in the consistency group can be imported from the slave side volume to the primary side volume after the abnormality of the primary side cluster is recovered; if the slave side volume in the consistency group is to be used as the business side, the master-slave swap can be used for the consistency group, that is, the slave side of the consistency group is changed to the master side, and the master side volume information and the slave side volume information in the pair objects at both the master and slave sides of the consistency group are updated at the same time; if a pair needs to be removed during use, the pair can be directly removed from the consistency group, and the relevant information in the consistency group object and the pair object can be updated.
[0071] This embodiment creates a consistency group object and a pair object, and then writes basic information of the consistency group into the consistency group object, so that users can query the basic information of each consistency group.
[0072] Based on the above embodiment, in order to facilitate users to query the configuration information of each consistency group, it is necessary to save the configuration information of each consistency group. This step includes:
[0073] The configuration information of the consistency group entered by the user is written into the pair object corresponding to the consistency group, where the configuration information includes synchronization policy, synchronization period, bandwidth and cluster name.
[0074] Since each consistency group has a pair object corresponding to it, the configuration information of each consistency group input by the user can be written into the pair object corresponding to each consistency group. By storing the configuration information of each consistency group separately, it is convenient for users to query the configuration information of each consistency group. It should be noted that in the specific implementation, each pair has its configuration information, and for the pair added to the consistency group, its configuration information depends on the unified configuration of the consistency group to which it is added.
[0075] In the configuration information of the consistency group input by the user, the synchronization strategy can be to set the synchronization cycle so as to perform data synchronization periodically, or to perform data synchronization at a fixed time point. The synchronization cycle can be one hour or two hours. This embodiment does not limit the synchronization strategy and synchronization cycle. It can be understood that in the specific implementation, the configuration information of the consistency group input by the user includes but is not limited to the synchronization strategy, synchronization cycle, bandwidth and cluster name, and can also include information such as whether to perform full synchronization immediately.
[0076] This embodiment writes the configuration information of the consistency group input by the user into the pair object corresponding to each consistency group for user query, and can use the configuration information of the consistency group to uniformly configure each pair in the consistency group to facilitate unified management of each pair in the consistency group.
[0077] Based on the above embodiment, this embodiment provides additional explanations on the steps of establishing a mapping relationship between a consistency group and each pair. The steps include:
[0078] Write the basic information of each pair into the pair object corresponding to the consistency group to which each pair belongs; the basic information of the pair includes the local storage pool, the local volume name, the remote storage pool and the remote volume name;
[0079] Write the basic information of the consistency group into the metadata object of each pair belonging to the consistency group.
[0080] Specifically, since each consistency group has a pair object corresponding to it, the basic information of each pair can be written into the pair object corresponding to the consistency group to which each pair belongs, so that the user can query the pair object to find out which pairs are included in the consistency group corresponding to the pair object. In addition, each pair has its own metadata object, and the basic information of the consistency group to which the pair belongs can be written into the pair's metadata object, so that the user can query the pair's metadata object to which the pair belongs. It should be noted that in a specific implementation, the basic information of each pair can be written into the pair object corresponding to the consistency group to which each pair belongs in the form of omap, and the basic information of the consistency group can be written into the metadata objects of each pair belonging to the consistency group in the form of omap, so that the written data are mapped to each other for the convenience of user query.
[0081] This embodiment writes the basic information of each pair into the pair object corresponding to the consistency group to which each pair belongs, and writes the basic information of the consistency group into the metadata object of each pair belonging to the consistency group, thereby establishing a mapping relationship between each consistency group and each pair, so that the user can obtain the basic information of all pairs contained in the consistency group corresponding to the pair object by querying the pair object, and obtain the basic information of the consistency group to which the pair belongs by querying the metadata object of each pair.
[0082] Based on the above embodiment, since the business end of the consistency group will read data after the consistency group is created, in order to ensure that the data of each pair of slave volume is synchronized with the master volume, it is necessary to use periodic synchronization to update the data of each pair in the consistency group. This step includes: periodically synchronizing the data of each pair in the consistency group according to the synchronization period.
[0083] In this embodiment, after the full synchronization is completed, the data of the pair in the consistency group can be periodically backed up and synchronized according to the synchronization period in the pre-set configuration information. It can be understood that since the full synchronization has been done, the periodic data synchronization method is an incremental synchronization method. In addition, in order to improve the synchronization of the data of the master volume and the slave volume in each pair, the synchronization period should not be too large.
[0084] Based on the above embodiment, since sometimes after removing a consistency group, it may be necessary to restore the consistency group later, a historical storage object may be created to temporarily store the consistency group to be removed, so as to facilitate the restoration of the removed consistency group. This step includes:
[0085] Create a history object; the history object corresponds to the consistency group;
[0086] Move the basic information of the consistency group to be removed from the consistency group object to the history object, and move the configuration information of the consistency group to be removed from the pair object to the history object.
[0087] In the specific implementation, in order to accurately perform data recovery, each time a consistency group is created, a history object needs to be created, that is, one history object corresponds to one consistency group, and the consistency group can be moved to the history object corresponding to the consistency group, so that when restoring the consistency group, the consistency group can be directly queried and restored from the history object corresponding to the consistency group. Specifically, the consistency group can be removed by moving the basic information of the consistency group to be removed from the consistency group object to the history object, and moving the configuration information of the consistency group to be removed from the pair object to the history object.
[0088] In the above embodiments, the asynchronous remote replication method is described in detail, and the present application also provides embodiments corresponding to the asynchronous remote replication device. It should be noted that the present application describes the embodiments of the device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.
[0089] Figure 2 A structural diagram of an asynchronous remote replication device provided by this application, such as Figure 2 As shown, the device comprises:
[0090] A creation module 10 is used to create a consistency group and add multiple pairs to the consistency group;
[0091] The first judgment module 11 is used to judge whether the current pair has been fully synchronized; if so, the first determination module 12 is triggered; if not, the second determination module 13 is triggered;
[0092] A first determination module 12 is used to determine whether to synchronize the primary-end volume information of the current pair to the secondary-end volume by means of incremental synchronization;
[0093] The second determination module 13 is used to determine whether to synchronize the primary-end volume information of the current pair to the secondary-end volume by means of full synchronization;
[0094] The second judgment module 14 is used to judge whether the synchronization mode of all pairs is determined; if so, the synchronization module 15 is triggered; if not, the action module 16 is triggered;
[0095] A synchronization module 15 is used to synchronize the master-side volume information of each pair to the slave-side volume according to the synchronization mode corresponding to each pair;
[0096] As module 16, it is used to take one pair of all pairs whose synchronization mode has not been determined as the current pair, and trigger the first judgment module 11.
[0097] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.
[0098] The asynchronous remote replication device provided in this embodiment uses a creation module to create a consistency group and add multiple pairs to the consistency group; uses a first judgment module to determine whether the current pair has been fully synchronized; if so, triggers the first determination module; if not, triggers the second determination module; uses the first determination module to determine whether the current pair's master-side volume information is synchronized to the slave-side volume by incremental synchronization; uses the second determination module to determine whether the current pair's master-side volume information is synchronized to the slave-side volume by full synchronization; uses the second judgment module to determine whether the synchronization method of all pairs is determined; if so, triggers the synchronization module; if not, triggers the as module; synchronizes the master-side volume information of each pair to the slave-side volume according to the synchronization method corresponding to each pair through the synchronization module; uses the as module to set one of the pairs whose synchronization method has not been determined as the current pair, and triggers the first judgment module. It can be seen that the device can realize the functions of creating a consistency group, adding pairs, etc. In addition, the device first determines the synchronization mode of each pair, and then replicates data of multiple pairs in batches, so that multiple pairs can perform the same processing operations at the same time, thereby achieving consistent processing of asynchronous remote data backup and meeting customer needs for batch operation and management of asynchronous remote replication.
[0099] Figure 3 A structural diagram of another asynchronous remote replication device provided by this application, such as Figure 3 As shown, the device comprises:
[0100] A memory 20, used for storing computer programs;
[0101] The processor 21 is configured to implement the steps of the asynchronous remote replication method mentioned in the above embodiment when executing a computer program.
[0102] The asynchronous remote replication 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.
[0103] Among them, the processor 21 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 21 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 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 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 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0104] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 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 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the asynchronous remote replication method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to the master-end volume information and slave-end volume information of each pair.
[0105] In some embodiments, the asynchronous remote replication device may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .
[0106] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation on the asynchronous remote replication device, and may include more or less components than those shown in the figure.
[0107] The asynchronous remote replication device provided in this embodiment includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the above-mentioned asynchronous remote replication method, and the effect is the same as above.
[0108] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the asynchronous remote replication method as described in the above method embodiment are implemented.
[0109] 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 computer-readable storage medium. Based on this understanding, the technical solution of the present application 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, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present application. 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.
[0110] The computer-readable storage medium provided in this embodiment includes the above-mentioned asynchronous remote replication method, and the effect is the same as above.
[0111] The above is a detailed introduction to the asynchronous remote replication method, device and medium provided by the present application. 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 refer 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 refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
[0112] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used 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 "comprise", "include" 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 statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. An asynchronous remote replication method, characterized in that: include: Create a consistency group and add multiple pairs to the consistency group; wherein a pair includes primary-end volume information and secondary-end volume information of an asynchronous remote replication; Determine whether the current pair has been fully synchronized; If yes, determine to synchronize the master-side volume information of the current pair to the slave-side volume by incremental synchronization; If not, determine to synchronize the master-end volume information of the current pair to the slave-end volume by the full synchronization method; Determining whether the synchronization mode of all the pairs in the consistency group has been determined; If yes, synchronizing the master-end volume information of each pair to the slave-end volume according to the synchronization mode corresponding to each pair; If not, one of the pairs whose synchronization mode has not been determined among all the pairs is used as the current pair, and the process proceeds to the step of determining whether the current pair has been fully synchronized.
2. The asynchronous remote replication method according to claim 1, characterized in that: After adding the multiple pairs to the consistency group and before determining whether the current pair has been fully synchronized, the method further includes: A mapping relationship between the consistency group and each of the pairs is established; wherein there are multiple consistency groups.
3. The asynchronous remote replication method according to claim 2, characterized in that: After creating the consistency group and before adding the plurality of pairs to the consistency group, the method further includes: Create a consistency group object and a pair object; wherein there are multiple pair objects, and each pair object corresponds to each consistency group one by one; The basic information of the consistency group is written into the consistency group object; wherein the basic information of the consistency group includes the name of the master and slave ends of the consistency group, the data of the master and slave ends, and the uuid.
4. The asynchronous remote replication method according to claim 3, characterized in that: After creating the pair object and before adding the plurality of pairs to the consistency group, the method further includes: The configuration information of the consistency group input by the user is written into the pair object corresponding to the consistency group, wherein the configuration information includes synchronization strategy, synchronization cycle, bandwidth and cluster name.
5. The asynchronous remote replication method according to claim 3, characterized in that: The establishing of a mapping relationship between the consistency group and each of the pairs includes: Writing the basic information of each pair into the pair object corresponding to the consistency group to which each pair belongs; wherein the basic information of the pair includes the local storage pool, the local volume name, the remote storage pool and the remote volume name; The basic information of the consistency group is written into the metadata object of each pair belonging to the consistency group.
6. The asynchronous remote replication method according to claim 4, characterized in that: After synchronizing the master-end volume information of each pair to the slave-end volume according to the synchronization mode corresponding to each pair, the method further includes: Periodically synchronize data for each pair in the consistency group according to the synchronization period.
7. The asynchronous remote replication method according to claim 4, characterized in that: After creating the consistency group and before adding the plurality of pairs to the consistency group, the method further includes: Creating a history object; wherein the history object corresponds to the consistency group; The basic information of the consistency group to be removed is moved from the consistency group object to the history object, and the configuration information of the consistency group to be removed is moved from the pair object to the history object.
8. An asynchronous remote replication device, characterized in that: include: A creation module is used to create a consistency group and add multiple pairs to the consistency group; wherein a pair includes the primary end volume information and the secondary end volume information of an asynchronous remote replication; The first judgment module is used to judge whether the current pair has been fully synchronized; if so, the first determination module is triggered; if not, the second determination module is triggered; The first determination module is used to determine whether to synchronize the master-end volume information of the current pair to the slave-end volume by means of incremental synchronization; The second determination module is used to determine to synchronize the primary-end volume information of the current pair to the secondary-end volume by adopting the full synchronization method; The second judgment module is used to judge whether the synchronization mode of all the pairs in the consistency group has been determined; if so, trigger the synchronization module; if not, trigger the operation module; The synchronization module is used to synchronize the master-end volume information of each pair to the slave-end volume according to the synchronization mode corresponding to each pair; The as module is used to take one of the pairs whose synchronization mode has not been determined among all the pairs as the current pair, and trigger the first judgment module.
9. An asynchronous remote replication device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the asynchronous remote replication method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the asynchronous remote replication method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Asynchronous remote copy system and control method for the same
CN101334748A
Test method, test device and test equipment for remote replication consistency group
CN111159024A