Updating change information for current copy relationships when establishing a new copy relationship having overlapping data with the current copy relationships
Abstract
Provided are a computer program product, system, and method for updating change information for current copy relationships when establishing a new copy relationship having overlapping data with the current copy relationships. A first copy relationship indicates changed first source data to copy to first target data. An establish request is processed to create a second copy relationship to copy second source data in to second target data. A second copy relationship is generated, in response to the establish request, indicating data in the second source data to copy to the second target data. A determination is made of overlapping data units in the first source data also in the second target data. Indication is made in the first copy relationship to copy the overlapping data units. The first source data indicated in the first copy relationship is copied to the first target data, including data for the overlapping data units.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A computer program product for managing copy relationships of data in at least one storage, wherein the computer program product comprises a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause operations, the operations comprising:
maintaining a first copy relationship indicating changed first source data in one of the at least one storage to copy to first target data in one of the at least one storage; processing an establish request to create a second copy relationship to copy second source data in one of the at least one storage to second target data in one of the at least one storage; generating a second copy relationship, in response to the establish request, indicating data in the second source data to copy to the second target data; determining overlapping data units in the first source data also in the second target data; indicating in the first copy relationship to copy the overlapping data units at the first source data to the first target data; and copying the first source data indicated in the first copy relationship to the first target data, including data for the overlapping data units.
2 . The computer program product of claim 1 , wherein the generated second copy relationship comprises a source copy relationship having source change information to indicate second source data to copy to the second target data, wherein the operations further comprise:
generating a target copy relationship indicating changed data of the second target data to not overwrite with the second source data from the source copy relationship, wherein the determining the overlapping data units and indicating in the first copy relationship to copy the overlapping data units are performed after creating the source copy relationship and before completing creating the target copy relationship.
3 . The computer program product of claim 1 , wherein the at least one storage comprises a first storage, a second storage, and a third storage, wherein the first source data and the second target data comprises all or a portion of a first volume configured in the first storage, the first target data comprises all or a portion of a second volume configured in the second storage, and the second source data comprises all or a portion of a third volume configured in a third storage.
4 . The computer program product of claim 1 , wherein the first copy relationship comprises an incremental copy relationship indicating the first source data that has changed, since a point-in-time when the first copy relationship was established, to copy to the first target data.
5 . The computer program product of claim 1 , wherein after indicating in the first copy relationship to copy the overlapping data units, further performing the operations of:
processing each of a plurality of additional copy relationships each having source data to copy to target data where the source data has overlapping data units with the second target data, wherein, for each of the additional copy relationships, indicating in the additional copy relationship to copy the overlapping data units to the target data of the additional copy relationship.
6 . The computer program product of claim 5 , wherein for each of the first and the additional copy relationships, further performing:
determining whether the first or the additional copy relationship comprises an incremental copy relationship to copy only changed data that changed since a point-in-time of the copy relationship, wherein the determining the overlapping data units and the indicating in the first and the additional copy relationships to copy the overlapping data units are in response to determining that the first and additional copy relationship comprises an incremental copy relationship.
7 . The computer program product of claim 5 , wherein the indicating in the additional copy relationship to copy the overlapping data units to the target data of the additional copy relationship comprises indicating, in source change recording information of the additional copy relationship, indicating changes to the source data of the additional copy relationship, to copy the overlapping data units in response to the additional copy relationship having the source change recording information and target change recording information indicating changes to the target data of the additional copy relationship.
8 . The computer program product of claim 5 , wherein the indicating in the additional copy relationship to copy the overlapping data units to the target data of the additional copy relationship comprises indicating, in target change recording information of the additional copy relationship indicating changed source data to copy to the target data of the additional copy relationship, to copy the overlapping data units in response to the additional copy relationship having the target change recording information indicating changes to the source data that need to be copied to the target data.
9 . The computer program product of claim 8 , wherein the indicating in the additional copy relationship to copy the overlapping data units to the target data of the additional copy relationship comprises:
obtaining a lock on the target data of the additional copy relationship, wherein the indicating in the target change recording information is performed in response to the obtaining the lock; and releasing the lock on the target data of the of the additional copy relationship in response to completing the indicating the overlapping data units in the target change recording information.
10 . The computer program product of claim 6 , wherein each of the first and the additional copy relationships comprise one of a first type copy relationship and a second type copy relationship, wherein the first type copy relationship includes source change recording information indicating changes to source data to copy to target data and target change recording information indicating changed target data, wherein the second type copy relationship includes target change recording information indicating source data that needs to be copied to the target data and updated target data, wherein further performing, for each of the first and the additional copy relationships:
determining whether the first or the additional copy relationship determined to comprise an incremental copy relationship is a first type copy relationship or a second type copy relationship, wherein the indicating in the first or the additional copy relationship to copy the overlapping data units to the target data of the additional copy relationship comprises;
indicating, in the source change recording information of the first or the additional copy relationship, to copy the overlapping data units in response to determining the first or the additional copy relationship comprises the first type copy relationship; and
indicating, in the target change recording information of the first or the additional copy relationship, to copy the overlapping data units in response determining the first or the additional copy relationship comprises the second type copy relationship.
11 . A system for managing copy relationships of data in at least one storage, comprising:
a processor; and a computer readable storage medium having program instructions executed by a processor to cause operations, the operations comprising:
maintaining a first copy relationship indicating changed first source data in one of the at least one storage to copy to first target data in one of the at least one storage;
processing an establish request to create a second copy relationship to copy second source data in one of the at least one storage to second target data in one of the at least one storage;
generating a second copy relationship, in response to the establish request, indicating data in the second source data to copy to the second target data;
determining overlapping data units in the first source data also in the second target data;
indicating in the first copy relationship to copy the overlapping data units at the first source data to the first target data; and
copying the first source data indicated in the first copy relationship to the first target data, including data for the overlapping data units.
12 . The system of claim 11 , wherein the generated second copy relationship comprises a source copy relationship having source change information to indicate second source data to copy to the second target data, wherein the operations further comprise:
generating a target copy relationship indicating changed data of the second target data to not overwrite with the second source data from the source copy relationship, wherein the determining the overlapping data units and indicating in the first copy relationship to copy the overlapping data units are performed after creating the source copy relationship and before completing creating the target copy relationship.
13 . The system of claim 11 , wherein the first copy relationship comprises an incremental copy relationship indicating the first source data that has changed, since a point-in-time when the first copy relationship was established, to copy to the first target data.
14 . The system of claim 11 , wherein after indicating in the first copy relationship to copy the overlapping data units, further performing the operations of:
processing each of a plurality of additional copy relationships each having source data to copy to target data where the source data has overlapping data units with the second target data, wherein, for each of the additional copy relationships, indicating in the additional copy relationship to copy the overlapping data units to the target data of the additional copy relationship.
15 . The system of claim 14 , wherein for each of the first and the additional copy relationships, further performing:
determining whether the first or the additional copy relationship comprises an incremental copy relationship to copy only changed data that changed since a point-in-time of the copy relationship, wherein the determining the overlapping data units and the indicating in the first and the additional copy relationships to copy the overlapping data units are in response to determining that the first and additional copy relationship comprises an incremental copy relationship.
16 . The system of claim 15 , wherein each of the first and the additional copy relationships comprise one of a first type copy relationship and a second type copy relationship, wherein the first type copy relationship includes source change recording information indicating changes to source data to copy to target data and target change recording information indicating changed target data, wherein the second type copy relationship includes target change recording information indicating source data that needs to be copied to the target data and updated target data, wherein further performing, for each of the first and the additional copy relationships:
determining whether the first or the additional copy relationship determined to comprise an incremental copy relationship is a first type copy relationship or a second type copy relationship, wherein the indicating in the first or the additional copy relationship to copy the overlapping data units to the target data of the additional copy relationship comprises;
indicating, in the source change recording information of the first or the additional copy relationship, to copy the overlapping data units in response to determining the first or the additional copy relationship comprises the first type copy relationship; and
indicating, in the target change recording information of the first or the additional copy relationship, to copy the overlapping data units in response determining the first or the additional copy relationship comprises the second type copy relationship.
17 . A method for managing copy relationships of data in at least one storage, comprising:
maintaining a first copy relationship indicating changed first source data in one of the at least one storage to copy to first target data in one of the at least one storage; processing an establish request to create a second copy relationship to copy second source data in one of the at least one storage to second target data in one of the at least one storage; generating a second copy relationship, in response to the establish request, indicating data in the second source data to copy to the second target data; determining overlapping data units in the first source data also in the second target data; indicating in the first copy relationship to copy the overlapping data units at the first source data to the first target data; and copying the first source data indicated in the first copy relationship to the first target data, including data for the overlapping data units.
18 . The method of claim 17 , wherein the generated second copy relationship comprises a source copy relationship having source change information to indicate second source data to copy to the second target data, wherein the operations further comprise:
generating a target copy relationship indicating changed data of the second target data to not overwrite with the second source data from the source copy relationship, wherein the determining the overlapping data units and indicating in the first copy relationship to copy the overlapping data units are performed after creating the source copy relationship and before completing creating the target copy relationship.
19 . The method of claim 17 , wherein the first copy relationship comprises an incremental copy relationship indicating the first source data that has changed, since a point-in-time when the first copy relationship was established, to copy to the first target data.
20 . The method of claim 17 , wherein after indicating in the first copy relationship to copy the overlapping data units, further performing the operations of:
processing each of a plurality of additional copy relationships each having source data to copy to target data where the source data has overlapping data units with the second target data, wherein, for each of the additional copy relationships, indicating in the additional copy relationship to copy the overlapping data units to the target data of the additional copy relationship.
21 . The method of claim 20 , wherein for each of the first and the additional copy relationships, further performing:
determining whether the first or the additional copy relationship comprises an incremental copy relationship to copy only changed data that changed since a point-in-time of the copy relationship, wherein the determining the overlapping data units and the indicating in the first and the additional copy relationships to copy the overlapping data units are in response to determining that the first and additional copy relationship comprises an incremental copy relationship.
22 . The method of claim 21 , wherein each of the first and the additional copy relationships comprise one of a first type copy relationship and a second type copy relationship, wherein the first type copy relationship includes source change recording information indicating changes to source data to copy to target data and target change recording information indicating changed target data, wherein the second type copy relationship includes target change recording information indicating source data that needs to be copied to the target data and updated target data, wherein further performing, for each of the first and the additional copy relationships:
determining whether the first or the additional copy relationship determined to comprise an incremental copy relationship is a first type copy relationship or a second type copy relationship, wherein the indicating in the first or the additional copy relationship to copy the overlapping data units to the target data of the additional copy relationship comprises;
indicating, in the source change recording information of the first or the additional copy relationship, to copy the overlapping data units in response to determining the first or the additional copy relationship comprises the first type copy relationship; and
indicating, in the target change recording information of the first or the additional copy relationship, to copy the overlapping data units in response determining the first or the additional copy relationship comprises the second type copy relationship.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.