How to configure geographic mirroring between two nodes
This post explains how to configure a basic two-node geographic mirroring environment within Skytap with an example. One of the best guides I have found for geographic mirroring is IBM PowerHA SystemMirror for i: Using Geographic Mirroring.
With the increasing business demands for application availability, enterprises are looking for a solution that can help eliminate planned and unplanned downtimes for their IT services. An unplanned outage that exceeds business expectations in duration or recovery time can have severe implications, including unexpected loss of reputation, customer loyalty, and revenue. To address client needs for High Availability (HA) for IBM i environments, IBM provides IBM PowerHA SystemMirror for i (PowerHA).
PowerHA provides a data and application resiliency solution that is an integrated extension of IBM i operating system and storage management architecture for both planned and unplanned outages. PowerHA geographic mirroring offers a straightforward, cost-effective, HA solution for small and mid-sized clients.
Before you begin
Prior to configuring and testing a new geographic mirroring environment, we strongly recommend that you perform the following tasks:
- Make sure all current PTFs related to PowerHA, clustering, and geographic mirroring are installed on both systems.
- Use the Planning Checklist for Clusters from the IBM Knowledge Center.
- Make sure a secondary disk is attached to both primary and backup virtual machines (used by IASP)
Configuring geographic mirroring
To configure geographic mirroring using IBM Navigator for i, follow the steps below in a browser.
In a web browser, create a session with the URL mysystem:2001, where mysystem is the hostname of the system.
Note: This post shows the configuration steps for IBM green screen (5250 terminal).
- From the primary node, create a cluster and define nodes with the following command string:
CRTCLU CLUSTER(<ClusterName>)) NODE((<PrimaryNodeName> (<PrimaryNode_IP_Interface>)) (<BackupNodeName> (<BackupNode_IP_Interface>))
CRTCLU CLUSTER(GEOCLU) NODE((PRIMARY(10.x.x.x)) (BACKUP(10.x.x.x)))
Note: The example shows private network IP schemes but these are not required.
- After the cluster is created and nodes are defined for it, you can start the cluster. From the primary node, type the following command strings:
STRCLUNOD CLUSTER(GEOCLU) NODE(PRIMARY)
STRCLUNOD CLUSTER(GEOCLU) NODE(BACKUP)
- Before you continue, check the previous work. Ensure both nodes are active by using the DSPCLUINF command, or WRKCLU, Opt.6.
Step 2 – Add nodes to device domain (ADDDEVDMNE)
- Perform the following from the primary node (not required, but recommended for consistency):
ADDDEVDMNE CLUSTER(GEOCLU) DEVDMN(<DomainName>) NODE(PRIMARY)
ADDDEVDMNE CLUSTER(GEOCLU) DEVDMN(<DomainName>) NODE(BACKUP)
ADDDEVDMNE CLUSTER(GEOCLU) DEVDMN(GEODOM) NODE(PRIMARY)
ADDDEVDMNE CLUSTER(GEOCLU) DEVDMN(GEODOM) NODE(BACKUP)
- Before you continue, check the previous work. Ensure both nodes show they are part of the device domain, using the DSPCLUINF command, or WRKCLU, Opt 7.
Step 3 – Create independent ASP (CFGDEVASP).
(This is also referred to as an Independent Disk Pool.)
- Create the IASP from a command line interface from the primary node:
CFGDEVASP ASPDEV(<IASP_Name>) ACTION(*CREATE) TYPE(*PRIMARY) PROTECT(*NO) ENCRYPT(*NO) UNITS(*SELECT)
CFGDEVASP ASPDEV(GEOIASP) ACTION(*CREATE) TYPE(*PRIMARY) PROTECT(*NO) ENCRYPT(*NO) UNITS(*SELECT)
- Specify the name of the IASP here. A device description by the same name will be created on the primary node.
- If specifying UNITS(*SELECT), it will be prompt with a list of non-configured disks to add to the IASP.
- Create the device description for the IASP on the backup node in the cluster. The device description is automatically created only on the node where the IASP was initially configured or created.
Step 4 – Create IASP Device Description on Target Node (CRTDEVASP)
- On the backup node type the following command string:
CRTDEVASP DEVD(<IASP_DeviceName>) RSRCNAME(<IASP_Name>)
CRTDEVASP DEVD(GEOIASP) RSRCNAME(GEOIASP)
Step 5 – Create the Device CRG (Cluster Resource Group), but do NOT start the CRG yet (CRTCRG)
- Perform the following on the primary node (not required, but recommended for consistency):
CRTCRG CLUSTER(GEOCLU) CRG(<DevCRGName>) CRGTYPE(*DEV) EXITPGM(*NONE) USRPRF(*NONE) RCYDMN((PRIMARY *PRIMARY *LAST <PrimarySiteName> (<DataPort_IP_Address>)) (BACKUP *BACKUP 1 <BackupSiteName> (<DataPort_IP_Address>))) CFGOBJ((GEOIASP))
CRTCRG CLUSTER(GEOCLU) CRG(GEOCRG) CRGTYPE(*DEV) EXITPGM(*NONE) USRPRF(*NONE) RCYDMN((PRIMARY *PRIMARY *LAST PRIMARY (10.x.x.x)) (BACKUP *BACKUP 1 BACKUP (10.x.x.x)) CFGOBJ((GEOIASP))
- The above example assumes the IASP production copy will initially and preferably be owned by node PRIMARY, with node BACKUP owning the mirror copy of the IASP.
- The Data Port IP addresses listed above are examples. We recommend that you use different IP addresses than what is being used for clustering to avoid problems with cluster communications.
Step 6– Configure Geographic Mirroring (CFGGEOMIR)
- Prior to performing the steps below, do a quick spot check to ensure the following statements are true:
- Both nodes in the cluster are Active.
- Job QHASVR is Active on both nodes (Error HAE2029 is a sign of an inactive job).
- The Device CRG is Inactive.
- The IASP *DEVD exists on both nodes.
- The IASP is varied off on the source node (and has not been configured with geomirror on target yet).
Important: The IASP must be varied off before Geographic Mirroring can be configured.
- To configure geographic mirroring through the command line interface from the primary node:
CFGGEOMIR ASPDEV(GEOIASP) ACTION(*CREATE) SRCSITE(*) TGTSITE(*) SSN(Site2_Copy>/<Site1_Copy>/<SessionName>) DELIVERY(*SYNC) UNITS(*SELECT) CLUSTER(*) CRG(*) MODE(*SYNC) PRIORITY(*HIGH)
CFGGEOMIR ASPDEV(GEOIASP) ACTION(*CREATE) SRCSITE(*) TGTSITE(*) SSN(BACKUP/PRIMARY/GEOSSN) DELIVERY(*SYNC) UNITS(*SELECT) CLUSTER(*) CRG(*) MODE(*SYNC) PRIORITY(*HIGH)
- If there are only two site names in the CRG recovery domain, you don’t need to specify names for the SRCSITE or TGTSITE.
- Specify the ASP session name, along with the two ASP copy description names. These are created automatically with the command. Note the order of those values in the SSN parameter.
- When specifying *SELECT for the UNITS parameter, you will be prompted to select from a list of non-configured disk units on the target site (backup node).
- The example above uses DELIVERY(*SYNC) and MODE(*SYNC). This can be modified to suit your needs (it can also be modified later via the CHGASPSSN command).
Step 7 – Start the CRG (STRCRG)
- Type the following command string:
STRCRG CLUSTER(<Cluster Name>) CRG(<CRG Name>)
STRCRG CLUSTER(GEOCLU) CRG(GEOCRG)
Step 8 – Vary on the IASP (VRYCFG)
- Type the following command string:
VRYCFG CFGOBJ(<Name of IASP>) CFGTYPE(*DEV) STATUS(*ON)
Step 9 – Start the ASP session (DSPASPSSN)
(Starting the asp session creates the session)
You’re now good to go with a fully functional, cloud-based IBM i Geographic mirroring set up and running in Skytap!