1. Field
Implementations of the invention relate to dynamic, policy-based control of copy service precedence.
2. Description of the Related Art
Certain disaster recovery systems address data loss over a period of time. In this type of gradual disaster, updates to volumes may be lost. A volume may be described as any logical or physical element of storage. To assist in recovery of data updates, a copy of data may be provided at a remote location. Such dual or shadow copies are typically made as an application program is writing new data to a storage device (e.g., a primary storage device). A storage device is a physical unit that provides a mechanism to store data on a given medium, such that the data can be subsequently retrieved.
There are many types of copy services available today, but some copy services cannot be simultaneously performed on the same data because they lead to inconsistencies in the data.
International Business Machines Corporation (IBM), the assignee of the subject patent application, provides remote copy services for maintaining remote copies of data at a secondary storage device, including extended remote copy (XRC) and peer-to-peer remote copy (PPRC). These systems provide techniques for recovering data updates between a last, safe backup and a system failure. Such data shadowing systems can also provide an additional remote copy for non-recovery purposes, such as local access at a remote site. The IBM XRC and PPRC systems are described further in z/OS V1R1.0 DFSMS Advanced Copy Services (IBM Document Number SC35-0428-00), April 2001, which is available from International Business Machines Corporation.
A point-in-time copy involves physically copying all the data from source volumes to target volumes so that the target volume has a copy of the data as of a point-in-time. A point-in-time copy can also be made by logically making a copy of the data and then only copying data over when necessary, in effect deferring the physical copying. This logical copy service is performed to minimize the time during which the target and source volumes are inaccessible.
A number of direct access storage device (DASD) subsystems are capable of performing “instant virtual copy” operations, also referred to as “fast replicate functions.” Instant virtual copy services work by modifying metadata such as relationship tables or pointers to treat a source data object as both the original and copy. In response to a host's copy request, the storage subsystem immediately reports creation of the copy without having made any physical copy of the data. Only a “virtual” copy has been created, and the absence of an additional physical copy is completely unknown to the host. Then, data may be physically copied as a background operation.
One such instant virtual copy service is known as a FlashCopy® operation. A FlashCopy® operation involves establishing a logical point-in-time relationship between source and target volumes on the same or different devices. Further details of the FlashCopy® operations are described in the copending and commonly assigned U.S. patent application Ser. No. 09/347,344, (U.S. Pat. No. 6,611,901) filed on Jul. 2, 1999, entitled “Method, System, and Program for Maintaining Electronic Data as of a Point-in-Time”, which patent application is incorporated herein by reference in its entirety.
A different fast replicate technique is the “SNAPSHOT” copy services solution disclosed in U.S. Pat. No. 5,410,667 entitled “Data Record Copy System for a Disk Drive Array Data Storage Subsystem,” which issued on Apr. 25, 1995, which patent is incorporated herein by reference in its entirety.
In existing implementations of copy services, there are often limitations on the combination of copy services that may be used simultaneously on the same data. For example, a point-in-time copy (e.g., a FlashCopy® or Snapshot) may be not performed when the target of the point-in-time copy is already the source of a remote copy (e.g., XRC, PPRC). This restriction exists because performing the point-in-time copy is an atomic operation from an application program's point of view, but might not be feasible to copy as an atomic unit to the remote copy target devices.
As an example, initially, assume that a PPRC copy service is being performed from source B to target C. Then, a desired operation is to perform a FlashCopy® copy service from source A to target B. Thus, target B is already a source for the PPRC copy service, and would be a target for the FlashCopy® copy service.
A normal technique for dealing with the underlying incompatibility between the copy services is to disallow the second copy service when there is a collision (i.e., when the copy services may not be performed simultaneously). This does not take into account the possibility that the FlashCopy® copy service is more important or desirable to the end user of the data than the consistency of the remote copy target.
Table A illustrates an example collision table. In Table A, the first column lists new copy services, while the remaining column headings provide an existing copy service. For example, if an XRC copy service is currently using a source, and a new FlashCopy® operation starts to move data such that the source of the XRC copy service becomes a target of the FlashCopy® copy service, an error occurs. Also, if a PPRC operation exists for a source, and a new PPRC operation attempts to move data, such that the source will be a target, the operation may proceed if the hardware supports this option.
TABLE AXRCFlashCopy ®sourcePPRC SourceSourceFlashCopy ®ErrorErrorErrorTargetPPRC TargeterrorOK if hardwareOKsupports thisoptionXRC TargetOKOKOK
In some conventional systems, typically the first copy service that is started is allowed to finish, and other copy services for the same data are rejected. In other conventional systems, when a first copy service is in process and a second copy service is started, the second copy service is allowed to start and the first copy service is cancelled. Either of these operations is set as a computer default, and a user is not able to change the default solution.
Therefore, there is a continued need in the art to provide better collision resolution between two or more copy services.