Abstract:
An apparatus operable with a host and at least first and second data storage for avoiding overwriting of a stored data item in the second data storage by a copy services system is provided. The apparatus includes a storage use analyzer for determining the availability of the second data storage. A copy services requester communicates with the host to receive a request to establish a copy services relationship, using the second data storage as a target data storage. A request blocking and passing component passes the request to establish a copy services relationship using the second data storage as the target data storage, responsive to a positive determination of availability of the second storage. The request blocking and passing component may also block the request responsive to a negative determination of availability of the second data storage.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1. Field of the Invention  
         [0002]     The present invention relates to controlling data copy services in data storage systems, and more particularly, to protecting data in data storage systems from the effects of erroneous establishment of copy services relationships.  
         [0003]     2. Background Information  
         [0004]     The expression “data copy services” refers to the set of services made available in advanced storage systems to provide facilities for allowing either real or virtual copies of data to be made and maintained for various purposes. These purposes may include backup, recovery, and providing “true-to-life” samples of data for the testing of applications, and the like.  
         [0005]     Some examples of data copy services are mirroring and point-in-time copying. Mirroring is a well-known technique for improving reliability of disk-based storage subsystems. Peer-to-Peer Remote Copy (PPRC), also known as Remote Copy or Remote Mirroring, is a form of mirroring in which one disk is maintained at a distance from the other, and can be made accessible in the case of a failure of the first. Mirroring provides continuing service in case of a large scope failure. An example of a system that embodies the PPRC principles in their synchronous form, is the IBM® Metro Mirror function.  
         [0006]     Point-in-time copying provides a virtual image of the contents of a storage system at a particular point in time. When the point-in-time copy relationship is started, data is not initially physically copied from a source storage to a target storage. Instead, any reads directed to the target storage are transparently satisfied from the source storage. Over a period of time, data may be physically copied from the source to the target as a background activity, and, in addition, any existing data that is to be modified at the source will be transferred to the target prior to the modification taking effect at the source.  
         [0007]     Copy service functions, such as FlashCopy® (FlashCopy is a registered trademark of the IBM Corporation, Armonk, NY) or Peer-to-Peer Remote Copy (PPRC) provide the ability to create a copy of an existing volume of data storage. Configuration of these functions in systems such as data storage systems like the SAN Volume Controller®, sold by the IBM Corporation, requires the specification of a target volume to receive the copy of the data.  
         [0008]     If the wrong target volume is specified, then a disk that contains valuable data might be misconfigured to act as the target to receive the copy. Unless this error is detected quickly, this can lead to the corruption and loss of the data. Corruption or loss of the data would require recovery from a backup medium.  
         [0009]     In certain operating system environments, it is possible to identify that a volume is in use through use of defined protocols. However, in Open Systems environments, which include many those that use SCSI protocols, no such explicit mechanism exists.  
         [0010]     Thus, it would be desirable to provide an apparatus and method for protecting data in data storage systems from the effects of erroneous establishment of copy services relationships.  
       SUMMARY OF THE INVENTION  
       [0011]     An embodiment of the present invention provides an apparatus operable with a host and at least first and second data storage for avoiding overwriting of a stored data item on the second data storage by a copy services system. The apparatus includes a storage monitor for monitoring use of the second data storage and a storage component for retaining one or more use indicators from the storage monitor.  
         [0012]     The apparatus also includes a storage use analyzer. The storage use analyzer analyzes the use indicators to make a positive or a negative determination of availability of the second storage.  
         [0013]     The invented apparatus further includes a copy services requester. The copy services requester communicates with the host to receive a request to establish a copy services relationship using the second data storage as a target data storage.  
         [0014]     A request blocking and passing component is provided for passing the request to establish a copy services relationship using the second data storage as the target. The request blocking and passing component passes the request to the second storage responsive to a positive determination of availability of the second storage. The request blocking and passing component blocks the request responsive to a negative determination of availability of the second storage. Preferably, the request blocking and passing component is further operable to return a request naming a further potential target storage responsive to the negative determination of availability of the second storage.  
         [0015]     In an embodiment of the apparatus, the copy services relationship may comprise one of a point-in-time copy relationship, a local mirror copy relationship, and a remote mirror copy relationship. The use indicator may be derived from at least one of an I/O count over time, a volume allow/suppress indicator, a volume reservation indicator, and a SCSI service task performance indicator. In a preferred embodiment, the use indicator is derived from data collected over a configurable time-period.  
         [0016]     In a second aspect, the present invention provides a method for avoiding overwriting of a stored data item in a second data storage by a copy services system. The method comprises providing a host and at least a first and a second data storage. Monitoring use of the second data storage. Retaining one or more use indicators from a storage monitor. Analyzing the one or more use indicators to make a positive or a negative determination of availability of the second data storage. Receiving a request to establish a copy services relationship using the second data storage as a target data storage. Passing the request to establish a copy services relationship using the second data storage as the target data storage responsive to a positive determination of availability of the second storage. The method may further comprise the step of blocking the request responsive to a negative determination of availability of the second data storage.  
         [0017]     The method may also comprise the step of returning, by the request blocking and passing component, a request naming a further potential target storage responsive to the negative determination of availability of the second storage.  
         [0018]     In a third aspect, there is provided a data carrier having functional data thereon, the functional data comprising functional computer data structures to, when loaded into a computer system and operated upon thereby, enable the computer system to perform all the steps of a method according to the second aspect.  
         [0019]     In a fourth aspect, there is provided a computer program comprising computer program code to, when loaded into a computer system and executed thereon, cause the computer system to perform all the steps of a method according to the second aspect.  
         [0020]     Preferred embodiments of the invention thus contemplate, in their broadest aspect, a technical framework for monitoring which volumes are receiving read or write I/O in a given period of time. If any such volume is designated as the target for a copy service relationship, and has received I/O in the recent period of time, the attempt to configure the copy service relationship is rejected, on the grounds that the disk is in use.  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0021]     The objects and features of the present invention, which are believed to be novel, are set forth with particularity in the appended claims. The present invention, both as to its organization and manner of operation, together with further objects and advantages, may best be understood by reference to the following description, taken in connection with the accompanying drawings, in which:  
         [0022]      FIG. 1  shows in schematic form an apparatus in accordance with a preferred embodiment of the present invention.  
         [0023]      FIG. 2  shows in flowchart form one method or one logic arrangement in which a method of operation according to a preferred embodiment of the present invention may be implemented.  
     
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0024]     The following description is provided to enable any person skilled in the art to make and use the invention and sets forth the best modes presently contemplated by the inventors of carrying out the invention. Various modifications, however, will remain readily apparent to those skilled in the art, since the generic principles of the present invention have been defined herein.  
         [0025]     Referring to  FIG. 1  of the drawings, there is shown, in schematic form, an apparatus in accordance with a preferred embodiment of the present invention. The invented apparatus includes a copy services controller  100 , operatively connected to a host  200  and to a copy services source  210 . Copy services controller  100  is also connected in operation with a copy services target  160 . Copy services source  210  may comprise a first data storage and copy services target  160  may comprise a second data storage. Each data storage may comprise one or more data storage volumes.  
         [0026]     Within copy services controller  100 , storage component monitor  110  monitors the use of copy services sources and targets, such as copy services source  210  and copy services target  160 . Storage monitor  110  also stores use indicators in indicator storage  115  in order to provide information pertaining to storage use analyzer  120 . Storage use analyzer  120  analyzes use indicators from indicator storage  115  to supply analyzed storage use information to request blocker/passer  130 .  
         [0027]     In operation, host  200  may be instructed by a user, or an application, to establish a copy services relationship using copy services source  210  as the source, for example. The copy services target  160  is a potential target for this relationship. Host  200  requests the establishment of a relationship by copy services controller  100  via copy services requester  140 . The copy services requester  140  passes the request to request blocker/passer  130 . The request blocker/passer  130  ascertains, from information received from storage use analyzer  120 , whether copy services target  160  is in fact available for use as a copy services target for this relationship, based on the analysis of its use that has been recorded.  
         [0028]     If copy services target  160  is available for use, blocker/passer  130  passes the request, and copy services controller  100  establishes the copy services relationship. If copy services target  160  is not available for use, request blocker/passer  130  may block the request. If the request blocker/passer  130  blocks a request, it will be clear to one of ordinary skill in the art that various alternative measures are available to a system designer.  
         [0029]     For example, a failure may be returned to the host system to allow it to determine an alternative course of action, such as failing back the original request for the relationship to be established. In one alternative, the host system, on receiving a failure indicator, may select an alternative copy services target. In one alternative, the copy services controller  100  may avoid failing the host request and may itself attempt to establish an alternative copy services target to satisfy the request.  
         [0030]     In a most preferred embodiment, the copy services controller  100  monitors I/O received by each configured data storage volume. Specifically, the copy services controller  100  monitors I/O received by each configured data volume to determine if any read or write I/O has been received by a volume from any host system in a defined period of time. The defined time period may be 1 minute, for example. This information is used to govern the processing of commands that create new copy services relationships. Any attempt to create a new relationship is rejected if the data storage volume target has received any I/O over the defined time period.  
         [0031]     In an alternative embodiment, it may be possible to configure the defined time period that a volume must be idle before considering it safe to be the target of a copy services function. Configuring the defined time period may be advantageous in potentially reducing the number of “false positive” assessments of a data storage volume&#39;s “in-use” status in certain circumstances such as when it is known that certain data storage volumes are frequently used for short-lived storage needs and may have accumulated “residual” I/O statistics over a period that may incorrectly indicate that they are not available for use as targets, configuring the defined time period may reduce the number of “false positive” assessments in these data storage volumes.  
         [0032]     In another embodiment, selectively applying or suppressing the action of the copy services controller  100  on specified data storage volumes may be applied. Selectively applying or suppressing the actions of the copy services controller  100  may allow for those volumes that are managed by automated scripts. In these instances the scripts are responsible for coordinating host I/O activity with configuration activity, and where a timeout period that would be appropriate for monitoring human user I/O activity would be inappropriate.  
         [0033]     Alternative techniques for identifying current host activity, such as identifying the existence of a reservation, a persistent reservation, or an indication of recent processing of other SCSI Tasks, such as Test Unit Ready, are also possible, though the monitoring of host I/O activity is presently the most preferred embodiment.  
         [0034]     The preferred embodiment of the present invention in the form of an apparatus thus advantageously addresses the problem of protecting data in data storage from the effects of erroneous establishment of copy services relationships.  
         [0035]     Referring to  FIG. 2 , there is shown a flowchart of a method, or logic arrangement, of a preferred embodiment of the present invention. The method of the invention commences at START step  200 . At step  202  the use of storage data volumes (or any other selected unit, as will be appreciated by one of ordinary skill in the art) is monitored, and at step  204 , an indicator of any recent storage use (I/O counts, I/O frequencies over time, or the like) is retained. The retention may take the form of saving to non-volatile storage, for example, on a disk storage device, or it may take the form of saving to volatile storage, such as RAM storage.  
         [0036]     Responsive to receipt of a copy services request to start a relationship at step  206  specifying a potential target data storage volume, a query is issued at step  208  to determine the availability of the potential target volume for use as a target of this relationship. If at step  208  the indicator that was retained at step  204  shows no recent target use that would render the potential target volume not available for use as a target volume, the request to start the relationship using that target is honored at step  210 . The method or operation of the logic arrangement then returns to monitoring step  202  and continues.  
         [0037]     If at step  208  the indicator that was retained at step  204  shows recent target use that would render the potential target volume not available for use as a target, the request to start the relationship using that target is blocked at step  214 . In a most preferred embodiment, a request specifying an alternative target is created at step  214 , and the process returns to query step  208  for the newly-specified potential target. The method or operation of the logic arrangement concludes at END step  216 .  
         [0038]     The preferred method of the present invention advantageously addresses the problem of protecting data in data storage from the effects of erroneous establishment of copy services relationships.  
         [0039]     It will be clear to one of ordinary skill in the art that all or part of the method of the preferred embodiments of the present invention may suitably and usefully be embodied in a logic apparatus, or a plurality of logic apparatus, comprising logic elements arranged to perform the steps of the method and that such logic elements may comprise hardware components, firmware components or a combination thereof.  
         [0040]     It will be equally clear to one of skill in the art that all or part of a logic arrangement according to the preferred embodiments of the present invention may suitably be embodied in a logic apparatus comprising logic elements to perform the steps of the method, and that such logic elements may comprise components such as logic gates in, for example a programmable logic array or application-specific integrated circuit. Such a logic arrangement may further be embodied in enabling elements for temporarily or permanently establishing logic structures in such an array or circuit using, for example, a virtual hardware descriptor language, which may be stored and transmitted using fixed or transmittable carrier media.  
         [0041]     It will be appreciated that the method and arrangement described above may also suitably be carried out fully or partially in software running on one or more processors (not shown in the figures), and that the software may be provided in the form of one or more computer program elements carried on any suitable data-carrier (also not shown in the figures) such as a magnetic or optical disk or the like. Channels for the transmission of data may likewise comprise storage media of all descriptions as well as signal-carrying media, such as wired or wireless signal-carrying media.  
         [0042]     The present invention may further suitably be embodied as a computer program product for use with a computer system. Such an implementation may comprise a series of computer-readable instructions either fixed on a tangible medium, such as a computer readable medium, for example, diskette, CD-ROM, ROM, or hard disk, or transmittable to a computer system, via a modem or other interface device, over either a tangible medium, including but not limited to optical or analogue communications lines, or intangibly using wireless techniques, including but not limited to microwave, infrared or other transmission techniques. The series of computer readable instructions embodies all or part of the functionality previously described herein.  
         [0043]     Those skilled in the art will appreciate that such computer readable instructions can be written in a number of programming languages for use with many computer architectures or operating systems. Further, such instructions may be stored using any memory technology, present or future, including but not limited to, semiconductor, magnetic, or optical, or transmitted using any communications technology, present or future, including but not limited to optical, infrared, or microwave. It is contemplated that such a computer program product may be distributed as a removable medium with accompanying printed or electronic documentation, for example, shrink-wrapped software, pre-loaded with a computer system, for example, on a system ROM or fixed disk, or distributed from a server or electronic bulletin board over a network, for example, the Internet or World Wide Web.  
         [0044]     In an alternative embodiment, the preferred embodiment of the present invention may be realized in the form of computer implemented method of deploying a service comprising steps of deploying computer program code operable to, when deployed into a computer infrastructure and executed thereon, cause the computer system to perform all the steps of the method.  
         [0045]     It will be clear to one skilled in the art that many improvements and modifications can be made to the foregoing exemplary embodiment without departing from the scope and spirit of the present invention.