5. Resource Group
A resource group is a resource set where failover is performed when trouble occurs.
MCCS performs failover of nodes on a group basis. Thus, you need to group the resources in the unit of failover.In addition, within a cluster, you can create multiple groups.
Table of Contents
Resource Group Attribute
Group attribute can be identified from Group Attributes view and Group State view.
From the group management view of MCCS web console, select group, then select the ‘Group Attributes’ tab located on right top of detailed information panel.
The values of gray colored are for read only. They just contain and show the information of group state. The values of white colored are configurable by user definition.
[Figure] Group Attribute View
Attribute | Description | Type | Default | Edit | Note |
---|---|---|---|---|---|
ActionState | It represents the action status for the ongoing group. | STRING | X |
| |
AutoDisabled | Automatically disabled. | BOOLEAN | false | X | |
AutoFailover | Determine whether to perform automatic failover when trouble occurs within the group. | BOOLEAN | true | O | |
AutoFaultClearTIme | A failover occurs after trouble is detected, and it remains online for the given time limit. After that, all the trouble status will be removed. | INTEGER | 0 sec | O | |
AutoRestart | If a group is not started because of failures in resource for detection, determine whether to automatically start it when the resource or node is normalized. | BOOLEAN | false | O | |
*AutoStart | When the engine starts, it will notify when the group will be started automatically. | BOOLEAN | true | O | |
BatchAfterOnline | Set the batch file to run after a group goes online. | FILE | O | ||
BatchBeforeOffline | Set the batch file to run before a group goes offline. | FILE | O | ||
BatchTimeout | Designate the time out for running the batch file. | INTEGER | 300 sec | O | |
Enabled | It allows group to be managed.If the attribute value is set to 'false', a group cannot be controlled. | BOOLEAN | true | O | |
*Failover | Indicates whether there is an ongoing failover due to troubles. | BOOLEAN | false | X | |
GroupName | It represents the registered name of group. | NAME | X | ||
Locked | Permanent locking. Lock a group to prohibit all commands and operation. | BOOLEAN | false | X | |
MaxDependencyLevel | Designate the max vertical level that sets the dependencies among the resources in a group. | INTEGER | 20 levels | X | |
Monitored | It indicates whether all the activated resources are monitored. | BOOLEAN | X | ||
OnlineCount | It is the number of resource online within a group. '0' means that a group is terminated. | INTEGER | X | ||
Parallel | It is a group's parallel attributes. | BOOLEAN | false | X | |
PreActive | It represents the name of node where a group was executed before. | STRING | X | ||
State | The attribute represents the group status of node (online, offline, trouble, unchecked). | STRING | X | ||
TargetNodeList | It is the list of nodes in a group subject to operation. It is sorted in the increasing order of priority. This is the criterion used for selecting a target node when performing a failover. | STRING | X | ||
TLocked | The attribute indicates the status of 'temporary locking'. | BOOLEAN | false | X |
* AutoStart (true/false)
Determine whether to automatically start a group when making a new connection to a cluster in the system booting phase. (If the MCCS service is restarted or a single node is restarted to connect to operating MCCS, it will be ignored.) If a parallel group is offline at a local node or some members are online, it will automatically start. In case of a failover group, the node with the highest priority will be automatically started first. In case of locking or troubles, a group will not be started.
Group auto start option for each resource
Prerequisite | In case there is mirror disk | In case there is not mirror disk |
---|---|---|
AutoStart should be set to true. | 1. None of the remote nodes should be FAULTED. | 1. If the both nodes are booted, the first booted node will be automatically started. |
*Failover (true/false)
It indicates whether there is an ongoing failover due to troubles. When it is set to true, if the following event occurs, it is reset to false.
- The locking command sets the Locked/TLocked attribute to false.
- The initialization command (Flush) is sent.
- A group goes online.
Group State
The state of the group is determined by the state of the resources.
However, the status of persistent resources like Ethernet adapter do not affect on the status of group because these resources should be online on both nodes commonly.
Basically the group may have the following states.
[Figure] Group State View
Online
This is a state where all the resources are online.
Offline
This is a state where all the resources are offline.
They are displayed on the console window as gray colored icons.
But a Persistent Resources (e.g. Ethernet adapter) still remain online with colored icon regardless the group offline.
Partial
This is a state where only some of the resources are online and shows as a green check marks.
A persistent resources are excluded from state determination, they do not affect the partial online state.
Faulted
This is a state where one or more resources are failed and the group will also be regarded as faulted. It shows in red check marks.
The failure state does not mean that a failure is occurring at present. It only shows that a failure occurred, and refers to waiting for the administrator's analysis and actions.
Unless the administrator directly clears the failure state, and uses an attribute like 'AutoFaultClearTime' to cancel it, the failure state will remained.
CLI Use (mcgroup command)
It sends the commands related to MCCS group. Group related commands such as add, delete, online, offline, attribute edit can be done.
When you install MCCS, the initial user account ID is set to 'admin' and the password is set to 'password'.
When you run the CLI command, you need to enter the ID and the password. Otherwise, the above initial ID and password will be used.
Thus, when you change the initial user password, you must enter the ID/password in the CLI command as options.
Syntax
mcgroup [-u userid -pw password] [-ip node_ip_address] [-p port] -command [ group ] [-a attribute] [-r resource] [-n node] |
Options
Option | Description |
-h | It prints help menu. |
-u | Designate the user ID. |
-pw | Enter the user password. |
-ip | It defines the node to access to execute command. If omitted, it will access to execute command for local node. |
-p | It specifies the port to access to execute command. |
-groupcommand | It defines group command. |
group | It enters name of the group. |
-a | [list] It defines the attribute value that should be listed if it is command. |
-r | It defines the resource to be managed. |
-n | It defines node name to be managed. |
-t | It defines the interval time. |
-dep | It shows dependency of the group or the resource. |
Example
add
Adds testGroup.
mcgroup -u admin -pw password -add testGroup |
delete
Delete testGroup.
mcgroup -u admin -pw password -delete testGroup |
online
Bring online testGroup on testNode..
mcgroup -u admin -pw password -online testGroup [-n testNode] |
offline
Take offline testGroup on testNode
mcgroup -u admin -pw password -offline testGroup [-n testNode] |
move
Switchover testGroup to testNode
mcgroup -u admin -pw password -move testGroup [-n testNode] |
clear
Remove fault mark on testGroup of testNode.
mcgroup -u admin -pw password -clear testGroup [-n testNode] |
flush
Initiate all command for testGroup of testNode.
mcgroup -u admin -pw password -flush testGroup -n testNode |
modify
Modify a value of attribute of testGroup on testNode.
mcgroup -u admin -pw password -modify test -a attribute attribute_value -n testNode |
Modify the value of ‘AutoStart’ attribute of testGroup on testNode.
mcgroup -u admin -pw password -modify testGroup -a AutoStart true -n testNode |
list
Prints state of the group.
mcgroup -u admin -pw password -list [group [-all] | [-dep [-r resource]] | [-a attribute] [-n testNode]] |
It shows all the attribute value of the group.
mcgroup -u admin -pw password [-ip node_ipaddress] [-p port] -list [group [ -all]] |
It shows dependency of resource that belongs to the group.
mcgroup -u admin -pw password [-ip node_ipaddress] [-p port] -list [-dep [-r resource]] |
It checks certain attribute value of the group.
mcgroup -u admin -pw password [-ip node_ipaddress] [-p port] -list [-a attribute] [-n testNode]] |
lock
Locks testGroup temporarily.
mcgroup -u admin -pw password -lock testGroup |
Locks testGroup permanently.
mcgroup -u admin -pw password -lock testGroup -p |
unlock
Unlocks testGroup.
mcgroup -u admin -pw password -unlock testGroup |
state
It prints state of testGroup of testNode.
mcgroup -u admin -pw password -state testGroup [-n testNode] |
monitor
Monitors testGroup state on every time interval.
mcgroup -u admin -pw password -monitor testGroup [-t interval(seconds)] |