A method, apparatus and system for backing up data

By creating snapshots and writing differential data using data consistency points in a dual-active LUN configuration, the problem of backup data redundancy is solved, achieving efficient storage utilization and continuous backup in case of failure.

CN116010164BActive Publication Date: 2026-11-20HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211675288.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-29
Publication Date
2026-11-20
Estimated Expiration
2038-12-29

AI Technical Summary

Technical Problem

In a dual-active LUN configuration, existing technologies result in redundant backup data, making it impossible to efficiently utilize storage resources, and backup cannot continue when one storage device fails.

Method used

By establishing an active-active relationship between the first and second storage devices, creating snapshots using data consistency points, and writing differential data to the backup storage device, differential backup is achieved, reducing redundancy.

Benefits of technology

It enables continuous backup even in the event of storage device failure, reducing storage resource redundancy and improving backup efficiency and storage utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116010164B_ABST
    Figure CN116010164B_ABST
Patent Text Reader

Abstract

The application provides a data backup method applied to a storage system, wherein the storage system comprises a first storage device and a second storage device. A first LUN is constructed in the first storage device, and a second LUN is constructed in the second storage device. The first LUN and the second LUN are set in a dual-active relationship. The method comprises the following steps: when the first LUN is backed up, a request message for querying a data consistency point is sent to a second storage device to which the second LUN belongs, wherein the request message comprises an IO data state record of the first LUN, and the IO data state record is used for recording IO of a lower disk in the first LUN; information of the data consistency point obtained by the second storage device according to the IO data state record of the first LUN and an IO data state record of the second LUN stored in the second storage device is received; and a snapshot of the first LUN is created according to the data consistency point.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The original application has the application number 201880100576.1 and the original application date is December 29, 2018. The entire contents of the original application are incorporated herein by reference. Technical Field

[0002] This application relates to the field of storage technology, and in particular to a method, apparatus and system for backing up data. Background Technology

[0003] A dual-active LUN consists of two physically independent LUNs located in two separate storage systems. By configuring a dual-active relationship, these two independent LUNs are associated with a single logical LUN, and both physical LUNs share the same WebNode identifier (WWN). When a service host uses a dual-active LUN, it only needs to identify the LUN identifier (WWN) and read / write data to that identifier. The LUN driver layer will then distribute read / write requests to the two physical LUNs according to a specific load balancing strategy.

[0004] To ensure backups continue even if one storage device fails, backup administrators configure backup policies on both storage systems. Since the data on both systems is identical, this results in significant data redundancy during backups. Summary of the Invention

[0005] This application proposes a method for backing up data, applied to a storage system. The storage system includes a first storage device, a second storage device, and a backup storage device. The first storage device has a first logical unit (LUN), and the second storage device has a second logical unit (LUN). The first LUN and the second LUN are configured in an active-active relationship. The method includes: when the first storage device initiates a backup of the first LUN, sending a request message to the second storage device to which the second LUN belongs to query a data consistency point. The request message includes an IO data status record of the first LUN, which records disk I / O in the first LUN. The method also includes receiving data consistency point information obtained by the second storage device based on the IO data status record of the first LUN and the IO data status record of the second LUN stored in the second storage device. Finally, the method involves creating a snapshot of the first LUN based on the data consistency point and providing difference data between the current snapshot and the previous snapshot. This difference data is written to a backup image created for the current backup in the backup storage device.

[0006] This application proposes a method for backing up data, applied in a storage system. The storage system includes a first storage device, a second storage device, and a backup storage device. The first storage device has a first LUN configured, and the second storage device has a second LUN configured, with the first LUN and the second LUN set to an active-active relationship. The method includes:

[0007] When the first storage device initiates a backup of the first LUN, it suspends host I / O, writing previously cached write I / O to the hard disk. Simultaneously, the first storage device sends a notification message to the second storage device, instructing it to suspend host I / O and create a snapshot. Upon receiving a snapshot identifier from the second device and having written the previously cached write I / O to disk, the first storage device creates a snapshot of the first LUN, creates a backup image for this backup on the backup storage device, and writes the differences between this snapshot and the previous snapshot into the backup image.

[0008] This application also provides a storage system comprising a first storage device, a second storage device, and a backup storage device, wherein the first storage device has a first logical unit (LUN) configured, the second storage device has a second logical unit (LUN) configured, and the first LUN and the second LUN are configured in a dual-active relationship.

[0009] The first storage device is configured to, when initiating a backup of the first LUN, send a request message to the second storage device to which the second LUN belongs to query the data consistency point, the request message including the IO data status record of the first LUN, the IO data status record being used to record the disk IO in the first LUN, receive a response message returned by the second storage device including the data consistency point, and create a snapshot of the first LUN based on the data consistency point.

[0010] The first storage device is further configured to receive a request to query differential data, return corresponding differential data according to the request, and write the differential data into the backup image created for this backup in the backup storage device. The second storage device is configured to receive the request message to query the data consistency point, obtain the information of the data consistency point based on the IO data status record of the first LUN and the IO data status record of the second LUN stored in the second storage device, and return the response message to the second storage device.

[0011] The backup storage device is used to provide the backup storage image.

[0012] In another aspect, this application also provides a storage device, wherein the storage device is provided with at least one LUN, the at least one LUN including a first LUN, the first LUN being configured in a dual-active relationship with a second LUN in another storage device. The storage device includes a dual-end consistency snapshot device.

[0013] The dual-end consistency snapshot device is used to send a request message to the second storage device to which the second LUN belongs when initiating a backup of the first LUN. The request message includes the IO data status record of the first LUN, which is used to record the IO of the first LUN. The device also receives a response message from the second storage device that includes information on the data consistency point, and creates a snapshot of the first LUN based on the data consistency point.

[0014] The first LUN is used to receive requests for querying difference data, return the corresponding difference data according to the request, and write the difference data into the backup image created for this backup in the backup storage device.

[0015] This invention also provides a storage device, which includes a network interface 2100, a processor 2102, a memory 2104, a storage interface 2106, and a storage array 2108. The first LUN described above is configured based on the storage array 2108. The network interface 2100, processor 2102, memory 2104, and storage interface 2106 are connected via a bus, and the storage interface is communicatively connected to the storage array. The network interface 2102 can be provided by one or more network interface cards (NICs) for network access. The storage interface 2108 is used to connect to the storage array 2108. The storage array 2108 is used to store data. The storage array 2108 can also be replaced by other storage devices. The memory 2104 stores program instructions, which, when executed by the processor 2102, are used to implement the functions described above for the storage device.

[0016] This invention also provides a storage medium on which the aforementioned program instructions are stored. Attached Figure Description

[0017] Figure 1 This is a network diagram of a data backup system provided in an embodiment of the present invention;

[0018] Figure 2 This is another data backup system networking diagram provided in the embodiments of the present invention;

[0019] Figure 2-1 This is a schematic diagram of a storage device provided in an embodiment of the present invention;

[0020] Figure 3 This is a schematic flowchart of a data backup method provided in an embodiment of the present invention;

[0021] Figures 3-1 to 3-7 This is a schematic diagram of a data change process provided in an embodiment of the present invention. Detailed Implementation

[0022] This invention provides a data backup system for backing up data in storage devices. For example... Figure 1 As shown, the data backup system includes storage device A, storage device B, and a backup storage device. Storage device A and storage device B are physically independent. A logical unit (LUN A) is created in storage device A, and a LUN B is created in storage device B. LUN A and LUN B are configured in an active-active relationship. It is understood that in actual network configurations, storage devices A and B can be configured with more LUNs. For ease of description, this embodiment uses one LUN as an example. For convenience, storage device A is referred to as the first storage device in the following device and system embodiments, and storage device B is referred to as the second storage device. The LUN A is referred to as the first LUN, and the LUN is referred to as the second LUN.

[0023] The first storage device is configured to, when initiating a backup of the first LUN, send a request message to the second storage device to which the second LUN belongs to query a data consistency point. The request message includes an IO data status record of the first LUN, which records disk I / O operations performed on the first LUN. The first storage device also receives a response message from the second storage device including information about the data consistency point, and creates a snapshot of the first LUN based on the data consistency point. Furthermore, the first storage device is configured to receive a request to query differential data, return the corresponding differential data based on the request, and write the differential data into the backup image created for this backup in the backup storage device.

[0024] The second storage device is configured to accept the request message for querying the data consistency point, obtain the information of the data consistency point based on the IO data status record of the first LUN and the IO data status record of the second LUN stored in the second storage device, and return the response message to the second storage device.

[0025] The backup storage device is used to provide the backup storage image.

[0026] The first storage device includes at least one LUN, which comprises a first LUN. This first LUN is configured in a dual-active relationship with a second LUN in another storage device (the second storage device).

[0027] The first storage device further includes a dual-end consistency snapshot device, which is used to send a request message to the second storage device to which the second LUN belongs when initiating a backup of the first LUN, the request message including the IO data status record of the first LUN, the IO data status record being used to record the disk I / O of the first LUN, receive a response message returned by the second storage device including the data consistency point information, and create a snapshot of the first LUN according to the data consistency point.

[0028] The first LUN is used to receive requests for querying difference data, return the corresponding difference data according to the request, and write the difference data into the backup image created for this backup in the backup storage device.

[0029] Optionally, the aforementioned IO data status record includes the identifier of the LUN from which IO was received from the host and the sequence number of the IO received from the host. The dual-end consistency snapshot device is further configured to receive a request message querying a data consistency point. The request message originates from the second storage device to which the second LUN belongs. The request message includes the IO data status record of the second LUN, which is used to record the IOs that were dumped to disk in the second LUN.

[0030] The dual-end consistency snapshot device is further configured to determine, based on the IO data status records of the first LUN and the second LUN stored in the storage device, which IOs written by the host to the first LUN have been removed from both the first and second storage devices, and to use the latest sequence number of the determined IOs as the first data consistency point.

[0031] Based on the IO data status records of the first LUN and the second LUN, the IOs written by the host to the second LUN that have been removed from the second storage device and those that have been removed from the first storage device are determined, and the latest sequence number of the determined IOs is taken as the second data consistency point. The data consistency point includes both the first data consistency point and the second data consistency point.

[0032] Optionally, such as Figure 2As shown, when there is no gateway in the backup system, the storage device further includes a dual-policy management device and a backup device. The backup device is used to receive a backup policy creation request and forward the request to the dual-policy management device, wherein the backup policy creation request is used to create a backup policy.

[0033] The dual-end policy management device is used to set a dual-end backup policy based on the active-active relationship between the first LUN and the second LUN. The dual-end backup policy includes a first backup policy applicable to the first LUN and a second backup policy applicable to the second LUN. The dual-end policy generates a backup task for the first LUN based on the first backup policy.

[0034] Optionally, the dual-end policy management device is specifically used to determine the sequence number of the write IO included in this snapshot based on the first data consistency point and the second data consistency point, create a snapshot volume, search for the corresponding data from the IO data status record of the first LUN and the IO data status record of the second LUN based on the sequence number of the write IO, and write the found data into the snapshot volume.

[0035] refer to Figure 2-1 This invention also provides a storage device, which includes a network interface 2100, a processor 2102, a memory 2104, a storage interface 2106, and a storage array 2108. The first LUN described above is configured based on the storage array 2108. The network interface 2100, processor 2102, memory 2104, and storage interface 2106 are connected via a bus, and the storage interface is communicatively connected to the storage array. The network interface 2102 can be provided by one or more network interface cards for network access. The storage interface 2108 is used to connect to the storage array 2108. The storage array 2108 is used to store data. The storage array 2108 can also be replaced by other storage devices. The memory 2104 stores program instructions, which, when executed by the processor 2102, are used to implement the functions described above for the storage device.

[0036] refer to Figure 3 As shown, this embodiment of the invention provides a method for backing up data, applied to the above-mentioned... Figure 1 In the data backup system, LUN A in storage device A and LUN B in storage device B constitute a pair of active-active LUNs. Typically, the backup administrator creates a backup policy using either backup device A or B; this embodiment uses backup device A as an example.

[0037] Step 302: Backup device A receives a backup policy creation request from the backup administrator and forwards the request to dual-end policy management device A. The backup policy creation request is used to request the creation of a backup policy. The request includes a device identifier, the identifier of the backup object to be backed up, backup storage device information, and the backup policy.

[0038] Specifically, in this step, since the backup policy creation request is received by backup device A, the device identifier includes the IP address and port number of storage device A. The backup object to be backed up is LUN A, so the identifier information of the backup object is the ID of LUN A. The backup storage device information includes the IP address, port number, and path where the backup data is stored. The backup policy can refer to the backup triggering cycle, such as backing up once per hour, or other policies, which can be set according to actual needs.

[0039] The peer device is the storage device B. The peer device identifier includes the peer device's IP address and the port number of the peer device's listening port.

[0040] Step 304: Dual-end policy management device A sets the dual-end backup policy according to the received backup policy creation request and saves it locally.

[0041] Among them, the dual-end policy management device A discovers that LUN A is configured with a dual-active relationship and is paired with LUN B. Therefore, the dual-end policy management device A sets a dual-end backup policy, which includes policy information to be executed on LUN A (hereinafter referred to as the first backup policy for ease of description) and policy information to be executed on LUN B (hereinafter referred to as the second backup policy for ease of description).

[0042] The first backup strategy includes: the identifier of storage device A, the identifier (ID) of LUN A, the identifier of the backup storage device and the backup path ( / backup / ), and the time for performing the backup of LUN A (e.g., 1:00, 3:00, 5:00, 7:00, 9:00, 11:00, etc., which can be flexibly configured according to different administrator settings; this is just one example). The second backup strategy includes: the identifier of storage device B, the identifier of LUN B, the identifier of the backup storage device and the backup path ( / backup / ), and the time for performing the backup on the peer (e.g., 2:00, 4:00, 6:00, 8:00, 10:00, 12:00, etc.). In this embodiment of the invention, the World Wide Name (WWN) is used as the ID of LUN B and LUN A. LUN A and LUN B are set to a dual-active relationship, and their WWNs are the same.

[0043] Optionally, after step 304, the dual-end policy management device A may return a response message to the backup device A, indicating that the backup policy has been set.

[0044] Step 306: Dual-end policy management device A and dual-end policy management device B establish a communication channel and set up a heartbeat mechanism.

[0045] The dual-end policy management device A sends a heartbeat to the dual-end policy management device B. If it does not receive a heartbeat from the dual-end policy management device B within a specified time (e.g., 2 minutes), it considers that the storage device B is faulty.

[0046] Step 308: The dual-end policy management device A sends the first backup policy and the second backup policy to the dual-end policy management device B through the above communication channel.

[0047] Step 310: Dual-end policy management device B receives the backup policy from dual-end policy management device A and saves it locally.

[0048] Dual-end policy management device B receives the first backup policy and the second backup policy. Based on the identifier of the backup device, it can be determined that the backup policy on this end is the second backup policy, while the backup policy on the other end is the first backup policy.

[0049] Step 312: Dual-end policy management device A schedules the backup policy, generates a backup task, and sends a backup creation request to backup device A. The backup creation request includes the identifier (ID) of the backup task.

[0050] In this embodiment of the invention, the dual-end policy management device A calling the first backup policy is taken as an example. When the conditions in the second backup policy are met, such as at 2 o'clock, the dual-end policy management device B can also call its own backup policy and send a request to create a backup to the backup device B.

[0051] Step 314: After receiving the request to create a backup, backup device A sends a request message to create a consistent snapshot to dual-end consistent snapshot device A. The request message to create a consistent snapshot includes the ID of LUN A.

[0052] Step 316: Establish a communication channel between dual-end consistency snapshot device A and dual-end consistency snapshot device B for sending messages to each other during communication.

[0053] In this step, the dual-end consistency snapshot device A can locate the dual-end consistency snapshot device B where LUN B is located based on the active-active relationship, and establish a communication channel with it. Optionally, the communication channel established in step 306 above can also be reused to send messages in this step.

[0054] Step 318: Dual-end backup strategy management device A obtains the IO data status record of LUN A and sends the IO data status record to dual-end consistent snapshot device B.

[0055] The IO data status record is mainly used to describe the data written to LUN A. The IO data status record includes: the sequence number of the received host IO and the initiator identifier.

[0056] Step 320: The dual-end consistency snapshot device B acquires the IO data status record of LUN B, finds the data consistency point based on the received IO data status record of LUN A and LUN B, generates data consistency point information, creates a snapshot based on the data consistency point, and generates difference tracking information.

[0057] Step 322: The dual-end consistency snapshot device B returns the data consistency point information and the snapshot ID of LUN B to the dual-end consistency snapshot device A.

[0058] Step 324: After receiving the data consistency point information returned by the dual-end consistency snapshot device B, dual-end consistency snapshot device A creates a snapshot of its local LUN A based on the data consistency point information and generates difference tracking information.

[0059] Step 326: LUN A returns the snapshot ID of LUN A and the received snapshot ID of LUN B to backup device A.

[0060] Step 328: Backup device A generates the backup image ID for this backup and sends the information of this backup task to dual-end policy management device A. The information of this backup task includes: LUN ID of LUN A, snapshot ID of LUN A, backup task ID for this backup, and backup image ID for this backup.

[0061] Step 330: The dual-end policy management device A stores the received LUN ID, LUN A snapshot ID, backup task ID, and backup image ID in storage device A.

[0062] It is understandable that, since this backup was initiated by storage device A, the dual-end policy management device A can classify the above information as backup task information for LUN A.

[0063] Step 332: Backup device A sends backup task information and LUN B snapshot information to dual-end policy management device B.

[0064] Step 334: The dual-end policy management device B stores the LUN ID of LUN B, the snapshot ID of LUN B, the backup task ID, the backup image ID, and other task information in the backup task information of LUN A.

[0065] Since the backup task is the same and the backup image on the backup storage device is also the same, the backup task IDs and backup image IDs stored on both ends are the same.

[0066] Understandably, since this backup was initiated from storage device A, this task information is recorded as LUN A task information. If the backup was initiated from storage device B, then the dual-end policy management device B would record this task information as LUN B backup task information.

[0067] Step 336: Backup device A sends a request message to dual-end consistent snapshot device A, requesting to obtain difference information.

[0068] Step 338: The dual-end consistent snapshot device A determines the difference information and returns the determined difference information to the backup device A.

[0069] If it is the first time a snapshot is created, the dual-end consistency snapshot device A returns the full bitmap information. If it is not the first time a snapshot is created, the dual-end consistency snapshot device A finds the bitmap information corresponding to the parent snapshot based on the parent snapshot information passed in by the backup module, and finds the bitmap information corresponding to the current snapshot based on the current snapshot information passed in by the backup module. They compare the two and generate differential bitmap information, which is the difference information mentioned above.

[0070] Step 340: Backup device A requests the data indicated by the difference information from LUN A.

[0071] It is understandable that this data represents the data that has changed between the two backups; for ease of description, it will be referred to as difference data below. The information indicated by this difference information can be found through this snapshot. The specific process can be found using typical snapshot incremental backup techniques, and will not be elaborated upon here.

[0072] Step 342: LUN A returns the difference data.

[0073] Step 344: Backup device A generates the storage path of the backup image and writes the obtained difference data to the path to generate the backup image.

[0074] Similarly, when the dual-end management device B schedules the backup strategy and generates a backup task, it will also refer to steps 312-344 above, creating snapshots for this backup task on both end B and end A, and obtaining the difference data based on the data from two adjacent snapshots for backup. If, in step 338 above, the dual-end consistent snapshot device A returns the full bitmap information, that is, it is the first backup, then in this backup, the dual-end consistent snapshot device B compares the snapshot from the previous full backup at end A with the snapshot of this backup to obtain the difference bitmap information.

[0075] Taking the backup strategy exemplified above, after storage device A completes the backup of LUN A, the next backup will be performed by storage device B on LUN B; that is, the two devices take turns backing up. Furthermore, using the scheme of this embodiment, each backup is based on the snapshot of the other device at the time of the last backup, and the differences are calculated. Therefore, the full backup data is stored only once in the backup storage device. The backup image stored in the backup storage device accurately reflects the data changes on LUN A and LUN B every hour, meaning there is no duplication between the backed-up data, thereby reducing the amount of data stored.

[0076] Additionally, the path where the backup image is stored in backup storage can be a preset path combined with the WWN of the dual-active LUN. The preset path is / backup / in the first backup strategy described above, and the specific storage path is / backup / WWN. Since LUN A and LUN B have the same WWN, the backup image generated for LUN A and the backup image generated for LUN B are stored under the same path. This forms a structure as follows: Figure 1 The backup images shown are 1, 2, and 3, etc.

[0077] Furthermore, in this embodiment of the invention, if storage device A fails, causing LUN A to be unable to write data, then storage device B can continue the next backup based on the previous backup, replacing storage device A. As mentioned earlier, the backup images stored in the backup storage device are incremental backups, and there is no data duplication between backup images. To improve efficiency, breakpoint information (backup task ID, offset address where data backup in LUN A is complete, backup image ID, etc.) can be periodically saved to the backup storage device during the process of obtaining data from the LUN in step 342 and writing data to the backup storage device in step 344 (e.g., every 1GB of data or every minute). This allows storage device B to take over the backup task being executed before the failure of storage device A after the failure of storage device A, and to achieve breakpoint resumption. Referring to Figure 4, the process of achieving breakpoint resumption includes:

[0078] Step 402: Dual-end policy management device B takes over the backup task executed before the failure of storage device A and sends a request to backup device B to create a breakpoint resume task.

[0079] In this step, the dual-end policy management device B can find the backup task for LUN A on the storage device A side in the task information of LUN A stored in step 334, and carry the backup task ID of the backup task in the request to create the breakpoint resume task.

[0080] Step 404: Backup device B sends a query request to the backup storage device to query breakpoint information. The query request includes the backup task ID.

[0081] Step 406: The backup storage device locates the breakpoint information in the backup storage device based on the backup task ID, and sends the breakpoint information to the backup device B. The breakpoint information includes the backup task ID, the offset address where data backup in LUN A is complete, and the backup image ID.

[0082] Step 408: Backup device B sends a request message to dual-end consistent snapshot device B, requesting to obtain difference information.

[0083] Step 410: The dual-end consistent snapshot device B determines the difference information and returns the determined difference information to the backup device B.

[0084] Step 412: Backup device B requests the data indicated by the difference information from LUN B.

[0085] Step 414: LUN B returns the difference data.

[0086] Step 416: Backup device B continues to back up the incomplete backup of LUN A based on the breakpoint information.

[0087] In this step, since the breakpoint information contains the backup image ID and the offset address where the data in LUN A has been backed up, the backup device B can find the starting point that needs to be backed up, and find which backup image to store the data in.

[0088] Step 418: Periodically save the breakpoint information to the backup storage device.

[0089] The following is combined with Figures 3-1 to 3-7 This section will specifically explain how data consistency points are found in the embodiments of the present invention.

[0090] As mentioned earlier, LUN A on storage device A and LUN B on storage device B are dual-active LUNs. The process of finding a data consistency point is illustrated by the example of the host writing the four characters "abcd" to both LUN A and LUN B.

[0091] Step 3202: The host writes the character 'a' into the LUNA of storage device A and the character 'b' into the LUN B of storage device B.

[0092] Understandably, the host sends the character 'a' in a write I / O request to storage device A, and similarly sends the character 'b' in a write I / O request to storage device B. For example... Figure 3-1 As shown, the host's write I / O request first arrives at the two-endian consistency snapshot device A in storage device A, which stores the I / O request issued by the host in the host I / O queue. Similarly, the two-endian consistency snapshot device B in storage device B stores the I / O request issued by the host in the host I / O queue.

[0093] It is worth noting that the IO data status record is empty at this time.

[0094] Since LUN A and LUN B are dual-active LUNs, they need to synchronize data with each other.

[0095] Step 3204: Reference Figure 3-2 The two-end consistency snapshot device A synchronizes the character 'a' received at its local end to the other end's two-end consistency snapshot device, namely, two-end consistency snapshot device B; the two-end consistency snapshot device B synchronizes the character 'b' received at its local end to the other end's two-end consistency snapshot device, namely, two-end consistency snapshot device A. For easy differentiation, two-end consistency snapshot device A assigns a number to the character 'a' and stores this number in memory. Once the character 'a' is permanently stored on disk and the IO data status record is updated, this number is deleted from memory. This number includes the identifier of the initiating end and the sequence number of the IO request received by the initiating end. Here, the number assigned to the character 'a' can be (A, 1), where A is the identifier of the initiating end (end A), and 1 indicates that it is the first IO request received from the host. Similarly, the number assigned to the character 'b' is (B, 1), where B is the identifier of the initiating end (end B), and 1 indicates that it is the first IO request received from the host. The initiating end refers to the end that initiates the data synchronization, that is, the end that directly receives data from the host side. The number of the character 'b' is initially stored in memory. Once the character 'b' is permanently stored on disk and the IO data status record is updated, the number is deleted from memory.

[0096] Step 3206: Reference Figure 3-3The two-end consistency snapshot devices A and B respectively erase the data carried by the IO in their internal IO queues to disk. After erasing, they update the IO data status records. The IO data status records in the two-end consistency snapshot device A include [(B, 1)]; the IO data status records in the two-end consistency snapshot device B include [(A, 1)].

[0097] If the storage device is a storage array, after a write I / O arrives at the array, it is first stored in a cache, and then written to the hard disk according to a policy. Each I / O written to the cache is recorded in a corresponding I / O log. Each I / O log entry can include the sequence number of the received I / O, the offset of the I / O, the size of the I / O, and the data of the I / O. I / O logs can employ an aging mechanism, meaning that I / O logs written for a certain period of time are deleted. In practice, the host does not care when the data written to the cache is actually written to the hard disk; therefore, in typical implementations, recording write I / O in the I / O log means that the data has been written to disk for the host. Therefore, in this embodiment of the invention, "writing to disk" can refer to storing the data in the cache of the array.

[0098] Step 3208: Reference Figure 3-4 The host writes the character 'c' into the LUNA of storage device A and the character 'd' into the LUN B of storage device B.

[0099] As described in step 3202, the dual-end consistency snapshot device A stores the write I / O requests issued by the host in the host I / O queue. Similarly, the dual-end consistency snapshot device B stores the I / O requests issued by the host in the host I / O queue.

[0100] Step 3210: Reference Figure 3-5 The dual-end consistency snapshot device A synchronizes the character 'c' received at its local end to the dual-end consistency snapshot device at the other end, namely dual-end consistency snapshot device B; the dual-end consistency snapshot device B synchronizes the character 'd' received at its local end to the dual-end consistency snapshot device at the other end, namely dual-end consistency snapshot device A.

[0101] Assign the number (A, 2) to the character 'c', where A is the identifier of the initiating end (A end), and 2 indicates that it is the second IO request received from the host. Similarly, assign the number (B, 2) to the character 'd', where B is the identifier of the initiating end (B end), and 2 indicates that it is the second IO request received from the host.

[0102] Understandably, at this point, the characters 'c' and 'd' have not yet been removed from disk, so the recorded IO data status is not updated.

[0103] Step 3212: Dual-end policy management device A calls the backup policy of its local end. If the conditions for performing backup are met at this time, a backup task is generated and a request to create backup is sent to backup device A.

[0104] After receiving the request to create a backup, backup device A sends a request message to create a consistent snapshot to dual-end consistent snapshot device A.

[0105] Through the communication channel established in step 316 above, the dual-end consistency snapshot device A sends a data consistency point query message to the dual-end consistency snapshot device B. The query message carries information about the data that has been downloaded to disk, recorded in the local IO data status record. In this embodiment, [(B, 1)] recorded in the IO data status record at this time is sent to the dual-end consistency snapshot device B.

[0106] The dual-end consistency snapshot device B searches for data consistency points locally based on the IO data status record received from the dual-end consistency snapshot device A. The specific process is as follows:

[0107] The dual-end consistency snapshot device B categorizes the information in the IO data status records recorded at its own end and the IO data status records recorded at the peer end according to the initiating end:

[0108] First, find the record that originated from endpoint A:

[0109] The result of searching the IO data status record on end A: None;

[0110] The result found in the IO data status record on the B side is: [(A, 1)].

[0111] The inability to find a matching point indicates that the data received by end A from the host has not yet been downloaded locally, but has already been downloaded to the other end (end B). In other words, it is impossible to find data that has been downloaded to both ends.

[0112] Second, find records that originated from B:

[0113] The result found in the IO data status record on end A is: [(B, 1)].

[0114] The result of the search in the IO data status record on the B side is: None.

[0115] The inability to find a matching point indicates that the data received by B from the host has not yet been removed from B's disk, but has already been removed from A's disk. In other words, it is impossible to find data that has been removed from both ends.

[0116] When creating a snapshot, there is no difference information between it and the previous snapshot.

[0117] Step 3214: As Figure 3-6 As shown, dual-end consistency snapshot devices A and B respectively write the data in the first write IO request in the local host IO queue to disk.

[0118] In other words, two-endian consistent snapshot device A writes the character 'a' to disk, and two-endian consistent snapshot device B writes the character 'b' to disk.

[0119] After the data is downloaded to disk, refresh the local IO data status record, including:

[0120] The IO data status records in dual-end consistency snapshot device A include [(B, 1), (A, 1)]; the IO data status records in dual-end consistency snapshot device B include [(A, 1), (B, 1)].

[0121] If the conditions for storage device A to perform a backup are met at this time, after receiving the request message to create a consistent snapshot sent by storage device A, the information of the local IO data status record included in the data consistency point query message sent by dual-end consistent snapshot device A to dual-end consistent snapshot device B is [(B, 1), (A, 1)].

[0122] Similarly, the method for finding data consistency points described above is used to find the current data consistency point. The specific process is as follows:

[0123] The dual-end consistency snapshot device B categorizes the information in the IO data status records recorded at its own end and the IO data status records recorded at the peer end according to the initiating end:

[0124] First, find the record that originated from endpoint A:

[0125] The result found in the IO data status record at end A is: [(A, 1)].

[0126] The result found in the IO data status record on the B side is: [(A, 1)].

[0127] The data consistency point (A, 1) was found. This result indicates that the data of the first write IO request received by end A from the host has been written to disk locally (end A) and also to disk on the peer end (end B).

[0128] Second, find records that originated from B:

[0129] The result found in the IO data status record at end A is: [(B, 1)].

[0130] The result found in the IO data status record on the B side is: [(B, 1)].

[0131] The disk data point (B, 1) was found. This result indicates that the data from the first write IO request received by B from the host has already been written to disk locally, and has also been written to disk on the peer (A).

[0132] Step 3218: As Figure 3-7 As shown, in this case, the dual-end consistency snapshot device A will write the data in the write IO request of the local memory IO queue to disk.

[0133] At this time, the dual-end consistency snapshot device A refreshes the local IO data status record. The refreshed IO data status record includes [(B, 1), (A, 1), (B, 2)].

[0134] If the conditions for storage device A to perform a backup are met at this time, after receiving the request message to create a consistent snapshot sent by storage device A, the information of the local IO data status record included in the data consistency point query message sent by dual-end consistent snapshot device A to dual-end consistent snapshot device B is [(B, 1), (A, 1), (B, 2)].

[0135] Similarly, the method for finding data consistency points described above is used to find the current data consistency point. The specific process is as follows:

[0136] The dual-end consistency snapshot device B categorizes the information in the IO data status records recorded at its own end and the IO data status records recorded at the peer end according to the initiating end:

[0137] First, find the record that originated from endpoint A:

[0138] The result found in the IO data status record at end A is: [(A, 1)].

[0139] The result found in the IO data status record on the B side is: [(A, 1)].

[0140] The data consistency point (A, 1) was found. This result indicates that the data of the first write IO request received by end A from the host has been written to disk locally (end A) and also to disk on the peer (end B).

[0141] Second, find records that originated from B:

[0142] The result found in the IO data status record on end A is: [(B, 1)].

[0143] The result found in the IO data status record on the B side is: [(B, 1)].

[0144] The data consistency point was found, indicating that the data from the first write IO request received by B from the host had already been written to disk locally, and also to disk on the peer (A).

[0145] Step 320: The dual-end consistency snapshot device B saves the IO data status record, obtains the IO data status record of LUN B and compares it, finds the data consistency point, generates data consistency point information, creates a snapshot based on the data consistency point, and generates the difference IO data status record.

[0146] Once the data consistency point is determined, the process of creating a snapshot based on the data consistency point mentioned in step 320 includes:

[0147] Based on the data consistency points, (A, 1) and (B, 1) are determined to belong to this snapshot;

[0148] A snapshot volume is created by retrieving the corresponding data from the logs stored in storage devices A and B based on the I / O sequence number and writing it to the snapshot volume. If some data is deleted due to log aging, the data in the logs will be incomplete. Therefore, if not all data can be found in the logs, the corresponding data needs to be searched for on the hard drives of storage devices A or B.

[0149] In the above embodiments, it is necessary to determine the data consistency point by recording the IO data status of both the local and remote ends, thereby ensuring that the data in the snapshots of both ends are consistent. This implementation method has no impact on existing IO processing and is imperceptible to the user. However, this method is relatively complex.

[0150] Therefore, embodiments of the present invention also provide another simple method to ensure that the data in the snapshots at both ends are consistent. Referring to 5, the method includes:

[0151] Steps 502 to 514 are the same as steps 302 to 314.

[0152] Step 516: After receiving the request to create a consistent snapshot from the backup device, the dual-end consistent snapshot device A suspends the host IO and removes the IO in the local host IO queue and the internal IO queue from disk.

[0153] In this process, dual-consistency snapshot device A locates dual-consistency snapshot device B, where LUN B resides, based on the active-active relationship, and establishes a communication channel with it. The aforementioned notification is sent through this communication channel. Suspended host I / O refers to placing received host I / O into a cache without processing it temporarily, including not adding it to the host I / O queue. If suspended host I / O causes the cache space to become full, it may lead to the storage device reporting an error to the host, causing the host to stop issuing I / O.

[0154] Step 518: After the dual-end consistency snapshot device A performs host IO, it sends a notification message to the dual-end consistency snapshot device B, notifying the peer to suspend host IO and create a snapshot.

[0155] Step 520: After receiving the notification, the dual-end consistency snapshot device B suspends the host I / O and pushes the I / O in the local host I / O queue and the I / O in the internal I / O queue to disk. After all data is pushed to disk, a snapshot is created.

[0156] Step 522: The dual-consistency snapshot device B returns the LUN B snapshot ID to the dual-consistency snapshot device A.

[0157] Step 524: After receiving the snapshot ID of LUN B returned by dual-end consistency snapshot device B, dual-end consistency snapshot device A creates a snapshot of local LUN A and generates difference tracking information.

[0158] Steps 526 to 544 are the same as steps 326 to 344. They will not be repeated here.

[0159] This invention provides a very simple and effective method to ensure that when storage device A is backed up, the data already downloaded to disk in storage device A and storage device B are consistent. This achieves continuous backup on each end of the backup storage device, making it easier for one party to take over the backup task or other work of the other party in the event of a failure.

[0160] This invention also provides a method for backing up data, which is applied to the above-mentioned... Figure 2 Backup storage systems in [the system]. For example... Figure 2 As shown, a backup gateway is set between storage device A and storage device B and the backup storage device, and the backup gateway realizes the functions of the above-mentioned backup device and dual management device.

[0161] When the backup gateway receives a backup policy creation request from the backup administrator, it detects that the LUN to be backed up has a dual-active LUN configuration and then configures a dual-end backup policy for the dual-active LUN. Taking the example above where LUN A and LUN B have a backup relationship, the backup gateway no longer distinguishes between the local and peer ends. Instead, it creates a first backup policy for LUN A and a second backup policy for LUN B. Based on the first backup policy, it calls storage device A to perform a backup of LUN A, and calls the second backup policy to perform a backup of LUN B.

[0162] Since the backup device and the dual-end policy management device are not separately installed in storage device A and storage device B, the interaction steps between dual-end policy management device A and dual-end policy management device B mentioned above are not present in this embodiment, such as steps 306, 308, and 332.

[0163] The terms "local end" and "remote end" mentioned above are relative concepts. When the executing entity is storage device A or a component therein, "local end" refers to end A, and "remote end" refers to end B. Conversely, when the executing entity is storage device B or a component therein, "local end" refers to end B, and "remote end" refers to end A. Furthermore, "disk storage" refers to storing data on a disk, and a disk refers to a drive used for persistent storage, which can include SSDs, HDDs, etc.

[0164] Those skilled in the art will understand that various aspects, or possible implementations of various aspects, of the present invention can be embodied as systems, methods, or computer program products. Therefore, various aspects, or possible implementations of various aspects, of the present invention can take the form of entirely hardware embodiments, entirely software embodiments (including firmware, resident software, etc.), or embodiments combining software and hardware aspects, all collectively referred to herein as "circuit," "module," or "system." Furthermore, various aspects, or possible implementations of various aspects, of the present invention can take the form of computer program products, which are computer-readable program codes stored on a computer-readable medium.

[0165] Computer-readable media include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or apparatuses, or any suitable combination thereof, such as random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), and optical disc.

[0166] A processor in a computer reads computer-readable program code stored in a computer-readable medium, enabling the processor to perform the functional actions specified in each step, or combination of steps, of a flowchart.

[0167] Computer-readable program code may execute entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. It should also be noted that in some alternative implementations, the functions indicated by the steps in the flowchart or the blocks in the block diagram may not occur in the order shown in the diagram. For example, depending on the functions involved, two consecutive steps or blocks may actually be executed approximately simultaneously, or these blocks may sometimes be executed in reverse order.

[0168] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the invention.

[0169] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Those skilled in the art can easily conceive of variations or substitutions within the technical scope disclosed in the present invention, and all such variations or substitutions should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A storage system comprising a first storage device and a second storage device, wherein the first storage device includes a first logical unit (LUN), the second storage device includes a second LUN, and the first LUN and the second LUN are in a dual-active relationship, characterized in that, When the first storage device determines that a snapshot needs to be taken of the first LUN, it sends snapshot instruction information to the second storage device. The second storage device is configured to perform a first snapshot on the second LUN according to the snapshot indication information, and send the first snapshot information to the first storage device; The first storage device is used to execute a second snapshot on the first LUN based on the first snapshot information, wherein the data information corresponding to the first snapshot is consistent with the data information corresponding to the second snapshot; The snapshot indication information includes a first record, which records information about data written to the first LUN after the last snapshot and which has been disk-written. When the second storage device performs a first snapshot on the second LUN, it specifically determines consistent data information that has been disk-written on both the first and second storage devices based on the data information recorded in the first record and the data information recorded in the second record. The second record records information about data written to the second LUN after the last snapshot and which has been disk-written. The first snapshot information sent by the second storage device to the first storage device includes the consistent data information. Alternatively, before sending the snapshot indication information, the first storage device is further configured to: suspend host I / O and remove the write I / O of the first LUN cached in the first storage device from disk; the snapshot indication information also includes information instructing the second storage device to suspend host I / O; before performing the first snapshot on the second LUN, the second storage device is further configured to suspend host I / O according to the snapshot indication information and remove the write I / O of the second LUN cached in the second storage device from disk.

2. The system according to claim 1, characterized in that, The storage system further includes a third storage device, and the first storage device is also used to receive a backup request and determine, based on the backup request, that a snapshot needs to be taken of the first LUN, and the backup request is used to perform a backup operation on the data of the first LUN; The first storage device is further configured to, after performing the second snapshot on the first LUN, obtain the difference data between the second snapshot and the last snapshot on the first storage device, and back up the difference data to the third storage device.

3. The system according to claim 2, characterized in that, The first storage device is further configured to set a dual-end backup strategy, the dual-end backup strategy including a first backup strategy of the first storage device and a second backup strategy of the second storage device. The first storage device is further configured to send the dual-end backup strategy to the second storage device, and the first storage device generates the backup request by invoking the first backup strategy.

4. The system according to claim 3, characterized in that, The first backup strategy and the second backup strategy involve the first storage device and the second storage device alternately performing backup operations.

5. A data processing method applied to a storage system, the storage system comprising a first storage device and a second storage device, the first storage device comprising a first logical unit (LUN), the second storage device comprising a second LUN, wherein the first LUN and the second LUN are in a dual-active relationship, characterized in that, The method includes: When the first storage device determines that a snapshot needs to be taken of the first LUN, it sends snapshot instruction information to the second storage device; The second storage device performs a first snapshot on the second LUN according to the snapshot indication information, and sends the first snapshot information to the first storage device; The first storage device executes a second snapshot on the first LUN based on the first snapshot information, and the data information corresponding to the first snapshot is consistent with the data information corresponding to the second snapshot; The snapshot indication information includes a first record, which records information about data written to the first LUN after the last snapshot and which has been disk-written. When the second storage device performs a first snapshot on the second LUN, it specifically determines consistent data information that has been disk-written on both the first and second storage devices based on the data information recorded in the first record and the data information recorded in the second record. The second record records information about data written to the second LUN after the last snapshot and which has been disk-written. The first snapshot information sent by the second storage device to the first storage device includes the consistent data information. Alternatively, before the first storage device sends the snapshot indication information, the method further includes: suspending host I / O and removing the write I / O of the first LUN cached in the first storage device from disk; the snapshot indication information also includes information instructing the second storage device to suspend host I / O; before the second storage device performs the first snapshot on the second LUN, the method further includes: suspending host I / O according to the snapshot indication information and removing the write I / O of the second LUN cached in the second storage device from disk.

6. The method according to claim 5, characterized in that, The storage system further includes a third storage device, and the method further includes: The first storage device obtains a backup request and determines, based on the backup request, that a snapshot needs to be taken of the first LUN. The backup request is used to perform a backup operation on the data of the first LUN. After the first storage device performs the second snapshot on the first LUN, the method further includes: Obtain the difference data between the second snapshot and the last snapshot on the first storage device, and back up the difference data to the third storage device.

7. The method according to claim 6, characterized in that, The first storage device is further configured to set a dual-end backup strategy, the dual-end backup strategy including a first backup strategy of the first storage device and a second backup strategy of the second storage device. The first storage device is further configured to send the dual-end backup strategy to the second storage device, and the first storage device generates the backup request by invoking the first backup strategy.

8. The method according to claim 7, characterized in that, The first backup strategy and the second backup strategy involve the first storage device and the second storage device alternately performing backup operations.

Citation Information

Patent Citations

  • Snapshot processing method and associated equipment

    CN105808374A