QHASM.CLUSTER_RESOURCE_GROUP_LIST View
The QHASM.Cluster_Resource_Group_List view contains information about the list of cluster resource groups in a cluster.
The values returned for the columns in this view contain information from the DSPCRGINF CL command but represent them differently.
Authorization
The authorization ID of the statement must include the following privileges:
Authorization as required by PowerHA product functionality.
OBJOPR and *READ authority on QHASM/CRG_LIST.
Input/output system configuration (*IOSYSCFG) special authority.
Result Table
The table describes the columns in the view. Here, the system name used is CRG_LIST. The schema is QHASM.
Column Name | System Column Name | Data Type | Description |
---|---|---|---|
CLUSTER | CLUSTER | VARCHAR(10) | The name of the cluster |
CONSISTENT_INFORMATION | CLUSTS | VARCHAR(3) | Indicates whether or not the displayed information is consistent with other nodes in the cluster. YES The information is consistent for all active nodes in the cluster. NO The information retrieved from the node running the command may not be consistent with all the active nodes in the cluster. In order to obtain consistent information run the command on an active node, or start this node and run the command again. |
CLUSTER_RESOURCE_GROUP | CRG | VARCHAR(10) | The name of the Cluster Resource Group (CRG). |
CRG_TYPE | CRGTYPE | VARCHAR(5) | The type of the cluster resource group. *APP The cluster resource group is an application cluster resource group. *DATA The cluster resource group is a data cluster resource group. *DEV The cluster resource group is a device cluster resource group. *PEER The cluster resource group is a peer cluster resource group. |
CRG_STATUS | CRGSTS | VARCHAR(30) | The status of the cluster resource group. ACTIVE The resources managed by the cluster resource group are currently resilient. INACTIVE The resources managed by the cluster resource group are not currently resilient. INDOUBT The information contained within the cluster resource group object may not be accurate. This status occurs when an exit program is called with an action code of Undo and fails to complete successfully. RESTORED The cluster resource group object was restored on this node and has not been copied to the other nodes in the recovery domain. When Cluster Resource Services is started on this node, the cluster resource group will be synchronized with the other nodes in the recovery domain and its status set to Inactive. ADD PENDING A new node is in the process of being added to the recovery domain of a cluster resource group. If the exit program is successful the status is reset to its value at the time the command was called. If the exit program fails and the original state cannot be recovered, the status is set to Indoubt. DELETE PENDING Cluster resource group object is in the process of being deleted. When the exit program completes the cluster resource group is deleted from all nodes in the recovery domain. CHANGE PENDING The cluster resource group is in the process of being changed. If the exit program is successful the status is reset to the value at the time the command was called. If the exit program fails and the original state cannot be recovered, status is set to Indoubt. END PENDING Resilience for the cluster resource group is in the process of ending. If the exit program is successful, the status is set to Inactive. If the exit program fails and the original state cannot be recovered, the status is set to Indoubt. INITIALIZE PENDING A cluster resource group is being created and is in the process of being initialized. If the exit program is successful, the status is set to Inactive. If the exit program fails, the cluster resource group will be deleted from all nodes. REMOVE PENDING A node is in the process of being removed from the recovery domain of the cluster resource group. If the exit program is successful, the status is reset to the value at the time the command was called. If the exit program fails and the original state cannot be recovered, the status is set to Indoubt. START PENDING Resilience is in the process of starting for the cluster resource group. If the exit program is successful, the status is set to Active. If the exit program fails and the original state cannot be recovered, the status is set to Indoubt. SWITCHOVER PENDING The Change Cluster Resource Group Primary (CHGCRGPRI) command was called, a failure of a cluster resource group occurred, or a node failed, causing a switchover or failure to begin. The first backup node is in the process of becoming the primary node. If the exit program is successful, the status is set to Active. If the exit program fails and the original state cannot be recovered, the status is set to Indoubt. DELETE PENDING Cluster resource group object is being deleted by the Delete Cluster Resource Group (DLTCRG) command. The Cluster resource group object is only removed from the node running the command. This is not a distributed request. At the completion of the command, the cluster resource group is deleted from the node. ADD DEVICE PENDING A device entry is being added to a cluster resource group. If the exit program is successful, the status is reset to its value at the time the command was called. If the exit program fails and the original state cannot be recovered, the status is set to Indoubt. REMOVE DEVICE PENDING A device entry is being removed from a cluster resource group. If the exit program is successful, the status is reset to its value at the time the command was called. If the exit program fails and the original state cannot be recovered, the status is set to Indoubt. CHANGE DEVICE PENDING A device entry is being changed in a cluster resource group. If the exit program is successful, the status is reset to its value at the time the command was called. If the exit program fails and the original state cannot be recovered, the status is set to Indoubt. CHANGE STATUS PENDING The status of a node in the cluster resource group's current recovery domain is being changed. If the change is successful, the status is reset to its value at the time the Change Cluster Node Entry (CHGCLUNODE) command was called. Failure of the exit program causes the status of the cluster resource group to be set to Indoubt. If a backup node is reassigned as the primary node for a resilient device cluster resource group and the ownership of the device cannot be transferred to the new primary node, the status is set to Indoubt. EXIT POINT OPERATION PENDING An exit point operation is in progress. |
PRIMARY_NODE | PRIMARY | VARCHAR(8) | The name of the node that has a current node role of primary. Contains the null value if this is peer CRG. |
CONTAINER This column is not supported on IBM i 7.2 or IBM i 7.3 | CNR | VARCHAR(10) Nullable | The container managing this cluster resource group (CRG). Contains the null value if this is a stand-alone CRG that is not managed by a container. |
Examples
Example 1 - Get the list of cluster resource groups
Returns the list of cluster resource groups, the primary node, and its status.
SELECT CLUSTER_RESOURCE_GROUP, CRG_TYPE, CRG_STATUS, PRIMARY_NODE
FROM QHASM.CRG_LIST;
Example 1 - Sample Output
CLUSTER_RESOURCE_GROUP | CRG_TYPE | CRG_STATUS | PRIMARY_NODE |
---|---|---|---|
ERP01 | *APP | ACTIVE | PROD |
GMIRCRG | *DEV | ACTIVE | PROD |
Example 2 - Determine switch readiness
Indicates if a device cluster resource group (CRG) is ready to do a cross-site switchover with the READY_TO_SWITCH column. Contains YES if ready to switch, or NO if not ready to switch. This also provides supporting data for why the CRG is or is not ready to switch. For example, the CRG status, PowerHA Session Status, or CRG recovery domain node status.
SELECT CRG.CLUSTER_RESOURCE_GROUP, CRG.CRG_STATUS, SSN_INFO.SESSION_NAME, SSN_INFO.ASP_DEVICE,
SSN_INFO.COPY_STATUS, RCYDMN_NODES.*, (
CASE
WHEN (crg.crg_status = 'ACTIVE' AND
ssn_info.copy_status = 'ACTIVE' AND
rcydmn_nodes.number_inactive_backup_nodes = 0 AND
rcydmn_nodes.number_ineligible_backup_nodes = 0 AND
rcydmn_nodes.number_partitioned_backup_nodes = 0) THEN 'YES'
ELSE 'NO'
END) AS READY_TO_SWITCH
FROM QHASM.CRG_LIST crg, (
SELECT coalesce(sum(
case node_status
when 'INACTIVE' then 1
else 0
end), 0) number_inactive_backup_nodes, coalesce(sum(
case node_status
when 'INELIGIBLE' then 1
else 0
end), 0) number_ineligible_backup_nodes, coalesce(sum(
case node_status
when 'PARTITIONED' then 1
else 0
end), 0) number_partitioned_backup_nodes
FROM qhasm.crg_list crg, table (
qhasm.crg_recovery_domain(
cluster_resource_group => crg.cluster_resource_group)
) rcydmn
WHERE rcydmn.node_status != 'ACTIVE' and
rcydmn.current_node_role > 0
) as rcydmn_nodes,
(SELECT DISTINCT SESSION_NAME, CLUSTER_RESOURCE_GROUP FROM QHASM.SESSION_LIST) AS ssn_list,
table (
QHASM.SESSION_INFO(session => ssn_list.session_name)
) ssn_info
WHERE crg.crg_type = '*DEV' and
crg.cluster_resource_group = ssn_list.cluster_resource_group;
Example 2 - Sample Output
CLUSTER_RESOURCE_GROUP | CRG_STATUS | SESSION_NAME | ASP_DEVICE | COPY_STATUS | NUMBER_INACTIVE_BACKUP_NODES | NUMBER_INELIGIBLE_BACKUP_NODES | NUMBER_PARTITIONED_BACKUP_NODES | READY_TO_SWITCH |
---|---|---|---|---|---|---|---|---|
SVCGMIRCRG | ACTIVE | SVCMMIRSSN | PRODIASP | ACTIVE | 0 | 0 | 0 | YES |
GEOMIRCRG | ACTIVE | GEOMIRSSN | GEOASP | DETACHED | 0 | 1 | 0 | NO |
SQLSTATE Values
Errors and warnings returned by this function are returned as SQL state values. Possible SQLSTATE values returned by this view are:
SQLSTATE | Message |
---|---|
42501 | Not authorized to object CRG_LIST in QHASM type *FILE |
42502 | CURRENT USER DOES NOT HAVE *IOSYSCFG SPECIAL AUTHORITY |
560CR | NO VALID LICENSE FOR IBM POWERHA FOR I FOUND |
560CR | POWERHA FOR I ENTERPRISE EDITION NOT INSTALLED ON NODE &1 |
560CR | GRACE PERIOD EXPIRED FOR POWERHA FOR I ENTERPRISE EDITION ON NODE &1 |
560CR | USAGE LIMIT EXCEEDED FOR POWERHA FOR I ENTERPRISE EDITION ON NODE &1 |
560CR | POWERHA FOR I STANDARD EDITION NOT INSTALLED ON NODE &1 |
560CR | GRACE PERIOD EXPIRED FOR POWERHA FOR I STANDARD EDITION ON NODE &1 |
560CR | USAGE LIMIT EXCEEDED FOR POWERHA FOR I STANDARD EDITION ON NODE &1 |
560CR | POWERHA FOR I STANDARD EXPRESS NOT INSTALLED ON NODE &1 |
560CR | GRACE PERIOD EXPIRED FOR POWERHA FOR I STANDARD EXPRESS ON NODE &1 |
560CR | USAGE LIMIT EXCEEDED FOR POWERHA FOR I STANDARD EXPRESS ON NODE &1 |
58004 | AN UNEXPECTED ERROR OCCURRED. SEE JOBLOG FOR MORE INFORMATION |
Privacy Policy | Cookie Policy | Impressum
From time to time, this website may contain technical inaccuracies and we do not warrant the accuracy of any posted information.
Copyright © Fortra, LLC and its group of companies. All trademarks and registered trademarks are the property of their respective owners.