Abstract:
Provided are a method, system, and a computer program product handling a backup process. An instruction initiates a new backup from a source volume to a target volume using one of a plurality of backup processes. A cascade includes a cascade source volume and at least one cascade target volume, and a write to a storage location in one of the cascade volumes causes a copying of the storage location to be written in the cascade source volume to each of the cascade target volumes in the cascade according to a cascade order in which the at least one cascade target volume and the cascade source volume are linked in the cascade. The cascade is modified to include the target volume of the new backup in response to determining that there is an existing cascade, else a new cascade using the backup process of the new backup is created.

Description:
CROSS-REFERENCE TO RELATED FOREIGN APPLICATION 
       [0001]    This application is a non-provisional application that claims priority benefits under Title 35, Unites States Code, Section 119(a)-(d) from European Patent Application entitled “MULTIPLE CASCADED BACKUP PROCESS” by John P. AGOMBAR, Christopher B. BEEKEN, William J. SCALES, and John P. WILKINSON, having European Patent Application Serial No. EP10163742, filed on May 25, 2010, which application is incorporated herein by reference in its entirety. 
       BACKGROUND 
       [0002]    1. Technical Field 
         [0003]    This invention relates to a method of, and system for, handling a backup process. 
         [0004]    2. Related Art 
         [0005]    The storage of data in large organisations is of fundamental importance, both for reliability of the data and for the ability to recover data in the event of any hardware failure. Storage area network (SAN) is an architecture that is used when very large amounts of data are needed to be stored in a reliable and secure manner. This technology allows networks to be created that support the attachment of remote computer storage devices such as disk arrays to servers in such a way that, to the operating system, the devices appear as locally attached. It is common in these networks to include a large amount of redundancy, both in the data storage and in the hardware connections between the individual components. 
         [0006]    Various methods exist for creating data redundancy. For example, a backup process such as a FlashCopy® function enables an administrator to make point-in-time, full volume copies of data, with the copies immediately available for read or write access. (FlashCopy is a registered trademark of International Business Machines Corporation in the United States and other countries) The FlashCopy can be used with standard backup tools that are available in the environment to create backup copies on tape. A FlashCopy function creates a copy of a source storage volume on a target storage volume. This copy, as mentioned above, is called a point-in-time copy. When a FlashCopy operation is initiated, a relationship is created between a source volume and target volume. This relationship is a “mapping” of the source volume and the target volume. This mapping allows a point-in-time copy of that source volume to be copied to the associated target volume. The relationship exists between this volume pair from the time that the FlashCopy operation is initiated until the storage unit copies all data from the source volume to the target volume, or until the relationship is deleted. 
         [0007]    When the data is physically copied, a background process copies tracks (or “grains”) of data from the source volume to the target volume. The amount of time that the process takes to complete the background copy depends on various criteria, such as the amount of data being copied, the number of background copy processes that are running and any other activities that are presently occurring. The FlashCopy function works in that the data which is being copied does not actually need to be copied instantaneously, it only needs to be copied just prior to an update causing on overwrite of any old data on the source volume. So, as data changes on the source volume, the original data is copied to the target volume before being overwritten on the source volume. 
         [0008]    Therefore, a FlashCopy is an example of a feature supported on various storage devices that allows a user or an automated process to make nearly instantaneous copies of entire logical volumes of data. A copy of a source disk is made on a target disk. The copies are immediately available for both read and write access. A common feature of FlashCopy like implementations is the ability to reverse the copy. That is, to populate the source disk of a FlashCopy map with the contents of the target disk. It is also possible to use backup processes such as FlashCopy in cascaded implementations, in which a target disk later becomes the source disk for a further FlashCopy or vice versa. 
         [0009]    A cascaded configuration of storage volumes is described in detail in U.S. Pat. No. 7,386,695. It is also possible to create multiple cascades of storage volumes which are interlocking at a logical level. A first cascade may comprise storage volumes A, B, C and D which are arranged in a cascade as follows: A→B→C→D, while at a later time new backups of A may be started to volumes E and F that ultimately leads to the creation of a second cascade A→E→F. Many different combinations of FlashCopy functions and reversed functions are possible, potentially creating complicated multiple cascading storage volumes. 
         [0010]    There are two types of point-in-time (PIT) backup processes commonly used in data storage systems, called a clone and a snapshot. A clone is a PIT copy where the target disk will hold a complete copy of the data that was on the source disk when the PIT copy was started. When the copying of data from source to target completes, the target disk is independent of the source. A snapshot is a PIT copy where the target only holds the changed data necessary to present the PIT copy of the source. Data is only copied to the target disk if it is changed on the source. The target disk is generally always dependent on some of the data on the source disk in order to present the PIT copy. 
         [0011]    Multiple target cascaded copying is a technique implemented in the IBM SAN Volume Controller FlashCopy. A cascade is used to implement multiple PIT copies of a single data source. For example, with a data source S and PIT copies of S taken at times t 1 , t 2  and t 3 , then at time t 1  there is taken a PIT copy using data target T 1  resulting in a cascade: S→T 1 . Then at time t 2  there is taken a second PIT copy using data target T 2  and resulting in the cascade: S→T 2 →T 1 . This arrangement works because if data has been changed on T 1  or S between times t 1  and t 2  the data will be on T 1  and if the data has not been changed then both T 1  and T 2  want to read the same data. Similarly at t 3  there is produced the cascade: S→T 3 →T 2 →T 1 . 
         [0012]    This technique has many benefits. However, it also introduces dependencies between the data targets that would not exist in a traditional multiple target implementation. A side effect of this target dependency is the requirement to clean a target when a PIT copy is stopped or completes. For example, if PIT copy S→T 2  is stopped, any data on T 2  that is required by T 1  must be copied from T 2  to T 1  before the target T 2  can be removed from the cascade. In many situations this is not a problem, because the user may wish T 1  to hold a complete copy of S at time t 1 , meaning that the backup process S→T 1  is a clone. However, if the intention of S→T 1  is just to produce a snapshot of S at time t 1 , this extra copying from T 2  to T 1  may cause the user problems. Further, if the data target T 1  was thinly provisioned (also known as space efficient), the problems caused by the above behaviour may cause the unnecessary allocation of storage to T 1 . This would seriously reduce the user&#39;s ability to maintain snapshots and clones and to manage their backups. 
         [0013]    There are a number of existing techniques that attempt to reduce the amount of data that is copied from T 2  to T 1 , with varying degrees of success. There is no solution that can produce the minimal number of copies from T 2  to T 1 , without dramatically increasing the amount of metadata used to track the contents of the various data targets. 
         [0014]    It is therefore an object of the invention to improve upon the known art. 
       SUMMARY 
       [0015]    Provided are a method, system, and a computer program product handling a backup process. An instruction is received initiating a new backup from a source volume to a target volume using one of a plurality of backup processes. A determination is made as to whether there is a cascade of volumes using the backup process including the source volume of the new backup. The cascade includes a cascade source volume and at least one cascade target volume, and a write to a storage location in one of the cascade volumes causes a copying of the storage location to be written in the cascade source volume to each of the cascade target volumes in the cascade according to a cascade order in which the at least one cascade target volume and the cascade source volume are linked in the cascade. The cascade, using the backup process of the new backup already including the source volume of the new backup, is modified to include the target volume of the new backup in response to determining that there is the existing cascade. A new cascade using the backup process of the new backup including the source volume and the target volume of the new backup is created in response to determining that there is not the existing cascade. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0016]    Embodiments of the present invention will now be described, by way of example only, with reference to the accompanying drawings, in which: 
           [0017]      FIG. 1  is a schematic diagram of a pair of storage volumes, 
           [0018]      FIG. 2  is a schematic diagram of a FlashCopy cascade, 
           [0019]      FIG. 3  is a schematic diagram of different arrangements of storage volumes, 
           [0020]      FIG. 4  is a schematic diagram of a logical arrangement of storage volumes, and 
           [0021]      FIGS. 5 and 6  are further schematic diagrams of different arrangements of storage volumes. 
       
    
    
     DETAILED DESCRIPTION 
       [0022]    In one embodiment, there is provided a method of handling a backup process comprising receiving an instruction initiating a backup process from a source storage volume to a target storage volume, identifying the type of backup process as either a full backup process intended to make a complete copy of the source storage volume on the target storage volume or a fractional backup process intended to make a copy of data changed on the source storage volume on the target storage volume, and if a cascade exists for the identified backup process type, adding the target storage volume to the existing cascade for the identified backup process type, or if a cascade does not exist for the identified backup process type, starting a new cascade of the target storage volume from the source storage volume. 
         [0023]    In another embodiment, there is provided a system for handling a backup process comprising a plurality of storage volumes and a storage volume controller connected to the storage volumes, the storage controller arranged to receive an instruction initiating a backup process from a source storage volume to a target storage volume, identify the type of backup process as either a full backup process intended to make a complete copy of the source storage volume on the target storage volume or a fractional backup process intended to make a copy of data changed on the source storage volume on the target storage volume, and if a cascade exists for the identified backup process type, add the target storage volume to the existing cascade for the identified backup process type, or if a cascade does not exist for the identified backup process type, start a new cascade of the target storage volume from the source storage volume. 
         [0024]    In a further embodiment, there is provided a computer program product on a computer readable medium for handling a backup process, the product comprising instructions for receiving an instruction initiating a backup process from a source storage volume to a target storage volume, identifying the type of backup process as either a full backup process intended to make a complete copy of the source storage volume on the target storage volume or a fractional backup process intended to make a copy of data changed on the source storage volume on the target storage volume, and if a cascade exists for the identified backup process type, adding the target storage volume to the existing cascade for the identified backup process type, or if a cascade does not exist for the identified backup process type, starting a new cascade of the target storage volume from the source storage volume. 
         [0025]    With the described embodiments, it is possible to overcome the issues in the prior art implementations of cascading backup processes by ensuring that a snapshot is does not depend on a clone. The described embodiments allow multiple cascades for a single data source. The advantage of this approach is that snapshots are in a separate dependency chain (or cascade) from clones, and therefore a clone will not copy data onto a snapshot. This means that a snapshot does not hold data that it does not need. No extra metadata is required for the tracking of data on the various data targets. Separate cascades are maintained from a source volume such that a backup process that is a clone is not in a cascade with a backup process that is a snapshot, and vice versa. 
         [0026]    In certain embodiments, the type of backup process is identified as a restore process intended to restore a complete copy of the source storage volume on the target storage volume and a new cascade of the target storage volume is started from the source storage volume. In certain embodiments, any backup processes that are intended to restore a storage volume, for example, as a response to data corruption of the storage volume, are handled in a separate cascade. 
         [0027]    The described embodiments may further detect that a backup process identified as a snapshot is stopped and stopping all backup processes from the target storage volume of the detected backup process and further detect that a backup process identified as a clone is stopped and stopping all backup processes identified as snapshots from the target storage volume of the detected backup process. It is important that the stopping of backup processes is handled in a consistent manner. The approach detailed above is taken because a snapshot is always dependent on its source and if the source is destroyed the snapshot is of no use anymore. 
         [0028]      FIG. 1  illustrates the concept of a backup process using a storage controller  8  and two storage disks  10  and  12 . The disks  10  and  12  could form part of a larger array of disks, and may form part of an enterprise storage solution. The disks  10  and  12  could be part of a storage solution relating to a commercial website, for example. If at any time a backup needs to be made of the content of vdisk 1 , then a FlashCopy instruction can be sent from the storage volume controller  8  to that disk  10 , which defines a source disk  10  (vdisk 1 ) and also a target disk  12  (vdisk 2 ), which is the target of the FlashCopy. The FlashCopy instruction creates a point-in-time copy of the image of the specific vdisk which is the source disk  10 . 
         [0029]    In the embodiment of  FIG. 1 , the source disk  10  of a first FlashCopy instruction is vdisk 1 , and the target disk  12  is vdisk 2 . The FlashCopy instruction starts the FlashCopy process, which creates a map  14  from the source disk  10  to the target disk  12 . This map is labelled MAP  1  in the Figure. The image of vdisk 1  at this specific point in time is now available on vdisk 2 . This creates a backup of the data on vdisk 1 , and also allows tests and other administration tasks to be run on the data of vdisk 1 , without the attendant danger of losing any of the original data, as it is preserved on the original source disk. 
         [0030]    When a FlashCopy is made, it creates a link between the two disks  10  and  12 , as defined by the map  14 . Data may now be copied across in the background, with the additional requirement that any access to vdisk 2  (as the target disk  12 ) may immediately cause the relevant parts of the image of vdisk 1  to be copied across, and also any access to vdisk 1  which would result in a change to the image stored by that disk  10  will also cause the unaltered data to be immediately copied across to the target disk  12 , prior to the change being made. In this way, the vdisk 2 , to an outside user, stores the point in time copy of vdisk 1 , although data may only be physically copied across under the circumstances described above. 
         [0031]    A storage volume that is the target volume of a backup process such as a FlashCopy function can also be the source volume of a further backup process, thus creating a cascade of storage volumes. In  FIG. 2  there is shown an example of a FlashCopy cascade of three storage volumes  10 ,  12  and  16 , which are linked by FlashCopy maps  14 . Each map  14  defines a backup process from a source volume to a target volume. Disk B is providing a backup of disk A, and disk C is also providing a backup of disk A, through disk B. The FlashCopy functions  14  linking the different storage volumes may have been started at different times, which create different point-in-time copies of the images stored by the respective storage volumes, or could have been started simultaneously. 
         [0032]    In the FlashCopy cascade of A→B→C, where A, B and C are the disks in the cascade, as shown in  FIG. 2 , and the arrows are the FlashCopy maps, then denoting (A, B) to be a FlashCopy mapping from disk A to disk B, the cascade has maps (A, B) and (B, C). In this implementation of the cascade, any new data write to disk A will cause a write to disk B, as per the respective FlashCopy function, which is required to maintain the image on disk B. This writing to disk B will cause a further clean read of disk B followed by a write to disk C. In this way a single write to the first storage volume  10  in the cascade can result in a number of operations throughout the cascade. 
         [0033]    When a cascade is created, the new maps and new storage volumes are inserted into the cascade, not added to the end of the cascade. In the cascade shown in  FIG. 2 , the first backup process started would be A→C. When the backup process A→B is then started, the new target storage volume B is effectively “inserted” between the existing source storage volume A and the existing target storage volume C. This “insertion” is purely a logical construction illustrating the fact that target disk C will receive data writes from disk B, rather than disk A. This is how a cascaded implementation differs from a conventional arrangement which would have two independent maps from disk A. 
         [0034]    More complex arrangements will be created as more backup processes are started from different storage volumes. For example,  FIG. 3   b  shows four disks A, B, C and D with three PIT maps between them from the source volume A. The storage volume controller  8  is operated so that the disks and maps are arranged so that clones and snapshots are separated into different dependency chains or cascades. For example, suppose Map  1  is started as a clone and then some time later Map  2  is started as a snapshot. Then the resulting graph structure used to maintain the target images would be as shown in  FIG. 3   a . This structure is a dependency graph. 
         [0035]    In the graph shown in  FIG. 3   a , a data write to disk A may require copy on writes to B and/or C in order to maintain those images on the target disks of the respective backup processes. If the storage volume controller  8  now starts Map  3 , as a clone, the resulting dependency graph is as shown in  FIG. 3   b . In a cascade, the new disk and map to that disk are always placed adjacent to the source disk A, so the new target disk D of map  3  is placed in cascade A→D→B, where the two maps  3  and  1  are both clones. In the separate cascade A→C the map  2  is a snapshot. 
         [0036]    Subsequent backup processes as either snapshots or clones of A extend the length of the clone and/or snapshot chains without increasing the number of edges leaving A and so do not increase the number of IOs (Input/Outputs) required for any write to A. The graph of  FIG. 3   b  can be extended to include further snapshots and clones. As a general rule, if a cascade exists for the specific backup process type (clone or snapshot), then the target storage volume is added to the existing cascade for the identified backup process type, or if a cascade does not exist for the identified backup process type, then a new cascade is started, which consists of the target storage volume and the source storage volume. 
         [0037]      FIG. 4  illustrates the logical arrangement of the storage volumes after further backups E, F, G and H have been taken. The backups E and F, defined by respective maps  4  and  5 , are taking backups of disk D. The backups G and H, defined by respective maps  6  and  7 , are taking backups of disk C.  FIG. 4  is only showing the logical arrangement of the backup maps, not the actually configuration of the backup processes that will be set-up by the storage volume controller  8  to implement the arrangement shown in  FIG. 4 . As can be seen in  FIG. 3   b , the result of starting the map  3  from A to D is to create the cascade A→D→B. 
         [0038]    Now suppose that map  4  is started as a clone and map  5  is started as a snapshot then the resulting arrangement of backups and storage volumes will be as shown in  FIG. 5 . This Figure is essentially the arrangement shown in  FIG. 3   b  plus the two backups of disk D defined by maps  4  and  5  to volumes E and F respectively. Since map  4  is a clone this can be placed in the cascade from volume D to B, since the map  1  to disk B is also a clone. The last started map is always placed closest to the source disk, in this case creating the cascade D→E→B. 
         [0039]    Disk D, which is the target of map  3  from disk A, is the source disk for the backup process defined by map  4  and hence disk E is place adjacent to disk D in the creation of the new cascade D→E→B. Map  5 , however, is a snapshot and so must be the start of a new cascade with respect to its source storage volume (disk D). Hence the new map  5  defines a new cascade D→F. This is a cascade of snapshot backup processes from the disk D. In this way clones and snapshots taken from specific source disks never appear in the same cascade from that specific source disk. 
         [0040]    If map  5  to disk F was a snapshot backup of disk A (rather than disk D) then it would have been placed between disks A and C to form the cascade A→F→C. The snapshot backup processes that have A as a source disk will always be placed in this cascade, just as clone back up processes with A as the source disk will be placed in the other cascade (between A and D). Any backup processes from other disks in the cascade will follow the same rules of either entering an existing cascade for the backup process type, or creating a new cascade if one does not already exist. 
         [0041]    For example, if map  6  is started as a clone and if map  7  is started as a snapshot then the arrangement will be as shown in  FIG. 6 . Both these backup processes are from disk C and so two new cascades are formed from that storage volume. This example shows how the dependency graphs are constructed when maps are started as snapshots or clones. Any new backup processes from any disk in the cascades of  FIG. 6  will be handled in the same manner. For each new backup process that is taken at any future from any disk, either a cascade already exists for the backup process type, or a new cascade is created. 
         [0042]    As with multiple target PIT copies, writes to a disk in a dependency graph would result in a read, split writes and a client write. For example, a client (or host) write to B in the above dependency graph may result in a read of A, if the data required by B for the location being written to is on A, a write to F of the data read from A, if F is dependent on B, a write to E of the data read from A, if E is dependent on B (which can be performed in parallel to the second action, and finally the client write itself to B. This is the maximum number of IO operation required. So we see that the IO algorithm is a mixture of the traditional multiple target implementation with the multiple target cascaded implementation. 
         [0043]    One advantage of this solution is that the clones and snapshots of a source volume are not mixed. For example, if map  4  is stopped in the dependency graph of  FIG. 6 , then the storage volume controller  8  will “clean” the data from E to D. This is not a problem because D is also a clone and does not mind if the data is copied onto it. The snapshot F is not affected. 
         [0044]    Rules need to be considered concern the stopping of maps in a dependency graph whose target is the source of other snapshots and clones. There are many approaches that could be taken by anyone skilled in the art. In this implementation, the preferred embodiment is defined below. Rule  1 —when a snapshot is stopped all snapshots and clones of the target disk are also stopped. Rule  2 —when a clone is stopped all snapshots of the target disk are also stopped. This approach is taken because a snapshot is always dependent on its source and if the source is destroyed the snapshot is of no use anymore.