6.3 Node groups

 < Day Day Up > 



6.3 Node groups

CSM allows nodes to be grouped either by a host name list or via dynamic selection criteria based on node attributes.

In Example 6-19 we define a new group, TestGroup, containing the first three nodes of our cluster. We use nodegrp -a (add nodes to a group) to create the group. We then display (print) the contents of that group using nodegrp -p.

Example 6-19: Creating and displaying a new nodegroup with nodegrp

start example
 [root@master /]# nodegrp -a node1,node2,node3 TestGroup [root@master /]# nodegrp -p TestGroup node1.cluster.com node2.cluster.com node3.cluster.com [root@master /]# 
end example

Individual nodes may be subsequently removed from a group using nodegrp -x, as shown in Example 6-20.

Example 6-20: Removing nodes from a group using nodegrp -x

start example
 [root@master /]# nodegrp -x node2 TestGroup [root@master /]# nodegrp -p TestGroup node1.cluster.com node3.cluster.com [root@master /]# 
end example

Dynamic groups are created by defining a select statement or "where" clause. Example 6-21 shows the creation of a dynamic group consisting of all the nodes managed via mgrsa1.

Example 6-21: Creating a dynamic group with nodegrp -w

start example
 [root@master /]# nodegrp -w "HWControlPoint=='mgrsa1.cluster.com'" RSA1Nodes [root@master /]# nodegrp -p RSA1Nodes node1.cluster.com node2.cluster.com node3.cluster.com node4.cluster.com [root@master /]# 
end example

The select clause of dynamic groups my be displayed using the "-W" switch. Example 6-22 shows the select clause of the predefined node group RedHat73Nodes.

Example 6-22: Displaying the select clause of a dynamic group using nodegrp -W

start example
 [root@master /]# nodegrp -W RedHat73Nodes InstallDistributionName=='RedHat' && InstallDistributionVersion=='7.3' [root@master /]# 
end example

Both static and dynamic groups are removed using -D. Groups must be removed one at a time:

 # nodegrp -D TestGroup # nodegrp -D RSA1Nodes 

If any predefined nodegroups are accidentally removed or modified, they may be restored with predefined-nodegroups. Using the -f switch, all the predefined groups (AllNodes, ManagedNodes, and so on) will be initialized to their default setting:

 # predefined-nodegroups -f 

This will not affect any user created groups, whether static or dynamic.



 < Day Day Up > 



Linux Clustering with CSM and GPFS
Linux Clustering With Csm and Gpfs
ISBN: 073849870X
EAN: 2147483647
Year: 2003
Pages: 123
Authors: IBM Redbooks

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net