Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Create Cluster Resource Group (CRTCRG) command creates a cluster resource group object. The cluster resource group serves as the control object for a collection of resilient resources. It identifies a recovery domain, which is a set of nodes in the cluster that will play a role in the recovery. Additional characteristics for the cluster resource group, such as the exit program that will be called to perform resource specific processing. The cluster resource group exit program will be called with an action code of Initialize after each group has been created on each node in the recovery domain, if an exit program is specified for the cluster resource group. Successful completion of this command results in a new job started in the QSYSWRK subsystem. This job has the same name as the name of the cluster resource group being created.
To change attributes of the cluster resource group use the Change Cluster Resource Group (CHGCRG) command.
This command will do the following:
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
CLUSTER | Cluster | Name | Required, Positional 1 |
CRG | Cluster resource group | Name | Required, Positional 2 |
CRGTYPE | Cluster resource group type | *DATA, *APP, *DEV, *PEER | Required, Positional 3 |
EXITPGM | CRG exit program | Single values: *NONE Other values: Qualified object name |
Required, Positional 4 |
Qualifier 1: CRG exit program | Name | ||
Qualifier 2: Library | Name | ||
USRPRF | User profile | Simple name, *NONE | Required, Positional 5 |
RCYDMN | Recovery domain node list | Values (up to 128 repetitions): Element list | Required, Positional 6 |
Element 1: Node identifier | Name | ||
Element 2: Node role | *CRGTYPE, *PRIMARY, *BACKUP, *REPLICATE, *PEER | ||
Element 3: Backup sequence number | Integer, *LAST | ||
Element 4: Site name | Name, *NONE | ||
Element 5: Data port IP address |
Single values: *NONE Other values (up to 4 repetitions): Character value |
||
TKVINTNETA | Takeover IP address | Character value | Optional, Positional 7 |
EXITPGMFMT | Exit program format name | EXTP0100, EXTP0200 | Optional |
EXITPGMDTA | Exit program data | Character value, *NONE | Optional |
CRGMSGUSRQ | Distribute info user queue | Single values: *NONE Other values: Qualified object name |
Optional |
Qualifier 1: Distribute info user queue | Name | ||
Qualifier 2: Library | Name | ||
CFGINTNETA | Configure takeover IP address | Single values: *CRS Other values: Element list |
Optional |
Element 1: Responsibilities | *USR | ||
Element 2: Allow active IP address | *NO, *YES | ||
JOB | Job | Name, *JOBD | Optional |
ALWRESTART | Allow application restarts | *NO, *YES | Optional |
NBRRESTART | Number of application restarts | 0-3, *NONE | Optional |
CFGOBJ | Configuration object list | Values (up to 256 repetitions): Element list | Optional |
Element 1: Configuration object | Name, *NONE | ||
Element 2: Configuration object type | *DEVD | ||
Element 3: Configuration object online | *OFFLINE, *ONLINE, *PRIMARY | ||
Element 4: Server takeover IP address | Character value, *NONE | ||
TEXT | Text 'description' | Character value, *BLANK | Optional |
FLVMSGQ | Failover message queue | Single values: *NONE Other values: Qualified object name |
Optional |
Qualifier 1: Failover message queue | Name | ||
Qualifier 2: Library | Name | ||
FLVWAITTIM | Failover wait time | Integer, *NOWAIT, *NOMAX | Optional |
FLVDFTACN | Failover default action | *PROCEED, *CANCEL | Optional |
APPID | Application identifier | Character value, *NONE | Optional |
Top |
Specifies the cluster containing the cluster resource group which will be created.
This is a required parameter.
Top |
Specifies the cluster resource group to be created.
This is a required parameter.
Top |
Specifies the type of the cluster resource group to be created.
This is a required parameter.
Top |
Specifies the exit program that is used to handle action codes that are passed to it due to operations on the cluster resource group. The exit program cannot be in an independent auxiliary storage pool. The action codes are described in the Cluster Resource Group Exit Program section in the API manual.
This is a required parameter.
Single values
Qualifier 1: CRG exit program
Qualifier 2: Library
Top |
Specifies the user profile under which the exit program should be run. The user profile must exist on all nodes in the recovery domain.
The value for this parameter must be *NONE if no exit program is specified.
The following user profiles are not valid:
This is a required parameter.
Top |
Specifies the list of nodes that compose the recovery domain. A role must be defined for each node in the recovery domain. Nodes in the recovery domain must be unique.
You can specify up to 128 nodes for the recovery domain.
This is a required parameter.
Element 1: Node identifier
Specify an active cluster node that will participate in the recovery of resilient resources represented by this cluster resource group.
Element 2: Node role
Specify the role of the node in the recovery domain of the cluster resource group. For primary-backup model cluster resource groups a node can have one of three roles: primary, backup, or replicate. Only one node can be designated as the primary. For peer model cluster resource groups a node can have one of two roles: peer or replicate. Any number of nodes can be designated as a peer or replicate.
Element 3: Backup sequence number
Specifies the backup order for a node with a role of *BACKUP. At the completion of the request the nodes with backup roles will be sequentially renumbered from the first backup to the last. The first backup will always be 1.
Element 4: Site name
Specifies the site name of the recovery domain node. This is valid in a version 4 cluster and only for a device cluster resource group, specifically for geographic mirroring. A site contains a subset of recovery domain nodes in the same physical location. All nodes at a site have access to the same copy of the auxiliary storage pool. Only nodes with a site name need to have access to the devices.
Element 5: Data port IP address
Specify the data port IP address for the recovery domain node. This is valid only in a cluster of version 4 or higher, for a device cluster resource group, specifically for geographic mirroring. The data port IP address is used to to send updates from a source node that owns the production copy of auxiliary storage pool to a target node that owns the mirror copy of the auxiliary storage pool. The user is responsible for configuring and starting/ending the data port IP address. The data port IP addess must already exist on the specified node. This must be represented in dotted decimal format.
Single values
Other values (up to 4 repetitions)
Top |
Specifies the internet interface address that is to be associated with an application. This is the takeover IP address that will be switched between systems. The field must be represented in dotted decimal format.
Note: This parameter must be specified if *APP is specified for the Cluster resource group type (CRGTYPE) parameter.
Top |
Specifies the format which should be used for the information passed to the user when a CRG exit program is called.
Top |
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.
Top |
Specifies the user queue to receive distributed information from the Distribute Information (QcstDistributeInformation) API. If the user would like to distribute cluster-wide information through this cluster resource group using the Distribute Information (QcstDistributeInformation) API, then this parameter must be set to a value other than *NONE. If this field is set, the specified user queue must exist on all nodes in the recovery domain after the exit program completes. The only way to change the value of this field once the cluster resource group has been created is to delete and recreate the cluster resource group.
Single values
Qualifier 1: Distribute info user queue
Qualifier 2: Library
Top |
Specifies who is responsible for configuring (adding and removing) the takeover IP address. This does not affect the starting and ending of the takeover IP address, Cluster Resource Services will perform this function.
Single values
Element 1: Responsibilities
Element 2: Allow active IP address
Specifies whether or not a takeover IP address can be active when starting an application cluster resource group.
Top |
Specifies the name given the batch job that is submitted by the cluster resource group. This job will call the cluster resource group exit program with the action code generated by the command being used. If this field is blank, the job name will be the value in the job description found in the specified user profile to run the exit program.
Top |
Specifies whether or not to restart an application if the cluster resource group exit program fails.
Top |
Specifies the number of times a cluster resource group exit program can be called on a same node before failure occurs. Maximum number of restarts is 3. If the cluster resource group is currently active, any change does not take affect until failover occurs or the cluster resource group exit program job ends.
Top |
Specifies detailed information about the resilient devices to be added to the cluster resource group.
You can specify up to 256 devices for this parameter.
Element 1: Configuration object
The name of the auxiliary storage pool device description object which can be switched between the nodes in the recovery domain. An auxiliary storage pool device description can be specified in only one cluster resource group.
Element 2: Configuration object type
Specifies the type of configuration object specified with configuration object name.
Element 3: Configuration object online
Specifies what configuration action to take when the cluster resource group is switched over or failed over to a backup node. The configuration object can be varied on and the server takeover IP address can be started or leave the configuration object varied off and the server takeover IP address inactive when a device ownership is moved to another node. This attribute does not vary the device on or off when the cluster resource group is started or ended.
Element 4: Server takeover IP address
Specifies a takeover IP address for servers associated with the relational database name in the device description for an auxiliary storage pool. This element is optional and can only be specified for a primary auxiliary storage pool. If specified, the addresss must be presented in dotted decimal format. The specified address must exist on all nodes in the recovery domain if the cluster resource group is active. If not specified, or for a secondary or UDFS auxiliary storage pool, the element must be set to *NONE.
Top |
Specifies the text used to briefly describe the cluster resource group object.
Top |
Specifies the message queue to receive messages (CPABB01) dealing with failover. If the user would like to receive notice before a failover occurs, then this parameter must be set to a value other than *NONE. If this field is set, the specified message queue must exist on all nodes in the recovery domain after the exit program completes. The message queue cannot be in an independent auxiliary storage pool.
Single values
Qualifier 1: Failover message queue
Qualifier 2: Library
Top |
Specifies the number of minutes to wait for a reply to the failover message that was enqueued on the failover message queue.
Top |
Specifies the default action to be taken if a response to the failover message is not received in the failover wait time limit.
Top |
Specifies the application identifier. This identifies the purpose of the cluster resource group.
Top |
Example 1: Creating a CRG with a Two-Node Recovery Domain
CRTCRG CLUSTER(MYCLUSTER) CRG(MYCRG) CRGTYPE(*DEV) EXITPGM(TEST/EXITPGM) USRPRF(USER1) RCYDMN((NODE01 *PRIMARY) (NODE02 *BACKUP *LAST)) CFGOBJL(*NONE) TEXT('IASP for Application 17')
This command creates a device cluster resource group called MYCRG in the cluster called MYCLUSTER. The recovery domain consists of two nodes. NODE01 is the primary and NODE02 is the only backup. The list of configuration objects is not specified on this command; the Add CRG Device Entry (ADDCRGDEVE) command can be used to add this information.
Example 2: Creating a CRG with a Single-Node Recovery Domain
CRTCRG CLUSTER(MYCLUSTER) CRG(MYCRG) CRGTYPE(*DEV) EXITPGM(TEST/EXITPGM) USRPRF(USER1) RCYDMN((NODE01 *PRIMARY *LAST MYSITE ('1.1.1.1' '2.2.2.2'))) EXITPGMFMT(EXTP0200) TEXT('IASP for Application 17')
This command creates a device cluster resource group called MYCRG in the cluster called MYCLUSTER. The recovery domain consists of one node, NODE01. The recovery domain sets NODE01 as the primary node in site MYSITE, with 2 data port IP addresses, 1.1.1.1 and 2.2.2.2.
Example 3: Creating a Peer CRG with a Two-Node Recovery Domain
CRTCRG CLUSTER(MYCLUSTER) CRG(MYPEER) CRGTYPE(*PEER) EXITPGM(TEST/EXITPGM) USRPRF(USER1) RCYDMN((NODE01 *PEER) (NODE02 *PEER)) APPID(CompanyName.ExPeer) TEXT('Peer for ExamplePeer Application')
This command creates a peer cluster resource group called MYPEER in the cluster called MYCLUSTER. The recovery domain consists of two nodes, NODE01 and NODE02. This cluster resource group is for an IBM shipped application called ExamplePeer.
Top |
Top |