Navigation Bar

Metro Mirror commands and Usage

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.
mirroring a disk
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?


mirroring a 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!
mirroring a disk

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

	CDELPAIR

command for every disk, then the

 
	CESTPAIR MODE=COPY

command to copy all the data over again

Information sources

PPRC commands typically look like


CESTPAIR DEVN(x'0000')                         +       
          PRIM(x'0500'     12669 x'00' x'00')  +     
          SEC(x'0600'       12681 x'00' x'00') +     
          MODE(COPY)                           +       
          CRIT(NO)

CESTPATH DEVN(x'0000')                         +        
           PRIM(x'0500' 2453698267AAAAAA x'00')   +        
           SEC(x'0600'   2453698267AAAAAA x'00')  +        
           CGROUP(YES)                         +        
           LINK(x'00210000' x'00A10000')               

Or, for ESCON links

CESTPATH DEVN(x'0000')                         +        
           PRIM(x'0500'     12669 x'00')       +        
           SEC(x'0600'       12681 x'00')      +        
           CGROUP(YES)                         +        
           LINK(x'00210000' x'00A10000')               

 

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-17704 Y YY. YY. N
SIMPLEX 0A 0A3990-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


	00 01 04 05 08 09 0C 0D 20 21 24 25 28 29 2C 2D
	80 81 84 85 88 89 8C 8D A0 A1 A4 A5 A8 A9 AC AD
	

So the address of the 12th port is not 11 (counting from 00) but 25.

If the volumes are online, you can find the ESCON addresses, by using the ICKSDF command

  
	//DISK     DD UNIT=DISK,VOL=SER=xxxxxx,DISP=OLD  
  	//SYSIN    DD *                                  
    	ANALYZE DDNAME(DISK) NOSCAN NODRIVETEST
or simply
	ANALYZE UNIT(A000) NOSCAN NODRIVETEST 

if the disk is offline
look for E/A or E/B, which are the peer to peer ESCON relationships, and you will see
             22    | E/B    | 21      | 0000
           --------+--------+---------+---------
            449    | E/B    | A1      | 0000

Which tells you the link addresses are X'00210000' and X'00A10000'

back to top


Copyright © Lascon Storage Ltd. 2000 to present date. By entering and using this site, you accept the conditions and limitations of use