Change CRG Primary (CHGCRGPRI)

The Change Cluster Resource Group Primary (CHGCRGPRI) command performs an administrative switchover of the cluster resource group by changing the current roles of nodes in the recovery domain. The primary point of access for the cluster resource group is changed as follows:

  1. The current primary node is assigned the role of last active backup.
  2. The current first backup is assigned the role of primary.

This command is not valid for peer model cluster resource groups.

If a backup node does not exist in the recovery domain, the switchover will fail. If the first backup is not the desired primary, first use the Change Cluster Resource Group (CHGCRG) command to arrange the backup nodes in recovery domain to the desired order.

This command will cause the cluster resource group exit program to be called with an action code of Switchover on all active nodes in the recovery domain.

When switching over cluster resource groups of different types, the order of switchover is important. Device cluster resource group objects should be done first followed by data cluster resource group objects and finally application cluster resource group objects. If you are changing the primary point of access for a data or a device cluster resource group, you should also ensure that the applications using this data are quiesced.

This command will do the following for all cluster resource group types:

  1. Set the cluster resource group status Switchover Pending.
  2. Call the cluster resource group exit program on all active nodes in the recovery domain with an action code of Switchover, if an exit program is specified for the cluster resource group.
  3. Set the cluster resource group status to Active if the exit program completes successfully.
  4. Set the cluster resource group status to Indoubt if the exit program is unsuccessful and the original state of the cluster resource group cannot be recovered.

This command will do the following for resilient application cluster resource groups:

  1. Cancel the cluster resource group exit program job with a Cancel Job Immediate on the current primary. (Note: The application and exit program code should provide cancel handlers to clean up resources the job uses if it is cancelled).
  2. End the takeover IP interface on the current primary.
  3. Start the takeover IP interface on the new primary.
  4. Start the cluster resource group exit program on the new primary.
  5. Set the cluster resource group status to Active if the TCP/IP address and the cluster resource group exit program job are started.
  6. Set the cluster resource group status to Indoubt if either the TCP/IP address or the cluster resource group exit program job are not started.

This command will do the following for resilient device cluster resource groups:

  1. The configuration objects must exist on all active nodes in the recovery domain and the resource names in the configuration objects must be the same on all active nodes.
  2. The current primary node must own the IOPs or high-speed link I/O bridges for the devices configured in the cluster resource group.
  3. The new primary node must be able to access the IOPs or high-speed link I/O bridges for the devices configured in the cluster resource group.
  4. For the configuration objects specified in the cluster resource group, vary the configuration objects off if they are varied on and end the server takeover IP addresses if they are active on the current primary node. The devices are varied off and moved to the new primary before the exit program is called on the current primary. If any of the devices in the cluster resource group are a primary auxiliary storage pool, all members of the auxiliary storage pool group will be varied off. Before varying the devices off, cluster resource services will attempt to end all jobs which are using auxiliary storage pools configured in the cluster resource group. There are some system server jobs which will not be cancelled. If those server jobs are performing long running operations against data on an auxiliary storage pool, the devices may not vary off and the switchover will fail.
  5. For the configuration objects specified in the cluster resource group, vary the configuration objects on and start the server takeover IP address on the new primary node if the entry in the cluster resource group indicates the configuration objects is to be varied on. If any of the devices in the cluster resource group are a primary auxiliary storage pool, all members of the auxiliary storage pool group will be varied on if the primary specifies the vary on value. The exit program is called on the new primary after the devices are moved to the new primary and varied on.
  6. A separate batch job is submitted to vary each configuration object on or off. The job is submitted to the job queue defined in the job description associated with the command's requesting user profile. The batch subsystem should be defined to allow these batch jobs to run concurrently in order to make switchover as fast as possible.
  7. Cluster Resource Services varies the configuration objects in parallel based on the object type. All configuration objects of the type must either complete the vary (successfully or not) or be in vary pending before configuration objects of the next type are varied. The vary off sequence is *NWSD configuration objects first, followed by *DEVD, *CTLD, *LIND. The vary on sequence is the reverse order, *LIND, *CTLD, *DEVD, and lastly *NWSD configuration objects.
  8. Set the cluster resource group status to Active if the devices can be successfully switched to the new primary.
  9. If the device entry in the cluster resource group indicates the device should be varied on and the vary on or the start of the server takeover IP address fails for some reason, the switchover will not complete successfully. The exit program will be called with an action code of Undo and the devices will be moved back to the original primary node.
  10. If the devices can not be switched to the new primary, then the switchover fails. The exit program will be called with an action code of Undo (15) and the devices will be moved back to the original primary node and/or the role of auxiliary storage pool will be swapped back as before (for cross site mirroring where the new primary node is at a different site than the current primary node).
  11. If the device entry in the cluster resource group indicates the device should be varied on and the vary on or the start of the server takeover IP address fails for some reason, the switchover will not complete successfully. The devices remain on the new primary, and the exit program will be called with an action code dependent data of Configuration Object Online Failure (16). Configuration objects that had successfully varied on will remain varied on.
  12. Set the cluster resource group status to Indoubt if the devices cannot be successfully switched to the new primary node and cannot be returned to the same state on the old primary node.

Restrictions:

Parameters

Keyword Description Choices Notes
CLUSTER Cluster Name Required, Positional 1
CRG Cluster resource group Name Required, Positional 2
EXITPGMDTA Exit program data Character value, *SAME Optional

Cluster (CLUSTER)

Specifies the cluster containing the cluster resource group.

This is a required parameter.

name
Specify the name of the cluster.

Cluster resource group (CRG)

Specifies the cluster resource group.

This is a required parameter.

name
Specify the name of the cluster resource group that is to be switched over.

Exit program data (EXITPGMDTA)

Specifies up to 256 bytes of data that is passed to the cluster resource group exit program when it is called. This parameter may contain any scalar data except pointers. For example, it can be used to provide state information. This data will be stored with the specified cluster resource group and copied to all nodes in the recovery domain. Pointers in this area will not resolve correctly on all nodes and should not be placed in the data. The data specified will replace the existing exit program data stored with the cluster resource group. If blanks are specified, then the exit program data stored with the cluster resource group will be cleared. This parameter must be set to *SAME if no exit program is specified for the cluster resource group.

*SAME
The exit program data stored with the cluster resource group specified will be passed to the exit program.
character-value
Specify the exit program data that will be passed to the cluster resource group exit program.

Examples

CHGCRGPRI   CLUSTER(MYCLUSTER)  CRG(MYCRG)
            EXITPGMDTA('important information')

This command changes the primary point of access for the cluster resource group MYCRG in cluster MYCLUSTER. The role of the current primary node is changed to become the last backup and the role of the current first backup node is changed to become the primary. The resilient resources associated with the cluster resource group are now accessed through the new primary node.

Error messages

*ESCAPE Messages

HAE001E
Primary node of cluster resource group &1 not changed.