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.
How do I know if a disk is mirroring correctly?
Use the CQUERY command. This is the easiest command out, and is simply
CQUERY DEVN(x'nnnn'),
where nnnn is the disk unit address
The possible statuses are -
SIMPLEX not mirrored at all
DUPLEX fully mirrored
SUSPENDED mirroring stopped, but updates to the primary are logged.
PENDING mirroring command issued, but mirroring not finished yet.
How do I set up mirroring from scratch
Obviously, you need 2 disk subsystems, a source and a target, and these must be physically connected by at least one link.
The commands you need to use are
CESTPATH for every path you want to set up
CESTPAIR for every pair of disks you want mirrored
How do I mirroring an extra disk?
You don't need a path, its already defined, so all you need is to issue the CESTPAIR command for the pair of disks
Freeze or suspend, & allow use of secondary volumes
You would use these commands to allow access to the secondary volumes, typically to test out a Disaster Recovery plan. If you're unlucky, you'll get to do it for real!
The starting point, is all the disks mirrored, the end point is your primary disks are in Suspend mode, logging updates, and the secondary disks are in Simplex mode.
The commands you want to issue are -
CGROUP - FREEZE - suspend all IO
Mirroring broken, Source disk writes updates to a
log file. Both disks in mirrored but suspended state,
target disk can't be used.
What actually happens with CGROUP FREEZE depends on how a couple of parameters were set when mirroring was established. The parameters are CESTPATH CGROUP(n/y) and CESTPAIR CRIT(n/y).
If the CGROUP parameter on the CESTPATH command is set to ‘Y’ then the CGROUP FREEZE command will put all the disk subsystems into an extended long busy state and freeze the IO. If CESTPAIR CRIT was also set to ‘Y’ the primiary unit will have a unit check placed on it.
The CGROUP FREEZE command suspends mirroring, so once that is done successfully, then primary disks can be restarted, if that is an appropriate action for your business. The decision point is this, if you really have a disaster developing and you restart the primary disks, then any updates made to the primaries will be lost. However if you do not restart the primary disks and the freeze was caused by a transient error, then you will interrupt your business unnecessarily. As always, the choice is yours. However, the long busy state will automatically time out after two minutes.
CGROUP - RUN - re-enable IO to primaries - no change to config.
CRECOVER - allow use of secondary disks
or possibly
CSUSPEND - suspend all IO
Mirroring broken. Source disk writes updates to a log file.
Both disks in mirrored but suspended state, target disk
can't be used.
CRECOVER - allow use of secondary disks
Once you are finished testing, you need to put mirroring back again. use the
CESTPAIR MODE=RESYNCH
command for this, as long as you have not updated the secondaries. If you have, then you will have to use the
what does this lot mean? Take the second line of the CESTPAIR command
PRIM(x'ssss' nnnnn x'cc' x'll')
ssss is the subsystem id for the logical controller
nnnnn is the serial number of the storage subsystem
cc is the cca address of the logical disk
ll is the logical array number (ESS DASD only)
by the way, a number written as x'nn' is a hexadecimal number
base 16, where numbers 10-15 are represented by the letters
A-F
so how on earth do you find these numbers out?
SSID
z/OS sees this as the controller subsystem ID. You will typically have more than one defined within each storage unit.
use DEVSERV
DS QD,nnnn,1,TYPE=ALL (nnnn is unit address)
UNIT
VOLSER
SCUTYPE
DEVTYPE
CYL
SSID
SCU-SERIAL
DEV-SERIAL
EF-CHK
0300
B20557
3990006
3390A38
3339
7124
XX11-50639
XX11-04680
**OK**
Device Serial Number
This is the serial number of the storage box. Each box has one unique DSN.
use DEVSERV
DS QD,nnnn,1,TYPE=ALL
UNIT
VOLSER
SCUTYPE
DEVTYPE
CYL
SSID
SCU-SERIAL
DEV-SERIAL
EF-CHK
0300
B32067
3990006
3390A38
3339
7704
XX11- 50639
XX11-04680
**OK**
CCA number
The address which uniquely defines a disk to a channel use DEVSERV command
DS P,nnnn
DS P,030A
IEE459I
13.29.22
DEVSERV
PATHS
729
UNIT
DTYPE
M
CNT
VOLSER
CHPID=PATH STATUS
RTYPE
SSID
CFW
TC
DFW
PIN
DC-STATE
CCA
DDC
ALT
CU-TYPE
030A,
33903 ,
O,
000,
CUA30A,
1B=+ 1F=+ 21=+ 37=+ 33=+
9392-1
7704
Y
YY.
YY.
N
SIMPLEX
0A
0A
3990-6
LSS number
A number specific to IBMs ESS storage boxes. It defines a logical storage subsystem. It's the same as the last 2 digits of the array number, which runs from 00 - 0F. If you are using PPRC on a non-ESS subsystem, just miss this parameter off.
LINK address
The address of the fibre channel paths linking the storage subsystems. Each path has an 8 digit hex number consists of the four digit fibre channel adapor in the primary disk system and the four digit fibre channel adapor in the secondary disk system.
for ESCON these are a little more complicated and consist of
the System Adaptor ID, which is '00'
the 2 digit ESCON port number of the source ESS
the 2 digit ESCON address at the target ESS
the LSS number for the storage controller
The Escon port number can be a bit tricky to work out. Remember that you can't just count along the ESCON ports, the numbers are not consecutive. They go