This page is about the Mainframe TSO commands that can be used to manage Metro Mirror between two storage subsystems. When Metro Mirror is running between SVCs, the command set is different.
There are several good IBM manuals which describe the commands used to drive Metro Mirror. Rather than just repeat that information, this page concentrates on what the commands are used for. The available commands are -
|TSO Command||ICKDSF Command||DS CLI Command||Action|
|CESTPATH / CDELPATH||PPRCOPY ESTPATH / DELPATH||mkpprc / mkpprcpath||to define or delete paths between storage subsystems|
|CESTPAIR / CDELPAIR||PPRCOPY ESTPAIR / DELPAIR||rmpprc / rmpprcpath||to define or remove mirrored volumes|
|CGROUP FREEZE||PPRCOPY FREEZE||freezeprc||to freeze mirroring on a group of disks|
|CGROUP RUN||PPRCOPY RUN||unfreezepprc||to re-establish mirroring on a group of disks|
|CQUERY||PPRCOPY QUERY||lspprc||to find out the PPRC mirroring status of a disk.|
|CRECOVER||PPRCOPY RECOVER||rmpprc -at src||to make a mirrored secondary volume available for use|
|CSUSPEND||PPRCOPY SUSPEND||pausepprc||to temporarily suspend mirroring|
|CESTPAIR ACTION(FAILOVER)||PPRCOPY ESTPAIR FAILOVER||failoverpprc||temporarily failover to secondary site, record changes on secondary volumes|
|CESTPAIR ACTION(FAILBACK)||PPRCOPY ESTPAIR FAILBACK||failbackpprc||failback to primary site, copy changed data over to primary volumes|
So what sort of things would you want to do with Metro Mirror, and how would you do them? The following is a list of scenarios and the commands needed to make them happen. Metro Mirror commands are complicated. You need to know the disk serial numbers, Subsystem IDs of logical controllers, and Path ports. The last section gives some tips on how to find these.
Most of the commands below require -dev and -remotedev parameters. These are used to identify disk subsystems and the name is made up up maunufacturer.machine_type-serial_number. For the sake of illustration I'm using IBM.2107-75AK275 for the primary subsystem and IBM.2107-75MG701 for the secondary subsystem.
Mirroring is done by logical subsystem, so '5A' is the primary LSS and '5B' is the secondary LSS.
You will need to substitute your own values for these parameters.
When you run the mkpprcpath command, it does not add new paths onto existing paths. Rather the existing paths are deleted, then your paths are added. This means that if paths already exist and you are adding new ones, you must make sure the existing paths are included in your command. Use the lspprcpath command to check out existing paths.
lspprcpath -fullid 5A 5B
fullid means list out the fully qualified identifiers, and 5A and 5B are the logical subsystems.
The following command will define 4 paths, with details as follows
The source and remote subsystems are as defined above. You also need to define the WWNN of the remote subsystem, which is a 16 digit hex number. The one shown is a typical example. You could use the lssi or showsi command to find out your wwnn number.
the srclss and the tgtlss parameters refer to the logical subsystem IDs at source and remote, in this example, 5A and 5B
Last comes the Fiber Channel Port IDs, in source:target pairs. Each ID consists of I, the 2 digit port enclosure number, the adaptor number and the port number, which results in a number with format Innnn. Each source:target pair must be separated by a colon, with no spaces in between.
mkpprcpath -dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 -remotewwnn 50050A6307FEC268 -srclss 5A -tgtlss 5B I0103:I0103 I0233:I0233 I0503:I0503 I0633:I0633
If you want to know what Fiber Channel links are available, use
lsavailpprcport -dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 -remotewwnn 50050A6307FEC268 -l 5A:5B
To remove all the paths, use the rmpprcpath command
rmpprcpath -dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 -remotewwnn 50050A6307FEC268 5A:5A 5B:5B
The following command with list out the mirroring status of disks 5A01-5AB3. The optional -l switch means display long output.
lspprc -dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 5A01-5AB3:5A01-5AB3
To set up pairs of metro mirroring disks, use the mkpprc command
mkpprc dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 -type mmir -mode full 5A01-5AB3:5A01-5AB3
The type parameter is set to mmir, which is metro mirror (synchronous). The mode full parameter means copy over all the data and make a full new copy at the remote site. The addresses at the end of the command are a source volume range which will be copied to a remote volume range. An equivalent global mirror command is
mkpprc dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 -type gcp -mode nocp -cascade 5A01-5AB3:5A01-5AB3
Here, type gcp is Global Copy (Asynchronous), mode nocp means just establish mirroring but don't do any initial data copying. The assumption is that both local and remote disks are identical. Cascade means that the target volumes are source disks for another Global Copy relationship.
To completely remove mirroring relationships between disks, use the rmpprc command
rmpprc dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 -type mmir -mode full 5A01-5AB3:5A01-5AB3 -quiet
You will normally be prompted with the usual 'are you really sure' messages if you run this command, the optional -quiet switch supresses these messages.
Freeze is used when there is a problem in the primary site. When freeze is issued, no IO is allowed to the primary disks (so applications hang), mirroring is suspended and the mirroring paths are deleted. The command to do this is freezepprc. The equivalent unfreezepprc command allows access to the primary disks again, but mirroring is still suspended. Example commands are:
freezepprc dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 5A:5B unfreezepprc dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 5A:5B
It is possible to temporarily suspend mirroring for a while without affecting live applications. Updates to primary disks are logged and are copied over to the target disks when mirroring is resumed again. The commands to do this are
pausepprc dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 5A01-5AB3:5A01-5AB3 resumepprc dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 5A01-5AB3:5A01-5AB3
Failover means change mirroring so the target volumes become the primaries and the source volumes become the secondaries. The mirroring direction is reversed. Failback is the reverse, except that any changed data on the old target volumes is copied over to the old source volumes, then mirroring is resumed back in the normal direction again. The type is shown as mmir, but it could be gcp.
failoverpprc dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 -type=mmir 5A:5B failbackpprc dev IBM.2107-75AK275 -remotedev IBM.2107-75MG701 -type=mmir 5A:5B