5- Resource Group
A resource group is a set of resources and MCCS failover the entire resources in a group when failure is occurred.
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 | ||
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 | |
AutoRestartTimeout | The wait time for the group to be checked by checking the group status automatically when Auto starts | INTEGER | 0 sec | O | |
*AutoStart | When the engine starts, it will notify when the group will be started automatically. | BOOLEAN | true | O | |
AutoStartNode | Set a node which group can be online while remote node being connected after MCCS main process is started. | STRING | NONE | 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 | |
*Failover | It indicates group is failing over due to failure. | BOOLEAN | false | X | |
GroupName | It is group name. | NAME | X | ||
Locked | The group is permanent locked. Lock a group to prohibit all commands and operation. | BOOLEAN | false | X | |
LockedTimeout | Sets the time limitation in case of using the "Temporary lock" item. The locking status would be unlocked after the time you've setted here | INTEGER | 6h | O | |
MaxDependencyLevel | Designate the max vertical level that sets the dependencies among the resources in a group. | INTEGER | 20 levels | X | |
OnlineCount | It is the number of resource which is online within a group.'0' means that a group is offline. | INTEGER | X | ||
Parallel | It is a group's parallel attributes. | BOOLEAN | false | X | |
PreActive | It shows the name of node where a group was online 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 where a group is operated. Higher priority node will be primary node. | STRING | X | ||
TLocked | The group is temporary locked. | BOOLEAN | false | X |
MCCS has function to limit input values against user's input field, and it provides function detects automatically data which is input wrong by user's mistake.
*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 target 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 DRBD | In case there is not DRBD |
---|---|---|
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 group is failing over due to failure.
When it is set to true, if the following event occurs, it is changed to false.
- The locking command sets the Locked/TLocked attribute to false.
- The Flush command is initiated.
- A group is 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 | Display Help. |
-u | Enter the user account. |
-pw | Enter the 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 -add testGroup |
delete
Delete testGroup.
mcgroup -delete testGroup |
online
Bring online testGroup on testNode.
mcgroup -online testGroup [-n testNode] |
offline
Take offline testGroup on testNode
mcgroup -offline testGroup [-n testNode] |
move
Switchover testGroup to testNode
mcgroup -move testGroup [-n testNode] |
clear
Remove fault mark on testGroup of testNode.
mcgroup -clear testGroup [-n testNode] |
flush
Initiate all command for testGroup of testNode.
mcgroup -flush testGroup -n testNode |
modify
Modify a value of attribute of testGroup on testNode.
mcgroup -modify test -a attribute attribute_value -n testNode |
Modify the value of ‘AutoStart’ attribute of testGroup on testNode.
mcgroup -modify testGroup -a AutoStart true -n testNode |
list
Prints state of the group.
mcgroup -list [group [-all] | [-dep [-r resource]] | [-a attribute] [-n testNode]] |
It shows all the attribute value of the group.
mcgroup [-ip node_ipaddress] [-p port] -list [group [ -all]] |
It shows dependency of resource that belongs to the group.
mcgroup [-ip node_ipaddress] [-p port] -list [-dep [-r resource]] |
mcgroup [-ip node_ipaddress] [-p port] -list [-a attribute] [-n testNode]] |
link
Make a dependency link among resources.
Make a dependency link between the resource1 as parent and the resource2 as child.
|
unlink
Delete a dependency link between the resource1 and the resource2.
|
lock
Locks testGroup temporarily.
mcgroup -lock testGroup |
Locks testGroup permanently.
mcgroup -lock testGroup -p |
unlock
Unlocks testGroup.
mcgroup -unlock testGroup |
state
It prints state of testGroup of testNode.
mcgroup -state testGroup [-n testNode] |
monitor
Monitors testGroup state on every time interval.
mcgroup -monitor testGroup [-t interval(seconds)] |