Input / output processing method, device, equipment and medium

By obtaining and controlling the number of sites and the direction of input and output requests in the 3DC strategy, the problems of disordered input and output flows and inconsistent data under the 3DC strategy are solved, and data consistency and rapid recovery are achieved.

CN118869460BActive Publication Date: 2025-09-09INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411045744.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2025-09-09
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Under the three-site, three-center (3DC) disaster recovery strategy, when the production center and the disaster recovery center simultaneously deliver services from multiple sites, there is a risk of input/output flow confusion and data inconsistency.

Method used

By obtaining the number of sites mapped to the host during the creation of the data protection center, and judging and controlling the jump direction of input and output requests to be consistent with the transmission direction before starting the data protection center to protect data, it is ensured that only one site receives the input and output requests issued by the host. The dual-active site fault switching mechanism and the remote site data synchronization mechanism are adopted to prevent the disorder of the input and output request flow.

Benefits of technology

It effectively avoids the disorder of input and output request flows, ensures data consistency, reduces the risk of data loss and business interruption, and achieves rapid recovery in the event of a failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869460B_ABST
    Figure CN118869460B_ABST
Patent Text Reader

Abstract

The present invention discloses an input / output processing method, apparatus, device, and medium, and relates to the technical field of data storage. In the method, only when the number of sites mapped to the host is equal to 1, the site mapped to the host is used to receive input / output requests issued by the host, thus ensuring that only one site is responsible for the host's business at the same time, avoiding the problem of disordered flow of input / output requests, and ensuring data consistency. In the stage of creating a data protection center, when starting the data protection center to protect data, and after the data protection center is successfully started to protect data, the number of sites mapped to the host is judged, so that during the entire process of using the data protection center to protect data, it is ensured that only one site is mapped to the host before the site mapped to the host is used to receive input / output requests issued by the host, further avoiding the problem of disordered flow of input / output requests, and ensuring data consistency.
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 technology, and in particular to an input and output processing method, device, equipment and medium. Background Art

[0002] With the rapid development of information technology, data centers store and process large amounts of critical data and business applications. Their stability and reliability are crucial to business operations. However, data centers face a variety of potential risks, such as hardware failures and software errors, which can lead to service interruptions. To ensure data recovery and restore business continuity, a two-site, three-center (3DC) disaster recovery model has been proposed: a production center, a local disaster recovery center, and a remote disaster recovery center.

[0003] While both the production center and the disaster recovery center under the 3DC strategy have the ability to handle business, if the same business is delivered to multiple sites simultaneously (due to human error or failure), this can cause input / output (IO) flow confusion and create the risk of data inconsistency.

[0004] Therefore, how to prevent IO flow disorder and avoid the occurrence of data inconsistency is a technical problem that people in this field urgently need to solve. Summary of the Invention

[0005] The purpose of the present invention is to provide an input / output processing method, device, equipment and medium to solve the technical problem of input / output flow disorder and data inconsistency.

[0006] To solve the above technical problems, the present invention provides an input and output processing method, comprising:

[0007] In the stage of creating a data protection center, a first number of sites mapped to the host is obtained; wherein the data protection center includes at least a local site and a remote site;

[0008] When starting the data protection center to protect data, if it is detected that the first number is greater than 1, it is determined that the data protection center has failed to start protecting data; if it is detected that the first number is less than or equal to 1, it is determined that the data protection center has successfully started protecting data;

[0009] When the first number is equal to 1, the site mapped to the host is used as the target site, and the input and output requests sent by the host are received by using the target site;

[0010] When the first number is equal to 0, add the site mapped to the host and obtain the second number of sites mapped to the host; when it is detected that the second number is equal to 1, return to the step of using the site mapped to the host as the target site and use the target site to receive input and output requests issued by the host.

[0011] On the one hand, in the stage of creating the data protection center, obtaining the first number of sites mapped to the host includes:

[0012] In the data protection center creation stage, the first number of sites mapped to the host is determined according to a parameter used to characterize the number of sites mapped to the host;

[0013] Among them, in the stage of creating a data protection center, when creating data volumes and mapping each data volume to the site corresponding to the data protection center, when creating data synchronous replication between local sites and creating asynchronous replication between local sites and remote sites, the parameters used to characterize the number of sites mapped to the host are all invalid values; in the stage of creating a data protection center, when it is detected that there is a site mapped to the host, the value of the parameter used to characterize the number of sites mapped to the host is increased by 1.

[0014] On the other hand, the stage of creating a data protection center also includes:

[0015] Set the jump direction of input and output requests of local sites and remote sites;

[0016] Before starting the data protection center to protect data, the method further includes:

[0017] Get the input and output request transmission direction;

[0018] Determining whether the jump direction of the input / output request is the same as the transmission direction of the input / output request;

[0019] If so, the data protection center is activated to protect the data;

[0020] If not, a prompt message indicating that the data protection center is prohibited from being started to protect data is output, and the input / output request jump direction is controlled to be the same as the input / output request transmission direction.

[0021] On the other hand, the local site includes a first site and a second site, the first site and the second site are in an active-active network topology; the remote site includes a backup logical storage unit; wherein the backup logical storage unit in the remote site has the same attributes as the data logical storage unit in the second site;

[0022] The controlling the jump direction of the input / output request to be the same as the transmission direction of the input / output request includes:

[0023] When it is detected that the transmission direction of the input / output request is forward transmission, the redirection of the input / output request from the data logical storage unit in the second site to the backup logical storage unit in the remote site is retained, and after the data protection center starts protecting data, the redirection of the input / output request from the data logical storage unit in the second site to the backup logical storage unit in the remote site is maintained; wherein the forward transmission is the transmission of the input / output request from the first site to the second site;

[0024] If it is detected that the transmission direction of the input / output request changes from the forward transmission to the reverse transmission, suspending the data protection center from protecting the data; wherein the reverse transmission is the transmission of the input / output request from the remote site to the second site;

[0025] From the time when the data protection center is suspended to the time when the data protection center is restarted, the input and output request jump relationship between the data logical storage unit in the second site and the backup logical storage unit in the remote site is deleted;

[0026] An input / output request jump relationship is established from the backup logical storage unit in the remote site to the data logical storage unit in the second site.

[0027] On the other hand, after the data protection center starts protecting data, after maintaining the redirection of input and output requests from the data logical storage unit in the second site to the backup logical storage unit in the remote site, the method further includes:

[0028] After detecting that a write input / output request arrives at the data logical storage unit in the second site, jump to the backup logical storage unit in the remote site to modify the bitmap;

[0029] After completing the modification of the bitmap of the backup logical storage unit, return to writing data in the data logical storage unit in the second site; wherein, the bitmap is used to represent the difference between the data in the data logical storage unit of the second site and the data in the backup logical storage unit of the remote site.

[0030] On the other hand, after establishing the input / output request jump relationship from the backup logical storage unit in the remote site to the data logical storage unit in the second site, the method further includes:

[0031] After the data protection center is started to protect data, the input and output requests of the host are copied using the backup logic storage unit in the remote site;

[0032] Jumping to the data logical storage unit in the second site and performing dual writing with the first site;

[0033] After detecting that the double write is completed, returning to the backup logical storage unit of the remote site to modify the bitmap so that the difference between the data in the data logical storage unit of the second site and the data in the backup logical storage unit of the remote site is zero.

[0034] On the other hand, it also includes:

[0035] When the reverse transmission is detected, if one of the first site and the second site fails, obtaining a normal site among the first site and the second site;

[0036] The master end in the active-active relationship is restricted from switching to the normal site, and the remote site is kept receiving input and output requests sent by the host; wherein the master end in the active-active relationship is the site that receives the input and output requests of the host.

[0037] In order to solve the above technical problems, the present invention further provides an input-output processing device, comprising:

[0038] A creation and acquisition module, configured to acquire a first number of sites mapped to a host during the creation of a data protection center; wherein the data protection center includes at least a local site and a remote site;

[0039] a determination module configured to, when starting the data protection center to protect data, determine that the data protection center has failed to start protecting data if it is detected that the first number is greater than 1; and determine that the data protection center has successfully started protecting data if it is detected that the first number is less than or equal to 1;

[0040] A judging module, configured to, after successful startup, judge whether the first number is equal to 0; if not, trigger the receiving module; if so, trigger the adding and detecting module;

[0041] The receiving module is configured to use the site mapped to the host as a target site, and use the target site to receive input and output requests sent by the host;

[0042] The adding and detecting module is configured to add sites mapped to the host and obtain a second number of sites mapped to the host; and when it is detected that the second number is equal to 1, return to trigger the receiving module.

[0043] In order to solve the above technical problems, the present invention further provides an input-output processing device, comprising:

[0044] memory for storing computer programs;

[0045] A processor is used to implement the steps of the above-mentioned input and output processing method when executing the computer program.

[0046] In order to solve the above technical problems, the present invention further 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-mentioned input and output processing method are implemented.

[0047] The input and output processing method provided by the present invention includes obtaining a first number of sites mapped to the host during the stage of creating a data protection center; when the data protection center is started to protect data, when the first number is equal to 1, or when the first number is equal to 0, adding sites mapped to the host and obtaining a second number of sites mapped to the host, and when it is detected that the second number is equal to 1, using the site mapped to the host as the target site, and using the target site to receive input and output requests issued by the host.

[0048] The beneficial effects of the present invention are as follows: first, in the method, only when the number of sites mapped to the host is equal to 1, the site mapped to the host is used to receive the input and output requests issued by the host, that is, it is ensured that only one site is responsible for the host's business at the same time, avoiding the problem of disordered flow of input and output requests, and ensuring data consistency between the sites as much as possible; second, the method judges the number of sites mapped to the host in the stage of creating a data protection center, when starting the data protection center to protect data, and after the data protection center is successfully started to protect data, so that in the entire process of using the data protection center to protect data, it is ensured that only one site is mapped to the host before the site mapped to the host is used to receive the input and output requests issued by the host, further avoiding the problem of disordered flow of input and output requests, and ensuring data consistency; third, when the data protection center is created, the first number of sites mapped to the host is obtained to be 0, then after the data protection center is successfully started to protect data, by adding the site mapped to the host, the site mapped to the host is used to receive the input and output requests issued by the host, thereby ensuring that the input and output requests issued by the host can be processed as much as possible.

[0049] Furthermore, when creating a data protection center, the I / O request jump direction is set. Before starting the data protection center to protect data, the I / O request transmission direction is obtained. Only when the I / O request jump direction and the I / O request transmission direction are determined to be the same does the data protection center start protecting data. This ties the I / O request jump direction and the I / O request transmission direction together, preventing the occurrence of mixed I / O request flow directions.

[0050] When it is determined that the input / output request jump direction is different from the input / output request transmission direction, the input / output request jump direction and the input / output request transmission direction are controlled so that the two directions are the same, thereby ensuring that the input / output request flow direction will not be confused as much as possible.

[0051] After detecting that a write input / output request arrives at the data logical storage unit in the second site, jump to the backup logical storage unit in the remote site to modify the bitmap; after completing the modification of the bitmap of the backup logical storage unit, return to write the data in the data logical storage unit in the second site; and after detecting that the double write is completed, return to the backup logical storage unit in the remote site to modify the bitmap, so that the data in the data logical storage unit of the second site is the same as the data in the backup logical storage unit of the remote site, thereby ensuring data consistency.

[0052] For active-active sites, when there is a faulty site, by restricting the master end in the active-active relationship from switching to a normal site, it is avoided that both the master end and the remote site in the active-active relationship receive input and output requests sent by the host at the same time. Instead, only the remote site is allowed to receive input and output requests sent by the host. This prevents the occurrence of disordered input and output request flows caused by faults or multiple sites simultaneously assuming the host's business, and eliminates the risk of data inconsistency.

[0053] In addition, the present invention also provides an input-output processing device, an input-output processing equipment, and a computer-readable storage medium, which have the same or corresponding technical features as the above-mentioned input-output processing method and have the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present invention, 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0055] Figure 1 A flowchart of an input and output processing method provided by an embodiment of the present invention;

[0056] Figure 2 A flowchart of a method for creating a 3DC strategy after adding parameters provided by an embodiment of the present invention;

[0057] Figure 3 A schematic diagram of an active-active asynchronous serial IO processing flow provided by an embodiment of the present invention;

[0058] Figure 4 This is a structural diagram of an input / output processing device provided in another embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0060] The core of the present invention is to provide an input-output processing method, device, equipment and medium to solve the technical problem of input-output flow disorder and data inconsistency.

[0061] In order to enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods. Figure 1 A flowchart of an input and output processing method provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method includes:

[0062] S10: in the stage of creating the data protection center, obtaining a first number of sites mapped to the host;

[0063] The data protection center includes at least a local site and a remote site;

[0064] S11: when starting the data protection center to protect data, if it is detected that the first number is greater than 1, it is determined that the data protection center fails to start protecting data; if it is detected that the first number is less than or equal to 1, it is determined that the data protection center successfully starts protecting data;

[0065] S12: After the startup is successful, determine whether the first quantity is equal to 0; if not, proceed to step S13; if so, proceed to step S14;

[0066] S13: The site mapped to the host is used as the target site, and the target site is used to receive input and output requests sent by the host;

[0067] S14: Add the site mapped to the host and obtain the second number of sites mapped to the host; when it is detected that the second number is equal to 1, use the site mapped to the host as the target site, and use the target site to receive input and output requests sent by the host.

[0068] Currently, two common disaster recovery technologies are local and remote. Local disaster recovery sites typically have the same business processing capabilities as production sites, enabling smooth failover without data loss, ensuring business continuity. However, these sites place high demands on network connectivity, limiting the distance between them. Remote disaster recovery allows for greater data protection at production sites, but data loss is inevitable in the event of a disaster. 3DC combines the advantages of both. While the remote disaster recovery center offers comprehensive disaster takeover capabilities, a local disaster recovery center is established, serving as a synchronized data mirror site while also providing business takeover capabilities. 3DC can rapidly respond to disasters of varying scale, restoring services, minimizing data loss, and achieving optimal recovery point objectives (RPOs) and recovery time objectives (RTOs).

[0069] While the current 3DC strategy combines the advantages of local disaster recovery and remote disaster recovery, it also has stricter requirements for IO delivery and transmission flow in the workflow. Since both the production center and the disaster recovery center under the 3DC strategy have the ability to undertake business, if user errors cause business to be delivered to multiple sites at the same time, or if the faulty production site carries the host mapping of the original production business and starts the 3DC failover process, it will cause IO flow confusion and there is a risk of data inconsistency.

[0070] Therefore, the embodiment of the present invention proposes to restrict IO delivery in an input / output processing method to prevent IO flow disorder caused by failure or erroneous operation and eliminate the possibility of data inconsistency.

[0071] First, during the data protection center creation phase, a first number of sites mapped to the host is obtained. The method for obtaining the number of sites mapped to the host (including the first number and the second number mentioned later) is not limited. In one embodiment, during the data protection center creation phase, obtaining the first number of sites mapped to the host includes:

[0072] In the data protection center creation phase, determining a first number of sites mapped to the host according to a parameter used to characterize the number of sites mapped to the host;

[0073] Among them, in the stage of creating a data protection center, when creating data volumes and mapping each data volume to the site corresponding to the data protection center, when creating data synchronous replication between local sites and creating asynchronous replication between local sites and remote sites, the parameters used to represent the number of sites mapped to the host are all invalid values; in the stage of creating a data protection center, when it is detected that there is a site mapped to the host, the value of the parameter used to represent the number of sites mapped to the host will be increased by 1.

[0074] In order to avoid IO flow confusion, the embodiment of the present invention ensures that only one site receives IO issued by the host at the same time. When starting the data protection center to protect data, if it is detected that the first number is greater than 1, it is determined that the data protection center has failed to start protecting data; if it is detected that the first number is less than or equal to 1, it is determined that the data protection center has successfully started protecting data; after successful startup, if the first number is equal to 1, the site mapped to the host is used as the target site, and the target site is used to receive input and output requests issued by the host; if the first number is equal to 0, the site mapped to the host is added and the second number of sites mapped to the host is obtained; when it is detected that the second number is equal to 1, the site mapped to the host is used as the target site, and the target site is used to receive input and output requests issued by the host.

[0075] The following describes the above process using a 3DC scenario as an example.

[0076] The relationship between the 3DC production center and the local disaster recovery center is dual-active and synchronous replication. The relationship with the remote disaster recovery center is periodic asynchronous replication. According to the topological relationship between the two remote replication masters during 3DC forward transmission, there are two types of network architectures: series and parallel.

[0077] Series networking architecture: synchronous + periodic asynchronous (A->B->C), active-active + periodic asynchronous (A<->B->C);

[0078] Parallel networking architecture: synchronous + periodic asynchronous (C<-A->B), active-active + periodic asynchronous (C<-A<->B);

[0079] (1) Synchronous + periodic asynchronous serial architecture:

[0080] Disk array A is deployed in the business production center, and disk array B is deployed in the local disaster recovery center. The two are interconnected via a Fiber Channel (FC) link, and synchronous remote replication is established to synchronize data received by disk array A to disk array B in real time. Disk array C is deployed in the remote disaster recovery center, and periodic asynchronous remote replication is established with B to synchronize B's data to C on a regular basis.

[0081] (2) Active-active + periodic asynchronous serial architecture:

[0082] The architecture consists of two production centers and an off-site disaster recovery center. Disk arrays A and B are deployed in the two local business production centers respectively. The two are interconnected through FC links to establish a dual-active topology. Disk array C is deployed in the off-site disaster recovery center, and periodic asynchronous remote replication is established with B to synchronize B's data to C on a regular basis.

[0083] (3) Synchronous + periodic asynchronous parallel architecture:

[0084] Deploy disk array A in the business production center and disk array B in the local disaster recovery center. The two are interconnected through FC links and establish synchronous remote replication. Deploy disk array C in the remote disaster recovery center and establish periodic asynchronous remote replication with A.

[0085] (4) Active-active + periodic asynchronous parallel architecture:

[0086] The architecture consists of two production centers and an off-site disaster recovery center. Disk arrays A and B are deployed in the two local business production centers respectively. The two are interconnected through FC links to establish a dual-active topology; disk array C is deployed in the off-site disaster recovery center to establish periodic asynchronous remote replication with A.

[0087] The 3DC policy includes remote replication between logical storage unit A and logical storage unit B, and remote replication between incremental data storage unit B and logical storage unit C. In remote replication, a parameter (site_3dc_count) has been added to indicate the number of sites mapped to a host. This parameter represents the number of sites mapped to a host in a 3DC policy. For sites not in a 3DC policy, this parameter is 0xffff (an invalid value). The number of sites mapped to a host is determined by the change in the value of site_3dc_count.

[0088] Figure 2 A flowchart of a method for creating a 3DC strategy after adding parameters provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method includes:

[0089] S15: Create volume;

[0090] S16: Create active-active and synchronous replication;

[0091] S17: Create periodic asynchronous replication;

[0092] S18: Set the input and output jump direction of synchronous replication and periodic asynchronous replication;

[0093] S19: Synchronous replication of primary volume mapping host;

[0094] S20: Start the data protection center to protect data strategies.

[0095] It's worth noting that when creating a HyperMetro system, synchronous replication, periodic asynchronous replication, or setting the input / output redirection for synchronous replication or periodic asynchronous replication, the value of site_3dc_count is 0xffff. After the synchronous replication primary volume is mapped to a host, site_3dc_count is 1.

[0096] 1) When creating a 3DC policy, this parameter is initialized to 0. The host mapping status of the virtual disks (vdisks) of synchronous / active-active and periodic asynchronous remote replication in the 3DC policy is traversed and queried. If a host mapping exists, the value is incremented by 1.

[0097] 2) When starting a 3DC policy, query the parameter site_3dc_count for each remote replication in the 3DC policy. If site_3dc_count is greater than 1, the policy fails to start and an error is reported.

[0098] 3) After the 3DC policy is successfully started, if a new host mapping is added to the vdisk in the 3DC policy, the remote replication parameter site_3dc_count corresponding to the vdisk is queried. If site_3dc_count = 1, the host mapping addition fails.

[0099] By checking the host mapping status at key process points such as creating host mapping, creating 3DC policies, and starting 3DC policies, we ensure that only one site receives the host mapping before and after the production business center is changed.

[0100] In the method provided by this embodiment, first, only when the number of sites mapped to the host is equal to 1, the site mapped to the host is used to receive the input and output requests issued by the host, that is, it is ensured that only one site is responsible for the host's business at the same time, avoiding the problem of disordered flow of input and output requests, and ensuring data consistency between the sites as much as possible; secondly, the method judges the number of sites mapped to the host during the stage of creating the data protection center, when starting the data protection center to protect data, and after the data protection center is successfully started to protect data, so that during the entire process of using the data protection center to protect data, it is ensured that only one site is mapped to the host before the site mapped to the host is used to receive the input and output requests issued by the host, further avoiding the problem of disordered flow of input and output requests, and ensuring data consistency; thirdly, when the data protection center is created, if the first number of sites mapped to the host is 0, then after the data protection center is successfully started to protect data, by adding the site mapped to the host, the site mapped to the host is used to receive the input and output requests issued by the host, thereby ensuring that the input and output requests issued by the host can be processed as much as possible.

[0101] In addition to the site-host service mapping query method described above, ensuring that only one site receives the host mapping avoids IO flow confusion and eliminates the risk of data inconsistency. This embodiment also provides IO flow change restrictions to avoid IO flow confusion. In implementation, the data protection center creation stage also includes:

[0102] Set the jump direction of input and output requests of local sites and remote sites. Figure 2 Step S18 in .

[0103] Before starting the data protection center to protect data, the method further includes:

[0104] Get the input and output request transmission direction;

[0105] Determine whether the input / output request jump direction is the same as the input / output request transmission direction;

[0106] If so, the data protection center is activated to protect the data;

[0107] If not, a prompt message indicating that starting the data protection center to protect data is prohibited is output, and the input / output request jump direction is controlled to be the same as the input / output request transmission direction.

[0108] Specifically, the local site includes a first site and a second site, and the first site and the second site are in an active-active network topology structure; the remote site includes a backup logical storage unit; wherein the backup logical storage unit in the remote site has the same attributes as the data logical storage unit in the second site;

[0109] Controlling the jump direction of input and output requests is the same as the transmission direction of input and output requests, including:

[0110] When it is detected that the input / output request transmission direction is forward transmission, the redirection of the input / output request from the data logical storage unit in the second site to the backup logical storage unit in the remote site is retained, and after the data protection center starts protecting data, the redirection of the input / output request from the data logical storage unit in the second site to the backup logical storage unit in the remote site is maintained; wherein the forward transmission is the transmission of the input / output request from the first site to the second site;

[0111] After the data protection center starts protecting data, the method further includes:

[0112] After detecting that a write input / output request arrives at the data logical storage unit in the second site, jump to the backup logical storage unit in the remote site to modify the bitmap;

[0113] After completing the modification of the bitmap of the backup logical storage unit, return to write data in the data logical storage unit in the second site; wherein the bitmap is used to represent the difference between the data in the data logical storage unit in the second site and the data in the backup logical storage unit in the remote site.

[0114] If it is detected that the transmission direction of the input / output request changes from forward transmission to reverse transmission, the data protection center is suspended from protecting the data; wherein the reverse transmission is the transmission of the input / output request from the remote site to the second site;

[0115] From the time when data protection by the data protection center is suspended until data protection by the data protection center is restarted, the input and output request jump relationship between the data logical storage unit in the second site and the backup logical storage unit in the remote site is deleted;

[0116] An input / output request jump relationship is established from the backup logical storage unit in the remote site to the data logical storage unit in the second site.

[0117] After establishing the input / output request jump relationship from the backup logical storage unit in the remote site to the data logical storage unit in the second site, the method further includes:

[0118] After the data protection center is started to protect the data, the input and output requests of the host received are copied using the backup logical storage unit in the remote site;

[0119] Jump to the data logical storage unit in the second site and perform dual write with the first site;

[0120] After detecting that the double write is completed, the backup logical storage unit returned to the remote site modifies the bitmap so that the difference between the data in the data logical storage unit of the second site and the data in the backup logical storage unit of the remote site is zero.

[0121] Take the active-active + asynchronous cascade 3DC strategy as an example:

[0122] Figure 3 A schematic diagram of an active-active asynchronous serial IO processing flow provided by an embodiment of the present invention is shown as follows: Figure 3 As shown, the production host issues I / O to a cross-site active-active cluster, which then interacts with the disaster recovery center corresponding to the disaster recovery host. The cross-site active-active cluster includes arrays in Data Center A and Data Center B, both of which contain logical data storage units. In addition, the array in Data Center B also contains incremental data. The disaster recovery center includes arrays in Data Center C, which correspond to the logical disaster recovery storage units.

[0123] During the IO forward transmission process, the active-active slave end and the remote replication master end are in production center B. The active-active slave end is designated as the data logical storage unit (Logical Unit, LUN), and the periodic asynchronous replication master end is the backup LUN with consistent data LUN attributes. The IO jump of data LUN->backup LUN is retained and cannot be changed when the 3DC is started. After the write IO reaches the data LUN, it jumps to the backup LUN to modify the bitmap and then returns to the data LUN to write data. The original technology is to synchronize the write IO received by the data LUN to the snapshot LUN by regularly starting incremental snapshots. The jump method of the present invention is bound to the IO transmission direction. If the two are mutually exclusive, the 3DC strategy cannot be started.

[0124] When the 3DC topology is modified to reverse transmission, the jump relationship between data LUN->backup LUN is deleted and the jump relationship between backup LUN and data LUN is established between suspending the 3DC policy and the next startup. After starting reverse synchronization, the backup LUN will first jump to the data LUN of production site B for copy IO at the remote disaster recovery site and perform dual write with production site A. After the dual write is completed, the backup LUN is returned to modify the bitmap, so that the asynchronous remote replication bitmap of B and C is reset. Figure 1 To.

[0125] In the method provided in this embodiment, the IO jump relationship modification mechanism between two remote replication relationships is used to ensure that the IO jump direction is consistent with the IO transmission direction, thereby avoiding the occurrence of input and output flow confusion and eliminating the risk of data inconsistency.

[0126] The above solves the problem of IO flow disorder by restricting IO flow changes. In practice, if the host mapping of the failed production site with the original production business is started and the 3DC failover process is started, it will cause IO flow disorder and the risk of data inconsistency. Therefore, the input and output processing method also includes:

[0127] When reverse transmission is detected, if one of the first site and the second site fails, obtaining a normal site from the first site and the second site;

[0128] The active end in the active-active relationship is restricted from switching to a normal site, and the remote site is maintained to receive input and output requests sent by the host. The active end in the active-active relationship is the site that receives input and output requests from the host.

[0129] According to the 3DC strategy requirements, when the 3DC strategy is started and business data is received, only one site is allowed to bear business data. However, in special circumstances, such as when all local sites recover after failure and reverse transmission is performed, if the restored production site A or B still has the host business mapping before the failure, there is a possibility of receiving host IO, which poses a risk of data inconsistency.

[0130] In order to prevent re-failures in the fault recovery process, the present invention adds restrictions on the automatic switching of the active-active relationship caused by faults under the 3DC strategy. For example, during the reverse transmission process after the recovery of production centers A and B, if production center B fails again, the present invention will limit the master end of the active-active relationship to switch to production center A to prevent IO flow conflicts after B recovers. At this time, the active-active and periodic asynchronous replication relationships will be disconnected, and the asynchronous replication center C will continue to receive business data. After the production center B recovers, the IO flow direction remains unchanged, and reverse transmission continues to execute the fault recovery process of the 3DC strategy. This ensures that the IO flow direction is fixed throughout the fault recovery process, eliminating the risk of data inconsistency.

[0131] Specifically, the fault recovery process for executing the 3DC strategy includes the following:

[0132] When a local production center fails, the automatic active-active failover feature of the active-active system can reduce RPO to 0 and significantly reduce RTO. If both local active-active production sites fail simultaneously, manual failover can be performed, with the remote disaster recovery site taking over production services. This inevitably results in a small amount of data loss. Once the local site recovers, reverse transmission is used to transfer incremental service data received at the remote disaster recovery site back to the local production and local disaster recovery sites. Once synchronization is complete, services are switched back to the production center, resuming forward transmission.

[0133] The following describes the site fault handling method for active-active + periodic asynchronous cascade 3DC.

[0134] a: Failure of production center A:

[0135] When production center A fails, production center B automatically takes over the business. Production center B records the data differences with production center A, and the periodic asynchronous replication with the remote disaster recovery center is not affected.

[0136] When production center A is repaired, production center B will copy the differential data during the failure period to production center A until the two active-active data LUNs are fully synchronized.

[0137] If production center A cannot be repaired and needs to be rebuilt, the active-active system requires a full synchronization from B to A.

[0138] b: Production center B fails

[0139] When production center B fails, it does not affect the takeover of production center A's business, but the production data cannot be synchronized to B, nor can it be replicated to the remote disaster recovery center through periodic asynchronous replication.

[0140] When production center B is repaired, production center A will automatically resynchronize the differential data to production center B. When B is fully synchronized with A, periodic asynchronous replication will be triggered again.

[0141] When production center B cannot be repaired, the active-active system needs to reinitialize the synchronized data and re-initialize the data to the remote disaster recovery center.

[0142] c: Production center A and production center B fail at the same time:

[0143] Because production centers A and B are close together, a large-scale regional disaster could cause simultaneous failures at both sites. In this case, services can be restored at a remote disaster recovery center. When services are restored at a remote disaster recovery center, data must be rolled back to the most recent consistency point, potentially resulting in data loss for up to two replication cycles.

[0144] d: Remote disaster recovery center C fails:

[0145] When the remote disaster recovery center C fails, the periodic asynchronous replication from production center B to disaster recovery center C is interrupted. After C recovers, asynchronous replication continues to run in incremental mode to synchronize incremental data.

[0146] If the data in disaster recovery center C cannot be restored, a full initial synchronization is required.

[0147] The above fault recovery strategy can handle various fault scenarios in the active-active + periodic asynchronous series 3DC site and ensure data protection.

[0148] In the method provided in this embodiment, for scenarios where there is a risk of data inconsistency due to a failure of the 3DC business causing the switching of the business production center, or human error causing IO direction confusion, the method protects the 3DC policy IO flow by scanning and querying all sites of the 3DC policy, modifying the IO jump relationship between the data LUN and the backup LUN, and restricting the active-active switching mechanism. This ensures that there is only one site mapping host before and after the business production site switching, prevents 3DC policy IO flow confusion caused by failures or multiple sites simultaneously undertaking business, and eliminates the risk of data inconsistency.

[0149] It is worth noting that the input and output processing method provided in the embodiment of the present invention is applicable to any networking architecture under 3DC networking to prevent IO flow disorder caused by failure or misoperation and eliminate the possibility of data inconsistency.

[0150] While the above embodiments describe the input / output processing method in detail, the present invention also provides corresponding embodiments of an input / output processing apparatus and device. It should be noted that the present invention describes the apparatus embodiments from two perspectives: one based on functional modules and the other based on hardware.

[0151] An input / output processing device provided by an embodiment of the present invention, based on the perspective of functional modules, includes:

[0152] A creation and acquisition module, configured to acquire a first number of sites mapped to a host during the creation of a data protection center; wherein the data protection center includes at least a local site and a remote site;

[0153] a determination module configured to, when starting the data protection center to protect data, determine that the data protection center has failed to start protecting data if it is detected that the first number is greater than 1; and determine that the data protection center has successfully started protecting data if it is detected that the first number is less than or equal to 1;

[0154] A judging module, configured to judge whether the first quantity is equal to 0 after successful startup; if not, trigger the receiving module; if so, trigger the adding and detecting module;

[0155] The receiving module is used to use the site mapped to the host as the target site and use the target site to receive input and output requests sent by the host;

[0156] The adding and detecting module is used to add a site mapped to the host and obtain a second number of sites mapped to the host; when it is detected that the second number is equal to 1, it returns to trigger the receiving module.

[0157] In some embodiments, creating and obtaining a module includes:

[0158] A creation and acquisition submodule, configured to determine, during a data protection center creation phase, a first number of sites mapped to the host based on a parameter characterizing the number of sites mapped to the host;

[0159] Among them, in the stage of creating a data protection center, when creating data volumes and mapping each data volume to the site corresponding to the data protection center, when creating data synchronous replication between local sites and creating asynchronous replication between local sites and remote sites, the parameters used to represent the number of sites mapped to the host are all invalid values; in the stage of creating a data protection center, when it is detected that there is a site mapped to the host, the value of the parameter used to represent the number of sites mapped to the host will be increased by 1.

[0160] In some embodiments, the input-output processing device further includes:

[0161] The setting module is used to set the jump direction of input and output requests of local sites and remote sites;

[0162] The input and output processing device also includes:

[0163] A first acquisition module is used to obtain the transmission direction of the input and output request;

[0164] The first judgment module is used to judge whether the jump direction of the input / output request is the same as the transmission direction of the input / output request; if so, trigger the start module; if not, trigger the output and control module;

[0165] A startup module is used to start the data protection center to protect data;

[0166] The output and control module is used to output prompt information indicating that the data protection center is prohibited from starting to protect data, and to control the jump direction of the input and output request to be the same as the transmission direction of the input and output request.

[0167] In some embodiments, the local site includes a first site and a second site, the first site and the second site are in an active-active network topology; the remote site includes a backup logical storage unit; wherein the backup logical storage unit in the remote site has the same attributes as the data logical storage unit in the second site;

[0168] The control module is used to control the jump direction of the input and output request to be the same as the transmission direction of the input and output request;

[0169] The control module specifically includes:

[0170] A retention module is configured to retain the redirection of the input / output request from the data logical storage unit in the second site to the backup logical storage unit in the remote site when detecting that the input / output request transmission direction is forward transmission, and to maintain the redirection of the input / output request from the data logical storage unit in the second site to the backup logical storage unit in the remote site after the data protection center starts protecting data; wherein forward transmission is the transmission of the input / output request from the first site to the second site;

[0171] A pause module, configured to pause data protection at the data protection center if it detects that the transmission direction of an input / output request changes from forward transmission to reverse transmission; wherein the reverse transmission is the transmission of the input / output request from a remote site to a second site;

[0172] A deletion module is used to delete the input and output request jump relationship between the data logical storage unit in the second site and the backup logical storage unit in the remote site from the time when the data protection center suspends data protection to the time when the data protection center restarts data protection;

[0173] The establishing module is used to establish an input and output request jump relationship from the backup logical storage unit in the remote site to the data logical storage unit in the second site.

[0174] In some embodiments, the input-output processing device further includes:

[0175] A jump module, configured to jump to a backup logical storage unit in a remote site to modify a bitmap after detecting that a write input / output request has arrived at the data logical storage unit in the second site;

[0176] The first return module is used to return to write data in the data logical storage unit in the second site after completing the modification of the bitmap of the backup logical storage unit; wherein the bitmap is used to represent the difference between the data in the data logical storage unit in the second site and the data in the backup logical storage unit in the remote site.

[0177] In some embodiments, the input / output processing device further includes:

[0178] A copy module is used to copy the input and output requests received from the host using the backup logical storage unit in the remote site after the data protection center is started to protect the data;

[0179] A dual-write module, used to jump to the data logic storage unit in the second site and perform dual-write with the first site;

[0180] The second returning module is used to return the modification bitmap of the backup logical storage unit of the remote site after detecting that the double write is completed, so that the difference between the data in the data logical storage unit of the second site and the data in the backup logical storage unit of the remote site is 0.

[0181] In some embodiments, the input-output processing device further includes:

[0182] A second acquisition module is configured to acquire a normal site from among the first site and the second site if one of the first site and the second site fails when reverse transmission is detected;

[0183] The restriction module is used to restrict the master end in the active-active relationship from switching to a normal site and keep the remote site receiving input and output requests sent by the host; wherein the master end in the active-active relationship is the site that receives the input and output requests of the host.

[0184] 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, and they will not be repeated here.

[0185] Figure 4 This is a structural diagram of an input and output processing device provided by another embodiment of the present invention. This embodiment is based on the hardware perspective, such as Figure 4 As shown, the input and output processing equipment includes:

[0186] Memory 20, for storing computer programs;

[0187] The processor 21 is configured to implement the steps of the input and output processing method mentioned in the above embodiment when executing a computer program.

[0188] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented in at least one of the following hardware forms: a digital signal processor (DSP), a field-programmable gate array (FPGA), or 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 the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing content required to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is responsible for processing computing operations related to machine learning.

[0189] 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 input and output processing 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 data involved in the input and output processing method mentioned above.

[0190] In some embodiments, the input / output processing 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 .

[0191] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the input and output processing device, and may include more or fewer components than shown in the figure.

[0192] The input-output processing device provided by the embodiment of the present invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: the input-output processing method, the effect is the same as above.

[0193] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned input and output processing method when executed by a processor.

[0194] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiment.

[0195] It is understood that if the methods in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage media include various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0196] The computer-readable storage medium provided by the present invention includes the above-mentioned input and output processing method, and the effect is the same as above.

[0197] The above is a detailed introduction to an input and output processing method, device, equipment and medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the present invention.

[0198] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

Claims

1. An input and output processing method, characterized in that: include: In the stage of creating a data protection center, a first number of sites mapped to the host is obtained; wherein the data protection center includes at least a local site and a remote site; When starting the data protection center to protect data, if it is detected that the first number is greater than 1, it is determined that the data protection center has failed to start protecting data; if it is detected that the first number is less than or equal to 1, it is determined that the data protection center has successfully started protecting data; When the first number is equal to 1, the site mapped to the host is used as the target site, and the input and output requests sent by the host are received by using the target site; When the first number is equal to 0, add the site mapped to the host and obtain the second number of sites mapped to the host; when it is detected that the second number is equal to 1, return to the step of using the site mapped to the host as the target site and use the target site to receive input and output requests issued by the host.

2. The input-output processing method according to claim 1, wherein: In the data protection center creation stage, obtaining a first number of sites mapped to the host includes: In the data protection center creation stage, the first number of sites mapped to the host is determined according to a parameter used to characterize the number of sites mapped to the host; Among them, in the stage of creating a data protection center, when creating data volumes and mapping each data volume to the site corresponding to the data protection center, when creating data synchronous replication between local sites and creating asynchronous replication between local sites and remote sites, the parameters used to characterize the number of sites mapped to the host are all invalid values; in the stage of creating a data protection center, when it is detected that there is a site mapped to the host, the value of the parameter used to characterize the number of sites mapped to the host is increased by 1.

3. The input-output processing method according to claim 2, wherein: The creation of a data protection center also includes: Set the jump direction of input and output requests of local sites and remote sites; Before starting the data protection center to protect data, the method further includes: Get the input and output request transmission direction; Determining whether the jump direction of the input / output request is the same as the transmission direction of the input / output request; If so, the data protection center is activated to protect the data; If not, a prompt message indicating that the data protection center is prohibited from being started to protect data is output, and the input / output request jump direction is controlled to be the same as the input / output request transmission direction.

4. The input-output processing method according to claim 3, wherein: The local site includes a first site and a second site, and the first site and the second site are in an active-active network topology; the remote site includes a backup logical storage unit; wherein the backup logical storage unit in the remote site has the same attributes as the data logical storage unit in the second site; The controlling the jump direction of the input / output request to be the same as the transmission direction of the input / output request includes: When it is detected that the transmission direction of the input / output request is forward transmission, the redirection of the input / output request from the data logical storage unit in the second site to the backup logical storage unit in the remote site is retained, and after the data protection center starts protecting data, the redirection of the input / output request from the data logical storage unit in the second site to the backup logical storage unit in the remote site is maintained; wherein the forward transmission is the transmission of the input / output request from the first site to the second site; If it is detected that the transmission direction of the input / output request changes from the forward transmission to the reverse transmission, suspending the data protection center from protecting the data; wherein the reverse transmission is the transmission of the input / output request from the remote site to the second site; From the time when the data protection center is suspended to the time when the data protection center is restarted, the input and output request jump relationship between the data logical storage unit in the second site and the backup logical storage unit in the remote site is deleted; An input / output request jump relationship is established from the backup logical storage unit in the remote site to the data logical storage unit in the second site.

5. The input-output processing method according to claim 4, characterized in that: After the data protection center starts protecting data, the method further includes: After detecting that a write input / output request arrives at the data logical storage unit in the second site, jump to the backup logical storage unit in the remote site to modify the bitmap; After completing the modification of the bitmap of the backup logical storage unit, return to writing data in the data logical storage unit in the second site; wherein, the bitmap is used to represent the difference between the data in the data logical storage unit of the second site and the data in the backup logical storage unit of the remote site.

6. The input-output processing method according to claim 4, wherein: After establishing the input / output request jump relationship from the backup logical storage unit in the remote site to the data logical storage unit in the second site, the method further includes: After the data protection center is started to protect data, the input and output requests of the host are copied using the backup logic storage unit in the remote site; Jumping to the data logical storage unit in the second site and performing dual writing with the first site; After detecting that the double write is completed, returning to the backup logical storage unit of the remote site to modify the bitmap so that the difference between the data in the data logical storage unit of the second site and the data in the backup logical storage unit of the remote site is zero.

7. The input-output processing method according to any one of claims 4 to 6, characterized in that: Also includes: When the reverse transmission is detected, if one of the first site and the second site fails, obtaining a normal site among the first site and the second site; The master end in the active-active relationship is restricted from switching to the normal site, and the remote site is kept receiving input and output requests sent by the host; wherein the master end in the active-active relationship is the site that receives the input and output requests of the host.

8. An input-output processing device, characterized in that: include: A creation and acquisition module, configured to acquire a first number of sites mapped to a host during the creation of a data protection center; wherein the data protection center includes at least a local site and a remote site; a determination module configured to, when starting the data protection center to protect data, determine that the data protection center has failed to start protecting data if it is detected that the first number is greater than 1; and determine that the data protection center has successfully started protecting data if it is detected that the first number is less than or equal to 1; A judging module, configured to, after successful startup, judge whether the first number is equal to 0; if not, trigger the receiving module; if so, trigger the adding and detecting module; The receiving module is configured to use the site mapped to the host as a target site, and use the target site to receive input and output requests sent by the host; The adding and detecting module is configured to add sites mapped to the host and obtain a second number of sites mapped to the host; and when it is detected that the second number is equal to 1, return to trigger the receiving module.

9. An input-output processing device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the input-output processing 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 input-output processing method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Establishing method and device of IPSAN disaster tolerant system

    CN107391294A

  • Method and device for deploying cross-site cluster based on ETCD

    CN115208743A