Change CRG Primary (CHGCRGPRI)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

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 (30) 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. Set the cluster resource group status to Active if the devices can be successfully switched to the new primary.
  8. 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.
  9. 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:

  1. You must have input/output system configuration (*IOSYSCFG) special authority to run this command.
  2. This command cannot be called from a cluster resource group exit program.
  3. Cluster Resource Services must be started on the node processing the request.
  4. The status of the cluster resource group being switched must be Active.
Top

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
Top

Cluster (CLUSTER)

Specifies the cluster containing the cluster resource group.

This is a required parameter.

name
Specify the name of the cluster.
Top

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.
Top

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.
Top

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.

Top

Error messages

*ESCAPE Messages

CPF1999
Errors occurred on command.
Top