ShadowImage from HDS

ShadowImage for z/OS

The HDS terminology for a disk is a Logical Volume Image (LVI). ShadowImage volumes are called P-VOLs and S-VOLs, for Primary and Secondary (Older documentation might show S-VOL annd T-VOL, for Source and Target).

When the pair establish command is issued, data is physically copied from the P-VOL to the S-VOL. You cannot access the S-VOL, even after the copy is complete, until you issue a "Split" command. Once the Split command is issued, the S-VOL can be brought on-line to a different LPAR, and read or updated. T0, or the point-in-time of the copy is at the moment the split command is issued. The P-VOL and S-VOL remain paired and the S-VOL is kept updated with changed data until the split command is issued, but ShadowImage updates the S-VOLs asynchronously, so the data on a S-VOL may not be identical with its P-VOL, even if the pair are in duplex status. When you run the split command, ShadowImage will copy over any remaining tracks to get the volumes identical to the split time. If you use the delete command to break the relationship, the two disks might not be identical.
The disk subsystem keeps a record of changed tracks on both the P-VOL and the S-VOL in 2 independent bit maps, so the S-VOL can be re-synchronised with the P-VOL later, by just copying over changed tracks.

It is possible to take three S-VOL copies from each P-VOL, though each S-VOL can be in a relationship with only one P-VOL.
It is also possible to define a cascade configuration, where each S-VOL can replicate to a further pair of S-VOLS. The original P-VOL becomes the 'root' and the original S-VOLs are 'nodes'. Nodes are effectively both S-VOLs in the original configuration, and P-VOLS to the third level images, which are called 'leafs'. This effectively extends the number of potential image volumes from 3 to 9.

The main states a ShadowImage pair can have are

  • Simplex (SMPL) - The disks are not in a pair relationship
  • Pending (COPY(PD)/COPY) - An initial copy is in progress (Initial Copy and other commands are explained later)
  • Duplex (PAIR) - The initial copy is complete
  • Split (PSUS) - The S-VOL is split from the P-VOL, and is a consistent copy. The disk subsystem continues to record updates for later synchronisation
  • SP-Pending (COPY(SP)/COPY) - Steady Split in progress, the status will change to Split when updates to the S-VOL are complete.
  • V-split (PSUS(SP)/PSUS) - Quick Split in progress, the status will change to Split when updates to the S-VOL are complete.
  • Suspend (PSUE) - Stop recording changed track information.
  • Resynch (COPY(RS)/COPY) - Re-synchronisation operation in progress. For a Quick Resynch, this is just the time to copy over the changed track bitmap.
  • Resynch-R (COPY(RS-R)/COPY - Reverse re-synchronisation operation in progress. For a Quick Restore, this is just the time to copy over the changed track bitmap. The P-VOL is unusable while a Resynch is active.

ShadowImage Operations

You perform ShadowImage operations with the Remote Console-Storage Navigator, which is a GUI based tool, or with TSO commands. If you use the GUI, you need to put intended S-VOLs into Reserved status. You do this from the Set Reserve Attribute Panel. If you use PPRC commands, you do not need to reserve the volumes, but they must be varied offline. The following operations are available with the z/OS variant of ShadowImage

Create Pair

This command defines a new relationship between an P-VOL and up to three S-VOLs. All volumes must be in simplex state. The command also copies all data on the P-VOL to the associated S-VOL(s). The Create Pair command should be transparent to any other process accessing the P-VOL, all read and write I/O operations proceed as normal. Any writes sent to the P-VOL while the initial copy is happening are recorded, and then replicated to the S-VOL after the initial copy is complete.

Once the initial copy is complete, and while the disks are still in Duplex status, The VSP will periodically update the S-VOL(s) with changed data from the P-VOL. This is not a synchronous operation.

You use the TSO command CESTPAIR .. MODE(COPY) to add a shadowimage pair.

Split Pair

When the split pair command is issued to a duplexed pair, the S-VOL becomes a point-in-time copy of the P-VOL. If there are any S-VOL write I/Os outstanding at that time, they are processed. The P-VOL, of course, continues to work as normal, and is not affected by the split command. The S-VOL can now be mounted and brought on-line to a different LPAR, and read or updated as required. While the pair is split, write I/Os made to either the P-VOL or the S-VOL after the Split command are recorded in the track-map for future resynchronisation. Its possible to do the Add and Split commands in a single step.

There are three variants of split; Non Split, Quick Split and Steady Split. With Quick Split, the S-VOL is available immediately, and pending writes happen in the background. With Steady Split, pending writes must complete before the S-VOL can be used.
ShadowImage supports Consistency Groups, where a number of volumes are grouped together to be treated as an entity during operations. For example, a consistency group split will split all the volumes in the group at the exact same point in time.

The CSUSPEND TSO command allow you to split volume pairs.

Resynchronize Pair

There are four different variations of the Resynchronise pair operation, Normal, Quick, Reverse and Quick Restore. You can perform normal/quick resync operations on split and suspended pairs, but reverse resync operations can only be performed on split pairs. The four operations in detail are -

  • A Normal resynch command makes the S-VOL a copy of the P-VOL again. The S-VOL is inaccessible to all hosts, but the P-VOL is not affected.
    If a suspended pair is re-synchronised, all the data is copied from the P-VOL to the S-VOL. If a split pair is re-synchronised, the 9900V copies all data changed at the P-VOL since the split command was issued from the P-VOL to the S-VOL and also copies over any data changed on the S-VOL, with the original data from the P-VOL.
  • A Quick resync operation just copies over the differential data map from the P-VOL to the S-VOL. The actual data is copied over later as an update copy. The S-VOL cannot be accessed while the Quick Resynch is in progress, but the P-VOL is not affected.
  • A Reverse resync operation synchronizes the P-VOL with the S-VOL. While the reverse-resynch operation is in progress, neither the S-VOL or the P-VOL are accessible, but the P-VOL is available as soon as the reverse resync operation is complete, that is, as soon as all the changed data is copied over. This command applies to split pairs only, not suspended pairs.
  • A Quick Restore just merges and copies over the changed tracks bitmap from the S-VOL to the P-VOL. The data is actually copied over later. A quick restore also swaps over the RAID levels between the two disks if they were different.

You use the TSO command CESTPAIR .. MODE(RESYNCH) for this.

Suspend Pair

The Suspend Pair command stops the disk subsystem from recording changed tracks in memory. This means that if the pair is re-synchronised again, all the data must be copied from the P-VOL to the S-VOL. The disk subsystem will automatically suspend a pair if it has problems with the mirroring. The P-VOL is not affected if a pair is suspended. Suspend Pair is a ShadowImage concept, and so there is no equivalent PPRC command. The CSUSPEND command is the equivalent of a ShadowImage split.

Delete Pair

The Delete Pair command sets the P-VOL and S-VOL status both the simplex, and discards any pending updates to the S-VOL. This means that the S-VOL may not be in the status you require, so its best to do a Split before a Delete Pair, to get the S-VOL consistent. The S-VOL is not available for write operations until the reserve attribute is reset.

You use the TSO command CDELPAIR to delete a shadowimage pair.

HDS support the full IBM FlashCopy command set with their FlashCopy Extension. See the Flashcopy page for details of the FlashCopy commands. With the ShadowImage FlashCopy feature you can take up to six copies of the original ShadowImage source volume.

HDS recently released Hitachi Dataset Replication Software, which enhances Shadowimage to allow replication at dataset level.

back to top

Open systems ShadowImage

You control Open Systems volume copy using ShadowImage Command Control Interface (CCI) commands embedded in scripts. The exact format of the script will depend on the operating system. CCI commands need a configuration definition file, which contains lists of hosts and the volumes pairs or groups of volumes associated with each host. An example of part of a configuration file to define two volumes in a group sqldb is

The following CCI commands are available

  • Paircreate: You can either create single volume pairs or groups of pairs. You can specify the copy direction by using the -vl or -vr parameters; -vl means the server that issues the command has the primary volume, -vr means the remote server has the primary volume. Another parameter, -split, means split the pair as soon as the copy completes. This lets you create a point-in-time copy with a single command. The three examples below will create all pairs in volume group sqldb with replication going from local to remote (-vl); with replication going from remote to local (-vr) and create pairs in a consistency group (-m grp)

    paircreate -g sqldb -vl
    paircreate -g sqldb -vr
    paircreate -g sqldb -vl -m grp

  • Pairsplit: This command stops the background updates to the secondary volume of a pair. You can either suspend the pair, or delete it and place both disks in simplex status. The following example puts all volumes in simplex status, and allows read-write access to the secondary.

    pairsplit -g sqldb -rw -s

  • Pairresynch: Take a suspended pair, and make the secondary volume an image of the primary again, by copying over the updates made to the primary, and overwriting any updates made to the secondary disk with the original data from the primary disk. If you chose the -restore option, then the primary disk is made an image of the secondary. In this case, the primary disk is inaccessable until the resynch is complete. There are lots of different options for the pairresynch command. In the example below, the primary volumes are being re-synchronised from the secondaries.

    pairresync -g sqldb -restore

  • Pairevtwait: This pauses the script while it waits for a long running command to complete, then checks the pair status. The example below queries all volumes in the sqldb group, and waits for 10 seconds, or until the status of all volumes is pair (duplex).

    pairevtwait -g sqldb -s pair -t 10

  • Pairdisplay: You use this one to display the pair status to see if it is what you expected it to be. An example is

    pairdisplay -g sqldb

    ShadowImage can be used with Thin Provisioning disks, to make a very cost effective way to make copies of data.
    ShadowImage can also work with TrueCopy to create copies of disks in remote sites