End-to-end restartability of cross-region replication using a common snapshot
Techniques are described for performing different types of restart operations for a file storage replication between a source file system and a target file system in different cloud infrastructure regions. In certain embodiments, the disclosed techniques perform a restart operation to terminate a current cross-region replication by synchronizing resource cleanup operations in the source file system and the target file system, respectively. In other embodiments, disclosed techniques perform a restart operation to allow a customer to reuse the source file system by identifying a restartable base snapshot in the source file system without dependency on the target file system.
1 . A method, comprising:
performing, by a computing system, a cross-region replication between a source file system in a source region and a target file system in a target region after encountering a triggering event, the source region and the target region being different regions;
receiving, by the computing system, a first request to terminate the cross-region replication;
responsive to the first request, synchronizing, by the computing system, operations between the source region and the target region, the synchronizing comprising modifying one of a lifecycle state or a delta state;
initiating, by the computing system, cleanup operations of resources in at least the source file system or the target file system based at least in part on one of the lifecycle state or the delta state;
performing, by the computing system, the cleanup operations;
receiving, by the computing system, a second request to reinitiate cross-region replication and reuse the source file system as a primary region after the cross-region replication, the primary region being an operating region before the triggering event occurred;
communicating, by the computing system, replication-related information between the source file system and the target file system;
generating, by the computing system, a first restartable base snapshot in the source file system associated with a first point in time from before the triggering event occurred, the first restartable base snapshot being configured to allow the source file system to operate according to baseline operations after the triggering event;
generating, by the computing system, a second restartable base snapshot associated with a second point in time from after the triggering event occurred, the second restartable base snapshot being configured to allow the source file system to operate according to baseline operations after the triggering event;
selecting, by the computing system, one of the first restartable base snapshot associated with the first point in time from before the triggering event occurred or the second restartable base snapshot associated with the second point in time from after the triggering event occurred; and
performing, by the source file system of the computing system, operations corresponding to the cross-region replication using the selected one of the first restartable base snapshot or the second restartable base snapshot without dependency on the target file system.
2 . The method of claim 1 , wherein replication-related information comprises identification of the cross-region replication, unique identifications of snapshots in the source file system and unique identifications of snapshots in the target file system.
3 . The method of claim 1 , wherein the at least one of the first restartable base snapshot or the second restartable base snapshot in the source file system is a source snapshot used to successfully create a replica in the target file system through the cross-region replication.
4 . The method of claim 3 , wherein the replica in the target file system has a same unique identification as the source snapshot in the source file system.
5 . The method of claim 1 , wherein the at least one of the first restartable base snapshot or the second restartable base snapshot in the source file system is a replica of a latest new snapshot in the target file system after a reverse cross-region replication between the source file system and the target file system.
6 . The method of claim 5 , wherein the reverse cross-region replication comprises:
identifying a latest common snapshot between the source file system and the target file system;
generating deltas, by the target file system, based at least in part on differences between the latest new snapshot and the latest common snapshot in the target file system;
transferring the deltas from the target file system to the source file system; and
applying the deltas, by the source file system, to the latest common snapshot in the source file system to generate at least one of the first restartable base snapshot or the second restartable base snapshot in the source file system.
7 . The method of claim 6 , wherein transferring the deltas from the target file system to the source file system further comprising uploading the deltas from the target file system to an object storage located in the source region, and downloading the deltas from the object storage to the source file system.
8 . A non-transitory computer-readable medium storing computer-executable instructions that, when executed by one or more processors of a computing system, cause the one or more processors to perform operations comprising:
performing, by a computing system, a cross-region replication between a source file system in a source region and a target file system in a target region after encountering a triggering event, the source region and the target region being different regions;
receiving a first request, by the computing system, a first request to terminate the cross-region replication;
responsive to the first request, synchronizing, by the computing system, operations between the source region and the target region, the synchronizing comprises modifying one of a lifecycle state or a delta state;
initiating, by the computing system, cleanup operations of resources in at least the source file system or the target file system based at least in part on one of the lifecycle state or the delta state;
performing, by the computing system, the cleanup operations;
receiving, by the computing system, a second request to reinitiate cross-region replication and reuse the source file system as a primary region after the cross-region replication, the primary region being an operating region before the triggering event occurred;
communicating, by the computing system, replication-related information between the source file system and the target file system;
generating, by the computing system, a first restartable base snapshot in the source file system associated with a first point in time from before the triggering event occurred, the first restartable base snapshot being configured to allow the source file system to operate according to baseline operations after the triggering event;
generating, by the computing system, a second restartable base snapshot associated with a second point in time from after the triggering event occurred, the second restartable base snapshot being configured to allow the source file system to operate according to baseline operations after the triggering event;
selecting, by the computing system, one of the first restartable base snapshot associated with the first point in time from before the triggering event occurred or the second restartable base snapshot associated with the second point in time from after the triggering event occurred; and
performing, by the source file system of the computing system, operations corresponding to the cross-region replication using the selected one of the first restartable base snapshot or the second restartable base snapshot without dependency on the target file system.
9 . The non-transitory computer-readable medium of claim 8 , wherein replication-related information comprises identification of the cross-region replication, unique identifications of snapshots in the source file system and unique identifications of snapshots in the target file system.
10 . The non-transitory computer-readable medium of claim 8 , wherein the at least one of the first restartable base snapshot or the second restartable base snapshot in the source file system is a source snapshot used to successfully create a replica in the target file system through the cross-region replication.
11 . The non-transitory computer-readable medium of claim 10 , wherein the replica in the target file system has a same unique identification as the source snapshot in the source file system.
12 . The non-transitory computer-readable medium of claim 8 , wherein the at least one of the first restartable base snapshot or the second restartable base snapshot in the source file system is a replica of a latest new snapshot in the target file system after a reverse cross-region replication between the source file system and the target file system.
13 . The non-transitory computer-readable medium of claim 12 , wherein the reverse cross-region replication comprises:
identifying a latest common snapshot between the source file system and the target file system;
generating deltas, by the target file system, based at least in part on differences between the latest new snapshot and the latest common snapshot in the target file system;
transferring the deltas from the target file system to the source file system; and
applying the deltas, by the source file system, to the latest common snapshot in the source file system to generate the at least one of the first restartable base snapshot or the second restartable base snapshot in the source file system.
14 . The non-transitory computer-readable medium of claim 13 , wherein transferring the deltas from the target file system to the source file system further comprising uploading the deltas from the target file system to an object storage located in the source region, and downloading the deltas from the object storage to the source file system.
15 . A system, comprising:
one or more processors; and
one or more non-transitory computer readable media storing computer-executable instructions that, when executed by the one or more processors, cause the system to:
perform a cross-region replication between a source file system in a source region and a target file system in a target region after encountering a triggering event, the source region and the target region being different regions;
receive a first request to terminate the cross-region replication;
responsive to the first request, synchronize operations between the source region and the target region, wherein the synchronizing comprises modifying one of a lifecycle state or a delta state;
initiate cleanup operations of resources in at least the source file system or the target file system based at least in part on one of the lifecycle state or the delta state;
perform the cleanup operations;
receive a second request to reinitiate cross-region replication and reuse the source file system as a primary region after the cross-region replication, the primary region being an operating region before the triggering event occurred;
communicate replication-related information between the source file system and the target file system;
generate a first restartable base snapshot in the source file system associated with a first point in time from before the triggering event occurred, the first restartable base snapshot being configured to allow the source file system to operate according to baseline operations after the triggering event;
generate a second restartable base snapshot associated with a second point in time from after the triggering event occurred, the second restartable base snapshot being configured to allow the source file system to operate according to baseline operations after the triggering event;
select one of the first restartable base snapshot associated with the first point in time from before the triggering event occurred or the second restartable base snapshot associated with the second point in time from after the triggering event occurred; and
perform, by the source file system, operations corresponding to the cross-region replication using the selected one of the first restartable base snapshot or the second restartable base snapshot without dependency on the target file system.
16 . The system of claim 15 , wherein replication-related information comprises identification of the cross-region replication, unique identifications of snapshots in the source file system and unique identifications of snapshots in the target file system.
17 . The system of claim 15 , wherein the at least one of the first restartable base snapshot or the second restartable base snapshot in the source file system is a source snapshot used to successfully create a replica in the target file system through the cross-region replication.
18 . The system of claim 15 , wherein the at least one of the first restartable base snapshot or the second restartable base snapshot in the source file system is a replica of a latest new snapshot in the target file system after a reverse cross-region replication between the source file system and the target file system.
19 . The system of claim 18 , wherein the reverse cross-region replication comprises:
identifying a latest common snapshot between the source file system and the target file system;
generating deltas, by the target file system, based at least in part on differences between the latest new snapshot and the latest common snapshot in the target file system;
transferring the deltas from the target file system to the source file system; and
applying the deltas, by the source file system, to the latest common snapshot in the source file system to generate the at least one of the first restartable base snapshot or the second restartable base snapshot in the source file system.
20 . The system of claim 19 , wherein transferring the deltas from the target file system to the source file system further comprising uploading the deltas from the target file system to an object storage located in the source region, and downloading the deltas from the object storage to the source file system.