This application claim priority from Chinese Patent Application Number CN201511021598.3, filed on Dec. 31, 2015 at the State Intellectual Property Office, China, titled “METHOD AND DEVICE FOR RECOVERING DATA REPLICATION BETWEEN STORAGE DEVICES” the contents of which is herein incorporated by reference in its entirety.
The present disclosure generally relates to the technical field of storage, and more specifically, relates to a method and device for recovering data replication between storage devices.
Data storage devices, for example a product of the EMC, VNX2, provide a disaster recovering system of the file level. If a disaster occurs on a primary storage device, the selected network attached storage (NAS) server, together with all its file systems, snapshots, and network configurations, can be switched to a secondary storage device through a continuous data service.
However, there might be a case that the primary storage device may be interrupted due to outage. After the primary storage device is recovered from an interruption state, the data on the secondary storage device cannot be automatically replicated to the primary storage device. As an example of the disaster recovery, VNX2 provides a disaster recovery service of the file level by using a MirrorView/S solution. In the solution, a mirrored pair is created for a pair of logical units (LUNs). The LUN of the primary storage device serves as a primary mirror in the mirrored pair, and the LUN of the secondary storage device serves as a secondary mirror in the mirrored pair. The mirrored pair is placed in a consistency group and managed collectively as a single entity.
When the primary storage device does not respond normally or is interrupted during switchover, the single consistency group is destroyed, resulting in two local consistency groups. Hence, when the primary storage device is recovered from the interruption state, the data on the secondary storage device cannot be automatically replicated to the primary storage device through the two local consistency groups. In other words, the data replication is interrupted.
In the case of the two local consistency groups, although the NAS client may continue to access the data on'the secondary storage system, the altered/updated data cannot be replicated to the primary storage system. This would cause the data to be unprotected. A user may try to re-create the mirrored pair and the consistency group, but it is difficult to find the corresponding primary mirror and secondary mirror.
In order to solve the above problem, the present disclosure provides a method, and device for recovering data replication between storage devices. The method can acquire original mirror information from replication sessions reserved in a database (DB), for example re-create a mirrored pair and a consistency group by the replication session, and restart a file transmission from a secondary storage system to a primary storage system. Once data is synchronized, the data replication may be switched to the primary storage system.
A first aspect of the present disclosure provides a method of recovering data replication between storage devices, comprising; creating mirrored pairs between logical units of a primary storage device and logical units of a secondary storage device; in response to the primary storage device recovering from an interruption state to a normal state, re-creating the mirrored pairs based on one or more replication sessions between the logical units of the primary storage device and the logical units of the secondary storage device stored before interruption; and replicating data to the primary storage device based on the re-created mirrored pairs.
The method allows the user to recover the interrupted data replication in an automatic manner after the primary storage system is recovered from the interruption state. Once the recovering command is performed, the data may be automatically replicated from the secondary storage system to the primary storage system.
According to an embodiment of the present disclosure, creating mirrored pairs between logical units of a primary storage device and logical units of a secondary storage device comprises: creating the mirrored pairs corresponding to the respective logical units of the primary storage device and the respective logical units of the secondary storage device, each mirrored pair including a primary mirror corresponding to one of the logical units of the primary storage device and a secondary mirror corresponding to a respective one of the logical units of the secondary storage device; forming a consistency group based on the mirrored pairs; and storing first information including the mirrored pairs and the consistency group to a database of the primary storage device, and replicating the first information to a database of the secondary storage device.
For a write operation, the data is firstly written into the LUNs at the primary storage device side and simultaneously replicated (or synchronized) to the LUNs at the secondary storage device side, to ensure that the data stored in the LUNs at the primary storage device side and in the LUNs at the secondary storage device side are exactly identical after the write operation. In this way, upon a failure of the primary storage device, the secondary storage device can immediately provide a data service as a backup storage device. Thus, data synchronization is achieved and data safety is improved.
Since the consistency group formed by the mirrored pairs is a single entity, it facilitates uniform management and operation of the mirrored pairs.
It should be noted that the primary and secondary storage devices involved in an embodiment of the present disclosure may be completely peer storage devices. In other words, the primary and secondary storage devices do not have the traditional “primary-secondary” relation, and the roles thereof are interchangeable. For example, the primary storage device may be a local storage device, and the secondary storage device may be a (for example, remote) backup storage device, and vice versa. Specifically, the number and size of the LUNs in the primary and secondary storage devices, as well as other configurations of the storage devices, may be exactly identical.
According to an embodiment of the present disclosure, re-creating the mirrored pairs based on one or more replication sessions between the logical units of the primary storage device and the logical units of the secondary storage device stored before interruption comprises: for the one or more replication sessions before the interruption, acquiring, from the database of the secondary storage device, the first information on the mirrored pairs before the interruption, to re-create the mirrored pairs.
Since the one or more replication sessions before the interruption have been stored in, the database of the secondary storage device, the first information for re-creating the mirrored pairs may be easily acquired from the database with less errors.
According to an embodiment of the present disclosure, for the one or more replication sessions before the interruption, acquiring, from the database of the secondary storage device, the first information on the mirrored pairs before the interruption, to re-create the mirrored pairs comprises: setting the secondary mirror of the secondary storage device as a new primary mirror; setting the primary mirror of the primary storage device as a new secondary mirror: and creating, based on the first information acquired from the database of the secondary storage device, a new mirrored pair including the new primary mirror and the new secondary mirror.
As a result, after recovering from the interruption state, the storage system still comprises the primary and secondary storage devices to allow the written data to be replicated from one storage device to the other storage device, thereby ensuring data safety.
According to an embodiment of the present disclosure, the method further comprises: removing an original mirrored pair of the primary storage device before setting the secondary mirror of the secondary storage device as the new primary mirror.
According to an embodiment of the present disclosure, replicating data to the primary storage device based on the re-created mirrored pair comprises: forming a new consistency group based on the re-created mirrored pair; in response to forming the new consistency group, storing second information including the re-created mirrored pair and the new consistency group to a database of the secondary storage device, and replicating the second information to a database of the primary storage device; and transmitting the replicated data from the secondary storage device to the primary storage device.
Due to the second information being stored in the database of the secondary storage device and replicated to the database of the primary storage device, if the interruption occurs again, infatuation about the mirrored pairs and the consistency group before the interruption can be automatically extracted from the second information in a similar manner. As a result, the mirrored pairs and the consistency group can be re-created, and the automatic recovery of the data replication can be achieved.
A second aspect of the present disclosure provides a device for recovering data replication between storage devices, comprising: a creating unit configured to create mirrored pairs between logical units of a primary storage device and logical units of a secondary storage device; a re-creating unit configured to, in response to the primary storage device recovering from an interruption state to a normal state, re-create the mirrored pairs based on one or more replication sessions between the logical units of the primary storage device and the logical units of the secondary storage device stored before interruption; and a data replicating unit configured to replicate data to the primary storage device based on the re-created mirrored pairs.
According to an embodiment of the present disclosure, the creating unit comprises: a mirrored pairs creating unit configured to create the mirrored pairs corresponding to the respective logical units of the primary storage device and the respective logical units of the secondary storage device, each mirrored pair including a primary mirror corresponding to one of the logical units of the primary storage device and a secondary mirror corresponding to a respective one of the logical units of the secondary storage device; a first consistency group forming unit configured to form a consistency group based on the mirrored pairs; and a first information replicating unit configured to store first information including the mirrored pairs and the consistency group to a database of the primary storage device, and replicate the first information to a database of the secondary storage device.
According to an embodiment of the present disclosure, the re-creating unit comprises: a mirrored pairs re-creating unit configured to, for the one or more replication sessions before the interruption, acquiring, from the database of the secondary storage device, the first information on the mirrored pairs before the interruption, to re-create the mirrored pairs.
According to an embodiment of the present disclosure, the mirrored pairs re-creating unit comprises: a first mirror setting subunit configured to set the primary mirror of the primary storage device as a new secondary mirror; a second mirror setting subunit configured to set the primary mirrors of the primary storage device as new secondary mirrors; and a mirrored pair creating subunit configured to create, based on the first information acquired from the database of the secondary storage device, a new mirrored pair including the new primary mirror and the new secondary mirror.
According to an embodiment of the present disclosure, the device further comprises: a mirrored pair removing unit configured to remove an original mirrored pair of the primary storage device before setting the secondary mirror of the secondary storage device as the new primary mirror.
According to an embodiment of the present disclosure, the data replicating unit comprises: a second consistency group forming unit configured to form a new consistency group based on the re-created mirrored pair; a second information replicating unit configured to, in response to forming the new consistency group, store second information including the re-created mirrored pair and the new consistency group to a database of the secondary storage device, and replicate the second information to a database of the primary storage device; and a data transmitting unit configured to transmit the replicated data from the secondary storage device to the primary storage device.
A third aspect of the present disclosure provides a computer program product for recovering data replication between storage devices, which is tangibly stored on a non-transient computer readable medium and comprises a computer executable instruction that, when being executed, enables the computer to execute steps of the method according to the first aspect of the present disclosure.
Hereinafter, principles of the present disclosure will be described in detail with reference to several embodiments shown in the drawings. Though the drawings show several embodiments of the present disclosure, it should be appreciated that embodiments described herein are only provided to assist those skilled in the art to understand and implement the present disclosure, rather than limiting the scope of the present disclosure in any manner.
At S110, mirrored pairs between logical units of a primary storage device and logical units of a secondary storage device are created. At S120, in response to the primary storage device recovering from an interruption state to a normal state, the mirrored pairs are re-created based on one or more replication sessions between the logical units of the primary storage device and the logical units of the secondary storage device stored before interruption. Next, at S130, data is replicated to the primary storage device based, on the re-created mirrored pairs.
Details of steps of method 100 as shown in
According to an embodiment of the present disclosure, at S110, the mirrored pairs corresponding to the respective logical units of the primary storage device and the respective logical units of the secondary storage device are created. Each mirrored pair includes a primary mirror corresponding to one of the logical units of the primary storage device and a secondary mirror corresponding to a respective one of the logical units of the secondary storage device. A consistency group is formed based on the mirrored pairs. First information including the mirrored pairs and the consistency group is stored to a database of the primary storage device, and is replicated to a database of the secondary storage device.
An embodiment shown in
For a write operation, the data is firstly written into the LUNs at the primary storage device side and simultaneously replicated (or synchronized) to the LUNs at the secondary storage device side, to ensure that the data stored in the LUNs at the primary storage device side and in the LUNs at the secondary storage device side are exactly identical after the write operation. In this way, upon a failure of the primary storage device, the secondary storage device can immediately provide a data service as a backup storage device. Thus, data synchronization is achieved and data safety is ensured.
It should be noted that the data synchronization is implemented through the mirrored pairs comprising the primary mirrors and the secondary mirrors. For example, the data synchronization may be implemented through MinorView/S solution of the EMC. As shown in
After the primary storage device is recovered from the interruption state, the method 100 proceeds to S120. At S120, in response to the primary storage device recovering from an interruption state to a normal state, the mirrored pairs is re-created based on one or more replication sessions between the logical units of the primary storage device and the logical units of the secondary storage device stored before interruption.
According to an embodiment of the present disclosure, at S120, for the one or more replication sessions before the interruption, the first information on the mirrored pairs before the interruption may be acquired from the database of the secondary storage device to re-create the mirrored pairs.
100451 As stated above, since the first information including the mirrored pairs and the consistency group has been stored in the database 201 of the primary storage device and (for example, in real time) replicated to the database 202 of the secondary storage device before the interruption of the primary storage device occurs, for the one or more replication sessions before the interruption, the first information on the mirrored pairs before the interruption is acquired from the database 202 of the secondary storage device to re-create the mirrored pairs.
It should be noted that as re-creating the mirrored pairs is based on the one or more replication sessions before the interruption, re-creating the relevant mirrored pairs may be selectively only based on one session or based on all the sessions, for example.
According to an embodiment of the present disclosure, for the one or more replication sessions before the interruption, acquiring, from the database of the secondary storage device, the first information on the mirrored pairs before the interruption, to re-create the mirrored pairs comprises the following steps of:
According to an embodiment of the present disclosure, the method 100 may further comprise an additional step of:
According to the embodiment of
Next, after re-creating the new mirrored pairs, the method 100 proceeds to S130. At S130, the data is replicated to the primary storage device based on the re-created mirrored pairs.
According to an embodiment of the present disclosure, at S130, a new consistency group is formed based on the re-created mirrored pairs. In response to forming the new consistency group, second information including the re-created mirrored pair and the new consistency group is stored to a database of the secondary storage device, and replicated to a database of the primary storage device. The replicated data is transmitted from the secondary storage device to the primary storage device.
According to the embodiment of
Moreover, it should be noted that as the method is indempotent, the replication data will not be lost in case of that any of the above steps fails or terminates. A user may retry the recovery of the interrupted data replication later.
A second aspect of the present disclosure provides a device 300 for recovering data replication between storage devices, comprising: a creating unit 310 configured to create mirrored pairs between logical units of a primary storage device and logical units of a secondary storage device; a re-creating unit 320 configured to, in response to the primary storage device recovering from an interruption state to a normal state, re-create the mirrored pairs based on one or more replication sessions between the logical units of the primary storage device and the logical units of the secondary storage device stored before interruption; and a data replicating unit 330 configured to replicate data to the primary storage device based on the re-created mirrored pairs.
According to an embodiment of the present disclosure, the creating unit 310 comprises: a mirrored pairs creating unit configured to create the mirrored pairs corresponding to the respective logical units of the primary storage device and the respective logical units of the secondary storage device, each mirrored pair including a primary mirror corresponding to one of the logical units of the primary storage device and a secondary mirror corresponding to a respective one of the logical units of the secondary storage device; a first consistency group forming unit configured to form a consistency group based on the mirrored pairs; and a first information replicating unit configured to store first information including the mirrored pairs and the consistency group to a database of the primary storage device, and replicate the first information to a database of the secondary storage device.
According to an embodiment of the present disclosure, the re-creating unit 320 comprises: a mirrored pairs re-creating unit configured to, for the one or more replication sessions before the interruption, acquiring, from the database of the secondary storage device, the first information on the mirrored pairs before the interruption, to re-create the mirrored pairs.
According to an embodiment of the present disclosure, the mirrored pairs re-creating unit comprises: a first mirror setting subunit configured to set the primary mirror of the primary storage device as a new secondary mirror; a second mirror setting subunit configured to set the primary mirrors of the primary storage device as new secondary mirrors; and a mirrored pair creating subunit configured to create, based on the first information acquired from the database of the secondary storage device, a new mirrored pair including the new primary mirror and the new secondary mirror.
According to an embodiment of the present disclosure, the device 300 further comprises: a mirrored pair removing unit configured to remove an original mirrored pair of the primary storage device before setting the secondary mirror of the secondary storage device as the new primary mirror.
According to an embodiment of the present disclosure, the data replicating unit 330 comprises: a second consistency group forming unit configured to form a new consistency group based on the re-created mirrored pair; a second information replicating unit configured to, in response to forming the new consistency group, store second information including the re-created mirrored pair and the new consistency group to a database of the secondary storage device, and replicate the second information to a database of the primary storage device: and a data transmitting unit configured to transmit the replicated data from the secondary storage device to the primary storage device, transmitting the data from the secondary storage device to the primary storage device.
To conclude, various embodiments of the present disclosure provide a method and device for recovering data replication between storage devices. The method comprises: creating mirrored pairs between logical units of a primary storage device and logical units of a secondary storage device; in response to the primary storage device recovering from an interruption state to a normal state, re-creating the mirrored pairs based on one or more replication sessions between the logical units of the primary storage device and the logical units of the secondary storage device stored before interruption; and replicating data to the primary storage device based on the re-created mirrored pairs. The method allows to recover interrupted data replication in an automatic manner after recovering the primary storage device from the interruption state. Once a recovering command is performed, the data may be replicated to the primary storage device. Besides, the method results in convenient re-creating of the consistency group and the mirrored pairs with fewer errors. Meanwhile, the method is indempotent, and therefore, the replication data will not be lost in the case that any of the above steps fails or terminates. The user may retry the recovery of the interrupted data replication later.
The foregoing is only optional embodiments of the present disclosure but does not intend to limit the present disclosure, and for those skilled in the art, the present disclosure may have various modifications and changes. All the amendments, equivalent replacements, improvements, etc. made within the spirit and principle of the present disclosure should be covered in the protection scope of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201511021598.3 | Dec 2015 | CN | national |