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

 


AttributeDescriptionTypeDefaultEditNote
ActionState

It represents the action status for the ongoing group.
Resource online in progress: STARTING
Resource offline in progress: STOPPING
Online/offline: WATCHING

STRING
X


AutoFailoverDetermine whether to perform automatic failover when trouble occurs within the group.BOOLEANtrueO
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.
'0' implies that troubles are not removed.

INTEGER0 secO
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.
It will operate properly only if AutoStart is set to true.

BOOLEANfalseO
AutoRestartTimeoutThe wait time for the group to be checked by checking the group status automatically when Auto startsINTEGER0 secO
*AutoStartWhen the engine starts, it will notify when the group will be started automatically.BOOLEANtrueO
AutoStartNodeSet a node which group can be online while remote node being connected after MCCS main process is started.STRINGNONEO
BatchAfterOnline

Set the batch file to run after a group goes online.
Whether the batch file is successful or failed, it does not affect the progress of a group

FILE
O
BatchBeforeOffline

Set the batch file to run before a group goes offline.
Whether the batch file is successful or failed, it does not affect the progress of a group.

FILE
O
BatchTimeoutDesignate the time out for running the batch file.INTEGER300 secO
*Failover

It indicates group is failing over due to failure.

BOOLEANfalseX
GroupNameIt is group name.NAME
X
Locked

The group is permanent locked. Lock a group to prohibit all commands and operation.
Unlike temporary locking permanent, locking is maintained even after the server reboots.

BOOLEANfalseX
LockedTimeoutSets the time limitation in case of using the "Temporary lock" item. The locking status would be unlocked after the time you've setted hereINTEGER6hO
MaxDependencyLevelDesignate the max vertical level that sets the dependencies among the resources in a group.INTEGER20 levelsX
OnlineCount

It is the number of resource which is online within a group.'0' means that a group is offline.
The number of monitoring resources (network cards) is not included in the total number.

INTEGER
X
Parallel

It is a group's parallel attributes.
It indicates whether the resources in a group can be online in two nodes at the same time.
The value cannot be changed. It can be set only once when you add a group for the first time.

BOOLEANfalseX
PreActiveIt shows the name of node where a group was online before.STRING
X
StateThe 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.
It operates in the same way as the locked, but it is a temporary function that will be cancelled when the engine restarts. 

BOOLEANfalseX

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

PrerequisiteIn case there is DRBDIn case there is not DRBD

AutoStart should be set to true.

1. None of the remote nodes should be FAULTED.
2. DRBD roles of all nodes should be set to Secondary.
3. The mirror disk connection should be SyncSource at one node and SyncTarget at another node. A node in the SyncSource is selected as a source node.
4. The most recently online nodes go online with the both nodes connected.
5. If there are multiple mirror disk resources within a group, should be all sources to a single node before they can go online.

1. If the both nodes are booted, the first booted node will be automatically started.
2. Should be in boot mode.
3. Group's node status should not be online.


*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

OptionDescription

-h

Display Help.

-uEnter 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.
If omitted, it will access to the default value and when you define specific port number as heartbeat, enter this followed by --p. 

-groupcommand

It defines group command.  
(add, delete, online, offline, move, clear, flush, modify, list, lock, unlock, state, monitor)

group

It enters name of the group. 

-a

[list] It defines the attribute value that should be listed if it is command.  
[modify] It lists the attribute and attribute value that should be changed if it is command. 
attribute : It defines the values of the group. 
attribute_value: It defines the values that should be changed.  

-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]]


It checks certain attribute value of the group. 


mcgroup [-ip node_ipaddress] [-p port] -list [-a attribute] [-n testNode]]

Make a dependency link among resources.
Make a dependency link between the resource1 as parent and the resource2 as child.

mcgroup -link resource1 resource2 [onlineDependency offlineDependency]

Delete a dependency link between the resource1 and the resource2.

mcgroup -unlink resource1 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)]