Synchronous remote replication method and apparatus for storage system
By asynchronously sending the write request of the remote storage device in the main storage device, the problem of long delay in synchronous remote replication is solved, the efficiency and reliability of disaster recovery backup are improved, and the data is ensured when the main storage device fails. Quick recovery.
Patent Information
- Application Number
- PCT/CN2023/112341
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-24
- Filing Date
- 2023-08-10
- Publication Date
- 2024-08-29
AI Technical Summary
In synchronous remote replication, the distance between the primary storage device and the remote storage device is long, resulting in a long delay from write request to write response, which affects the efficiency of disaster recovery and backup and customer experience.
After the main storage device determines that the target data has been written to the local cache, it sends a write success response to the host without waiting for confirmation from the remote storage device, and then sends the data asynchronously to the remote storage device, simplifying the synchronization process and reducing latency. .
It effectively shortens the synchronization delay in synchronous remote replication, improves the reliability and customer experience of disaster recovery and backup, and can quickly restore data consistency when the primary storage device fails.
Smart Images

Figure CN2023112341_29082024_PF_FP_ABST
Abstract
Description
A synchronous remote replication method and device for a storage system
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on February 24, 2023, with application number 202310196308.7 and application name “A Synchronous Remote Replication Method and Device for a Storage System”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] 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
[0004] Remote replication is a core technology for disaster recovery and backup, enabling remote data backup and disaster recovery. Specifically, remote replication synchronizes data from a primary storage device to a remote storage device in real time or periodically. This allows the remote storage device to provide the same functionality as the primary storage device in the event of a primary storage device failure.
[0005] 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 stores the target data in its cache (referred to as the primary cache) but also remotely replicates the target data to the cache of a remote storage device (referred to as the remote cache). After the primary storage device receives the target data stored in both the primary and remote caches, it returns a write response to the host.
[0006] However, due to the long distance between the primary storage device and the remote storage device, the synchronization time required for the primary storage device to synchronize the target data with the remote storage device is long. Consequently, the latency between the host sending a write request to the primary storage device and receiving a write response from the primary storage device is long, and this latency increases as the distance between the primary and remote storage devices increases.
[0007] Summary of the Invention
[0008] The present application provides a synchronous remote replication method and apparatus for a storage system, which is 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.
[0009] In a first aspect, the present application provides a synchronous remote replication method for a storage system, wherein the storage system includes a primary storage device and a remote storage device, wherein the primary storage device includes a cache and a primary interface card. The method comprises: the primary storage device receiving a write request from a host, the write request including target data; the primary storage device writing the target data to the primary interface card; the primary storage device writing the target data to the cache; in response to successfully writing the target data to the cache, the primary storage device sending a write success response to the host; and in response to successfully writing the target data to the primary interface card, the primary storage device sending the target data to the remote storage device.
[0010] In the above technical solution, after the primary storage device determines that the target data has been successfully written to the cache, it can return a write success response corresponding to the write request to the host, without having to wait for the remote storage device to write the target data, which helps to shorten the synchronization delay in synchronous remote replication. Furthermore, after the primary storage device determines that the target data has been successfully written to the primary interface card, it can send the target data to the remote storage device. In this way, the remote storage device can obtain the target data, thereby ensuring data synchronization between the primary storage device and the remote storage device.
[0011] In one possible implementation, the primary storage device also includes a backup interface card. After the primary storage device successfully writes 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 further improve data reliability in disaster recovery and backup scenarios.
[0012] 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.
[0013] In one possible implementation, the primary storage device further determines the identifier of the target remote disk based on the identifier of the target primary disk and a pre-set mapping relationship between the target primary disk and the target remote disk, where 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 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.
[0014] 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.
[0015] 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.
[0016] In the above technical solution, if the primary storage device sends a write failure response to the host, the host will interrupt the currently running application services. However, if the primary storage device updates the health status of the mapping relationship between the target primary disk and the target remote disk from normal to abnormal, it will not affect the currently running application services in the host. In this way, if the primary storage device determines that it has failed to successfully write the target data to the primary interface card, it can update the mapping relationship between the target primary disk and the target remote disk, thereby avoiding interruption of application services and helping to improve the customer experience.
[0017] In one possible implementation, when the primary storage device detects a network disconnection between the primary storage device and the remote storage device, it can also record the start time of the network disconnection. The primary storage device then receives a log request and, in response to the log request, outputs log data after the start time. The log data after the start time is used to query data from the primary storage device's primary storage array. In this way, the difference in data between the primary storage device and the remote storage device can be determined based on the start time of the network disconnection, and the difference in data can then be updated to the remote storage device.
[0018] 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.
[0019] 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.
[0020] In one possible implementation, the device also includes a primary storage array, and the write request also includes an identifier of the target primary disk; after the main management module writes the target data to the cache, it is also used to: determine the target primary disk from the primary storage array based on the identifier of the target primary disk, and store the target data in the cache to the target primary disk.
[0021] In one possible implementation, the primary management module is further configured to: determine the identifier of the target remote disk based on the identifier of the target primary disk and a pre-set 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; and write the identifier of the target remote disk to the primary interface card. The primary interface card is further configured to: send the identifier of the target remote disk to the remote storage device.
[0022] In a possible implementation, the primary management module is further configured to: in response to a failure in writing target data to the primary interface card, update the health status of the mapping relationship between the target primary disk and the target remote disk recorded in the primary management module to abnormal.
[0023] 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.
[0024] 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.
[0025] In a fourth aspect, the present application provides a computing device comprising 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.
[0026] 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 of the first aspect.
[0027] In a sixth aspect, the present application provides a storage system comprising a primary storage device and a remote storage device, wherein the primary storage device is configured to execute the method of the first aspect or any possible implementation of the first aspect.
[0028] 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
[0029] FIG1 is a schematic diagram of the architecture of a storage system;
[0030] FIG2 is a schematic diagram of the architecture of a storage system suitable for remote replication scenarios;
[0031] FIG3 is a flow chart of a synchronous remote replication method for a storage system;
[0032] FIG4 is a flow chart of a synchronous remote replication method for a storage system provided by the present application;
[0033] FIG5 is a schematic diagram of the architecture of another storage system suitable for remote replication scenarios;
[0034] FIG6 is a schematic structural diagram of a device for synchronous remote replication of a storage system provided by the present application. DETAILED DESCRIPTION
[0035] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0036] As shown in Figure 1, a diagram of the architecture of a storage system 100 is provided. In the storage system 100, multiple hosts 110 are connected to a storage device 130 via a switch 120. An Internet Protocol (IP) storage network or a Fibre Channel (FC) storage network can be established between the hosts 110, the switch 120, and the storage device 130. The communication protocol between the hosts 110 and the switch 120, or between the switch 120 and the storage device 130, can be the 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.
[0037] In this embodiment, the structures of the hosts are substantially the same, and the following description takes one host 110 as an example. Various applications are running on the host 110, and the applications are used to provide different application services to customers.
[0038] The storage device 130 includes a storage array, which stores data generated by applications in the host 110 during operation. The storage array can be a flash memory 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 disks 1 to n in Figure 1, where n is a positive integer. 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 memory 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.
[0039] After the disks are partitioned, the storage array assigns 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) used in the SCSI protocol, vendor information, and product information; or the disk identification includes a globally unique identifier (GUID) used in 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, etc. under the SCSI protocol, and namespace numbers such as namespace1, namespace2, etc. under the NVMe protocol. After the disk identification and disk code are assigned, the storage array configures the mapping relationship between the disk and the host, specifically configuring the mapping relationship between the disk code and the host port information (for example, the host bus adapter (HBA) card port information). Based on the mapping relationship, the host to which the disk belongs can be determined.
[0040] In conjunction with the storage system 100 shown in FIG1 , FIG2 is an architectural diagram of a storage system 200 suitable for a remote replication scenario exemplified in the present application. 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 denoted as a primary data center and a remote data center. The primary data center includes a host 210 and a primary storage device 220, and the remote data center includes a host 240 and a remote storage device 230. Exemplarily, the host 210 can be connected to the primary storage device 220 via a switch (not shown in FIG2 ), and the host 240 can be connected to the remote storage device 230 via a switch (not shown in FIG2 ).
[0041] When host 210 and primary storage device 220 are operating normally, host 210 can write data (referred to as target data) generated by applications running on host 210 to primary storage device 220. Furthermore, primary storage device 220 can remotely replicate the target data to remote storage device 230. If host 210 or primary storage device 220 fails, host 240 can perform similar functions as host 210. Because remote storage device 230 stores the same data as primary storage device 220, host 240 can continue to provide the same application services to clients based on remote storage device 230, thus helping to ensure the normal operation of application services.
[0042] As shown in Figure 2, 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.
[0043] Exemplarily, the primary management module 221 is used to obtain target data from the host 210, write the target data into the primary cache 222, and send the target data to the remote management module 231; the primary cache 222 is used to write the target data into the primary storage array 223 (or, the primary cache 222 is used to write the target data in the primary cache 222 into the primary storage array 223 under the control of the primary management module 221, that is, the primary management module 221 is also used to write the target data in the primary cache 222 into the primary storage array 223).
[0044] 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.
[0045] 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 .
[0046] Remote replication supports two replication modes: synchronous and asynchronous. Synchronous remote replication synchronizes data in real time, maximizing data consistency and minimizing data loss in the event of a disaster. Asynchronous remote replication synchronizes data periodically, minimizing service performance degradation caused by data transmission latency. Synchronous remote replication provides greater data security than asynchronous remote replication.
[0047] In conjunction with the architecture diagram of the storage system 200 shown in FIG2 , FIG3 is a schematic diagram of a synchronous remote replication process:
[0048] In step 301 , the host 210 sends a write request to the primary management module 221 . The write request includes target data to be written into the primary cache 222 .
[0049] In step 302 , the primary management module 221 writes the target data in the write request into the primary cache 222 .
[0050] Step 303 : The primary cache 222 returns the write result 1 to the primary management module 221 .
[0051] Specifically, if the primary cache 222 determines that the target data has been successfully cached, 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 has not been successfully cached, the write result 1 returned to the primary management module 221 is a write failure, that is, the primary management module 221 has not successfully written the target data into the primary cache 222.
[0052] In 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.
[0053] Exemplarily, the primary management module 221 sends a synchronization request to the remote storage device 230 via the primary interface card 224 . Correspondingly, the remote management module 231 receives the synchronization request from the primary storage device 220 via the remote interface card 234 .
[0054] In step 305 , the remote management module 231 writes the target data in the synchronization request into the remote cache 232 .
[0055] Step 306 : The remote cache 232 returns the write result 2 to the remote management module 231 .
[0056] 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.
[0057] Step 307 : The remote management module 231 sends a synchronization response to the main management module 221 .
[0058] 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).
[0059] Illustratively, the remote management module 231 sends a synchronization response to the master management module 221 through the remote interface card 234 . Correspondingly, the master management module 221 receives the synchronization response from the remote management module 231 through the master interface card 224 .
[0060] In 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.
[0061] For example, 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).
[0062] 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 the write response to the host 210 .
[0063] 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); however, 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 100 km, the delay can be close to 1.3 ms; when the distance between the main management module 221 and the remote management module 231 is 3000 km, the delay can be close to 39 ms.
[0064] 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.
[0065] However, to improve disaster recovery capabilities (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 must not be affected), it is usually necessary to deploy the primary storage device 220 and the remote storage device 230 at two locations that are relatively far apart, for example, more than 3000 km apart. In order to further shorten the synchronization delay while deploying the primary storage device 220 and the remote storage device 230 at two locations that are relatively far apart, the present application provides a method for synchronous remote replication.
[0066] This synchronous remote replication method is applicable to the storage system 200 shown in Figure 2, wherein 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.
[0067] For the specific process, please refer to the flowchart shown in FIG4 .
[0068] In step 401 , the host 210 sends a write request to the primary management module 221 .
[0069] The write request is, for example, an input / output (I / O) write request.
[0070] The write request includes the target data to be written and the identifier of the target primary disk specified by the customer. The identifier of the target primary disk is used by the primary management module 221 to select the target primary disk for storing the target data from the multiple primary disks included in the primary storage array 223. Optionally, the write request also includes the length (datalen) of the target data to be written.
[0071] Step 402: The main management module 221 generates a log corresponding to the write request.
[0072] 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 based on the identifier of the target master disk, and then determines the storage offset (such as the logical block address (LBA)) based on the length already stored in the target master disk. Subsequently, the main management module 221 generates a log corresponding to the write request based on 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.
[0073] 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 master disk is ID1. The main management module 221 determines the target master disk from the main storage array 223 based on the "disk identifier ID1", and then determines that the current storage length of the target master 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".
[0074] In step 403 , the primary management module 221 writes the target data into the primary cache 222 .
[0075] Optionally, the primary management module 221 also writes the identifier, 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 .
[0076] Step 404 : The primary cache 222 returns the write result 1 to the primary management module 221 .
[0077] Specifically, if the primary cache 222 determines that the target data has been successfully cached, the write result 1 returned to the primary management module 221 indicates a write success, meaning that the primary management module 221 has successfully written the target data into the primary cache 222. If the primary cache 222 determines that the target data has not been successfully cached, the write result 1 returned to the primary management module 221 indicates a write failure, meaning that the primary management module 221 has not successfully written the target data into the primary cache 222. The reason why the primary management module 221 has failed to successfully write the target data into the primary cache 222 may be due to insufficient cache space in the primary cache 222. Furthermore, the reason for insufficient cache space in the primary cache 222 may be due to a primary disk failure, which has prevented data in the primary cache 222 from being successfully written to disk. Consequently, a large amount of data that has not yet been successfully written to disk is cached in the primary cache 222.
[0078] Furthermore, after successfully caching the target data, the primary cache 222 may write the target data to the primary storage array 223. Specifically, the primary cache 222 writes the target data to the target primary disk in the primary storage array 223 (i.e., stores the data on disk) based on the identifier and storage offset of the target primary disk. Alternatively, after determining that the primary cache 222 has successfully cached the target data, the primary management module 221 writes the target data in the primary cache 222 to the target primary disk in the primary storage array 223 based on the identifier and storage offset of the target primary disk.
[0079] In step 405 , the primary management module 221 writes the target data into the cache of the primary interface card 224 .
[0080] In this application, primary interface card 224 is used not only for communication between primary storage device 220 and remote storage device 230 but also for storing target data. This means that the existing module in primary storage device 220 (i.e., primary interface card 224) is given new functionality, thereby reducing synchronization latency and costs during synchronous remote replication. Furthermore, primary interface card 224 has a power-saving function. Even if primary storage device 220 fails and cannot provide power to primary interface card 224, primary interface card 224 can still ensure that target data is not lost.
[0081] For example, the primary interface card 224 may be connected to the primary storage device 220 in the form of a plug-in card, thereby achieving a 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).
[0082] Exemplarily, the main management module 221 may write the identifier of the target master disk, the storage offset, the length of the target data, the target data and timestamp 3 into the main interface card 224, where 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.
[0083] It should be noted that the primary disks in the primary storage array 223 and the remote disks in the remote storage array 233 can be mapped one to one. For example, the primary storage array 223 includes primary disks 1 through n, and the remote storage array 233 includes remote disks 1 through n corresponding to the primary disks 1 through n, respectively, where n is a positive integer. Optionally, n mapping relationships consisting of primary disks 1 through n and remote disks 1 through n are preconfigured in the primary management module 221. Alternatively, these n mapping relationships can be configured by the user on the host 210.
[0084] In one possible approach, after obtaining the identifier of the target primary disk from the write request, the primary management module 221 may further determine the remote disk corresponding to the target primary disk (referred to as the target remote disk) from remote disk 1 to remote disk n based on the identifier of the target primary disk and n preconfigured mapping relationships in the primary management module 221. Furthermore, the primary management module 221 may also write the identifier of the target remote disk into the cache of the primary interface card 224, or write an identifier pair consisting of the identifier of the target primary disk and the identifier of the target remote disk into the cache of the primary interface card 224.
[0085] 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 of step 410 below.
[0086] Step 406 : The primary interface card 224 returns the write result 3 to the primary management module 221 .
[0087] 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.
[0088] The reason why the primary management module 221 fails to successfully write the target data into the cache of the primary interface card 224 may be one or more of: insufficient cache space of the primary interface card 224, insufficient cache concurrency of the primary interface card 224. 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).
[0089] In this 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 into the cache of the main interface card 224 and the main cache 222 at the same time.
[0090] In step 407 , the main management module 221 returns a write response to the host 210 according to the write result 1 and the write result 3 .
[0091] In one 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 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).
[0092] 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 a write success (i.e., a write success response). If the main management module 221 determines that write result 1 is a write success and write result 3 is a write failure, the write response sent to the host 210 is a write success (i.e., a write success response). Furthermore, the main management module 221 can obtain the target data from the primary cache 222 and rewrite the target data to the cache of the primary interface card 224; or, based on the log corresponding to the write request, the main management module 221 obtains the target data from the target primary disk and rewrites the target data to the cache of the primary interface card 224. If the main management module 221 determines that write result 1 is a write failure and write result 3 is a write success, the write response sent to the host 210 is a write failure (i.e., a write failure response).
[0093] Step 408: The main management module 221 operates the log.
[0094] 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 during the next resynchronization.
[0095] In this application, the order of steps 407 and 408 is not limited. 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 executed after step 414 described below.
[0096] It is understood that the primary management module 221 can return a write success to the host 210 after receiving write result 1 and 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.
[0097] 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.
[0098] When the master management module 221 determines that the target data was successfully written to the primary cache 222 (i.e., write result 1 is write success), but fails to successfully write the target data to the cache of the primary interface card 224 (i.e., write result 3 is write failure), the master management module 221 may update the health status of the mapping relationship between the target primary 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 changed from "normal" to "abnormal". The master management module 221 sends a write response to the host 210 indicating write success and saves the log to the DCL.
[0099] 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".
[0100] Alternatively, the primary management module 221 indicates to the host 210 that the health status of the target mapping relationship has been updated from "normal" to "abnormal." Accordingly, the host 210 displays a prompt message to the client, indicating that the health status of the target mapping relationship has been updated from "normal" to "abnormal." The client can then check the storage link between the primary storage device 220 and the remote storage device 230 to determine and repair the faulty link in the current storage link. For example, if the client determines that the primary management module 221 is unable to successfully write the target data to the cache of the primary interface card 224 because the primary interface card 224 is faulty, the client repairs the primary interface card 224. Furthermore, the client can issue an instruction to the host 210 to instruct synchronization of data between the primary storage device 220 and the remote storage device 230. Accordingly, the host 210 sends a synchronization instruction to the primary management module 221. Based on the synchronization instruction, the primary management module 221 synchronizes the data between the primary storage device 220 and the remote storage device 230, i.e., attempts to write the target data to the cache of the primary 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.
[0101] 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 based on the abnormal time, obtains the target data from the target main disk based on the log, and then rewrites the target data into the cache of the main interface card 224.
[0102] It is understood that if the write response sent by the primary management module 221 to the host 210 indicates a write failure, the host 210 will interrupt the currently running application services. However, updating the health status of the target mapping relationship from "normal" to "abnormal" by the primary management module 221 does not affect the currently running application services on the host 210. In this way, when the primary management module 221 determines that the target data has not been successfully written to the cache of the primary interface card 224, it can update the health status of the target mapping relationship, thereby avoiding interruption of the currently running application services on the host 210 and improving the customer experience.
[0103] Furthermore, to ensure data synchronization between the primary storage device 220 and the remote storage device 230, that is, to ensure data reliability in a 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:
[0104] In step 409 , the primary interface card 224 sends a synchronization request to the remote management module 231 . The synchronization request includes target data, and is used to instruct the remote management module 231 to write the target data into the remote cache 232 .
[0105] In one possible embodiment, 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.
[0106] In one possible embodiment, the primary interface card 224 specifically sends a synchronization request to the remote interface card 234. The remote interface card 234 processes the synchronization request and then 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 primary interface card 224 via the remote interface card 234. Exemplarily, the synchronization request may further include a source IP address, a source port number, a destination IP address, and a destination port number. Specifically, the source IP address and the source port number are the IP address and the port number of the primary interface card 224, and the destination IP address and the destination port number are the IP address and the port number of the remote interface card 234.
[0107] 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 .
[0108] 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.
[0109] In another possible embodiment, the remote management module 231 may also be pre-configured with the n mapping relationships. Exemplarily, the primary storage device 220 synchronizes the n mapping relationships to the remote storage device 230. For the specific synchronization method, please refer to the description of the synchronization of target data from the primary storage device 220 to the remote storage device 230 in FIG4 . In another exemplary embodiment, the client configures the n mapping relationships to the remote management module 231 through the host 240. Furthermore, 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 based on the identifier of the target primary disk and the pre-configured n mapping relationships. Furthermore, the remote management module 231 writes the target data and the identifier of the target remote disk to the remote cache 232.
[0110] In addition, the remote management module 231 can also determine the target remote disk from the remote storage array 233 based on the identifier of the target remote disk, and then determine the storage offset based on the length already stored in the target remote disk. The remote management module 231 writes the storage offset to 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 to the remote cache 232, the remote cache 232 can write the target data to the target remote disk in the remote storage array 233 based on 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 can write the target data in the remote cache 232 to the target primary disk based on the identifier and storage offset of the target remote disk.
[0111] In step 411 , the remote cache 232 returns the write result 2 to the remote management module 231 .
[0112] 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.
[0113] The reason why the remote management module 231 fails to successfully write the target data to the remote cache 232 may be insufficient cache space in the remote cache 232. Furthermore, insufficient cache space in the remote cache 232 may be caused by a remote disk failure, which prevents data in the remote cache 232 from being successfully written to the disk. As a result, a large amount of data that has not yet been successfully written to the disk is cached in the remote cache 232.
[0114] In step 412 , the remote management module 231 returns a synchronization response to the primary interface card 224 .
[0115] Specifically, when write result 2 is a write success, the synchronization response is also a write success (or a synchronization success response); when 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 the synchronization response to the primary interface card 224 via the remote interface card 234, and correspondingly, the primary interface card 224 receives the synchronization response from the remote management module 231.
[0116] Optionally, the remote management module 231 also returns a reception response to the primary interface card 224, indicating 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 reception response from the remote management module 231 within a preset period of time for sending the synchronization request, the primary interface card 224 sends the synchronization request again to the remote management module 231. 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 reception response for any of the multiple synchronization requests, the primary interface card 224 determines that the network between the primary storage device 220 and the remote storage device 230 is disconnected.
[0117] 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.
[0118] 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.
[0119] In 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.
[0120] 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.
[0121] In step 414 , the primary interface card 224 returns the write result 4 to the primary management module 221 .
[0122] For example, after receiving write result 4 returned by primary interface card 224, primary management module 221 determines whether write result 4 is a success or a failure. If primary management module 221 determines that write result 4 is a failure, it may update the health status of the target mapping relationship from "normal" to "abnormal" and record the abnormal time when the health status changed from "normal" to "abnormal." For specific implementation methods, see the description of step 407.
[0123] In this 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.
[0124] This helps ensure that the target data is successfully written to the remote cache 232, and that the data in the remote storage device 230 remains 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. In other words, the host 240 and the remote storage device 230 can be used as the new host and primary storage device, respectively, to improve data reliability in disaster recovery and backup scenarios.
[0125] 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.
[0126] In one possible embodiment, the primary management module 221 writes the target data not only to the cache of the primary interface card 224 but also to the cache of the backup interface card 225. In another possible embodiment, after the primary management module 221 writes the target data to the cache of the primary interface card 224, the primary interface card 224 can not only send the target data to the remote management module 231 via a synchronization request but also mirror the target data to the cache of the backup interface card 225. In this way, if the primary 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.
[0127] As shown in Figure 5, this application provides an exemplary architecture diagram of another storage system suitable for remote replication scenarios, in which the main storage device 220 includes a main interface card 224 and a backup interface card 225. The main interface card 224 is connected to the backup interface card 225, and the main management module 221 can mirror and back up the target data to the cache of the backup interface card 225.
[0128] 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, it can instruct the backup interface card 225 in normal operation to send a synchronization request to the remote management module 231.
[0129] 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 the new target data.
[0130] Based on the above solution, this application provides three examples of synchronous remote replication methods in failure scenarios:
[0131] Fault scenario 1:
[0132] When the network between the primary storage device 220 and the remote storage device 230 is disconnected (i.e., the primary interface card 224 in the primary 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 primary storage device 220 with the remote storage device 230 through a third device. Optionally, the third device is a card reader, which can be located in a data center other than the primary data center and the remote data center, and can be connected to the primary storage device 220 and the remote storage device 230 respectively.
[0133] 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.
[0134] In one specific implementation, the third device sends a log request to the primary management module 221. This log request is used to request the primary management module 221 for logs in the DCL corresponding to timestamp 1 after the start time of the network disconnection. Accordingly, the primary management module 221 selects one or more logs from the DCL corresponding to timestamp 1 after the start time of the network disconnection based on the start time of the network disconnection, and returns these one or more logs to the third device. Optionally, the primary management module 221 can monitor the network status between the primary storage device 220 and the remote storage device 230, and upon determining that the network between the primary storage device 220 and the remote storage device 230 is disconnected, record the start time of the network disconnection.
[0135] Optionally, the third device performs the following steps for each log: determining the target primary disk based on the identifier of the target primary disk recorded in the log, and obtaining the target data from the target primary disk based on 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, where the synchronization request includes the target data indicated by the one or more logs. In response, the remote management module 231 obtains the target data indicated by the one or more logs from the synchronization request and writes the obtained target data to the remote cache 232.
[0136] Fault scenario 2:
[0137] When the network between the primary storage device 220 and the remote storage device 230 is disconnected (i.e., the primary interface card 224 in the primary 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 primary interface card 224 from the primary storage device 220 and then insert it into the remote storage device 230. Accordingly, upon detecting that an interface card (i.e., the primary interface card 224) has been inserted, the remote management module 231 of the remote storage device 230 reads the target data recorded in the detected primary interface card 224 and then writes the target data into the remote cache 232.
[0138] Optionally, during a 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 to the primary interface card 224. Correspondingly, when the remote management module 231 of the remote storage device 230 detects that an interface card has been inserted, the remote management module 231 may read the one or more target data from the primary interface card 224 and write the one or more target data sequentially to the remote cache 232.
[0139] 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, record the start time of the network disconnection; 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.
[0140] Fault scenario three:
[0141] 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.
[0142] Optionally, during a period of network disconnection between the primary storage device 220 and the remote storage device 230, the primary management module 221 may obtain one or more target data from the host 210 and write the one or more target data to the primary interface card 224. In one specific implementation, the primary management module 221 may monitor the network status between the primary storage device 220 and the remote storage device 230, and upon determining that the network between the primary storage device 220 and the remote storage device 230 is disconnected, record the start time of the network disconnection; the third device requests the start time of the network disconnection from the primary management module 221, and then, based on the start time of the network disconnection, reads one or more target data with a timestamp 3 after the start time from the primary interface card 224, and then sends the one or more target data to the remote management module 231 via a synchronization request. Accordingly, the remote management module 231 obtains the target data indicated by the one or more logs from the synchronization request and writes the obtained target data to the remote cache 232.
[0143] It should be noted 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, neither the primary interface card 224 nor the backup interface card 225 in the primary storage device 220 can send synchronization requests to the remote management module 231 in the remote storage device 230. Furthermore, in the above-mentioned failure scenarios 2 and 3, data can still be synchronized through the backup interface card 225.
[0144] Based on the above content and the same concept, this application provides a possible synchronous remote replication device for a storage system. This synchronous remote replication device can be used to implement the functions of the primary storage device 220 in the above method embodiment, thereby also achieving the beneficial effects of the above method embodiment. This 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:
[0145] In one possible implementation, the synchronous remote replication apparatus includes a primary management module 221, a primary cache 222, and a primary interface card 224. The primary management module 221 is configured to receive a write request from a host, the write request including target data; write the target data to the primary interface card 224; write the target data to the primary cache 222; and, in response to writing the target data to the primary cache 222, send a write success response to the host. The primary interface card 224 is configured to send the target data to the remote storage device 230.
[0146] 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 .
[0147] In one possible implementation, the device also includes a primary storage array 223, and the write request also includes an identifier of the target primary disk; after the primary management module 221 writes the target data to the primary cache 222, it is also used to: determine the target primary disk from the primary storage array 223 based on the identifier of the target primary disk, and store the target data in the primary cache 222 in the target primary disk.
[0148] In one possible implementation, the master management module 221 is further configured to: determine the identifier of the target remote disk based on the identifier of the target primary disk and a pre-set 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 230; and write the identifier of the target remote disk to the master interface card 224. The master interface card 224 is further configured to: send the identifier of the target remote disk to the remote storage device 230.
[0149] In a possible implementation, the primary management module 221 is further configured to 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 in response to a failure in writing target data to the primary interface card 224 .
[0150] 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.
[0151] Based on the above content and the same concept, FIG6 shows another possible synchronous remote replication device 600 provided by the present application. This synchronous remote replication device 600 can be used to implement the functions of the primary storage device 220 in the above method embodiment, thereby also achieving the beneficial effects of the above method embodiment. This synchronous remote replication device 600 can be the primary storage device 220 in the above method embodiment.
[0152] 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.
[0153] The division of modules in the embodiments of the present application is illustrative and is merely a logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional modules in the various embodiments of the present application may be integrated into a single processor, or may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or software functional modules.
[0154] Based on the above content and the same concept, the present application provides a computer-readable storage medium, which stores a computer program or instruction. When the computer program or instruction is executed by a computing device, the computing device performs the actions performed by the main storage device 220 in the above method embodiment.
[0155] 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 perform the actions performed by the main storage device 220 in the above method embodiment.
[0156] 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.
[0157] 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.
[0158] It is understood that the various numbers used in the embodiments of this application are merely for ease of description and are not intended to limit the scope of the embodiments of this application. The order of the sequence numbers of the above-mentioned processes does not necessarily imply a specific order of execution; the order of execution of the processes should be determined by their functions and inherent logic.
[0159] Obviously, those skilled in the art may make various modifications and variations to this application without departing from the scope of protection of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is 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
Patent Citations
Asynchronous remote copying method, system and equipment
CN102306115A
Data processing method and node equipment
CN103514173A
Synchronous remote replication implementing method
CN104580470A
A data synchronization method and device
CN109710183A
System and method for disaster recovery of data
US20060271815A1
