Asynchronous remote replication method, system, device and computer readable storage medium

By judging whether the last object of the incremental data is an all-0 object and controlling the throttle valve to end the reading state, the problem of the master-slave volume being unable to be synchronized under Iscsi mounting is solved, and data synchronization is achieved smoothly.

CN114595099BActive Publication Date: 2024-10-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202210269093.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-18
Publication Date
2024-10-22
Estimated Expiration
2042-03-18

AI Technical Summary

Technical Problem

In the Iscsi mounting scenario, the existing asynchronous remote replication method cannot achieve data synchronization, resulting in the master and slave volume cycles being out of sync, the process being stuck, and subsequent data synchronization status unable to be entered.

Method used

By reading the incremental data written to the primary volume, it is determined whether the last object is an all-0 object. If so, the throttle valve is controlled to end the reading state, and the incremental data is backed up to the secondary volume, and optionally Close the master and slave volumes to avoid throttle failure and ensure the normal progress of the data synchronization process.

Benefits of technology

It effectively avoids the infinite reading status of the throttle valve, prevents the process from being stuck, achieves smooth data synchronization, and solves the problem of the master-slave volume cycle being out of sync when Iscsi is mounted.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114595099B_ABST
    Figure CN114595099B_ABST
Patent Text Reader

Abstract

The present application discloses an asynchronous remote replication method, system, device and computer-readable storage medium, which are applied to Iscsi mounting scenarios, including: reading incremental data written in the master volume; judging whether the last object of the incremental data is an all-0 object; if so, controlling the throttle to end the reading state; backing up the incremental data to the slave volume. The present application actively judges whether the last object of the incremental data is an all-0 object. If it is an all-0 object, it guides and controls the throttle to end the reading state, stops infinite reading of enhanced data, avoids process jams, enters the subsequent data synchronization state, and implements the subsequent data synchronization process, thereby solving the problem of asynchronous master-slave volume cycles when Iscsi is mounted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data storage, and in particular to an asynchronous remote replication method, system, device and computer-readable storage medium. Background Art

[0002] Asynchronous remote replication is a form of data disaster recovery. Compared with synchronous remote replication, which synchronizes data in real time, it guarantees data consistency to the greatest extent possible, thereby reducing the amount of data loss when a disaster occurs. Asynchronous remote replication synchronizes data periodically, minimizing the degradation of business performance caused by the delay in remote data transmission.

[0003] In the prior art, periodic synchronization is based on snapshots, and the process is as follows: when a pair relationship is created between the primary volume and the backup volume, snapshots are taken of the primary volume and the backup volume respectively. During the scheduled task, data will be written to the primary volume from time to time. After the scheduled task expires, another snapshot is taken of the primary volume, and this snapshot is compared with the last identical snapshot (common_sanp) of the previous snapshots of the primary and backup volumes, and the differences are imported into the backup volume. After the incremental synchronization is completed, another snapshot is taken of the backup volume. The purposes of this are: 1. To prepare for the next incremental synchronization. 2. To avoid restoring (repairing) the primary and backup volumes after the pair relationship expires. Finally, all snapshots except the latest snapshots of the primary and backup volumes are deleted. The next periodic synchronization begins, as shown in the following figure. Figure 1 shown.

[0004] After establishing an asynchronous remote replication relationship, use bench (a universal latency benchmark library) to write data to the primary volume. When the periodic synchronization time arrives, the secondary volume will be incrementally synchronized, and md5sum will be used to check whether the data of the primary and secondary volumes are consistent. However, when the primary volume is mounted through iscsi (Internet Small Computer System Interface), data synchronization cannot be achieved when the client writes to the raw volume through the I / O workload generator or formats the file system and mounts the folder to copy data.

[0005] Therefore, a method for implementing asynchronous remote replication in an Iscsi mounting scenario is needed. Summary of the invention

[0006] In view of this, the purpose of the present invention is to provide an asynchronous remote replication method, system, device and computer-readable storage medium, which can realize asynchronous remote replication in an Iscsi mounting scenario. The specific scheme is as follows:

[0007] An asynchronous remote replication method, applied to Iscsi mounting scenarios, includes:

[0008] Read the incremental data written to the primary volume;

[0009] Determine whether the last object of the incremental data is an all-0 object;

[0010] If yes, the throttle valve is controlled to end the reading state;

[0011] The incremental data is backed up to the secondary volume.

[0012] Optionally, after backing up the incremental data to the secondary volume, the method further includes:

[0013] The master volume and the slave volume are closed to avoid failure of the throttle valve.

[0014] Optionally, the process of controlling the throttle valve to end the reading state includes:

[0015] The throttle valve is controlled to call an exit mechanism corresponding to when the last object of the incremental data read is an all-0 object, thereby ending the reading state.

[0016] The present invention also discloses an asynchronous remote replication system, which is applied to an Iscsi mounting scenario and includes:

[0017] An incremental data reading module, used to read the incremental data written into the primary volume;

[0018] An all-0 object determination module is used to determine whether the last object of the incremental data is an all-0 object;

[0019] a throttle control module, configured to control the throttle to end the reading state if the all-0 object judgment module determines that the last object of the incremental data is an all-0 object;

[0020] The data backup module is used to back up the incremental data to the secondary volume.

[0021] Optionally, also include:

[0022] The master-slave volume closing module is used to close the master volume and the slave volume to avoid failure of the throttle valve.

[0023] Optionally, the throttle control module is specifically used to control the throttle to call an exit mechanism corresponding to when the last object of the incremental data read is an all-0 object, thereby ending the reading state.

[0024] The present invention also discloses an asynchronous remote replication device, comprising:

[0025] Memory for storing computer programs;

[0026] The processor is used to execute the computer program to implement the asynchronous remote replication method as described above.

[0027] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the asynchronous remote replication method as described above is implemented.

[0028] In the present invention, an asynchronous remote replication method is applied to an Iscsi mounting scenario, including: reading incremental data written in a master volume; determining whether the last object of the incremental data is an all-0 object; if so, controlling a throttle valve to end the reading state; and backing up the incremental data to a slave volume.

[0029] The present invention actively determines whether the last object of the incremental data is an all-0 object. If it is an all-0 object, it guides and controls the throttle valve to end the reading state, stop infinite reading of enhanced data, avoid process jamming, enter the subsequent data synchronization state, and realize the subsequent data synchronization process. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0031] Figure 1 It is a schematic diagram of the theoretical process of asynchronous remote replication;

[0032] Figure 2 A schematic diagram of a flow chart of an asynchronous remote replication method disclosed in an embodiment of the present invention;

[0033] Figure 3 A schematic diagram of another asynchronous remote replication method disclosed in an embodiment of the present invention;

[0034] Figure 4 The present invention discloses an asynchronous remote replication system. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] The embodiment of the present invention discloses an asynchronous remote replication method. Figure 2 As shown, the method is applied to the Iscsi mounting scenario and includes:

[0037] S11: Read the incremental data written to the primary volume.

[0038] Specifically, after the incremental data is written to the primary volume, data synchronization is performed to read the incremental data in the primary volume so that the incremental data can be subsequently written to the secondary volume.

[0039] S12: Determine whether the last object of the incremental data is an all-0 object;

[0040] S13: If yes, the throttle valve is controlled to end the reading state.

[0041] Specifically, an incremental data may contain all-0 objects. For example, a 4M incremental data may contain 3M of truly valid data, and the remaining 1M is an all-0 object. The throttle valve that affects data synchronization controls whether to end the reading of incremental data. After the throttle valve reads that the last object of the incremental data is an all-0 object, it cannot normally enter the end state even after reading the incremental data. As a result, the throttle valve continues to be in the state of reading incremental data and does not end. The data synchronization process is a scheduled task, which is in the data reading state for a long time and cannot enter the subsequent data synchronization state, which will cause the synchronization task to time out and end. As a result, when the last object of the enhanced data is an all-0 object, it cannot normally enter the subsequent synchronization process, resulting in the inability to achieve data synchronization in the Iscsi mounting scenario. Therefore, it is actively determined whether the last object of the incremental data is an all-0 object. If it is an all-0 object, the throttle valve is guided and controlled to end the reading state, stop infinite reading of enhanced data, avoid process jams, enter the subsequent data synchronization state, and achieve subsequent data synchronization processes.

[0042] Specifically, if the last object of the incremental data is not an all-0 object, the throttle valve can normally complete the read operation and enter the subsequent state to complete the subsequent synchronization process.

[0043] S14: Back up the incremental data to the secondary volume.

[0044] It can be seen that the embodiment of the present invention actively determines whether the last object of the incremental data is an all-0 object. If it is an all-0 object, it guides and controls the throttle to end the reading state, stop infinite reading of enhanced data, avoid process stuck, enter the subsequent data synchronization state, implement the subsequent data synchronization process, and solve the problem of asynchronous master-slave volume cycle when iSCSI is mounted.

[0045] The embodiment of the present invention discloses a specific asynchronous remote replication method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Figure 3 As shown, specifically:

[0046] S21: read the incremental data written into the primary volume;

[0047] S22: Determine whether the last object of the incremental data is an all-0 object;

[0048] S23: If yes, the throttle valve is controlled to call the corresponding jump mechanism when the last object of the incremental data read is an all-0 object, and the reading state ends.

[0049] Specifically, by adding else if in the if-else selection structure and writing a new interface end_op(0) processing, the throttle valve calls throttle.end_op(0), thereby realizing a new jump mechanism corresponding to when the last object of the incremental data read is an all-0 object, ensuring that the throttle valve can end the reading state.

[0050] Furthermore, we can improve clusterwatcher's filtering mechanism for bufferlist and execute ioctx.read(RBD_DIRECTORY,b1,0,0) to improve the filtering mechanism for all-0 objects.

[0051] S24: backing up the incremental data to the secondary volume;

[0052] S25: Close the master volume and the slave volume to avoid throttle valve failure.

[0053] Specifically, after the incremental synchronization is completed, the master volume and the slave volume can be temporarily closed to ensure that the throttle valve will not get stuck after the data is synchronized. Of course, the master volume and the slave volume can be opened again when incremental data needs to be written or data synchronization is required next time.

[0054] Correspondingly, the embodiment of the present invention also discloses an asynchronous remote replication system, which is applied to the Iscsi mounting scenario, see Figure 4 As shown, the system includes:

[0055] The incremental data reading module 11 is used to read the incremental data written in the primary volume;

[0056] An all-0 object determination module 12 is used to determine whether the last object of the incremental data is an all-0 object;

[0057] The throttle control module 13 is used to control the throttle to end the reading state if the all-0 object judgment module 12 determines that the last object of the incremental data is an all-0 object;

[0058] The data backup module 14 is used to back up the incremental data to the secondary volume.

[0059] It can be seen that the embodiment of the present invention actively determines whether the last object of the incremental data is an all-0 object. If it is an all-0 object, it guides and controls the throttle to end the reading state, stop infinite reading of enhanced data, avoid process stuck, enter the subsequent data synchronization state, implement the subsequent data synchronization process, and solve the problem of asynchronous master-slave volume cycle when iSCSI is mounted.

[0060] Specifically, it may also include:

[0061] The master-slave volume closing module is used to close the master volume and the slave volume to avoid throttle valve failure.

[0062] Specifically, the throttle control module 13 can be used to control the throttle to call the corresponding jump mechanism when the last object of the incremental data read is an all-0 object, thereby ending the reading state.

[0063] In addition, an embodiment of the present invention further discloses an asynchronous remote replication device, including:

[0064] Memory for storing computer programs;

[0065] The processor is used to execute a computer program to implement the aforementioned asynchronous remote replication method.

[0066] In addition, an embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the asynchronous remote replication method as described above is implemented.

[0067] Finally, it should be noted that, in this article, 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 "include", "comprise" 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, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0068] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0069] The technical content provided by the present invention is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for general technical personnel in the field, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. An asynchronous remote replication method, It is characterized in that Applicable to Iscsi mounting scenarios, including: Read the incremental data written to the primary volume; Determine whether the last object of the incremental data is an all-0 object; If yes, the throttle valve is controlled to end the reading state; Backing up the incremental data to the secondary volume; Correspondingly, after backing up the incremental data to the secondary volume, the method further includes: Closing the master volume and the slave volume to avoid failure of the throttle valve; Correspondingly, the process of controlling the throttle valve to end the reading state includes: The throttle valve is controlled to call an exit mechanism corresponding to when the last object of the incremental data read is an all-0 object, thereby ending the reading state.

2. An asynchronous remote replication system, It is characterized in that Applicable to Iscsi mounting scenarios, including: An incremental data reading module, used to read the incremental data written into the primary volume; An all-0 object determination module is used to determine whether the last object of the incremental data is an all-0 object; a throttle control module, configured to control the throttle to end the reading state if the all-0 object judgment module determines that the last object of the incremental data is an all-0 object; A data backup module, used for backing up the incremental data to a secondary volume; Correspondingly, it also includes: A master-slave volume closing module, used to close the master volume and the slave volume to avoid failure of the throttle valve; Correspondingly, the throttle control module is specifically used to control the throttle to call the corresponding jump mechanism when the last object of the incremental data read is an all-0 object, so as to end the reading state.

3. An asynchronous remote replication device, It is characterized in that include: Memory for storing computer programs; A processor is used to execute the computer program to implement the asynchronous remote replication method according to claim 1.

4. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the asynchronous remote replication method according to claim 1 is implemented.

Citation Information

Patent Citations

  • Disaster-tolerant real-time data replicating method and system and backup client

    CN106776123A

  • Data backup method and apparatus

    CN106980556A

  • Method and device for distinguishing synchronous replication from asynchronous replication and readable medium

    CN110442477A

  • Distributed block storage synchronous remote replication full-amount synchronization method and device

    CN111901398A

  • Asynchronous local and remote generation of consistent point-in-time snap copies

    US20180157421A1