CN112269684A - Data replication method, device and medium based on primary and secondary volumes - Google Patents

Data replication method, device and medium based on primary and secondary volumes Download PDF

Info

Publication number
CN112269684A
CN112269684A CN202011147019.0A CN202011147019A CN112269684A CN 112269684 A CN112269684 A CN 112269684A CN 202011147019 A CN202011147019 A CN 202011147019A CN 112269684 A CN112269684 A CN 112269684A
Authority
CN
China
Prior art keywords
value
replication mode
preset
proportion
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202011147019.0A
Other languages
Chinese (zh)
Inventor
胡正建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202011147019.0A priority Critical patent/CN112269684A/en
Publication of CN112269684A publication Critical patent/CN112269684A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1461Backup scheduling policy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a data replication method, a data replication device and a data replication medium based on a main volume and an auxiliary volume, which are used for recording the processing duration of each IO. Counting IO proportion values of which the processing duration is greater than or equal to a preset threshold value within the period time; the IO proportion value reflects the overall performance of the system in the period time, and the higher the IO proportion value is, the worse the current processing performance of the system is. When the IO proportion value meets the preset performance requirement, switching the current synchronous replication mode or asynchronous replication mode into a periodic asynchronous replication mode; the periodic asynchronous replication mode is to synchronize the difference data generated on the primary volume to the secondary volume according to a preset periodic replication time. Compared with the traditional synchronous replication mode and the traditional asynchronous replication mode, the performance requirement of the periodic asynchronous replication mode on the system is greatly reduced, and the system is automatically switched to the periodic asynchronous replication mode under the condition that the performance of the system is reduced and the asynchronous replication can not be guaranteed to be successfully completed, so that the reliability of data backup is improved.

Description

Data replication method, device and medium based on primary and secondary volumes
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a data replication method and apparatus based on primary and secondary volumes, and a computer-readable storage medium.
Background
Remote copy relationships define the relationship between volumes, typically one volume designated as a primary volume and the other as a secondary volume. The host application writes data to the primary volume and does not run Input/Output (IO) operations on the secondary volume. Although data is written to only one volume, the system will copy the data to another volume. At disaster recovery, a copy on another volume may be used as a backup.
Remote replication includes synchronous replication and asynchronous replication. Synchronous replication is that after host data is written into a primary volume, the data is synchronized to a secondary volume, and then the host IO is informed of completion, and a Recovery Point Objective (RPO) of the synchronous replication is 0. Asynchronous replication is writing host data into a primary volume, namely informing the host of IO completion, and then immediately synchronizing the data to a secondary volume according to the IO sequence, wherein the RPO of the asynchronous replication is larger than 0 and generally smaller than 1 s. In the conventional method, a remote copy method is often selected as a method for synchronously copying data between a primary volume and a secondary volume. When the system has more service, the current processing performance of the system may not meet the performance requirement of the data synchronous replication mode on the system, so that the data synchronous replication cannot be completed smoothly.
Therefore, how to improve the reliability of data backup is a problem to be solved by those skilled in the art.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for data replication based on primary and secondary volumes, and a computer-readable storage medium, which can improve reliability of data backup.
To solve the foregoing technical problem, an embodiment of the present invention provides a data replication method based on primary and secondary volumes, including:
recording the processing duration of each IO;
counting IO proportion values of which the processing duration is greater than or equal to a preset threshold value within the period time;
when the IO proportion value meets the preset performance requirement, switching the current synchronous replication mode or asynchronous replication mode into a periodic asynchronous replication mode; the periodic asynchronous replication mode is to synchronize the difference data generated on the primary volume to the secondary volume according to a preset periodic replication time.
Optionally, when the IO ratio value meets a preset performance requirement, switching the current synchronous copy mode or asynchronous copy mode to the periodic asynchronous copy mode includes:
judging whether the IO proportion value is larger than or equal to a preset proportion upper limit value or not;
if the IO proportion value is larger than or equal to the preset proportion upper limit value, adding 1 to the cycle count value; if the IO proportion value is smaller than the preset proportion upper limit value, subtracting 1 from the cycle count value;
judging whether the current cycle count value reaches a preset count upper limit value or not;
and if the current cycle count value reaches the preset count upper limit value, switching the current synchronous replication mode or asynchronous replication mode into a cycle asynchronous replication mode.
Optionally, after the switching the current synchronous copy mode or asynchronous copy mode to the periodic asynchronous copy mode, the method further includes:
judging whether the period count value is less than or equal to a preset count lower limit value or not;
and if the period count value is less than or equal to the preset count lower limit value, switching the current periodic asynchronous replication mode into a synchronous replication mode or an asynchronous replication mode.
Optionally, the counting an IO ratio value of the processing duration greater than or equal to the preset threshold in the period of the cycle includes:
counting the total number of all IOs processed in the period time and the number of the overtime IOs of which the processing time length in the period time is greater than or equal to a preset threshold;
and taking the ratio of the number of the overtime IOs to the total number of the IOs as an IO proportion value.
Optionally, the counting an IO ratio value of the processing duration greater than or equal to the preset threshold in the period of the cycle includes:
and starting timing when the first IO is received, adding 1 to the delayed IO value when the IO with the processing time length being greater than or equal to the preset threshold occurs, and taking the ratio of the delayed IO value to the total number of the IOs processed in the period time as an IO proportion value until the period time is reached.
The embodiment of the invention also provides a data copying device based on the main and auxiliary volumes, which comprises a recording unit, a statistical unit and a switching unit;
the recording unit is used for recording the processing duration of each IO;
the statistic unit is used for counting IO proportion values of which the processing duration in the period time is greater than or equal to a preset threshold value;
the switching unit is used for switching the current synchronous replication mode or asynchronous replication mode into a periodic asynchronous replication mode when the IO proportion value meets the preset performance requirement; the periodic asynchronous replication mode is to synchronize the difference data generated on the primary volume to the secondary volume according to a preset periodic replication time.
Optionally, the switching unit includes a first determining subunit, an accumulating and subtracting subunit, a second determining subunit, and a switching subunit;
the first judging subunit is configured to judge whether the IO proportion value is greater than or equal to a preset proportion upper limit value;
the accumulation subunit is configured to add 1 to the cycle count value if the IO ratio value is greater than or equal to the preset ratio upper limit value;
the accumulation and subtraction subunit is configured to subtract 1 from the cycle count value if the IO ratio value is smaller than the preset ratio upper limit value;
the second judging subunit is configured to judge whether the current cycle count value reaches a preset count upper limit value;
and the switching subunit is used for switching the current synchronous replication mode or the asynchronous replication mode into the periodic asynchronous replication mode if the current period count value reaches the preset count upper limit value.
Optionally, the system further comprises a judging unit;
the judging unit is used for judging whether the period count value is less than or equal to a preset count lower limit value after the current synchronous replication mode or asynchronous replication mode is switched to the periodic asynchronous replication mode;
the switching unit is further configured to switch the current periodic asynchronous replication mode to a synchronous replication mode or an asynchronous replication mode if the period count value is less than or equal to a preset count lower limit value.
Optionally, the counting unit is specifically configured to count a total number of all the IOs processed within a period time and an number of the timeout IOs processed within the period time, where the processing duration is greater than or equal to a preset threshold; and taking the ratio of the number of the overtime IOs to the total number of the IOs as an IO proportion value.
Optionally, the statistical unit is specifically configured to start timing when a first IO is received, add 1 to the delayed IO value every time an IO with a processing duration greater than or equal to a preset threshold occurs until the cycle time is reached, and use a ratio of the delayed IO value to a total number of the IO processed within the cycle time as an IO proportional value.
An embodiment of the present invention further provides a data replication device based on primary and secondary volumes, including:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the primary and secondary volume-based data replication method as in any one of the above.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the primary and secondary volume-based data replication method are implemented as any one of the above.
According to the technical scheme, the processing time of each IO is recorded; the processing time length reflects the processing performance of the system, and the shorter the processing time length is, the stronger the current processing performance of the system is. Counting IO proportion values of which the processing duration is greater than or equal to a preset threshold value within the period time; the IO proportion value reflects the overall performance of the system in the period time, and the higher the IO proportion value is, the worse the current processing performance of the system is. Considering that the performance requirement of the system is high in a synchronous replication mode and an asynchronous replication mode when the primary volume executes data synchronization to the secondary volume, if the processing performance of the current system is poor, in order to ensure smooth execution of the data synchronization, when the IO ratio value meets the preset performance requirement, the current synchronous replication mode or the asynchronous replication mode may be switched to the periodic asynchronous replication mode; the periodic asynchronous replication mode is to synchronize the difference data generated on the primary volume to the secondary volume according to a preset periodic replication time. Compared with the traditional synchronous replication mode and the traditional asynchronous replication mode, the performance requirement of the periodic asynchronous replication mode on the system is greatly reduced, and the system is automatically switched to the periodic asynchronous replication mode under the condition that the system bearing business is intensively burst and the performance of the system is reduced and the asynchronous replication cannot be successfully completed, so that uninterrupted data backup can be effectively ensured, and the reliability of the data backup is improved.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a data replication method based on primary and secondary volumes according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a data replication device based on primary and secondary volumes according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a hardware structure of a data replication device based on primary and secondary volumes according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Next, a data replication method based on primary and secondary volumes according to an embodiment of the present invention will be described in detail. Fig. 1 is a flowchart of a data replication method based on primary and secondary volumes according to an embodiment of the present invention, where the method includes:
s101: and recording the processing time length of each IO.
The processing duration reflects the processing performance of the system. The shorter the processing time is, the stronger the current processing performance of the system is; the longer the processing time, the weaker the current processing performance of the system.
S102: and counting the IO proportion value of which the processing time length in the period is greater than or equal to the preset threshold value.
The value of the cycle time may be set according to actual requirements, and is not limited herein.
In practical application, one feasible implementation manner can count the total number of all the IOs processed in the period time and the number of the overtime IOs of which the processing time length in the period time is greater than or equal to a preset threshold value; and taking the ratio of the number of the overtime IOs to the total number of the IOs as an IO proportion value.
In another feasible implementation manner, timing may be started when the first IO is received, and when an IO with a processing time length greater than or equal to a preset threshold occurs, 1 is added to the delayed IO value until the cycle time is reached, and then the ratio of the delayed IO value to the total number of the IOs processed in the cycle time is used as the IO proportion value.
The IO proportion value reflects the overall performance of the system in the period time, and the higher the IO proportion value is, the more the overtime IO exists in the period time is, and the worse the processing performance of the system is at the moment.
S103: and when the IO proportion value meets the preset performance requirement, switching the current synchronous copy mode or asynchronous copy mode into a periodic asynchronous copy mode.
In an initial state, the system realizes the backup of IO data between the primary volume and the secondary volume according to a synchronous replication mode or an asynchronous replication mode. The synchronous copy mode or the asynchronous copy mode has a high performance requirement on the system.
The periodic asynchronous replication mode is to synchronize the difference data generated on the primary volume to the secondary volume according to a preset periodic replication time. Periodic asynchronous replication mode reduces the performance requirements on the system compared to synchronous replication mode and asynchronous replication mode.
The preset performance requirement may be a performance condition for the system to switch to the periodic asynchronous copy mode. In a specific implementation, whether the IO proportion value is greater than or equal to a preset proportion upper limit value or not can be judged; if the IO proportion value is larger than or equal to the preset proportion upper limit value, adding 1 to the cycle count value; and if the IO proportion value is smaller than the preset proportion upper limit value, subtracting 1 from the cycle count value.
Judging whether the current cycle count value reaches a preset count upper limit value or not; if the current cycle count value reaches the preset count upper limit value, it indicates that the current processing performance of the system cannot meet the performance requirement of the synchronous copy mode or the asynchronous copy mode, and at this time, the current synchronous copy mode or the asynchronous copy mode can be switched to the cycle asynchronous copy mode.
The value of the preset count upper limit value can be set according to actual requirements, and is not limited herein. For example, the preset count upper limit value may be set to 3, and when the cycle count value reaches 3, the current synchronous copy mode or asynchronous copy mode may be switched to the periodic asynchronous copy mode.
According to the technical scheme, the processing time of each IO is recorded; the processing time length reflects the processing performance of the system, and the shorter the processing time length is, the stronger the current processing performance of the system is. Counting IO proportion values of which the processing duration is greater than or equal to a preset threshold value within the period time; the IO proportion value reflects the overall performance of the system in the period time, and the higher the IO proportion value is, the worse the current processing performance of the system is. Considering that the performance requirement of the system is high in a synchronous replication mode and an asynchronous replication mode when the primary volume executes data synchronization to the secondary volume, if the processing performance of the current system is poor, in order to ensure smooth execution of the data synchronization, when the IO ratio value meets the preset performance requirement, the current synchronous replication mode or the asynchronous replication mode may be switched to the periodic asynchronous replication mode; the periodic asynchronous replication mode is to synchronize the difference data generated on the primary volume to the secondary volume according to a preset periodic replication time. Compared with the traditional synchronous replication mode and the traditional asynchronous replication mode, the performance requirement of the periodic asynchronous replication mode on the system is greatly reduced, and the system is automatically switched to the periodic asynchronous replication mode under the condition that the system bearing business is intensively burst and the performance of the system is reduced and the asynchronous replication cannot be successfully completed, so that uninterrupted data backup can be effectively ensured, and the reliability of the data backup is improved.
The processing performance of the system belongs to a dynamically changing factor, and in order to fully utilize the processing performance of the system, after the current synchronous copy mode or asynchronous copy mode is switched to the periodic asynchronous copy mode, whether the period count value is less than or equal to the preset count lower limit value can be judged.
If the period count value is less than or equal to the preset count lower limit value, it indicates that the current processing performance of the system can meet the performance requirement of the synchronous copy mode or the asynchronous copy mode.
The value of the preset count lower limit value can be set according to actual requirements, and is not limited herein. For example, a preset count lower limit value may be set to-3, and when the cycle count value reaches-3, the current periodic asynchronous copy mode is switched to the synchronous copy mode or the asynchronous copy mode.
By detecting the cycle count value in real time, the data replication mode of the main and auxiliary volumes can be switched to the synchronous replication mode or the asynchronous replication mode in time when the system performance meets the performance requirements of the synchronous replication mode and the asynchronous replication mode, so that the current processing performance of the system is fully utilized to improve the processing efficiency of data backup.
Fig. 2 is a schematic structural diagram of a data replication device based on primary and secondary volumes according to an embodiment of the present invention, including a recording unit 21, a counting unit 22, and a switching unit 23;
a recording unit 21, configured to record a processing duration of each IO;
the statistical unit 22 is configured to count an IO ratio value of which the processing duration within the period time is greater than or equal to a preset threshold;
the switching unit 23 is configured to switch the current synchronous copy mode or the asynchronous copy mode to the periodic asynchronous copy mode when the IO ratio value meets a preset performance requirement; the periodic asynchronous replication mode is to synchronize the difference data generated on the primary volume to the secondary volume according to a preset periodic replication time.
Optionally, the switching unit includes a first determining subunit, an accumulating and subtracting subunit, a second determining subunit, and a switching subunit;
the first judgment subunit is used for judging whether the IO proportion value is greater than or equal to a preset proportion upper limit value;
the accumulation subunit is used for adding 1 to the cycle count value if the IO proportion value is greater than or equal to the preset proportion upper limit value;
the accumulation and subtraction subunit is used for subtracting 1 from the cycle count value if the IO proportion value is smaller than the preset proportion upper limit value;
the second judgment subunit is used for judging whether the current cycle count value reaches a preset count upper limit value;
and the switching subunit is used for switching the current synchronous copy mode or the asynchronous copy mode into the periodic asynchronous copy mode if the current period count value reaches the preset count upper limit value.
Optionally, the system further comprises a judging unit;
the judging unit is used for judging whether the period count value is less than or equal to a preset count lower limit value or not after the current synchronous replication mode or asynchronous replication mode is switched to the period asynchronous replication mode;
the switching unit is further configured to switch the current periodic asynchronous replication mode to a synchronous replication mode or an asynchronous replication mode if the period count value is less than or equal to the preset count lower limit value.
Optionally, the counting unit is specifically configured to count the total number of all the IOs processed in the period time and the number of the timeout IOs processed in the period time, where the processing duration is greater than or equal to a preset threshold; and taking the ratio of the number of the overtime IOs to the total number of the IOs as an IO proportion value.
Optionally, the statistical unit is specifically configured to start timing when the first IO is received, add 1 to the delayed IO value every time an IO with a processing duration greater than or equal to a preset threshold occurs until the cycle time is reached, and use a ratio of the delayed IO value to a total number of the IO processed within the cycle time as the IO proportional value.
The description of the features in the embodiment corresponding to fig. 2 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, the processing time of each IO is recorded; the processing time length reflects the processing performance of the system, and the shorter the processing time length is, the stronger the current processing performance of the system is. Counting IO proportion values of which the processing duration is greater than or equal to a preset threshold value within the period time; the IO proportion value reflects the overall performance of the system in the period time, and the higher the IO proportion value is, the worse the current processing performance of the system is. Considering that the performance requirement of the system is high in a synchronous replication mode and an asynchronous replication mode when the primary volume executes data synchronization to the secondary volume, if the processing performance of the current system is poor, in order to ensure smooth execution of the data synchronization, when the IO ratio value meets the preset performance requirement, the current synchronous replication mode or the asynchronous replication mode may be switched to the periodic asynchronous replication mode; the periodic asynchronous replication mode is to synchronize the difference data generated on the primary volume to the secondary volume according to a preset periodic replication time. Compared with the traditional synchronous replication mode and the traditional asynchronous replication mode, the performance requirement of the periodic asynchronous replication mode on the system is greatly reduced, and the system is automatically switched to the periodic asynchronous replication mode under the condition that the system bearing business is intensively burst and the performance of the system is reduced and the asynchronous replication cannot be successfully completed, so that uninterrupted data backup can be effectively ensured, and the reliability of the data backup is improved.
Fig. 3 is a schematic hardware structure diagram of a data replication device 30 based on primary and secondary volumes according to an embodiment of the present invention, including:
a memory 31 for storing a computer program;
a processor 32 for executing a computer program to implement the steps of any of the primary and secondary volume-based data replication methods described above.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the above-mentioned primary and secondary volume-based data replication methods are implemented.
The data replication method, device and computer-readable storage medium based on primary and secondary volumes provided by the embodiments of the present invention are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Claims (10)

1. A data replication method based on primary and secondary volumes is characterized by comprising the following steps:
recording the processing duration of each IO;
counting IO proportion values of which the processing duration is greater than or equal to a preset threshold value within the period time;
when the IO proportion value meets the preset performance requirement, switching the current synchronous replication mode or asynchronous replication mode into a periodic asynchronous replication mode; the periodic asynchronous replication mode is to synchronize the difference data generated on the primary volume to the secondary volume according to a preset periodic replication time.
2. The primary and secondary volume-based data replication method according to claim 1, wherein when the IO ratio value satisfies a preset performance requirement, switching a current synchronous replication mode or an asynchronous replication mode to a periodic asynchronous replication mode comprises:
judging whether the IO proportion value is larger than or equal to a preset proportion upper limit value or not;
if the IO proportion value is larger than or equal to the preset proportion upper limit value, adding 1 to the cycle count value; if the IO proportion value is smaller than the preset proportion upper limit value, subtracting 1 from the cycle count value;
judging whether the current cycle count value reaches a preset count upper limit value or not;
and if the current cycle count value reaches the preset count upper limit value, switching the current synchronous replication mode or asynchronous replication mode into a cycle asynchronous replication mode.
3. The primary-secondary volume-based data replication method according to claim 2, further comprising, after the switching the current synchronous replication mode or asynchronous replication mode to the periodic asynchronous replication mode:
judging whether the period count value is less than or equal to a preset count lower limit value or not;
and if the period count value is less than or equal to the preset count lower limit value, switching the current periodic asynchronous replication mode into a synchronous replication mode or an asynchronous replication mode.
4. The primary and secondary volume-based data replication method according to any one of claims 1 to 3, wherein the counting of the IO proportion value of the processing duration within the period of time greater than or equal to the preset threshold comprises:
counting the total number of all IOs processed in the period time and the number of the overtime IOs of which the processing time length in the period time is greater than or equal to a preset threshold;
and taking the ratio of the number of the overtime IOs to the total number of the IOs as an IO proportion value.
5. The primary and secondary volume-based data replication method according to any one of claims 1 to 3, wherein the counting of the IO proportion value of the processing duration within the period of time greater than or equal to the preset threshold comprises:
and starting timing when the first IO is received, adding 1 to the delayed IO value when the IO with the processing time length being greater than or equal to the preset threshold occurs, and taking the ratio of the delayed IO value to the total number of the IOs processed in the period time as an IO proportion value until the period time is reached.
6. A data copying device based on a main volume and an auxiliary volume is characterized by comprising a recording unit, a statistical unit and a switching unit;
the recording unit is used for recording the processing duration of each IO;
the statistic unit is used for counting IO proportion values of which the processing duration in the period time is greater than or equal to a preset threshold value;
the switching unit is used for switching the current synchronous replication mode or asynchronous replication mode into a periodic asynchronous replication mode when the IO proportion value meets the preset performance requirement; the periodic asynchronous replication mode is to synchronize the difference data generated on the primary volume to the secondary volume according to a preset periodic replication time.
7. The primary-secondary volume-based data replication device according to claim 6, wherein the switching unit includes a first judging subunit, an accumulating subunit, a decrementing subunit, a second judging subunit, and a switching subunit;
the first judging subunit is configured to judge whether the IO proportion value is greater than or equal to a preset proportion upper limit value;
the accumulation subunit is configured to add 1 to the cycle count value if the IO ratio value is greater than or equal to the preset ratio upper limit value;
the accumulation and subtraction subunit is configured to subtract 1 from the cycle count value if the IO ratio value is smaller than the preset ratio upper limit value;
the second judging subunit is configured to judge whether the current cycle count value reaches a preset count upper limit value;
and the switching subunit is used for switching the current synchronous replication mode or the asynchronous replication mode into the periodic asynchronous replication mode if the current period count value reaches the preset count upper limit value.
8. The primary-secondary volume-based data replication device of claim 7, further comprising a judging unit;
the judging unit is used for judging whether the period count value is less than or equal to a preset count lower limit value after the current synchronous replication mode or asynchronous replication mode is switched to the periodic asynchronous replication mode;
the switching unit is further configured to switch the current periodic asynchronous replication mode to a synchronous replication mode or an asynchronous replication mode if the period count value is less than or equal to a preset count lower limit value.
9. A primary and secondary volume-based data replication apparatus, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the primary and secondary volume-based data replication method of any one of claims 1 to 5.
10. A computer-readable storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the primary and secondary volume-based data replication method of any one of claims 1 to 5.
CN202011147019.0A 2020-10-23 2020-10-23 Data replication method, device and medium based on primary and secondary volumes Withdrawn CN112269684A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011147019.0A CN112269684A (en) 2020-10-23 2020-10-23 Data replication method, device and medium based on primary and secondary volumes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011147019.0A CN112269684A (en) 2020-10-23 2020-10-23 Data replication method, device and medium based on primary and secondary volumes

Publications (1)

Publication Number Publication Date
CN112269684A true CN112269684A (en) 2021-01-26

Family

ID=74341580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011147019.0A Withdrawn CN112269684A (en) 2020-10-23 2020-10-23 Data replication method, device and medium based on primary and secondary volumes

Country Status (1)

Country Link
CN (1) CN112269684A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080244035A1 (en) * 2007-03-30 2008-10-02 Nec Corporation Remote copy system and remote copy method
CN109542683A (en) * 2018-11-19 2019-03-29 郑州云海信息技术有限公司 A kind of data transmission method based on period asynchronous replication, apparatus and system
CN111309803A (en) * 2020-01-17 2020-06-19 西安奥卡云数据科技有限公司 Intelligent remote copying system based on resource utilization rate

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080244035A1 (en) * 2007-03-30 2008-10-02 Nec Corporation Remote copy system and remote copy method
CN109542683A (en) * 2018-11-19 2019-03-29 郑州云海信息技术有限公司 A kind of data transmission method based on period asynchronous replication, apparatus and system
CN111309803A (en) * 2020-01-17 2020-06-19 西安奥卡云数据科技有限公司 Intelligent remote copying system based on resource utilization rate

Similar Documents

Publication Publication Date Title
CN106547635B (en) Operation retry method and device for operation
CN101419564B (en) Method and device for recovering data by employing snapshot
CN109710456B (en) Data recovery method and device
CN109558263B (en) Method and related device for processing data reading errors of solid state disk
CN109358947A (en) A kind of realization method and system of virtual machine snapshot
CN104424186A (en) Method and device for realizing persistence in flow calculation application
EP4031971A1 (en) Incrementally updating recovery map data for a memory system
CN112269681A (en) Method, device and equipment for continuously protecting virtual machine data
CN113467993A (en) Method, system, equipment and storage medium for restoring cloud platform resources
CN112965660A (en) Method, system, device and medium for feeding back information of double storage pools
CN104023176A (en) Method and device of processing audio frequency and image information as well as terminal equipment
CN102629223B (en) Method and device for data recovery
CN111752482A (en) Method and system for writing data in full-flash distributed storage system
CN109521969B (en) Solid state disk data recovery method and device and computer readable storage medium
CN105302489A (en) Heterogeneous multi-core remote embedded memory system and method
CN111327684A (en) Quota management method and device of distributed object storage system
CN112269684A (en) Data replication method, device and medium based on primary and secondary volumes
CN107621994B (en) Method and device for creating data snapshot
CN107330061B (en) File deletion method and device based on distributed storage
CN109167690A (en) A kind of restoration methods, device and the relevant device of the service of distributed system interior joint
CN108460163A (en) K-DB method for synchronizing data of database, device, equipment and storage medium
CN110515769A (en) A kind of backup processing method, device and electronic equipment and readable storage medium storing program for executing
CN107153589B (en) Reading and writing method of mirror image data
CN111817904B (en) Bandwidth recovery method, device and medium based on PCIE Switch
US8656124B2 (en) Managing backup relationships in a data storage system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20210126

WW01 Invention patent application withdrawn after publication