Cyclic point-in-time-copy architecture with data deduplication

A method for performing a write to a volume x in a cyclic point-in-time-copy architecture is described. In one embodiment, such a method includes determining whether the volume x has a child volume. The method then determines whether the target bit maps (TBMs) of both the volume x and the child volume are set. If the TBMs are set, the method finds a higher source (HS) volume from which to copy the desired data to the child volume. Once the HS volume is found, the method determines whether the HS volume and the child volume are the same volume. If the HS volume and the child volume are not the same volume, the method copies the data from the HS volume to the child volume. The method then performs the write to the volume x. A corresponding computer program product is also described.

BACKGROUND

1. Field of the Invention

This invention relates to data replication, and more particularly to apparatus and methods for creating point-in-time copies of data while minimizing data duplication.

2. Background of the Invention

Data replication functions such as IBM's Flash Copy, Hitachi's ShadowImage, or the like, may be used to generate nearly instantaneous point-in-time copies of logical volumes or data sets. Among other uses, these point-in-time copies may be used for disaster recovery and business continuity purposes. IBM's Flash Copy in particular creates a point-in-time copy by establishing a mapping relationship between a source volume and a target volume. Once this mapping relationship is established, data may be read from either the source volume or target volume. A target bit map associated with the target volume keeps track of which data tracks have actually been copied from the source volume to the target volume. In certain cases, volumes may be arranged in a cascaded configuration such that certain volumes function as both targets and sources. In other cases, volumes may be arranged in a flat (or “multi-target”) configuration such that a source volume has mapping relationships with multiple target volumes.

Nevertheless, I/O performance can be impacted significantly as the number of volumes increases in either a cascaded or multi-target configuration. For example, in a cascaded configuration, a write to a source volume may need to wait for data to be copied between several volumes in the cascade before the write can be performed. Thus, the larger number of volumes in the cascade, the larger number of copies that may need to occur before data can be written to the source volume. Similarly, in a multi-target configuration, a write to a source volume may need to wait for data to be copied to each connected target before the write can be performed. The larger number of volumes in the multi-target configuration, the larger number of copies that need to occur before data can be written to the source volume. This can make a write to a source volume or other volumes in the cascade very slow. For this reason, current Flash Copy implementations typically only allow a limited number of targets in a multi-target configuration to keep the performance impact within an acceptable range.

In view of the foregoing, what are needed are methods to reduce the performance impact of having large numbers of volumes in cascaded or multi-target configurations. More specifically, methods are needed to reduce data duplication in cascaded or multi-target configurations when performing reads or writes thereto.

SUMMARY

The invention has been developed in response to the present state of the art and, in particular, in response to the problems and needs in the art that have not yet been fully solved by currently available apparatus and methods. Accordingly, the invention has been developed to provide methods for performing reads and writes to volumes in cyclic point-in-time-copy architectures. The features and advantages of the invention will become more fully apparent from the following description and appended claims, or may be learned by practice of the invention as set forth hereinafter.

Consistent with the foregoing, a method for performing a write to a volume x in a cyclic point-in-time-copy architecture is disclosed herein. In one embodiment, such a method includes determining whether the volume x has a child volume, wherein each of the volume x and the child volume have a target bit map (TBM) associated therewith. The method then determines whether the TBMs of both the volume x and the child volume are set, indicating that neither the volume x nor the child volume contains desired data. If the TBMs are set, the method finds a higher source (HS) volume from which to copy the desired data to the child volume. Finding the HS volume includes traveling up the cascaded architecture until the source of the data is found. Once the HS volume is found, the method determines whether the HS volume and the child volume are the same volume. If the HS volume and the child volume are not the same volume, the method copies the data from the HS volume to the child volume. The method then performs the write to the volume x. A corresponding computer program product is also disclosed and claimed herein.

DETAILED DESCRIPTION

As will be appreciated by one skilled in the art, the present invention may be embodied as an apparatus, system, method, or computer program product. Furthermore, the present invention may take the form of a hardware embodiment, a software embodiment (including firmware, resident software, micro-code, etc.) configured to operate hardware, or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “module” or “system.” Furthermore, the present invention may take the form of a computer-usable storage medium embodied in any tangible medium of expression having computer-usable program code stored therein.

Any combination of one or more computer-usable or computer-readable storage medium(s) may be utilized to store the computer program product. The computer-usable or computer-readable storage medium may be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable storage medium may include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CDROM), an optical storage device, or a magnetic storage device. In the context of this document, a computer-usable or computer-readable storage medium may be any medium that can contain, store, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.

Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object-oriented programming language such as Java, Smalltalk, C++, or the like, and conventional procedural programming languages, such as the “C” programming language or similar programming languages. Computer program code for implementing the invention may also be written in a low-level programming language such as assembly language.

Referring toFIG. 1, one example of a network architecture100is illustrated. The network architecture100is presented to show one example of an environment where a point-in-time-copy methodology in accordance with the invention may be implemented. The network architecture100is presented only by way of example and not limitation. Indeed, the methodology disclosed herein may be applicable to a wide variety of different computers, servers, storage devices, and network architectures, in addition to the network architecture100shown.

As shown, the network architecture100includes one or more computers102,106interconnected by a network104. The network104may include, for example, a local-area-network (LAN)104, a wide-area-network (WAN)104, the Internet104, an intranet104, or the like. In certain embodiments, the computers102,106may include both client computers102and server computers106(also referred to herein as “host systems”106). In general, the client computers102initiate communication sessions, whereas the server computers106wait for requests from the client computers102. In certain embodiments, the computers102and/or servers106may connect to one or more internal or external direct-attached storage systems112(e.g., arrays of hard-disk drives, solid-state drives, tape drives, etc.). These computers102,106and direct-attached storage systems112may communicate using protocols such as ATA, SATA, SCSI, SAS, Fibre Channel, or the like. One or more of the storage systems112may utilize the point-in-time-copy methodology disclosed herein.

The network architecture100may, in certain embodiments, include a storage network108behind the servers106, such as a storage-area-network (SAN)108or a LAN108(e.g., when using network-attached storage). This network108may connect the servers106to one or more storage systems110, such as arrays110aof hard-disk drives or solid-state drives, tape libraries110b, individual hard-disk drives110cor solid-state drives110c, tape drives110d, CD-ROM libraries, or the like. To access a storage system110, a host system106may communicate over physical connections from one or more ports on the host106to one or more ports on the storage system110. A connection may be through a switch, fabric, direct connection, or the like. In certain embodiments, the servers106and storage systems110may communicate using a networking standard such as Fibre Channel (FC). One or more of the storage systems110may utilize the point-in-time-copy methodology disclosed herein.

Referring toFIG. 2, one embodiment of a storage system110bcontaining an array of hard-disk drives204and/or solid-state drives204is illustrated. The internal components of the storage system110bare shown since the point-in-time-copy methodology disclosed herein may, in certain embodiments, be implemented within such a storage system110b, although the methodology may also be applicable to other storage systems110. As shown, the storage system110bincludes a storage controller200, one or more switches202, and one or more storage devices204, such as hard disk drives204or solid-state drives204(such as flash-memory-based drives204). The storage controller200may enable one or more hosts106(e.g., open system and/or mainframe servers106) to access data in the one or more storage devices204.

In selected embodiments, the storage controller200includes one or more servers206. The storage controller200may also include host adapters208and device adapters210to connect the storage controller200to host devices106and storage devices204, respectively. Multiple servers206a,206bmay provide redundancy to ensure that data is always available to connected hosts106. Thus, when one server206afails, the other server206bmay pick up the I/O load of the failed server206ato ensure that I/O is able to continue between the hosts106and the storage devices204. This process may be referred to as a “failover.”

In selected embodiments, each server206may include one or more processors212and memory214. The memory214may include volatile memory (e.g., RAM) as well as non-volatile memory (e.g., ROM, EPROM, EEPROM, hard disks, flash memory, etc.). The volatile and non-volatile memory may, in certain embodiments, store software modules that run on the processor(s)212and are used to access data in the storage devices204. The servers206may host at least one instance of these software modules. These software modules may manage all read and write requests to logical volumes in the storage devices204.

In selected embodiments, the memory214includes a cache218. Whenever a host106(e.g., an open system or mainframe server106) performs a read operation, the server206that performs the read may fetch data from the storages devices204and save it in its cache218in the event it is needed again. If the data is requested again by a host106, the server206may fetch the data from the cache218instead of fetching it from the storage devices204, saving both time and resources. Similarly, when a host106performs a write, the server106that receives the write request may store the write in its cache218. The server106may then destage the write to the storage devices204as time and resources allow.

One example of a storage system110bhaving an architecture similar to that illustrated inFIG. 2is the IBM DS8000™ enterprise storage system. The DS8000™ is a high-performance, high-capacity storage controller providing disk storage that is designed to support continuous operations. Nevertheless, the methods disclosed herein are not limited to the IBM DS8000™ enterprise storage system110b, but may be implemented in any comparable or analogous storage system110, regardless of the manufacturer, product name, or components or component names associated with the system110. Any storage system that could benefit from one or more embodiments of the invention is deemed to fall within the scope of the invention. Thus, the IBM DS8000™ is presented only by way of example and is not intended to be limiting.

Referring toFIG. 3, one example of a cyclic architecture300for creating point-in-time copies is illustrated. Such an architecture300may be implemented within a storage system110, such as the storage system110billustrated inFIG. 2. As shown, the cyclic architecture300includes a source volume302and one or more target volumes304a-carranged in a cascade, with the last target volume304cin the cascade cycling back to the source volume302. Some target volumes304a,304bmay act as source volumes for downstream target volumes. For example, the target volume304ais the source volume for the downstream target volume304b, and the target volume304bis the source volume for the downstream target volume304c. Similarly, one or more target volumes304may act as a source for the source volume302(such as when the source volume302needs to be restored to a previous point-in-time), thereby completing the cycle. In such cases, the source volume302also acts as a target volume. In the illustrated example, the target volume304cis the source for the source volume302. Each target volume304a-ccontains a point-in-time copy of the data in the volume immediately upstream.

In selected embodiments, such as in Flash Copy implementations, a point-in-time copy is created by establishing a mapping relationship between a source volume302and a target volume304. Once this mapping relationship is established, data may be read from or written to either the source volume302or the target volume304even though data may still not be copied from the source volume302to the target volume304. A target bit map (TBM)306associated with each target volume304keeps track of which data tracks have actually been copied from the source volume to the target volume304. For example, a “0” in the TBM306may indicate that a data track has been copied (i.e., the target volume304has its own data), whereas a “1” may indicate that a data track has not yet been copied. In cases where the TBM306contains a “1,” a read to a track on the target volume306may be directed to the corresponding track on the source volume302. For the purposes of this disclosure, a bit in a TBM306is said to be “set” if it contains a “1” and “reset” if it contains a “0,” although this could be reversed in other embodiments.

As previously mentioned, in conventional cascaded architectures300, a write to a source volume302may need to wait for data to be copied (i.e., destaged) to each target volume304a-cin the cascade before the write can be completed on the source volume302. In particular, before data can be written to a track of the source volume302, the existing data in the track may need to be destaged (i.e., written) to the target volume304a(assuming the TBM306of the target volume304ais set). Similarly, before the write to the target volume304acan occur, the data in the track may need to be destaged to the target volume304b(assuming the TBM306of the target volume304bis set). Similarly, before the write to the target volume304bcan occur, the data in the track may need to be destaged to the target volume304c(assuming the TBM306of the target volume304bis set). The larger the number of target volumes304a-cin the cascade, the larger number of copies that may need to occur before data can be successfully written to the source volume302. This can make a write to the source volume302or other volume304in the cascade very slow.

As will be explained in more detail hereafter, an improved methodology in accordance with the invention may reduce the performance impact of having large numbers of volumes in a cascade, such as in the cyclic architecture300shown inFIG. 3. Instead of requiring copies to propagate to each volume in the cascade, a direct copy is made between a higher source (HS) volume and a target volume304that needs to receive the data, effectively bypassing (i.e., skipping over) one or more intermediate target volumes304. This can significantly reduce the number of copies that need to occur when a write is performed to a source volume302or target volume304. This, in turn, enables larger numbers of volumes302,304to be included in the cyclic architecture300. The flow diagrams illustrated inFIGS. 4 through 7show various specific examples of methods that may be used to implement such a methodology.

Referring toFIG. 4, one example of a method400for reading a track from a volume304is illustrated. Upon receiving a request to read a data track from a volume (volume x), the method400determines402whether the TBM306of the volume304is set. If the TBM306is not set (indicating that the volume x is a target volume304that includes its own copy of the requested data) or there is no TBM306(indicating the volume is a source volume302only), the method400simply reads406the requested data track from the volume x. On the other hand, if the TBM306is set (indicating that the volume does not contain its own copy of the data), the method400finds404a higher source (HS) volume from which to read the data, and reads404the data from the HS volume. A method600for finding the HS volume is described in association withFIG. 6. For the purposes of this disclosure, the HS volume is the volume that contains the data to be read and from which volume x inherits.

Referring toFIG. 5, one embodiment of a method500for copying a data track in response to a write to a volume302,304(volume x) is illustrated. As shown, the method500initially determines502whether the volume x has a child. For the purposes of this disclosure, a “child” is a downstream target volume304that is mapped to the volume x. If the volume x does not have a child, then no copy is needed as reflected at step504and the method500ends. If the volume x does have a child, the method500determines506whether the TBM306of the child is set in order to determine whether the child has its own copy of the data. If the TBM306of the child is not set (indicating that the child volume has its own copy of the data), then no copy is needed as reflected at step504and the method500ends.

If, on the other hand, the TBM306of the child is set (indicating that the child volume does not have its own copy of the data), then the method500determines508whether the TBM306of the volume x is set. If the TBM306of the volume x is not set or the volume x is a source volume302(no TBM306), then the method500copies510the data in the track from the volume x to the child volume and the method500ends. If, on the other hand, the TBM306of the volume x is set, the method500finds512a higher source (HS) volume from which to copy the data. One method700for finding the HS volume from which to copy the data will be described in association withFIG. 7.

Once the HS volume is found, the method500determines516whether the HS volume and the child volume are the same volume. If they are not the same volume, the method500copies514the data from the HS volume to the child volume304. If they are the same volume, no copy is needed as reflected at step518.

Referring toFIG. 6, one embodiment of a method600for finding a higher source (HS) volume in response to a read to a volume is illustrated. Such a method600may be used in association with step404ofFIG. 4. As shown, the method600initially determines602whether the volume (volume x) being read from is a target volume304. If not, the method600reads604from the volume x since it is a source volume302. If the volume x is a target volume304, the method600determines606whether the TBM306of the volume x is set. If the TBM306is not set, the method600reads604from the volume x304since it has its own copy of the data. If the TBM306of the volume x is set, the method600finds608the source volume associated with the volume x.

Upon finding608the source volume associated with the volume x, the method600determines610whether the source volume is also a target volume. If not, the method600reads612from the source volume and the method600ends. If the source volume is also a target volume, the method600determines614whether the TBM306of the volume is set. If the TBM306is not set, the method600reads612from the source volume (since the source volume contains the data to be read) and the method600ends.

If the TBM306of the source volume is not set, the method600determines616whether the source volume has a mapping relationship, with a lower generation number (GN), with an upstream source volume. As will be explained in association withFIG. 8, generation numbers (GNs) may be used to determine the order in which mapping relationships in the cyclic architecture300were created. In effect, the decision step616determines whether an upstream mapping relationship exists that was created prior in time to the downstream mapping relationship. If not, the method600reads612from the source volume612determined at step608. If so, the method600finds608the next upstream source volume and repeats steps610,614,616in the manner previously described. In this way, the method600travels up the cascade until the HS volume containing the desired data is found. When the desired data is found, the method600reads the data. The decision step616essentially prevents the method600from circling through the cyclic architecture300multiple times.

Referring toFIG. 7, one embodiment of a method700for finding a higher source (HS) volume from which to copy a data track in response to a write is illustrated. Such a method700may be used in association with steps512,514ofFIG. 5. As shown, the method700initially determines702whether the volume (volume x) being written to is a target volume304. If the volume x is not a target volume304, no copy is required as reflected at step704. If the volume x is a target volume304, the method700determines706whether the TBM306of the volume x is set. If the TBM306is not set, no copy is required as reflected at step704. If the TBM306of the volume x is set, the method700finds708the source volume associated with the volume x.

Upon finding708the source volume associated with the volume x, the method700determines710whether the source volume is also a target volume. If not, the method700copies712the data712from the source volume. If the source volume is also a target volume, the method700determines714whether the TBM306of the source volume is set. If the TBM306of the source volume is not set, the method700copies712the data from the source volume (since the source volume contains the desired data). If the TBM306of the source volume is not set, then the method700determines716whether the source volume has a mapping relationship, with a lower generation number (GN), with an upstream source volume.

As will be explained in association withFIG. 8, the generation numbers (GNs) may be used to determine the order in which mapping relationships in the cyclic architecture300were created. In effect, the decision step716determines whether an upstream mapping relationship exists that was created prior in time to the downstream mapping relationship. If not, the method700copies712the data from the source volume. Otherwise, the method700finds708the next upstream source volume and repeats steps710,714,716in the manner previously described. In this way, the method700travels up the cascade until the volume containing the desired data is found. Once found, the method700copies712the data from the volume. The decision step716prevents the method700from circling through the cyclic architecture300multiple times.

Referring toFIG. 8, one example of a cyclic architecture300showing the use of generation numbers (GNs) is illustrated. As shown in the cyclic architecture300ofFIG. 8, a mapping relationship800exists between a source volume (SV)302and a first target volume (TV1)304a, a mapping relationship802exists between the first target volume (TV1)304aand a second target volume (TV2)304b, and a mapping relationship804exists between the second target volume (TV2)304band the source volume302, thereby completing the cycle. Each mapping relationship has associated therewith two GNs—one for the source volume and one for the target volume. Each time a mapping relationship is established with a volume, the generation number on the volume is incremented. Accordingly, by inspecting the generation numbers on a volume, the order in which the mapping relationships were created may be determined. For example, as indicated on the first target volume304a, the mapping relationship800is associated with the GN of “10”, while the mapping relationship802is associated with the GN of “11.” These numbers indicate that the mapping relationship800was created prior to the mapping relationship802.

The following paragraphs describe several non-limiting examples of writes to the cyclic architecture300using the methods illustrated inFIGS. 4 through 7:

Assume that mapping relationships800,802are initially established between the source volume302and the first target volume304a, and the first target volume304aand the second target volume304b, but the mapping relationship804between the second target volume304band the source volume302is not yet established. To perform a write to track1of the second target volume304b, no copy is required since the second target volume304bhas no child. The write is performed to track1of the second target volume304band the TBM306of the second target volume304bis reset. Similarly, to perform a write to track2of the source volume302, the data in track2is copied from the source volume302to the first target volume304aand the TBM306of the first target volume304ais reset (indicating that it now contains the data). The write is then performed to track2of the source volume302.

Assume that a third mapping relationship804is now established between the second target volume304band the source volume302. To perform a write to track3of the source volume302, the data in track3is copied from the source volume302to the first target volume304aand the TBM306of the first target volume304ais reset. The write is then performed to track3of the source volume302. To perform a write to track4of the second target volume304b, no copy is required since the source volume302(the higher source) is the same as the child volume. Although no copy is required, the TBM306of the source volume302is reset. The write is then performed to track4of the second target volume304band the TBM306of the second target volume304bis reset.

To perform a write to track5of the first target volume304a, the data in track5is copied from the source volume302(the higher source) to the second target volume304band the TBM306of the second target volume304bis reset. The write is then performed to track5of the first target volume304aand the TBM306of the first target volume304ais reset. To perform a write to track6of the source volume302, the data in track6is copied from the source volume302to the first target volume304aand the TBM306of the first target volume304ais reset. The write is then performed to track6of the source volume302and the TBM306of the source volume302is reset. The data residing in the first target volume (TV1)304a, second target volume (TV2)304b, and source volume302after all six writes described above is shown inFIG. 9. The values in the TBMs306for each of these volumes are also shown.