Synchronous remote replication method and device of storage system

Through synchronous remote replication, the main storage device sends a response after the local cache and main interface card are successfully written, and optimizes the data synchronization process, solving the delay problem caused by distance and improving the efficiency and reliability of disaster recovery and backup. sex, improving customer experience.

CN118550761APending Publication Date: 2024-08-27HUAWEI TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202310196308.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In synchronous remote replication, due to the long distance between the primary storage device and the remote storage device, the delay from write request to write response is long, affecting the efficiency of disaster recovery and backup and customer experience.

Method used

After confirming that the target data has been written to the local cache, the main storage device sends a write success response to the host without waiting for confirmation from the remote storage device. It further sends data to the remote storage device after confirming that the target data has been written to the main interface card. , optimize the data synchronization process, shorten the synchronization delay, and improve data reliability through preset disk mapping relationships and health status update mechanisms.

Benefits of technology

It effectively shortens the synchronization delay in synchronous remote replication, improves the efficiency of disaster recovery and backup and data reliability, avoids application business interruption due to network disconnection, and improves customer experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550761A
    Figure CN118550761A
Patent Text Reader

Abstract

The invention relates to a synchronous remote replication method and device of a storage system, which are used for solving the problem that the time delay between the time when a host issues a write request to a main storage device and the time when the host receives a write response from the main storage device in the prior art. The storage system comprises a main storage device and a far-end storage device. The main storage device comprises a cache and a main interface card. The method comprises the steps that a main storage device obtains a write request of a host, wherein the write request comprises target data; the main storage device writes target data into the main interface card; the main storage device writes target data into the cache; the main storage device sends a write success response to the host in response to successful writing of the target data into the cache; and the main storage device sends the target data to the far-end storage device in response to successful writing of the target data into the main interface card.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computing technology, and in particular to a synchronous remote replication method and device for a storage system. Background Art

[0002] Remote replication is the core technology of disaster recovery and backup, which can realize remote data backup and disaster recovery. Specifically, remote replication is to synchronize data from the primary storage device to the remote storage device in real time or periodically, so that when the primary storage device fails, the remote storage device can provide the same functions as the primary storage device.

[0003] In synchronous remote replication, the host sends a write request to the primary storage device, which carries the target data to be written to the primary storage device. The primary storage device not only needs to store the target data in the cache of the primary storage device (remembered as the primary cache), but also remotely replicates the target data to the cache of the remote storage device (remembered as the remote cache). After obtaining the result of storing the target data in the primary cache and the result of storing the target data in the remote cache, the primary storage device feeds back the write response corresponding to the write request to the host.

[0004] However, due to the long distance between the main storage device and the remote storage device, the synchronization time required for the main storage device to synchronize the target data with the remote storage device is relatively long. Accordingly, the delay between the host sending a write request to the main storage device and receiving a write response from the main storage device is relatively long, and the delay increases as the distance between the main storage device and the remote storage device increases. Summary of the invention

[0005] The present application provides a synchronous remote replication method and apparatus for a storage system, which are used to shorten the delay between a host sending a write request to a primary storage device and receiving a write response from the primary storage device in synchronous remote replication.

[0006] In a first aspect, the present application provides a synchronous remote replication method for a storage system, wherein the storage system includes a main storage device and a remote storage device, and the main storage device includes a cache and a main interface card. The method includes: the main storage device obtains a write request from a host, and the write request includes target data; the main storage device writes the target data to the main interface card; the main storage device writes the target data to the cache; the main storage device responds to the successful writing of the target data to the cache, and sends a write success response to the host; the main storage device responds to the successful writing of the target data to the main interface card, and sends the target data to the remote storage device.

[0007] In the above technical solution, after determining that the target data is successfully written to the cache, the primary storage device can return a write success response corresponding to the write request to the host without waiting for the result of the remote storage device writing the target data, which helps to shorten the synchronization delay in synchronous remote replication. Furthermore, after determining that the target data is successfully written to the primary interface card, the primary storage device can send the target data to the remote storage device, so that the remote storage device can obtain the target data to ensure data synchronization between the primary storage device and the remote storage device.

[0008] In a possible implementation, the primary storage device also includes a backup interface card; after the primary storage device successfully writes the target data to the primary interface card, it also writes the target data to the backup interface card. Specifically, the primary interface card writes the target data to the backup interface card. This helps to further improve the reliability of data in disaster recovery backup scenarios.

[0009] In one possible implementation, the primary storage device also includes a primary storage array, and the write request also includes an identifier of a target primary disk; after the primary storage device successfully writes the target data to the cache, it also determines the target primary disk from the primary storage array based on the identifier of the target primary disk, and stores the target data in the cache in the target primary disk.

[0010] In a possible implementation, the primary storage device further determines the identifier of the target remote disk according to the identifier of the target primary disk and the preset mapping relationship between the target primary disk and the target remote disk, wherein the target remote disk is a disk in the remote storage array included in the remote storage device. The primary storage device writes the identifier of the target remote disk to the primary interface card, and the primary storage device sends the identifier of the target remote disk to the remote storage device. Specifically, the primary interface card sends the identifier of the target remote disk to the remote storage device.

[0011] In the above technical solution, a mapping relationship between the target main disk and the target remote disk is pre-set. After the main storage device obtains the identifier of the target main disk, the identifier of the target remote disk can be determined according to the mapping relationship, and the identifier of the target remote disk can be indicated to the remote storage device through the main interface card. The remote storage device can store the target data in the target remote disk. In this way, when the main storage device fails, the target remote disk used to store the target data in the remote storage device can be determined, and the target data can be read from the target remote disk.

[0012] In a possible implementation, in response to a failure in writing target data to the primary interface card, the primary storage device updates the health status of the mapping relationship between the target primary disk and the target remote disk recorded in the primary storage device to abnormal.

[0013] In the above technical solution, if the main storage device sends a write failure response to the host, the host will interrupt the currently running application business; and if the main storage device updates the health status of the mapping relationship between the target main disk and the target remote disk from normal to abnormal, it will not affect the currently running application business in the host. In this way, when the main storage device determines that the target data cannot be successfully written to the main interface card, it can update the mapping relationship between the target main disk and the target remote disk, thereby avoiding interruption of application business and helping to improve customer experience.

[0014] In a possible implementation, when the main storage device detects that the network between the main storage device and the remote storage device is disconnected, it can also record the start time of the network disconnection; the main storage device obtains a log request, and in response to the log request, outputs a log after the start time, and the log after the start time is used to query data from the main storage array of the main storage device. In this way, the difference data between the main storage device and the remote storage device can be determined according to the start time of the network disconnection, and then the difference data can be updated to the remote storage device.

[0015] In a second aspect, the present application provides a synchronous remote replication device for a storage system, comprising: a main management module, a cache and a main interface card; the main management module is used to obtain a write request from a host, the write request including target data; write the target data to the main interface card; write the target data to the cache; in response to writing the target data to the cache, send a write success response to the host; the main interface card is used to send the target data to a remote storage device.

[0016] In a possible implementation, the device further includes a backup interface card; the primary interface card is further configured to write target data to the backup interface card.

[0017] In one possible implementation, the device also includes a main storage array, and the write request also includes an identifier of the target main disk; after the main management module writes the target data to the cache, it is also used to: determine the target main disk from the main storage array according to the identifier of the target main disk, and store the target data in the cache in the target main disk.

[0018] In a possible implementation, the main management module is further used to: determine the identifier of the target remote disk according to the identifier of the target master disk and the preset mapping relationship between the target master disk and the target remote disk, wherein the target remote disk is a disk in the remote storage array included in the remote storage device; write the identifier of the target remote disk to the main interface card. The main interface card is further used to: send the identifier of the target remote disk to the remote storage device.

[0019] In a possible implementation, the main management module is further used to: in response to failure to write target data to the main interface card, update the health status of the mapping relationship between the target main disk and the target remote disk recorded in the main management module to abnormal.

[0020] In one possible implementation, the main management module is also used to: when a network disconnection between the device and the remote storage device is detected, record the start time of the network disconnection; obtain a log request, and in response to the log request, output the log after the start time, and the log after the start time is used to query data from the main storage array of the device.

[0021] In a third aspect, the present application provides a computer-readable storage medium, in which a computer program or instructions are stored. When the computer program or instructions are executed by a computing device, the computing device executes the method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0022] In a fourth aspect, the present application provides a computing device, including a processor, the processor being connected to a memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the computing device executes the method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0023] In a fifth aspect, an embodiment of the present application provides a computer program product. When a computer reads and executes the computer program product, the computer executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.

[0024] In a sixth aspect, the present application provides a storage system, including a main storage device and a remote storage device, wherein the main storage device is used to execute the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.

[0025] The technical effects that can be achieved in any of the second to sixth aspects mentioned above can refer to the description of the beneficial effects in the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram of the architecture of a storage system;

[0027] Figure 2 A schematic diagram of the architecture of a storage system suitable for a remote replication scenario;

[0028] Figure 3 A flowchart of a synchronous remote replication method for a storage system;

[0029] Figure 4 A flowchart of a synchronous remote replication method for a storage system provided in the present application;

[0030] Figure 5 A schematic diagram of the architecture of another storage system suitable for remote replication scenarios;

[0031] Figure 6 A schematic diagram of the structure of a synchronous remote replication device for a storage system provided in the present application. DETAILED DESCRIPTION

[0032] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0033] like Figure 1 As shown, it is an architecture diagram of a storage system 100. In the storage system 100, multiple hosts 110 are connected to the storage device 130 through the switch 120, wherein an Internet protocol (IP) storage network or a fiber channel (FC) storage network can be formed between the host 110, the switch 120 and the storage device 130. The communication protocol between the host 110 and the switch 120, or between the switch 120 and the storage device 130 can be a small computer system interface (SCSI) protocol. Each host 110 can be connected to a client, so that the client can operate or control the host 110 through the client.

[0034] In this embodiment, the structures of the hosts are basically the same, and in the following description, one of the hosts 110 is taken as an example. Various applications are running on the host 110, and the applications are used to provide different application services for customers.

[0035] The storage device 130 includes a storage array, which stores data generated by the application in the host 110 during operation. The storage array can be a flash array using a non-volatile memory express (NVMe) interface, or a SCSI storage array. The storage array can be divided into at least one disk, such as Figure 1In the disk 1 to n, n is a positive integer, and the storage array can communicate with the host 110 using different interfaces, such as an NVMe interface and a SCSI interface. When the storage array is a flash array using an NVMe interface, the host 100 communicates with the storage array through the NVMe protocol, and the disk can be represented by the namespace defined in the NVMe protocol. When the storage array is a storage array using a SCSI interface, the host 110 communicates with the storage array through the SCSI protocol, and the disk can be represented by the logical unit number (LUN) defined in the SCSI protocol.

[0036] After the disks are divided, the storage array will assign a disk identification (ID) and a disk code to each disk. The disk identification can uniquely identify the disk, for example, the disk identification includes a world wide name (WWN) applied to the SCSI protocol, vendor information (vendor) and product information (product); or the disk identification includes a globally unique identifier (GUID) applied to the NVMe protocol, vendor information and product information. The disk code is used to distinguish different disks in the storage array, such as LUN numbers LUN1, LUN2... under the SCSI protocol, and namespace numbers under the NVMe protocol, such as namespace1, namespace2... After the disk identification and disk code are assigned, the storage array will configure the mapping relationship between the disk and the host, specifically, the mapping relationship between the disk code and the host port information (for example, the host bus adapter (HBA) card port information), and the host to which the disk belongs can be determined according to the mapping relationship.

[0037] Combination Figure 1 The storage system 100 shown in FIG. Figure 2 The present application provides an exemplary architecture diagram of a storage system 200 suitable for remote replication scenarios. The storage system 200 includes two data centers, each of which includes a host and a storage device. Specifically, the two data centers can be respectively recorded as a main data center and a remote data center. The main data center includes a host 210 and a main storage device 220, and the remote data center includes a host 240 and a remote storage device 230. For example, the host 210 can be connected to the remote storage device 230 through a switch ( Figure 2 ) is connected to the main storage device 220, and the host 240 can be connected through a switch ( Figure 2 ) is connected to a remote storage device 230.

[0038] When the host 210 and the primary storage device 220 are operating normally, the host 210 can write the data (recorded as target data) generated by the application in the host 210 during operation to the primary storage device 220. Furthermore, the primary storage device 220 can remotely copy the target data to the remote storage device 230. When the host 210 or the primary storage device 220 fails, the host 240 can perform functions similar to those of the host 210, and because the remote storage device 230 stores the same data as the primary storage device 220, the host 240 can continue to provide the same application service to the customer based on the remote storage device 230, which helps to ensure the normal operation of the application service.

[0039] Combination Figure 2 As shown, the main storage device 220 includes a main management module 221, a main cache 222, a main storage array 223 and a main interface card 224; the remote storage device 230 includes a remote management module 231, a remote cache 232, a remote storage array 233 and a remote interface card 234.

[0040] Exemplarily, the main management module 221 is used to obtain target data from the host 210, write the target data into the main cache 222, and send the target data to the remote management module 231; the main cache 222 is used to write the target data into the main storage array 223 (or, the main cache 222 is used to write the target data in the main cache 222 to the main storage array 223 under the control of the main management module 221, that is, the main management module 221 is also used to write the target data in the main cache 222 to the main storage array 223).

[0041] The remote management module 231 is used to obtain target data from the main management module 221 and write the target data into the remote cache 232. The remote cache 232 is used to write the target data into the remote storage array 233.

[0042] The primary interface card 224 and the remote interface card 234 enable communication between the primary storage device 220 and the remote storage device 230 .

[0043] Remote replication can be implemented in two ways: synchronous remote replication and asynchronous remote replication. Synchronous remote replication can synchronize data in real time, thereby ensuring data consistency to the maximum extent possible and reducing data loss when a disaster occurs. Asynchronous remote replication synchronizes data periodically, thereby minimizing the degradation of service performance caused by the delay in remote data transmission. Synchronous remote replication achieves better data security than asynchronous remote replication.

[0044] Combination Figure 2 The architecture diagram of the storage system 200 shown in FIG. Figure 3The following is a flowchart of synchronous remote replication:

[0045] In step 301 , the host 210 sends a write request to the primary management module 221 , where the write request includes target data to be written into the primary cache 222 .

[0046] Step 302 : The primary management module 221 writes the target data in the write request into the primary cache 222 .

[0047] Step 303 , the primary cache 222 returns the write result 1 to the primary management module 221 .

[0048] Specifically, if the primary cache 222 determines that the target data is cached successfully, the write result 1 returned to the primary management module 221 is a write success, that is, the primary management module 221 successfully writes the target data into the primary cache 222; if the primary cache 222 determines that the target data is not cached successfully, the write result 1 returned to the primary management module 221 is a write failure, that is, the primary management module 221 fails to successfully write the target data into the primary cache 222.

[0049] Step 304 : The main management module 221 generates a synchronization request according to the target data in the write request, and sends the synchronization request to the remote management module 231 , wherein the synchronization request includes the target data.

[0050] Exemplarily, the main management module 221 sends a synchronization request to the remote storage device 230 through the main interface card 224 , and correspondingly, the remote management module 231 receives the synchronization request from the main storage device 220 through the remote interface card 234 .

[0051] Step 305 : the remote management module 231 writes the target data in the synchronization request into the remote cache 232 .

[0052] Step 306 , the remote cache 232 returns the write result 2 to the remote management module 231 .

[0053] Specifically, if the remote cache 232 determines that the target data is cached successfully, the write result 2 returned to the remote management module 231 is a write success, that is, the remote management module 231 successfully writes the target data into the remote cache 232; if the remote cache 232 determines that the target data is not cached successfully, the write result 2 returned to the remote management module 231 is a write failure, that is, the remote management module 231 fails to successfully write the target data into the remote cache 232.

[0054] Step 307 : The remote management module 231 sends a synchronization response to the main management module 221 .

[0055] Specifically, when the write result 2 is a write success, the synchronization response is also a write success (or called a synchronization success response); when the write result 2 is a write failure, the synchronization response is also a write failure (or called a synchronization failure response).

[0056] Exemplarily, the remote management module 231 sends a synchronization response to the main management module 221 through the remote interface card 234 , and correspondingly, the main management module 221 receives the synchronization response from the remote management module 231 through the main interface card 224 .

[0057] Step 308 : The main management module 221 sends a write response to the host 210 according to the write result 1 and the synchronization response.

[0058] Exemplarily, if the main management module 221 determines that the write result 1 and the synchronous response are both write successful, the write response sent to the host 210 is a write success (i.e., a write success response); if the main management module 221 determines that the write result 1 and / or the synchronous response are write failures, the write response sent to the host 210 is a write failure (i.e., a write failure response).

[0059] In the above synchronous remote replication process, the primary management module 221 needs to obtain the write result 1 returned by the primary cache 222 and the synchronization response returned by the remote management module 231 before returning a write response to the host 210 .

[0060] Under normal circumstances, since the main management module 221 and the main cache 222 are both located in the main storage device 220, when the main management module 221 writes the target data to the main cache 222, it can receive the write result 1 returned by the main cache 222 within a short delay (such as a few hundred microseconds); and the main management module 221 and the remote management module 231 are far apart, and the two need to be transmitted through the network. There is a long delay between the main management module 221 sending a synchronization request to the remote management module 231 and receiving a synchronization response from the remote management module 231. For example, when the distance between the main management module 221 and the remote management module 231 is 100km, the delay can be close to 1.3ms; when the distance between the main management module 221 and the remote management module 231 is 3000km, the delay can be close to 39ms.

[0061] In this way, in synchronous remote replication, the delay between the host 210 sending a write request to the primary storage device 220 and receiving a write response from the primary storage device 220 (hereinafter referred to as the synchronization delay) is closely related to the distance between the main management module 221 (i.e., the primary storage device 220) and the remote management module 231 (i.e., the remote storage device 230), and the greater the distance between the primary storage device 220 and the remote storage device 230, the longer the synchronization delay.

[0062] However, in order to improve the disaster recovery capability (for example, when a natural disaster (such as an earthquake) occurs at the location of the primary storage device 220, the location of the remote storage device 230 needs not to be affected), it is usually necessary to deploy the primary storage device 220 and the remote storage device 230 at two locations that are far apart, such as more than 3000 km apart. In order to further shorten the synchronization delay under the premise of deploying the primary storage device 220 and the remote storage device 230 at two locations that are far apart, the present application provides a method for synchronous remote replication.

[0063] This synchronous remote replication method is applicable to Figure 2 In the storage system 200 shown, the primary interface card 224 can be used not only for communication between the primary storage device 220 and the remote storage device 230, but also for backing up target data. In synchronous remote replication, the primary management module 221 can return a write response to the host 210 after writing the target data to the primary interface card 224 (or the cache of the primary interface card 224) and the primary cache 222 respectively.

[0064] For the specific process, please refer to Figure 4 Flowchart shown as an example.

[0065] Step 401 : the host 210 sends a write request to the primary management module 221 .

[0066] A write request is, for example, an input / output (I / O) write request.

[0067] The write request includes the target data to be written and the identifier of the target master disk specified by the customer, wherein the identifier of the target master disk is used by the main management module 221 to select the target master disk for storing the target data from the multiple master disks included in the main storage array 223. Optionally, the write request also includes the length (datalen) of the target data to be written.

[0068] Step 402: The main management module 221 generates a log corresponding to the write request.

[0069] Specifically, the main management module 221 obtains the length of the target data and the identifier of the target master disk from the write request. The main management module 221 determines the target master disk from the main storage array 223 according to the identifier of the target master disk, and then determines the storage offset (such as the logical block address (LBA)) according to the length already stored in the target master disk. Subsequently, the main management module 221 generates a log corresponding to the write request according to the length of the target data, the identifier of the target master disk, the storage offset, and the timestamp (timetrace) 1. Among them, the timestamp 1 can be the time when the main management module 221 obtains the write request, or the time when the main management module 221 generates the log.

[0070] For example, the length of the target data obtained by the main management module 221 from the write request is 1G, and the identifier of the target main disk is ID1. The main management module 221 determines the target main disk from the main storage array 223 according to the "disk identifier ID1", and then determines that the current storage length of the target main disk is 10G, that is, the storage offset is determined to be 10G; the log corresponding to the write request generated by the main management module 221 includes "ID1, 10G, 1G, timestamp 1".

[0071] Step 403 : the primary management module 221 writes the target data into the primary cache 222 .

[0072] Optionally, the primary management module 221 also writes the identification, storage offset, and timestamp 2 of the target primary disk into the primary cache 222 , where timestamp 2 may be timestamp 1 or the time when the primary management module 221 writes the target data into the primary cache 222 .

[0073] Step 404 , the primary cache 222 returns the write result 1 to the primary management module 221 .

[0074] Specifically, if the primary cache 222 determines that the target data is cached successfully, the write result 1 returned to the primary management module 221 is a write success, that is, the primary management module 221 successfully writes the target data into the primary cache 222; if the primary cache 222 determines that the target data is not cached successfully, the write result 1 returned to the primary management module 221 is a write failure, that is, the primary management module 221 fails to successfully write the target data into the primary cache 222. Among them, the reason why the primary management module 221 fails to successfully write the target data into the primary cache 222 may be that there is insufficient cache space in the primary cache 222. Furthermore, the reason for the insufficient cache space in the primary cache 222 may be that the primary disk fails, resulting in the data in the primary cache 222 not being successfully written to the disk, so there is a large amount of data cached in the primary cache 222 that has not been successfully written to the disk.

[0075] Furthermore, after successfully caching the target data, the primary cache 222 may write the target data into the primary storage array 223. Specifically, the primary cache 222 writes the target data into the target primary disk of the primary storage array 223 (i.e., stores the data on disk) according to the identifier and storage offset of the target primary disk. Alternatively, after determining that the primary cache 222 successfully caches the target data, the primary management module 221 writes the target data in the primary cache 222 into the target primary disk of the primary storage array 223 according to the identifier and storage offset of the target primary disk.

[0076] Step 405 , the primary management module 221 writes the target data into the cache of the primary interface card 224 .

[0077] In the present application, the main interface card 224 is not only used for the communication between the main storage device 220 and the remote storage device 230, but also for storing target data. It can be understood that the existing module in the main storage device 220 (i.e., the main interface card 224) is given a new function, thereby reducing the synchronization delay in synchronous remote replication and reducing costs. Furthermore, the main interface card 224 has a power protection function. Even if the main storage device 220 fails and cannot provide power to the main interface card 224, the main interface card 224 can also ensure that the target data is not lost.

[0078] Exemplarily, the primary interface card 224 may be connected to the primary storage device 220 in the form of a plug-in card, thereby realizing the connection between the primary interface card 224 and the primary management module 221. The primary interface card 224 may be a data processing unit (DPU).

[0079] Exemplarily, the main management module 221 may write the identification of the target main disk, the storage offset, the length of the target data, the target data and timestamp 3 into the main interface card 224, wherein timestamp 3 may be the above-mentioned timestamp 2, or the time when the main management module 221 writes the target data into the cache of the main interface card 224.

[0080] It should be added that the primary disks in the primary storage array 223 and the remote disks in the remote storage array 233 may be in a one-to-one mapping relationship. For example, the primary storage array 223 includes primary disks 1 to n, and the remote storage array 233 includes remote disks 1 to n corresponding to the primary disks 1 to n, respectively, where n is a positive integer. Optionally, n mapping relationships consisting of primary disks 1 to n and remote disks 1 to n are pre-configured in the primary management module 221. Optionally, the n mapping relationships may be set by the client in the host 210.

[0081] In one possible manner, after obtaining the identifier of the target master disk from the write request, the main management module 221 can also determine the remote disk (referred to as the target remote disk) corresponding to the target master disk from remote disk 1 to remote disk n according to the identifier of the target master disk and the n mapping relationships pre-configured in the main management module 221. Further, the main management module 221 also writes the identifier of the target remote disk into the cache of the main interface card 224, or writes an identifier pair consisting of the identifier of the target master disk and the identifier of the target remote disk into the cache of the main interface card 224.

[0082] In another possible implementation, after obtaining the identifier of the target master disk from the write request, the main management module 221 can also write the identifier of the target master disk into the cache of the main interface card 224, and the remote management module 231 determines the identifier of the target remote disk based on the identifier of the target master disk and n preset correspondences. The specific implementation method can be found in the description in the following step 410.

[0083] Step 406 : The primary interface card 224 returns the write result 3 to the primary management module 221 .

[0084] Specifically, if the main interface card 224 determines that the target data is cached successfully, the write result 3 returned to the main management module 221 is a write success, that is, the main management module 221 successfully writes the target data into the cache of the main interface card 224; if the main cache 222 determines that the target data is not cached successfully, the write result 3 returned to the main management module 221 is a write failure, that is, the main management module 221 fails to successfully write the target data into the cache of the main interface card 224.

[0085] The reason why the main management module 221 fails to successfully write the target data into the cache of the main interface card 224 may be: insufficient cache space of the main interface card 224, insufficient cache concurrency of the main interface card 224, or one or more of the above. Insufficient cache concurrency can be understood as the total number of messages received by the cache exceeding the total number of messages that the cache can support (i.e., the sum of the number of messages being processed concurrently and the number of messages in the cache queue).

[0086] In the present application, the order between step 403 and step 405 is not limited. The main management module 221 can first write the target data into the main cache 222, and then write the target data into the cache of the main interface card 224; or, the main management module 221 can first write the target data into the cache of the main interface card 224, and then write the target data into the main cache 222; or, the main management module 221 can write the target data to the cache of the main interface card 224 and the main cache 222 at the same time.

[0087] Step 407 : The main management module 221 sends a write response to the host 210 according to the write result 1 and the write result 3 .

[0088] In a possible example, if the main management module 221 determines that both write result 1 and write result 3 are write successes, the write response sent to the host 210 is a write success (i.e., a write success response). If the main management module 221 determines that write result 1 and / or write result 3 are write failures, the write response sent to the host 210 is a write failure (i.e., a write failure response).

[0089] In another possible example, if the main management module 221 determines that both write result 1 and write result 3 are write successful, the write response sent to the host 210 is write successful (i.e., write successful response). If the main management module 221 determines that write result 1 is write successful and write result 3 is write failed, the write response sent to the host 210 is write successful (i.e., write successful response). Further, the main management module 221 can obtain the target data from the main cache 222 and write the target data again to the cache of the main interface card 224; or, the main management module 221 obtains the target data from the target main disk based on the log corresponding to the write request and writes the target data again to the cache of the main interface card 224. If the main management module 221 determines that write result 1 is write failed and write result 3 is write successful, the write response sent to the host 210 is write failed (i.e., write failed response).

[0090] Step 408, the main management module 221 operates the log.

[0091] Specifically, if the main management module 221 determines that both write result 1 and write result 3 are successful, the log is deleted; if the main management module 221 determines that write result 1 and / or write result 3 are failed, the log is saved to the data change log (DCL). The DCL is used to implement incremental backup at the next resynchronization.

[0092] In the present application, the order between step 407 and step 408 is not limited, and the main management module 221 may first return a write response to the host 210 and then operate the log; or the main management module 221 may first operate the log and then return a write response to the host 210. In addition, step 408 may also be performed after step 414 described below.

[0093] It is understandable that the main management module 221 can return a write success to the host 210 after receiving the write result 1 and the write result 3, without determining whether the target data is written to the remote cache 232. This helps to shorten the synchronization delay in synchronous remote replication.

[0094] In addition, the main management module 221 can also maintain the health status of n mapping relationships, where the health status can be "normal" or "abnormal", where "normal" means that the data between the main disk and the remote disk in the corresponding mapping relationship can be kept synchronized; "abnormal" means that the data between the main disk and the remote disk in the corresponding mapping relationship cannot be kept synchronized.

[0095] When the main management module 221 determines that the target data is successfully written into the main cache 222 (i.e., write result 1 is write success), but fails to successfully write the target data into the cache of the main interface card 224 (i.e., write result 3 is write failure), the main management module 221 can update the health status of the mapping relationship between the target main disk and the target remote disk (recorded as the target mapping relationship) from "normal" to "abnormal", and record the abnormal time when the health status changes from "normal" to "abnormal". The write response sent by the main management module 221 to the host 210 is write success, and the log is saved in the DCL.

[0096] Furthermore, the main management module 221 may periodically attempt to write the target data into the cache of the main interface card 224, and after determining that the target data is successfully written into the cache of the main interface card 224, update the health status of the target mapping relationship from "abnormal" to "normal".

[0097] Alternatively, the main management module 221 indicates to the host 210 that the health status of the target mapping relationship is updated from "normal" to "abnormal", and accordingly, the host 210 displays a prompt message to the customer, which prompt message is that the health status of the target mapping relationship is updated from "normal" to "abnormal", and the customer can check the storage link between the main storage device 220 and the remote storage device 230, determine and repair the faulty link in the current storage link, and illustratively, the customer determines that the reason why the main management module 221 cannot successfully write the target data to the cache of the main interface card 224 is that the main interface card 224 is faulty, and then repair the main interface card 224. Further, the customer can send an instruction to the host 210 to instruct the synchronization of the data between the main storage device 220 and the remote storage device 230, and accordingly, the host 210 sends a synchronization instruction to the main management module 221, and the main management module 221 synchronizes the data between the main storage device 220 and the remote storage device 230 based on the synchronization instruction, that is, tries to write the target data to the cache of the main interface card 224 again. It can be understood that in this implementation, the storage link includes at least one or more of the three links: the main management module 221 writes the target data to the main interface card 224, the main interface card 224 sends a synchronization request to the remote management module 231, and the remote management module 231 writes the target data to the remote cache 232. The customer can detect each link in the storage link to determine which link is faulty.

[0098] When the main management module 221 writes the target data into the cache of the main interface card 224, specifically, the main management module 221 obtains the abnormal time when the health status changes from "normal" to "abnormal", and then obtains the log corresponding to the timestamp 1 after the abnormal time from the DCL according to the abnormal time, obtains the target data from the target main disk according to the log, and then rewrites the target data into the cache of the main interface card 224.

[0099] It can be understood that if the write response sent by the main management module 221 to the host 210 is a write failure, the host 210 will interrupt the currently running application service; and the main management module 221 updates the health status of the target mapping relationship from "normal" to "abnormal" without affecting the currently running application service in the host 210. In this way, when the main management module 221 determines that the target data cannot be successfully written into the cache of the main interface card 224, it can update the health status of the target mapping relationship, thereby avoiding the interruption of the currently running application service in the host 210 and improving the customer experience.

[0100] Furthermore, in order to ensure the synchronization of data in the primary storage device 220 and the remote storage device 230, that is, to ensure the reliability of data in the disaster recovery backup scenario, the primary interface card 224 also needs to send a synchronization request to the remote management module 231, so that the remote management module 231 writes the target data in the synchronization request to the remote cache 232:

[0101] Step 409 : The primary interface card 224 sends a synchronization request to the remote management module 231 . The synchronization request includes target data, and the synchronization request is used to instruct the remote management module 231 to write the target data into the remote cache 232 .

[0102] In one possible manner, the synchronization request sent by the main interface card 224 to the remote management module 231 may also include the identifier of the target remote disk; or, the synchronization request sent by the main interface card 224 to the remote management module 231 may also include an identifier pair consisting of the identifier of the target main disk and the identifier of the target remote disk; or, the synchronization request sent by the main interface card 224 to the remote management module 231 may also include the identifier of the target main disk.

[0103] In one possible manner, the main interface card 224 specifically sends a synchronization request to the remote interface card 234, and the remote interface card 234 processes the synchronization request and sends it to the remote management module 231. It can also be understood that the remote management module 231 receives the synchronization request from the main interface card 224 through the remote interface card 234. Exemplarily, the synchronization request may also include a source IP, a source port, a destination IP, and a destination port. Specifically, the source IP and the source port are the IP and the port of the main interface card 224, and the destination IP and the destination port are the IP and the port of the remote interface card 234.

[0104] In step 410 , the remote management module 231 obtains target data from the synchronization request and writes the target data into the remote cache 232 .

[0105] In one possible embodiment, the remote management module 231 also obtains the identifier of the target remote disk (or, an identifier pair consisting of the identifier of the target primary disk and the identifier of the target remote disk) from the synchronization request, and writes the identifier of the target remote disk (or, an identifier pair consisting of the identifier of the target primary disk and the identifier of the target remote disk) into the remote cache 232.

[0106] In another possible manner, the remote management module 231 may also be pre-configured with the n mapping relationships. For example, the primary storage device 220 synchronizes the n mapping relationships to the remote storage device 230. For a specific synchronization method, see Figure 4 200 and 230 respectively; in another exemplary embodiment, the client configures the n mapping relationships to the remote management module 231 through the host 240. Further, the remote management module 231 also obtains the identifier of the target primary disk from the synchronization request, and determines the identifier of the target remote disk corresponding to the target primary disk according to the identifier of the target primary disk and the n pre-configured mapping relationships. Further, the remote management module 231 writes the target data and the identifier of the target remote disk into the remote cache 232.

[0107] In addition, the remote management module 231 can also determine the target remote disk from the remote storage array 233 according to the identifier of the target remote disk, and then determine the storage offset according to the length already stored in the target remote disk. The remote management module 231 writes the storage offset into the remote cache 232. After the remote management module 231 successfully writes the target data, the identifier of the target remote disk and the storage offset into the remote cache 232, the remote cache 232 can write the target data into the target remote disk of the remote storage array 233 according to the identifier and storage offset of the target remote disk (i.e., store it on disk). Alternatively, after determining that the target data is successfully cached in the remote cache 232, the remote management module 231 writes the target data in the remote cache 232 into the target main disk according to the identifier and storage offset of the target remote disk.

[0108] Step 411 , the remote cache 232 returns the write result 2 to the remote management module 231 .

[0109] Specifically, if the remote cache 232 determines that the target data is cached successfully, the write result 2 returned to the remote management module 231 is a write success, that is, the remote management module 231 successfully writes the target data into the remote cache 232; if the remote cache 232 determines that the target data is not cached successfully, the write result 2 returned to the remote management module 231 is a write failure, that is, the remote management module 231 fails to successfully write the target data into the remote cache 232.

[0110] The reason why the remote management module 231 fails to successfully write the target data into the remote cache 232 may be that there is insufficient cache space in the remote cache 232. Further, the reason for the insufficient cache space in the remote cache 232 may be that the remote disk fails and the data in the remote cache 232 cannot be successfully written to the disk, so there is a large amount of data in the remote cache 232 that has not been successfully written to the disk.

[0111] Step 412 : The remote management module 231 returns a synchronization response to the primary interface card 224 .

[0112] Specifically, when the write result 2 is a write success, the synchronization response is also a write success (or a synchronization success response); when the write result 2 is a write failure, the synchronization response is also a write failure (or a synchronization failure response). Exemplarily, the remote management module 231 sends a synchronization response to the main interface card 224 through the remote interface card 234, and correspondingly, the main interface card 224 receives the synchronization response from the remote management module 231.

[0113] Optionally, the remote management module 231 also returns a receiving response to the primary interface card 224, and the receiving response is used to indicate that the remote management module 231 has received the synchronization request from the primary interface card 224. In this implementation, if the primary interface card 224 does not receive a receiving response from the remote management module 231 within a preset period of time for sending the synchronization request, it will send the synchronization request to the remote management module 231 again. Optionally, if the primary interface card 224 determines that the number of synchronization requests sent to the remote management module 231 has reached a preset value, and still has not received a receiving response to any of the multiple synchronization requests, it determines that the network between the primary storage device 220 and the remote storage device 230 is disconnected.

[0114] After determining that the network between the main storage device 220 and the remote storage device 230 is disconnected, the main interface card 224 sends a disconnection indication to the main management module 221. In response to the disconnection indication, the main management module 221 updates the health status of the target mapping relationship from "normal" to "abnormal", and records the abnormal time when the health status changes from "normal" to "abnormal". For the specific implementation method, please refer to the description in step 407.

[0115] It can be understood that the distance between the main interface card 224 and the remote management module 231 is relatively far, and the two need to be transmitted through the network. There is a long delay between the main interface card 224 sending a synchronization request to the remote management module 231 and receiving the synchronization response from the remote management module 231. However, since the host 210 does not need to wait for the synchronization response of the main storage device 220 to successfully synchronize the target data to the remote storage device 230, the delay caused by the distance between the main interface card 224 and the remote management module 231 will not affect the synchronization delay of the host 210 in the synchronous remote replication process.

[0116] Step 413 : The primary interface card 224 operates the target data stored in the cache of the primary interface card 224 according to the synchronization response.

[0117] Specifically, the main interface card 224 deletes the target data in the cache of the main interface card 224 based on the synchronization response returned by the remote management module 231. If the main interface card 224 determines that the target data is successfully written into the remote cache 232, it sends a synchronization request to the remote management module 231 again.

[0118] Step 414 , the primary interface card 224 returns the write result 4 to the primary management module 221 .

[0119] Exemplarily, after obtaining the write result 4 returned by the main interface card 224, the main management module 221 determines whether the write result 4 is a write success or a write failure. When the main management module 221 determines that the write result 4 is a write failure, the health status of the target mapping relationship can be updated from "normal" to "abnormal", and the abnormal time when the health status changes from "normal" to "abnormal" is recorded. For specific implementation methods, please refer to the description in step 407.

[0120] In the present application, the order of step 413 and step 414 is not limited. The main interface card 224 can first return the write result 4 to the main management module 221, and then operate the target data stored in the cache of the main interface card 224; or, the main management module 221 first operates the target data stored in the cache of the main interface card 224, and then returns the write result 4 to the main management module 221.

[0121] This helps ensure that the target data is successfully written into the remote cache 232, and the data in the remote storage device 230 is consistent with the primary storage device 220. When the host 210 or the primary storage device 220 fails, the host 240 and the remote storage device 230 can be used to provide services to customers, that is, the host 240 and the remote storage device 230 are used as new hosts and primary storage devices, respectively, to improve the reliability of data in disaster recovery backup scenarios.

[0122] In order to further improve the reliability of data in disaster recovery backup scenarios, the main storage device 220 of the present application can not only deploy a main interface card 224, but also deploy one or more backup interface cards 225, wherein the backup interface card 225 can be connected to the main storage device 220 in the form of a plug-in card, and the backup interface card 225 can be a DPU.

[0123] In one possible manner, the main management module 221 not only writes the target data into the cache of the main interface card 224, but also writes the target data into the cache of the backup interface card 225. In another possible manner, after the main management module 221 writes the target data into the cache of the main interface card 224, the main interface card 224 can not only send the target data to the remote management module 231 through a synchronization request, but also mirror the target data into the cache of the backup interface card 225. In this way, when the main interface card 224 fails, the backup interface card 225 can send the synchronization request to the remote management module 231 to ensure that the target data is cached in the remote cache 232.

[0124] like Figure 5 An architectural diagram of another storage system suitable for a remote replication scenario is provided as an example for the present application, wherein a primary storage device 220 includes a primary interface card 224 and a backup interface card 225, the primary interface card 224 is connected to the backup interface card 225, and the primary management module 221 can mirror and back up target data to the cache of the backup interface card 225.

[0125] In one possible implementation, the main management module 221 can monitor the operating status of the main interface card 224 and the backup interface card 225. If it is determined that the main interface card 224 fails, the backup interface card 225 in normal operation can be instructed to send a synchronization request to the remote management module 231.

[0126] In one possible implementation, after the primary interface card 224 determines that the target data has been successfully written into the remote cache 232 based on the synchronization response from the remote management module 231, it can not only delete the target data in the cache of the primary interface card 224, but also delete the target data in the cache of the backup interface card 225, thereby ensuring that the primary interface card 224 and the backup interface card 225 have sufficient storage space to store new target data.

[0127] Based on the above solution, this application exemplarily provides a method for synchronous remote replication in three failure scenarios:

[0128] Fault scenario 1:

[0129] When the network between the main storage device 220 and the remote storage device 230 is disconnected (i.e., the main interface card 224 in the main storage device 220 cannot send a synchronization request to the remote management module 231 in the remote storage device 230), the staff can synchronize the target data in the main storage device 220 to the remote storage device 230 through a third device. Optionally, the third device is a card reader, and the third device can be located in a data center other than the main data center and the remote data center, and the third device can be connected to the main storage device 220 and the remote storage device 230 respectively.

[0130] Optionally, during the period when the network between the main storage device 220 and the remote storage device 230 is disconnected, the main management module 221 may obtain one or more target data from the host 210 and write the one or more target data into the main cache 222. Accordingly, the main management module 221 may generate a log corresponding to each target data based on the one or more target data, and then store the log corresponding to each target data in the DCL.

[0131] In a specific implementation, the third device sends a log request to the main management module 221, and the log request is used to request the main management module 221 for the log corresponding to the timestamp 1 in the DCL after the start time of the network disconnection. Accordingly, the main management module 221 selects one or more logs corresponding to the timestamp 1 after the start time of the network disconnection from the DCL based on the start time of the network disconnection, and returns the one or more logs to the third device. Optionally, the main management module 221 can monitor the network status between the main storage device 220 and the remote storage device 230, and when it is determined that the network between the main storage device 220 and the remote storage device 230 is disconnected, the start time of the network disconnection is recorded.

[0132] Optionally, the third device performs, for each log: determining the target main disk according to the identifier of the target main disk recorded in the log, and obtaining the target data from the target main disk according to the storage offset and the length of the target data recorded in the log, so that the third device can obtain the target data indicated by one or more logs. The third device sends a synchronization request to the remote management module 231, and the synchronization request includes the target data respectively indicated by the one or more logs. Accordingly, the remote management module 231 obtains the target data respectively indicated by the one or more logs from the synchronization request, and writes the obtained target data into the remote cache 232.

[0133] Fault scenario 2:

[0134] When the network between the main storage device 220 and the remote storage device 230 is disconnected (i.e., the main interface card 224 in the main storage device 220 cannot send a synchronization request to the remote management module 231 in the remote storage device 230), the staff can manually remove the main interface card 224 from the main storage device 220 and then insert it into the remote storage device 230. Correspondingly, when the remote management module 231 of the remote storage device 230 detects that an interface card (i.e., the main interface card 224) is inserted, it reads the target data recorded in the detected main interface card 224 and then writes the target data into the remote cache 232.

[0135] Optionally, during the period when the network between the primary storage device 220 and the remote storage device 230 is disconnected, the primary management module 221 may obtain one or more target data from the host 210, and write the one or more target data into the primary interface card 224. Correspondingly, when the remote management module 231 of the remote storage device 230 detects that an interface card is inserted, the remote management module 231 may read the one or more target data in the primary interface card 224, and write the one or more target data into the remote cache 232 in sequence.

[0136] Optionally, the remote management module 231 of the remote storage device 230 can monitor the network status between the main storage device 220 and the remote storage device 230, and when it is determined that the network between the main storage device 220 and the remote storage device 230 is disconnected, the start time of the network disconnection is recorded; subsequently, when the remote management module 231 reads one or more target data from the main interface card 224, it can specifically be, based on the start time of the network disconnection, select one or more target data with timestamp 3 after the start time from the main interface card 224, and write these target data into the remote cache 232.

[0137] Fault scenario 3:

[0138] When the network between the main storage device 220 and the remote storage device 230 is disconnected (i.e., the main interface card 224 in the main storage device 220 cannot send a synchronization request to the remote management module 231 in the remote storage device 230), the staff can synchronize the target data in the main storage device 220 to the remote storage device 230 through a third device. The definition of the third device can be found in the description in fault scenario one.

[0139] Optionally, during the period when the network between the main storage device 220 and the remote storage device 230 is disconnected, the main management module 221 may obtain one or more target data from the host 210 and write the one or more target data into the main interface card 224. In a specific implementation, the main management module 221 may monitor the network status between the main storage device 220 and the remote storage device 230, and when it is determined that the network between the main storage device 220 and the remote storage device 230 is disconnected, the start time of the network disconnection is recorded; the third device requests the start time of the network disconnection from the main management module 221, and then reads one or more target data in the main interface card 224 with a timestamp 3 after the start time according to the start time of the network disconnection, and then sends the one or more target data to the remote management module 231 through a synchronization request, and accordingly, the remote management module 231 obtains the target data respectively indicated by the one or more logs from the synchronization request, and writes the obtained target data into the remote cache 232.

[0140] It should be added that, when the primary storage device 220 further includes a backup interface card 225, the network between the primary storage device 220 and the remote storage device 230 is disconnected, specifically, the primary interface card 224 and the backup interface card 225 in the primary storage device 220 are unable to send a synchronization request to the remote management module 231 in the remote storage device 230. Furthermore, in the above-mentioned fault scenarios 2 and 3, data can also be synchronized through the backup interface card 225.

[0141] Based on the above content and the same concept, the present application provides a possible synchronous remote replication device of a storage system, which can be used to implement the functions of the primary storage device 220 in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment. The synchronous remote replication device can be the primary storage device 220 in the above method embodiment. When the synchronous remote replication device is the primary storage device 220 in the above method embodiment:

[0142] In a possible implementation, the synchronous remote replication device includes a main management module 221, a main cache 222, and a main interface card 224. The main management module 221 is used to obtain a write request from a host, the write request including target data; write the target data to the main interface card 224; write the target data to the main cache 222; in response to writing the target data to the main cache 222, send a write success response to the host; the main interface card 224 is used to send the target data to the remote storage device 230.

[0143] In a possible implementation, the device further includes a backup interface card 225 ; the primary interface card 224 is further configured to write target data to the backup interface card 225 .

[0144] In one possible implementation, the device also includes a main storage array 223, and the write request also includes an identifier of the target main disk; after the main management module 221 writes the target data to the main cache 222, it is also used to: determine the target main disk from the main storage array 223 according to the identifier of the target main disk, and store the target data in the main cache 222 in the target main disk.

[0145] In a possible implementation, the master management module 221 is further used to: determine the identifier of the target remote disk according to the identifier of the target master disk and the preset mapping relationship between the target master disk and the target remote disk, wherein the target remote disk is a disk in the remote storage array included in the remote storage device 230; and write the identifier of the target remote disk to the master interface card 224. The master interface card 224 is further used to: send the identifier of the target remote disk to the remote storage device 230.

[0146] In a possible implementation, the primary management module 221 is further configured to: in response to failure in writing target data to the primary interface card 224, update the health status of the mapping relationship between the target primary disk and the target remote disk recorded in the primary management module 221 to abnormal.

[0147] In one possible implementation, the main management module 221 is also used to: when a network disconnection between the device and the remote storage device 230 is detected, record the start time of the network disconnection; obtain a log request, and in response to the log request, output the log after the start time, and the log after the start time is used to query data from the main storage array 223 of the device.

[0148] Based on the above content and the same concept, Figure 6 Another possible synchronous remote replication device 600 provided by the present application can be used to implement the function of the primary storage device 220 in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment. The synchronous remote replication device 600 can be the primary storage device 220 in the above method embodiment.

[0149] In one possible implementation, the synchronous remote replication device 600 includes a processing module 601, a communication module 602 and a storage module 603. The processing module 601 is used to execute the operations performed by the main management module 221 in the above embodiment, the communication module 602 is used to execute the operations performed by the main interface card 224 (the main interface card 224 and the backup interface card 225) in the above embodiment, and the storage module 603 is used to execute the operations performed by the main cache 222 and the main storage array 223 in the above embodiment.

[0150] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0151] Based on the above content and the same concept, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a computing device, the computing device executes the actions performed by the main storage device 220 in the above method embodiment.

[0152] Based on the above content and the same concept, the present application provides a computing device, including a processor, the processor is connected to a memory, the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory, so as to execute the actions performed by the main storage device 220 in the above method embodiment.

[0153] Based on the above content and the same concept, an embodiment of the present application provides a computer program product. When a computer reads and executes the computer program product, the computer executes the actions performed by the main storage device 220 in the above method embodiment.

[0154] Based on the above content and the same concept, the present application provides a synchronous remote replication system, including the primary storage device 220 and the remote storage device 230 in the above method embodiment. Optionally, the synchronous remote replication system also includes the host 210 and the host 240 in the above method embodiment.

[0155] It is understood that the various numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic.

[0156] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of protection of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A synchronous remote replication method for a storage system, It is characterized in that The storage system includes a main storage device and a remote storage device; wherein the main storage device includes a cache and a main interface card; The method comprises: The primary storage device obtains a write request from a host, wherein the write request includes target data; The primary storage device writes the target data to the primary interface card; The primary storage device writes the target data into the cache; In response to writing the target data into the cache, the primary storage device sends a write success response to the host; The primary storage device sends the target data to the remote storage device.

2. The method according to claim 1, It is characterized in that The main storage device also includes a backup interface card; After the main storage device writes the target data to the main interface card, the method further includes: The primary storage device writes the target data to the backup interface card.

3. The method according to claim 1 or 2, It is characterized in that The primary storage device also includes a primary storage array, and the write request also includes an identifier of a target primary disk; After the primary storage device writes the target data into the cache, the method further includes: The primary storage device determines the target primary disk from the primary storage array according to the identifier of the target primary disk, and stores the target data in the cache into the target primary disk.

4. The method according to any one of claims 1 to 3, It is characterized in that Also includes: The primary storage device determines the identifier of the target remote disk according to the identifier of the target primary disk and a preset mapping relationship between the target primary disk and the target remote disk, wherein the target remote disk is a disk in a remote storage array included in the remote storage device; The primary storage device writes the identifier of the target remote disk into the primary interface card; The primary storage device sends the identifier of the target remote disk to the remote storage device.

5. The method according to any one of claims 1 to 4, It is characterized in that Also includes: In response to a failure in writing the target data to the primary interface card, the primary storage device updates the health status of the mapping relationship between the target primary disk and the target remote disk recorded in the primary storage device to abnormal.

6. The method according to any one of claims 1 to 5, It is characterized in that Also includes: When the primary storage device detects that the network between the primary storage device and the remote storage device is disconnected, the primary storage device records the start time of the network disconnection; The primary storage device obtains a log request, and in response to the log request, outputs logs after the start time, wherein the logs after the start time are used to query data from a primary storage array of the primary storage device.

7. A synchronous remote replication device for a storage system, It is characterized in that include: Main management module, cache and main interface card; The main management module is used to obtain a write request from a host, wherein the write request includes target data; Writing the target data into the primary interface card; Writing the target data into the cache; In response to writing the target data into the cache, sending a write success response to the host; The master interface card is used to send the target data to the remote storage device.

8. The device according to claim 7, It is characterized in that The device also includes a backup interface card; The primary interface card is further used to write the target data into the backup interface card.

9. The device according to claim 7 or 8, It is characterized in that The device also includes a primary storage array, and the write request also includes an identifier of a target primary disk; After the main management module writes the target data into the cache, the main management module is further used to: The target primary disk is determined from the primary storage array according to the identifier of the target primary disk, and the target data in the cache is stored in the target primary disk.

10. The device according to any one of claims 7 to 9, It is characterized in that The main management module is also used for: According to the identifier of the target master disk and the preset mapping relationship between the target master disk and the target remote disk, the identifier of the target remote disk is determined, and the target remote disk is a disk in the remote storage array included in the remote storage device; the identifier of the target remote disk is written to the master interface card; The main interface card is also used for: The identifier of the target remote disk is sent to the remote storage device.

11. The device according to any one of claims 7 to 10, It is characterized in that The main management module is also used for: In response to a failure in writing the target data to the primary interface card, the health status of the mapping relationship between the target primary disk and the target remote disk recorded in the primary management module is updated to abnormal.

12. The device according to any one of claims 7 to 11, It is characterized in that The main management module is also used for: When a network disconnection between the device and the remote storage device is detected, a start time of the network disconnection is recorded; A log request is obtained, and in response to the log request, logs after the start time are output, where the logs after the start time are used to query data from a main storage array of the device.

13. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program or instructions. When the computer program or instructions are executed by a computing device, the computing device implements the method according to any one of claims 1 to 6.

14. A computing device, It is characterized in that The computer comprises a processor connected to a memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the computing device executes the method according to any one of claims 1 to 6.

15. A storage system, It is characterized in that include: A main storage device and a remote storage device, wherein the main storage device is used to execute the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Method for updating synchronization log, computer equipment, storage medium and program product

    CN119396851A

  • Methods, computer equipment, storage media, and program products for updating synchronization logs

    CN119396851B

  • Synchronous remote replication method and apparatus for storage system

    EP4664291A1