CROSS-REFERENCE TO RELATED APPLICATIONSThis application is related to the following commonly assigned and co-pending U.S. patent applications:[0001]
U.S. patent application Ser. No. ______, entitled “METHOD, SYSTEM, AND PROGRAM FOR REVERSE RESTORE OF AN INCREMENTAL VIRTUAL COPY,” by S. Werner, et al., Docket No. TUC920030037US1; and[0002]
U.S. patent application Ser. No. ______, entitled “METHOD, SYSTEM, AND PROGRAM FOR INCREMENTAL VIRTUAL COPY,” by S. Werner et al., Docket No. TUC920030041US1;[0003]
each of which is filed on the same date herewith, and which is incorporated by reference herein in its entirety.[0004]
BACKGROUND OF THE INVENTION1. Field of the Invention[0005]
The present invention is directed to recovery of a reverse restore operation.[0006]
2. Description of the Related Art[0007]
Computing systems often include one or more host computers (“hosts”) for processing data and running application programs, direct access storage devices (DASDs) for storing data, and a storage controller for controlling the transfer of data between the hosts and the DASD. Storage controllers, also referred to as control units or storage directors, manage access to a storage space comprised of numerous hard disk drives connected in a loop architecture, otherwise referred to as a Direct Access Storage Device (DASD). Hosts may communicate Input/Output (I/O) requests to the storage space through the storage controller.[0008]
In many systems, data on one storage device, such as a DASD, may be copied to the same or another storage device so that access to data volumes can be provided from two different devices. 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 operation is performed to minimize the time during which the target and source volumes are inaccessible.[0009]
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 operations 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.[0010]
Later, when the storage system receives updates to the original or copy, the updates are stored separately and cross-referenced to the updated data object only. At this point, the original and copy data objects begin to diverge. The initial benefit is that the instant virtual copy occurs almost instantaneously, completing much faster than a normal physical copy operation. This frees the host and storage subsystem to perform other tasks. The host or storage subsystem may even proceed to create an actual, physical copy of the original data object during background processing, or at another time.[0011]
One such instant virtual copy operation 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. The FlashCopy® operation guarantees that until a track in a FlashCopy® relationship has been hardened to its location on the target disk, the track resides on the source disk. A relationship table is used to maintain information on all existing FlashCopy® relationships in the subsystem. During the establish phase of a FlashCopy® relationship, one entry is recorded in the source and target relationship tables for the source and target that participate in the FlashCopy® being established. Each added entry maintains all the required information concerning the FlashCopy® relationship. Both entries for the relationship are removed from the relationship tables when all FlashCopy® tracks from the source extent have been physically copied to the target extents or when a withdraw command is received. In certain cases, even though all tracks have been copied from the source extent to the target extent, the relationship persists.[0012]
The target relationship table further includes a bitmap that identifies which tracks involved in the FlashCopy® relationship have not yet been copied over and are thus protected tracks. Each track in the target device is represented by one bit in the bitmap. The target bit is set when the corresponding track is established as a target track of a FlashCopy® relationship. The target bit is reset when the corresponding track has been copied from the source location and destaged to the target device due to writes on the source or the target device, or a background copy task.[0013]
In the prior art, as part of the establishment of the logical point-in-time relationship during the FlashCopy® operation, all tracks in the source cache that are included in the FlashCopy® relationship must be destaged to the physical source volume, e.g., source DASD, and all tracks in the target cache included in the FlashCopy® must be discarded. Further details of the FlashCopy® operations are described in the copending and commonly assigned U.S. patent application Ser. No. 09/347,344, 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.[0014]
Once the logical relationship is established, hosts may then have immediate access to data on the source and target volumes, and the data may be copied as part of a background operation. A read to a track that is a target in a FlashCopy® relationship and not in cache triggers a stage intercept, which causes the source track corresponding to the requested target track to be staged to the target cache when the source track has not yet been copied over and before access is provided to the track from the target cache. This ensures that the target has the copy from the source that existed at the point-in-time of the FlashCopy® operation. Further, any destages to tracks on the source device that have not been copied over triggers a destage intercept, which causes the tracks on the source device to be copied to the target device.[0015]
Instant virtual copy techniques have been developed, at least in part, to quickly create a duplicate copy of data without interrupting or slowing foreground processes. Instant virtual copy techniques, such as a FlashCopy® operation, provide a point-in-time copy tool. Instant virtual copy techniques may be used for a variety of applications, including, for example, data backup, data migration, data mining, testing, etc. For example, an instant virtual copy technique may be used for the creation of a physical “backup” copy of the source data, to aid in disaster recovery.[0016]
Although the instant virtual copy techniques are useful for copying large amounts of data, conventional instant virtual copy techniques may be improved.[0017]
SUMMARY OF THE INVENTIONProvided are a method, system, and program for processing interruption of an operation that transfers data between a source and a target. An indication that a reverse restore operation has been interrupted is received. It is determined whether designation of at least one of an original source and an original target has been reversed. The settings of one or more relation indicators are also determined. Processing to be performed is identified based on the determinations of whether designations have been reversed and based on the settings of the one or more relation indicators.[0018]
The described implementations of the invention provide a method, system, and program for processing an interrupt of a reverse restore operation that performs a reverse incremental virtual copy operation.[0019]
BRIEF DESCRIPTION OF THE DRAWINGSReferring now to the drawings in which like reference numbers represent corresponding parts throughout:[0020]
FIGS. 1A and 1B illustrate, in block diagrams, a computing environment in accordance with certain implementations of the invention.[0021]
FIG. 2 illustrates various structures and indicators in accordance with certain implementations of the invention.[0022]
FIG. 3 illustrates logic for updating structures in accordance with certain implementations of the invention.[0023]
FIG. 4 illustrates logic implemented in the reverse restore process for performing an incremental virtual copy in accordance with certain implementations of the invention.[0024]
FIG. 5 illustrates logic implemented in write process for processing of a write operation in accordance with certain implementations of the invention.[0025]
FIG. 6 illustrates logic implemented in the read process for processing of a read operation in accordance with certain implementations of the invention.[0026]
FIG. 7 illustrates a background copy process in accordance with certain implementations of the invention.[0027]
FIGS. 8A, 8B, and[0028]8C illustrate logic implemented in a reverse restore recovery process in accordance with certain implementations of the invention.
FIG. 9 illustrates a table describing states and recovery actions in accordance with certain implementations of the invention.[0029]
FIG. 10 illustrates an architecture of a computer system that may be used in accordance with certain implementations of the invention.[0030]
DETAILED DESCRIPTIONIn the following description, reference is made to the accompanying drawings which form a part hereof and which illustrate several implementations of the present invention. It is understood that other implementations may be utilized and structural and operational changes may be made without departing from the scope of the present invention.[0031]
An incremental virtual copy operation is an enhancement to an instant virtual copy operation. With the incremental virtual copy operation, only the blocks of data that were updated on source and target volumes since the last copy operation (e.g., instant virtual copy operation) from the source volume to the target volume are copied. A reverse restore operation is an enhancement to an incremental virtual copy operation. With the reverse restore operation, updates may be made to a source or target volume of an instant virtual copy. Then, the changes from the original target volume may be applied back to a corresponding original source volume, making the original source volume a point-in-time copy of the original target volume.[0032]
Implementations of the invention provide recovery of a reverse restore operation. That is, when the reverse restore operation is interrupted by some type of error event (e.g., hardware and/or software failures), implementations of the invention provide recovery by either undoing the operation and restoring the status of data to its original state (e.g., by performing a roll back operation) or by completing the reverse restore operation (e.g., by performing a roll forward operation starting at a roll forward point). Implementations of the invention determine the processing to be performed based on whether designations of source and target have been reversed (e.g., an original source is designated as a new target and/or an original target is designated as a new source) and on the setting of one or more indicators, which will be referred to herein as “relation” indicators.[0033]
FIGS. 1A and 1B illustrate, in block diagrams, a computing environment in accordance with certain implementations of the invention. A[0034]storage controller100 receives Input/Output (I/O) requests fromhosts140a,b, . . . l(wherein a, b, and l may be any integer value) over anetwork190 directed towardstorage devices120,130 configured to have volumes (e.g., Logical Unit Numbers, Logical Devices, etc.)122a,b . . . nand132a,b . . . m,respectively, where m and n may be different integer values or the same integer value. In certain implementations, the size of thetarget storage130 may be larger than or equal to thesource storage120.
The[0035]source storage120 includes one ormore volumes122a,b . . . n,which may be divided into blocks ofstorage150 containing blocks of data, and the blocks ofstorage150 are further divided into sub-blocks of storage (150a-150p,where a and p may be any integer value) that contain sub-blocks of data. A volume may be any logical or physical element of storage. In certain implementations, the blocks of data are contents of tracks, while the sub-blocks of data are contents of sectors of tracks.
[0036]Target storage130 maintains copies of all or a subset of thevolumes122a,b . . . nof thesource storage120. Additionally,target storage130 may be modified by, for example, host140.Target storage130 includes one ormore volumes132a,b . . . m,which may be divided into blocks ofstorage150 containing blocks of data, and the blocks ofstorage150 are further divided into sub-blocks of storage (150a-150p,where a and p may be any integer value) that contain sub-blocks of data. A volume may be any logical or physical element of storage. In certain implementations, the blocks of data are tracks, while the sub-blocks of data are sectors of tracks.
For ease of reference, the terms tracks and sectors will be used herein as examples of blocks of data and sub-blocks of data, but use of these terms is not meant to limit implementations of the invention to tracks and sectors. The implementations of the invention are applicable to any type of storage, block of storage or block of data divided in any manner. Moreover, although implementations of the invention refer to blocks of data, alternate implementations of the invention are applicable to sub-blocks of data.[0037]
The[0038]storage controller100 includes asource cache124 in which updates to tracks in thesource storage120 are maintained until written to source storage120 (i.e., the tracks are destaged to physical storage). Thestorage controller100 includes atarget cache134 in which updates to tracks in thetarget storage130 are maintained until written to target storage130 (i.e., the tracks are destaged to physical storage). Thesource cache124 andtarget cache134 may comprise separate memory devices or different sections of a same memory device. Thesource cache124 andtarget cache134 are used to buffer read and write data being transmitted between thehosts140a,b . . . l,source storage120, andtarget storage130. Further, althoughcaches124 and134 are referred to as source and target caches, respectively, for holding source or target blocks of data in a point-in-time copy relationship, thecaches124 and134 may store at the same time source and target blocks of data in different point-in-copy relationships.
Additionally, the[0039]storage controller100 includes anonvolatile cache118. Thenon-volatile cache118 may be, for example, a battery-backed up volatile memory, to maintain a non-volatile copy of data updates.
The[0040]storage controller100 further includessystem memory110, which may be implemented in volatile and/or non-volatile devices. Thesystem memory110 includes aread process112 for reading data, awrite process114 for writing data, an incrementalvirtual copy process116, a reverse restoreprocess117, and a reverse restorerecovery process119. Theread process112 executes insystem memory110 to read data fromstorages120 and130 tocaches124 and134, respectively. Thewrite process114 executes insystem memory110 to write data fromcaches124 and134 to storages120 and130, respectively. The incrementalvirtual copy process116 executes insystem memory110 to perform an incremental virtual copy operation that transfers data fromsource storage120 to targetstorage130. The incremental virtual copy process is described further in the cross-referenced patent application “METHOD, SYSTEM, AND PROGRAM FOR INCREMENTAL VIRTUAL COPY,” by S. Werner, et al., Docket No. TUC920030041US1, which is incorporated herein in its entirety. The reverse restoreprocess117 executes insystem memory110 to perform a reverse restore operation that reverses the roles of the original source and original target and transfers data from theoriginal target storage130 to theoriginal source storage120. The reverse restore process is described further in the cross-referenced patent application “METHOD, SYSTEM, AND PROGRAM FOR REVERSE RESTORE OF AN INCREMENTAL VIRTUAL COPY,” by S. Werner, et al., Docket No. TUC920030037US1. The reverse restorerecovery process119 executes insystem memory110 to perform recovery operations for a reverse restoreprocess117 that is interrupted (e.g., by an error event).
In certain implementations of the invention, there may be multiple reverse restore recovery processes[0041]119. In certain implementations of the invention, the reverse restorerecovery process119 may be executed at another storage controller connected tostorage controller100 instead of, or in addition to, execution at thestorage controller100. Thesystem memory110 may be in a separate memory devices fromcaches124 and134 or may share a memory device with one or bothcaches124 and134.
Implementations of the invention are applicable to the transfer of data between any two storage mediums, which for ease of reference will be referred to herein as source storage and target storage or as first storage and second storage. For example, certain implementations of the invention may be used with two storage mediums located at a single storage controller, as illustrated in FIG. 1A. Moreover, certain alternative implementations of the invention may be used with two storage mediums located at different storage controllers, different physical sites, etc. Also, for ease of reference, a block of data in source storage will be referred to as a “source block of data,” and a block of data in target storage will be referred to as a “target block of data.” When the indication of which storage is source storage and which storage is target storage is reversed, for ease of reference, the original “source block of data” will be referred to as the “new target block of data,” and the original “target block of data” will be referred to as the “new source block of data.”[0042]
In certain implementations, removable storage (instead of or in addition to target storage[0043]130) may be used to maintain copies of all or a subset of thesource storage120, and the implementations of the invention transfer data to the removable storage rather than to the target storage. The removable storage may reside at thestorage controller100.
The[0044]storage controller100 may further include a processor complex (not shown) and may comprise any storage controller or server known in the art, such as an Enterprise Storage Server® (ESS), 3990® Storage Controller, etc. Thehosts140a,b . . . lmay comprise any computing device known in the art, such as a server, mainframe, workstatation, personal computer, hand held computer, laptop telephony device, network appliance, etc. Thestorage controller100 and host system(s)140a,b . . . lcommunicate via anetwork190, which may comprise a Storage Area Network (SAN), a Source Area Network (LAN), Wide Area Network (WAN), the Internet, an Intranet, etc. Thesource storage120 andtarget storage130 may each comprise an array of storage devices, such as Direct Access Storage Devices (DASDs), Just a Bunch of Disks (JBOD), Redundant Array of Independent Disks (RAID), virtualization device, etc.
Additionally, although FIG. 1A illustrates a single storage controller, one skilled in the art would know that multiple storage controllers may be connected via a network (e.g., a Source Area Network (LAN), Wide Area Network (WAN), the Internet, etc.), and one or more of the multiple storage controllers may implement the invention.[0045]
When host[0046]140 wishes to update a block of data insource storage120, host140 writes data to a block of storage insource cache124. Write operations modify the block of storage insource cache124 synchronously (i.e., writing host140 waits for the operation to complete), and then, in a background process,source cache124 content is written to sourcestorage120. A write operation may update data, write new data, or write the same data again. Writing data insource cache124 to sourcestorage120 is called a destage operation. Copying all or a portion of a block of data fromsource storage120 tosource cache124 is a staging operation. Likewise, data may be staged and destaged betweentarget storage130 andtarget cache134. Moreover, data may be staged fromsource storage120 to targetcache134.
FIG. 2 illustrates[0047]various structures200,210, and220 andindicators212,214,216, and222 in accordance with certain implementations of the invention.Nonvolatile cache118 includes atarget copy structure200. Thetarget copy structure200 may be used to determine whether to retrieve data fromsource storage120 ortarget storage130 tocache124 or134, respectively (i.e., for a staging operation). Additionally, thetarget copy structure200 may be used to determine which blocks of data insource storage120 are to be copied to targetstorage130. Thetarget copy structure200 includes an indicator (e.g., a bit) for each block of data in, for example, a volume. When an indicator is set to a first value (e.g., one), the setting indicates that the block of data is to be retrieved from thesource storage120 for a staging operation or indicates that the block of data is to be copied to targetstorage130 for a copy operation (e.g., a background physical copy operation). When an indicator is set to a second value (e.g., zero), the setting indicates that the block of data is to be retrieved from thetarget storage130 for a staging operation or indicates that the block of data is not to be copied fromsource storage120 to targetstorage130 for a copy operation (e.g., a background physical copy operation).
A source[0048]change recording structure210 is used to monitor updates to blocks of data within portions of data in thesource storage120 for which an incremental virtual copy relationship has been established. The sourcechange recording structure210 includes an indicator (e.g., a bit) for each block of data in thesource storage120 that is part of the incremental virtual copy relationship. When an indicator is set to a first value (e.g., one), the setting indicates that the block of data has been updated since the last copy operation (e.g., an incremental virtual copy operation or a reverse restore operation). When an indicator is set to a second value (e.g., zero), the setting indicates that the block of data has not been updated since the last copy operation (e.g., an incremental virtual copy operation or a reverse restore operation).
A target[0049]change recording structure220 is used to monitor updates to blocks of data in thetarget storage130 after an incremental virtual copy relationship has been established. The targetchange recording structure220 includes an indicator (e.g., a bit) for each block of data in thetarget storage130 that is part of the incremental virtual copy relationship. When an indicator is set to a first value (e.g., one), the setting indicates that the block of data has been updated since the last copy operation. When an indicator is set to a second value (e.g., zero), the setting indicates that the block of data has not been updated since the last copy operation.
In certain implementations of the invention, each[0050]structure200,210, and220 comprises a bitmap, and each indicator comprises a bit. In eachstructure200,210, and220, the nth indicator corresponds to the nth block of data (e.g., the first indicator in eachstructure200,210, and220 corresponds to the first data block). Although thestructures200,210, and220 have been illustrated as three separate structures, the structures may be combined in any form without departing from the scope of the invention. In certain implementations of the invention, there is a copy of each structure for each volume. In certain alternative implementations of the invention, there is a single copy of each structure for all volumes. Moreover, althoughstructures210 and220 are referred to as source and target, respectively, in the illustration, the designation of source and target may be changed when thestorage120 is to be treated as a target, whilestorage130 is to be treated as a source.
A source reversal in progress indicator (SRIP)[0051]212 is stored innonvolatile cache118 and is used to indicate whether or not a reverse restore operation is in progress for a source portion of data. Although the source reversal inprogress indicator212 is illustrated as being stored innonvolatile cache118, the source reversal inprogress indicator212 may be stored innonvolatile cache118 or elsewhere. In particular, when the source reversal inprogress indicator212 is set to a first value (e.g., one), the setting indicates that a reverse restore operation is in progress. When the source reversal inprogress indicator212 is set to a second value (e.g., zero), the setting indicates that a reverse restore operation is not in progress. A source reversal inprogress indicator212 is a type of relation indicator. When a reversal of source and target occurs, the source reversal inprogress indicator212 is associated with the original source (i.e., new target).
Moreover, the[0052]nonvolatile cache118 stores toggleindicators214 that indicate whether a toggle operation is pending for a portion of data instorage120 or130. In certain implementations of the invention, there is one toggle indicator for the source change recording structure and one toggle indicator for the target change recording structure (i.e., there is a toggle indicator per volume). Although thetoggle indicator214 is illustrated as being stored innonvolatile cache118, thetoggle indicator214 may be stored elsewhere. When thetoggle indicator214 is set to a first value (e.g., one), the setting indicates that a toggle operation is pending. When thetoggle indicator214 is set to a second value (e.g., zero), the setting indicates that a toggle operation is not pending. Atoggle indicator214 is a type of relation indicator. Each toggle operation resets thetoggle indicators214 for either the source or targetchange recording structure210 or220 to indicate that no changes have occurred since the last copy operation (e.g., an incremental virtual copy operation).
Additionally, the[0053]nonvolatile cache118 stores a mergecomplete indicator216 that indicates whether a merge ofchange recording structures210 and220 is complete. Although the mergecomplete indicator216 is illustrated as being stored innonvolatile cache118, the mergecomplete indicator216 may be stored innonvolatile cache118 or elsewhere. When the mergecomplete indicator216 is set to a first value (e.g., one), the setting indicates that merging of the source and targetchange recording structures210 and220 is complete. When the mergecomplete indicator216 is set to a second value (e.g., zero), the setting indicates that merging of the source and targetchange recording structures210 and220 is not complete. A mergecomplete indicator216 is a type of relation indicator.
A target reversal in progress indicator (TRIP)[0054]222 is stored innonvolatile cache118 and is used to indicate whether or not a reverse restore operation is in progress. Although the target reversal inprogress indicator222 is illustrated as being stored innonvolatile cache118, the target reversal inprogress indicator222 may be stored innonvolatile cache118 or elsewhere. In particular, when the target reversal inprogress indicator222 is set to a first value (e.g., one), the setting indicates that a reverse restore operation is in progress. When the target reversal inprogress indicator222 is set to a second value (e.g., zero), the setting indicates that a reverse restore operation is not in progress. A target reversal inprogress indicator222 is a type of relation indicator. When a reversal of source and target occurs, the target reversal inprogress indicator222 is associated with the original target (i.e., new source).
FIG. 3 illustrates logic implemented in the incremental[0055]virtual copy process116 for updating structures in accordance with certain implementations of the invention. Control begins atblock300 with initial establishment of an incremental virtual copy relationship. The incremental virtual copy relationship is formed between one or more portions of data (e.g., source volumes) in thesource storage120 and corresponding portions of data (e.g., target volumes) in thetarget storage130 when an incremental virtual copy operation is performed between the corresponding portions of data. The first incremental virtual copy operation may copy, for example, one or more source volumes to corresponding target volumes. Subsequent copies, however, may make incremental copies, avoiding re-copying any portions of source volumes that have not changed since the last copy operation.
In[0056]block310, the incrementalvirtual copy process116 updates indicators in thetarget copy structure200 to indicate that all of the blocks of data corresponding to the indicators are to be retrieved from source storage for a staging operation and to indicate that all blocks of data are to be copied from source storage to target storage for a physical copy operation. In certain implementations of the invention, the indicators in thetarget copy structure200 are set to one.
In[0057]block320, the incrementalvirtual copy process116 updates the indicators in the sourcechange recording structure210 to indicate that the source blocks of data corresponding to the indicators have not been updated since the last copy operation (e.g., incremental virtual copy operation). In certain implementations of the invention, all of the indicators in the sourcechange recording structure210 are set to zero. Inblock330, the incrementalvirtual copy process116 updates the indicators in the targetchange recording structure220 to indicate that the target blocks of data corresponding to the indicators have not been updated since the last copy operation (e.g., incremental virtual copy operation). In certain implementations of the invention, all of the indicators in the targetchange recording structure220 are set to zero.
FIG. 4 illustrates logic implemented in the reverse restore[0058]process117 for performing an incremental virtual copy in accordance with certain implementations of the invention. In the example illustrated with FIG. 4,storage120 is initially designated as a source, andstorage130 is initially designated as a target. During the processing of logic in FIG. 4, the designations of source and target are reversed. In certain implementations of the invention, prior to execution of the reverse restoreprocess117, a physical copy has completed and the indicators in the target copy structure are set (e.g., to zero) to indicate that the blocks of data corresponding to the indicators are not to be copied for a copy operation. Control begins atblock400 with the reverse restoreprocess117 receiving a reverse restore operation. A reverse restore operation may be issued by host140. Although not shown in the flow of FIG. 4, prior to receipt of the reverse restore copy operation, one or more blocks of data may have been updated in thesource storage120 and/or thetarget storage130, by, for example, a user at host140.
When portions (e.g., storage, volumes, tracks, sectors, etc.) of data in the[0059]source storage120 are originally treated as source portions of data, and portions of data in thetarget storage130 are originally treated as target portions of data, a reversal of the designations of source and target treats the portions of data in thetarget storage130 as source portions of data and treats the portions of data in thesource storage120 as the target portions of data. Then, copying is performed from the new source to the new target (e.g., fromstorage130 to storage120). When the indication of which portions of data are to be treated as source and target is reversed, for ease of reference, the portions of data that are to be treated as source may be referred to as “new source” portions of data (e.g., new source storage or new source block of data), and the portions of data that are to be treated as target may be referred to as “new target” portions of data (e.g., new target storage or new target block of data). Moreover, if there is an interruption in the processing of FIG. 4, the reverse restore operation, the logic of FIGS. 8A, 8B, and8C is performed.
In[0060]block410, theTRIP indicator222 is set to indicate that a reverse restore operation is in progress for a new source (i.e., the original target), and atoggle indicator214 for the new source (also referred to as “a new source toggle indicator” ) is set to indicate that a toggle operation is pending for the new source. At this time, the setting of theSRIP indicator212 indicates that a reverse restore operation is not in progress for the new target (i.e., the original source). Inblock420, theSRIP indicator212 is set to indicate that a reverse restore operation is in progress for a new target (i.e., the original source), and atoggle indicator214 for the new target (also referred to as “a new target toggle indicator”) is set to indicate that a toggle operation is pending for the new target. TheSRIP indicator212 is set when processing a reverse restore for the original source relation entry by updating the relation entry, and theTRIP indicator222 is set when processing a reverse restore for the original target relation entry by updating the relation entry. A source relation entry holds information about the source, such as identifying a corresponding target. A target relation entry holds information about the target, such as identifying a corresponding source.
In[0061]block430, the reverse restoreprocess117 updates indicators in the sourcechange recording structure210 for the new source to indicate that the new source blocks of data have not been updated since the last copy operation (e.g., incremental virtual copy operation or reverse restore operation) and updates the toggle indicator for the new source to indicate that a toggle operation is not pending for the new source and that a copy of the sourcechange recording structure210 was made before updating the sourcechange recording structure210. In certain implementations of the invention, all of the indicators in the sourcechange recording structure210 are set to zero.
In[0062]block440, the reverse restoreprocess117 updates the indicators in the targetchange recording structure220 for the new target to indicate that the new target blocks of data have not been updated since the last copy operation (e.g., incremental virtual copy operation or reverse restore operation) and updates the toggle indicator for the new target to indicate that a toggle operation is not pending for the new target and that a copy of the targetchange recording structure220 was made before updating the targetchange recording structure220. In certain implementations of the invention, all of the indicators in the targetchange recording structure220 are set to zero.
In[0063]block450, the reverse restoreprocess117 updates indicators in the newtarget copy structure200 for the new target with indicators in the copies of the new source and new targetchange recording structures210 and220 and a mergecomplete indicator216 is set to indicate that a merge is complete. In certain implementations of the invention, the copy of the sourcechange recording structure210 is merged with the copy of the targetchange recording structure220 using an “OR” operation, and the result of the “OR” operation is stored in thetarget copy structure200.
In[0064]block460, the reverse restoreprocess117 updates an indication that the original source is acting as the new target and sets theSRIP indicator212 to indicate that a reverse restore operation is not in progress. Inblock470, the reverse restoreprocess117 updates an indication that the original target is acting as the new source and sets theTRIP indicator222 to indicate that a reverse restore operation is not in progress.
FIG. 5 illustrates logic implemented in[0065]write process114 for processing of a write operation in accordance with certain implementations of the invention. Control begins atblock500 with thewrite process114 receiving a request to write a block of data. Inblock520, thewrite process114 determines whether the block of data is in an incremental virtual copy relationship. If so, processing continues to block530, otherwise, processing continues to block560. Inblock530, thewrite process114 determines whether the block of data is in target storage (which may be eitherstorage120 or130, depending on the designation of source and target). If so, processing continues to block540, otherwise, processing continues to block550.
In[0066]block540, the indicator for the block of data in the targetchange recording structure220 is updated to indicate that the target block of data has changed since the last copy operation (e.g., incremental virtual copy operation). In certain implementations of the invention, the indicator in the targetchange recording structure220 is set to one. Inblock550, the indicator for the block of data in the sourcechange recording structure210 is updated to indicate that the source block of data has changed since the last copy operation (e.g., incremental virtual copy operation). In certain implementations of the invention, the indicator in the sourcechange recording structure210 is set to one. Inblock560, the write operation is performed by thewrite process114.
FIG. 6 illustrates logic implemented in the[0067]read process112 for processing of a read operation in accordance with certain implementations of the invention. Control begins atblock600 with receipt of a request to read a block of data. Inblock620, theread process112 determines whether the block of data is a target in an incremental virtual copy relationship. If so, processing continues to block630, otherwise, processing continues to block660. Inblock630, the read process determines whether an indicator for the block of data is set in the target copy structure to indicate that data is to be read fromsource storage120. If so, processing continues to block640, otherwise, processing continues to block650.
In[0068]block640, theread process112 reads (i.e., stages) the block of data fromsource storage120. Inblock650, theread process112 reads (i.e., stages) the block of data fromtarget storage130. Inblock660, theread process112 performs a normal read of the block of data.
FIG. 7 illustrates a background copy process in accordance with certain implementations of the invention. Control begins at[0069]block700 with a determination that it is time to copy a block of data. Inblock710, it is determined whether the indicator in thetarget copy structure200 for the block of data indicates that the block of data has not been copied. If so, processing continues to block730, otherwise processing continues to block720. Inblock720, a next block of data may be processed or, if there are no other blocks of data to be processed, this logic terminates.
In[0070]block730, the block of data is read in accordance with the logic of FIG. 6. Inblock740, the block of data is destaged to target storage (which may be eitherstorage120 or130, depending on the designation of source and target). Inblock750, an indicator in thetarget copy structure200 is updated for the block of data to indicate that the block of data has been copied. In certain implementations of the invention, the indicator in thetarget copy structure200 is set to zero.
FIGS. 8A, 8B, and[0071]8C illustrate logic implemented in a reverse restore recovery process in accordance with certain implementations of the invention. In the example illustrated with FIGS. 8A, 8B, and8C,source storage120 is initially designated as a source (i.e., “original source”), andtarget storage130 is initially designated as a target (i.e., “original target”).
The logic of FIGS. 8A, 8B, and[0072]8C will be described with reference to FIG. 9, which illustrates a table900 describing states and recovery actions in accordance with certain implementations of the invention. For the example described herein, volume A of table900 is designated as an original source volume, and volume B is designated as an original target volume. In particular, table900 includes a column for a row identifier (e.g., a number), an indication of whether volume A (e.g., a source volume) is a source or target, an indication of whether any relation indicators are currently set for volume A, an indication of whether a volume B (e.g., a target volume) is a source or target, an indication of whether any relation indicators are currently set for volume B, and recovery actions that are performed based on the indications.
Control begins in[0073]block800 with recognition that the reverse restore operation has been interrupted. Inblock802, if it is determined that the source and target have not been reversed yet and no relation indicators have been set such that processing is required (e.g., set as indicated in following blocks804-832), processing is done, otherwise, processing continues to block804. In particular, when the SRIP and TRIP indicators have been set to indicate that a reverse restore operation is not in progress and a merge complete indicator is set to indicate that merging of the change recording structures is complete, it is determined that the relation indicators are set such that processing is not required. For example, inrow1 of table900, volume A is initially designated as a source, volume B is initially designated as a target, no relation indicators have been set to first values, and no action is required.
In[0074]block804, if the designation of the original source is not reversed, the designation of the original target is reversed, a SRIP indicator is set to indicate that a reverse restore operation is not in progress, a TRIP indicator is set to indicate that a reverse restore operation is in progress, and a new source toggle indicator is set to indicate that a toggle operation is pending, processing continues to block806, otherwise, processing continues to block808. Inblock806, a roll back operation is performed, and the original target is designated as a target. A roll back operation “rolls back” processing that has occurred. Additionally, since the designation of the original target was reversed (i.e., set to source), this designation is again reversed. For example, inrow2 of table900, the designation of volume A has not been reversed (i.e., volume A is still a source), the designation of volume B has been reversed so that volume B is a source, the TRIP indicator is set to indicate that a reverse restore operation is in progress, and the new source indicator for volume B has been set to indicate that a toggle operation is pending. Then, a roll back operation is performed, and volume B is designated as a target.
A toggle operation resets indicators in the change recording structures to indicate that no changes to the source and target have occurred since the last copy operation (e.g., incremental virtual copy operation or reverse restore operation). In particular, in order to correctly recover from a reverse restore operation that was interrupted, implementations of the invention determine whether the change recording structures were toggled. Therefore, before the roll forward point, a call to “prepare to toggle” is issued to both the source and target change recording structures, and this sets a toggle indicator to indicate that a toggle operation is pending. Once the change recording structure has been reset, the corresponding toggle indicator is set to indicate that the toggle operation is complete. When recovery of the interruption is performed, a check of the toggle indicator and the merge complete indicator is used to determine whether the toggle operation has completed. When a toggle indicator is set to indicate that a toggle operation is not pending and a merge complete indicator is set to indicate that merging is not complete, then it is determined that a toggling operation has completed.[0075]
Moreover, the toggle indicator for the source change recording structure is set when the TRIP indicator is set to indicate that reversal of the target is in progress. The recovery of the incremental virtual copy relationship toggles the source change recording structure after the roll forward point.[0076]
In[0077]block808, if the designation of the original source and original target have been reversed, the SRIP and TRIP indicators have been set to indicate that a reverse restore operation of both source and target is in progress, and both a new source toggle indicator and a new target toggle indicator are set to indicate that a toggle operation is pending, processing continues to block810, otherwise, processing continues to block812. Inblock810, a roll forward operation is performed, starting with the processing ofblock430 in FIG. 4. For example, inrow3 of table900, the designation of volume A has been reversed to target, the SRIP indicator is set to indicate that a reversal of the original source is in progress, the new target toggle indicator is set to indicate that a toggle operation is pending, the designation of volume B has been reversed to source, the TRIP indicator is set to indicate that a reversal of the original target is in progress, and the new source toggle indicator is set to indicate that a toggle operation is pending. Then, a roll forward operation is performed, starting with the processing ofblock430 in FIG. 4.
In[0078]block812, if the designation of the original source and original target have been reversed, the SRIP and TRIP indicators have been set to indicate that a reverse restore operation of both source and target is in progress, a new target toggle indicator is set to indicate that a toggle operation is pending, and a new source toggle indicator is set to indicate that a toggle operation is not pending, processing continues to block814, otherwise, processing continues to block816. Inblock814, a roll forward operation is performed, starting with the processing ofblock440 in FIG. 4. For example, inrow4 of table900, the designation of volume A has been reversed to target, the SRIP indicator is set to indicate that a reversal of the original source is in progress, the new target toggle indicator is set to indicate that a toggle operation is pending, the designation of volume B has been reversed to source, the TRIP indicator is set to indicate that a reversal of the original target is in progress, and the new source toggle indicator is set to indicate that a toggle operation is not pending. Then, a roll forward operation is performed, starting with the processing ofblock440 in FIG. 4.
In[0079]block816, if the designation of the original source and original target have been reversed, the SRIP and TRIP indicators have been set to indicate that a reverse restore operation of both source and target is in progress, and a merge complete indicator is set to indicate that merging of the change recording structures is not complete, processing continues to block818, otherwise, processing continues to block820. Inblock818, a roll forward operation is performed, starting with the processing ofblock450 in FIG. 4.
In certain implementations of the invention, once the TRIP indicator is set in the target relation entry to indicate that a reverse restore operation is in progress, the roll forward point is reached. In certain implementations of the invention, if the reverse restore operation is interrupted by error after passing the roll forward point, the new target relation entry is recovered before the recovery of a new source relation entry.[0080]
For example, in[0081]row5 of table900, the designation of volume A has been reversed to target, the SRIP indicator is set to indicate that a reversal of the original source is in progress, the designation of volume B has been reversed to source, and the TRIP indicator is set to indicate that a reversal of the original target is in progress. Then, a roll forward operation is performed, starting with the processing ofblock450 in FIG. 4.
In[0082]block820, if the designation of the original source and original target have been reversed, the SRIP and TRIP indicators have both been set to indicate that a reverse restore operation is in progress, and a merge complete indicator is set to indicate that merging of the change recording structures is complete, processing continues to block822, otherwise, processing continues to block824. Inblock822, a roll forward operation is performed, starting with the processing ofblock460 in FIG. 4.
For example, in[0083]row6 of table900, the designation of volume A has been reversed to target, the SRIP indicator is set to indicate that a reverse restore operation is in progress, the merge complete indicator is set to indicate that the merge is complete, the designation of volume B has been reversed to source, and the TRIP indicator is set to indicate that a reverse restore operation is in progress. Then, a roll forward operation is performed, starting with the processing ofblock460 in FIG. 4.
In[0084]block824, if the designation of the original source and original target have been reversed, the SRIP indicator is set to indicate that a reverse restore operation is not in progress, and the TRIP indicator has been set to indicate that a reverse restore operation is in progress, processing continues to block826, otherwise, processing continues to block828. Inblock826, a roll forward operation is performed, starting with the processing ofblock470 in FIG. 4. For example, inrow7 of table900, the designation of volume A has been reversed to target, the SRIP indicator is set to indicate that a reverse restore operation is not in progress, the designation of volume B has been reversed to source, and the TRIP indicator is set to indicate that a reverse restore operation is in progress. Then, a roll forward operation is performed, starting with the processing ofblock470 in FIG. 4.
In[0085]block828, if the designation of the original source and original target have been reversed, and no relation indicators are set such that processing is required (e.g., set as indicated in preceding blocks804-832), processing continues to block830, otherwise, processing continues to block832. Inblock830, it is recognized that no processing is needed. For example, inrow8 of table900, the designation of source and target have been reversed, and no relation indicators are set, so no action is required.
In[0086]block832, relation indicators are reset as needed. For example, theSRIP indicator212 andTRIP indicator222 may be reset to indicate that a reverse restore operation is not in progress. For example, inrow8 of table900, the designation of volume A has been reversed to target, the designation of volume B has been reversed to source, and no relation indicators have been set to first values. No action is required for these states.
Thus, in certain implementations of the invention, the reverse restore operation is achieved by monitoring writes (i.e., updates) and recording changes to tracks for volumes participating in an incremental virtual copy relationship. After an initial incremental virtual copy operation, the direction of the incremental virtual copy operation may be reversed and tracks that have been updated on either a source or a target volume may be copied from the original target volume to the original source volume, without copying the entire original target volume. Implementations of the invention provide recovery of a reverse restore operation. That is, when the reverse restore operation is interrupted by some type of error event (e.g., hardware and/or software failures), implementations of the invention provide recovery by either undoing the operation and restoring the status of data to its original state (e.g., by performing a roll back operation) or by completing the reverse restore operation (e.g., by performing a roll forward operation).[0087]
Enterprise Storage Server, FlashCopy, and 3990 are registered trademarks or common law marks of International Business Machines Corporation in the United States and/or other countries.[0088]
Additional Implementation DetailsThe described techniques for recovery of a reverse restore operation may be implemented as a method, apparatus or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof. The term “article of manufacture” as used herein refers to code or logic implemented in hardware logic (e.g., an integrated circuit chip, Programmable Gate Array (PGA), Application Specific Integrated Circuit (ASIC), etc.) or a computer readable medium, such as magnetic storage medium (e.g., hard disk drives, floppy disks, tape, etc.), optical storage (CD-ROMs, optical disks, etc.), volatile and non-volatile memory devices (e.g., EEPROMs, ROMs, PROMs, RAMs, DRAMs, SRAMs, firmware, programmable logic, etc.). Code in the computer readable medium is accessed and executed by a processor. The code in which preferred embodiments are implemented may further be accessible through a transmission media or from a file server over a network. In such cases, the article ofmanufacture in which the code is implemented may comprise a transmission media, such as a network transmission line, wireless transmission media, signals propagating through space, radio waves, infrared signals, etc. Thus, the “article of manufacture” may comprise the medium in which the code is embodied. Additionally, the “article of manufacture” may comprise a combination of hardware and software components in which the code is embodied, processed, and executed. Of course, those skilled in the art will recognize that many modifications may be made to this configuration without departing from the scope of the present invention, and that the article of manufacture may comprise any information bearing medium known in the art.[0089]
The term “copy operation” herein may refer to various types of operations, including, for example: establishing an incremental virtual copy relationship, “incrementing” an incremental virtual copy operation, or “reverse restoring” an incremental virtual copy relationship.[0090]
The logic of FIGS. 3, 4,[0091]5,6,7,8A,8B, and8C describes specific operations occurring in a particular order. In alternative implementations, certain of the logic operations may be performed in a different order, modified or removed. Moreover, operations may be added to the above described logic and still conform to the described implementations. Further, operations described herein may occur sequentially or certain operations may be processed in parallel, or operations described as performed by a single process may be performed by distributed processes.
The illustrated logic of FIGS. 3, 4,[0092]5,6,7,8A,8B, and8C may be implemented in software, hardware, programmable and non-programmable gate array logic or in some combination of hardware, software, or gate array logic.
FIG. 10 illustrates an architecture of a computer system that may be used in accordance with certain implementations of the invention. A[0093]storage controller100 and/or host140 may implementcomputer architecture1000. Thecomputer architecture1000 may implement a processor1002 (e.g., a microprocessor), a memory1004 (e.g., a volatile memory device), and storage1010 (e.g., a non-volatile storage area, such as magnetic disk drives, optical disk drives, a tape drive, etc.). Anoperating system1005 may execute inmemory1004. Thestorage1010 may comprise an internal storage device or an attached or network accessible storage.Computer programs1006 instorage1010 may be loaded into thememory1004 and executed by theprocessor1002 in a manner known in the art. The architecture further includes anetwork card1008 to enable communication with a network. Aninput device1012 is used to provide user input to theprocessor1002, and may include a keyboard, mouse, pen-stylus, microphone, touch sensitive display screen, or any other activation or input mechanism known in the art. Anoutput device1014 is capable of rendering information transmitted from theprocessor1002, or other component, such as a display monitor, printer, storage, etc. Thecomputer architecture1000 of the computer systems may include fewer components than illustrated, additional components not illustrated herein, or some combination of the components illustrated and additional components.
The[0094]computer architecture1000 may comprise any computing device known in the art, such as a mainframe, server, personal computer, workstation, laptop, handheld computer, telephony device, network appliance, virtualization device, storage controller, etc. Anyprocessor1002 andoperating system1005 known in the art may be used.
The foregoing description of implementations of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be limited not by this detailed description, but rather by the. claims appended hereto. The above specification, examples and data provide a complete description of the manufacture and use of the composition of the invention. Since many implementations of the invention can be made without departing from the spirit and scope of the invention, the invention resides in the claims hereinafter appended.[0095]