5.4. Cluster Configuration

To set up a Linux FailSafe system, you configure the cluster that will support the highly available services. This requires the following steps:

The following subsections describe these tasks.

5.4.1. Defining Cluster Nodes

A cluster node is a single Linux image. Usually, a cluster node is an individual computer. The term node is also used in this guide for brevity.

The pool is the entire set of nodes available for clustering.

The first node you define must be the local host, which is the host you have logged into to perform cluster administration.

When you are defining multiple nodes, it is advisable to wait for a minute or so between each node definition. When nodes are added to the configuration database, the contents of the configuration database are also copied to the node being added. The node definition operation is completed when the new node configuration is added to the database, at which point the database configuration is synchronized. If you define two nodes one after another, the second operation might fail because the first database synchronization is not complete.

To add a logical node definition to the pool of nodes that are eligible to be included in a cluster, you must provide the following information about the node:

5.4.1.1. Defining a Node with the Cluster Manager GUI

To define a node with the Cluster Manager GUI, perform the following steps:

  1. Launch the FailSafe Manager.

  2. On the left side of the display, click on the “Nodes & Cluster” category.

  3. On the right side of the display click on the “Define a Node” task link to launch the task.

  4. Enter the selected inputs on this screen. Click on “Next” at the bottom of the screen and continue inputing information on the second screen.

  5. Click on “OK” at the bottom of the screen to complete the task, or click on “Cancel” to cancel.

5.4.1.2. Defining a Node with the Cluster Manager CLI

Use the following command to add a logical node definition:

cmgr> define node A

Entering this command specifies the name of the node you are defining and puts you in a mode that enables you to define the parameters of the node. These parameters correspond to the items defined in Section 5.4.1. The following prompts appear:

Enter commands, when finished enter either "done" or "cancel"

A?

When this prompt of the node name appears, you enter the node parameters in the following format:

set hostname to B
set nodeid to C
set sysctrl_type to D
set sysctrl_password to E
set sysctrl_status to F
set sysctrl_owner to G
set sysctrl_device to H
set sysctrl_owner_type to I
add nic J

You use the add nicJ command to define the network interfaces. You use this command for each network interface to define. When you enter this command, the following prompt appears:

Enter network interface commands, when finished enter "done" or "cancel"
NIC - J?

When this prompt appears, you use the following commands to specify the flags for the control network:

set heartbeat to K
set ctrl_msgs to L
set priority to M

After you have defined a network controller, you can use the following command from the node name prompt to remove it:

cmgr> remove nicN

When you have finished defining a node, enter done.

The following example defines a node called cm1a, with one controller:

cmgr> define node cm1a
Enter commands, when finished enter either "done" or "cancel"
cm1a? set hostname to cm1a
cm1a? set nodeid to 1
cm1a? set sysctrl_type to msc
cm1a? set sysctrl_password to [ ]
cm1a? set sysctrl_status to enabled
cm1a? set sysctrl_owner to cm2
cm1a? set sysctrl_device to /dev/ttyd2
cm1a? set sysctrl_owner_type to tty
cm1a? add nic cm1
Enter network interface commands, when finished enter “done” 
or “cancel”

NIC - cm1 > set heartbeat to true
NIC - cm1 > set ctrl_msgs to true
NIC - cm1 > set priority to 0
NIC - cm1 > done
cm1a? done
cmgr>

If you have invoked the Cluster Manager CLI with the -p option,or you entered the set prompting on command, the display appears as in the following example:

cmgr> define node cm1a
Enter commands, when finished enter either "done" or "cancel"
Nodename [optional]? cm1a
Node ID? 1
Do you wish to define system controller info[y/n]:y
Sysctrl Type <null>? (null)
Sysctrl Password[optional]? ( )
Sysctrl Status <enabled|disabled>? enabled
Sysctrl Owner? cm2
Sysctrl Device? /dev/ttyd2
Sysctrl Owner Type <tty>? (tty) 
Number of Network Interfaces ? (1)
NIC 1 - IP Address? cm1
NIC 1 - Heartbeat HB (use network for heartbeats) <true|false>? true
NIC 1 - Priority <1,2,...>? 0
NIC 2 - IP Address? cm2
NIC 2 - Heartbeat HB (use network for heartbeats) <true|false>? true
NIC 2 - (use network for control messages) <true|false>? false
NIC 2 - Priority <1,2,...>? 1

5.4.2. Modifying and Deleting Cluster Nodes

After you have defined a cluster node, you can modify or delete the cluster with the Cluster Manager GUI or the Cluster Manager CLI. You must remove a node from a cluster before you can delete the node.

5.4.2.1. Modifying a Node with the Cluster Manager GUI

To modify a node with the Cluster Manager GUI, perform the following steps:

  1. Launch the FailSafe Manager.

  2. On the left side of the display, click on the “Nodes & Cluster” category.

  3. On the right side of the display click on the “Modify a Node Definition” task link to launch the task.

  4. Modify the node parameters.

  5. Click on “OK” at the bottom of the screen to complete the task, or click on “Cancel” to cancel.

5.4.2.2. Modifying a Node with the Cluster Manager CLI

You can use the following command to modify an existing node. After entering this command, you can execute any of the commands you use to define a node.

cmgr> modify node A

5.4.2.3. Deleting a Node with the Cluster Manager GUI

To delete a node with the Cluster Manager GUI, perform the following steps:

  1. Launch the FailSafe Manager.

  2. On the left side of the display, click on the “Nodes & Cluster” category.

  3. On the right side of the display click on the “Delete a Node” task link to launch the task.

  4. Enter the name of the node to delete.

  5. Click on “OK” at the bottom of the screen to complete the task, or click on “Cancel” to cancel.

5.4.2.4. Deleting a Node with the Cluster Manager CLI

After defining a node, you can delete it with the following command:

cmgr> delete node A

You can delete a node only if the node is not currently part of a cluster. This means that first you must modify a cluster that contains the node so that it no longer contains that node before you can delete it.

5.4.3. Displaying Cluster Nodes

After you define cluster nodes, you can perform the following display tasks:

You can perform any of these tasks with the FailSafe Cluster Manager GUI or the Linux FailSafe Cluster Manager CLI.

5.4.3.1. Displaying Nodes with the Cluster Manager GUI

The Cluster Manager GUI provides a convenient graphic display of the defined nodes of a cluster and the attributes of those nodes through the FailSafe Cluster View. You can launch the FailSafe Cluster View directly, or you can bring it up at any time by clicking on “FailSafe Cluster View” at the bottom of the “FailSafe Manager” display.

From the View menu of the FailSafe Cluster View, you can select “Nodes in Pool” to view all nodes defined in the Linux FailSafe pool. You can also select “Nodes In Cluster” to view all nodes that belong to the default cluster. Click any node's name or icon to view detailed status and configuration information about the node.

5.4.3.2. Displaying Nodes with the Cluster Manager CLI

After you have defined a node, you can display the node's parameters with the following command:

cmgr> show node A 

A show node command on node cm1a would yield the following display:

cmgr> show node cm1
Logical Node Name: cm1
Hostname: cm1
Nodeid: 1
Reset type: reset
System Controller: msc
System Controller status: enabled
System Controller owner: cm2
System Controller owner device: /dev/ttyd2
System Controller owner type: tty
ControlNet Ipaddr: cm1
ControlNet HB: true
ControlNet Control: true
ControlNet Priority: 0

You can see a list of all of the nodes that have been defined with the following command:

cmgr> show nodes in pool

You can see a list of all of the nodes that have defined for a specified cluster with the following command:

cmgr> show nodes [in cluster A]

If you have specified a default cluster, you do not need to specify a cluster when you use this command and it will display the nodes defined in the default cluster.

5.4.4. Linux FailSafe HA Parameters

There are several parameters that determine the behavior of the nodes in a cluster of a Linux FailSafe system.

The Linux FailSafe parameters are as follows:

5.4.4.1. Resetting Linux FailSafe Parameters with the Cluster Manager GUI

To set Linux FailSafe parameters with the Cluster Manager GUI, perform the following steps:

  1. Launch the FailSafe Manager from a menu or the command line.

  2. On the left side of the display, click on the “Nodes & Cluster” category.

  3. On the right side of the display click on the “Set Linux FailSafe HA Parameters” task link to launch the task.

  4. Enter the selected inputs.

  5. Click on “OK” at the bottom of the screen to complete the task, or click on “Cancel” to cancel.

5.4.4.2. Resetting Linux FailSafe Parameters with the Cluster Manager CLI

You can modify the Linux FailSafe parameters with the following command:

cmgr> modify ha_parameters [on node A] [in cluster B]

If you have specified a default node or a default cluster, you do not have to specify a node or a cluster in this command. Linux FailSafe will use the default.

Enter commands, when finished enter either "done" or "cancel"

A?

When this prompt of the node name appears, you enter the Linux FailSafe parameters you wish to modify in the following format:

set node_timeout to A
set heartbeat to B
set run_pwrfail to C
set tie_breaker to D

5.4.5. Defining a Cluster

A cluster is a collection of one or more nodes coupled with each other by networks or other similar interconnects. In Linux FailSafe, a cluster is identified by a simple name. A given node may be a member of only one cluster.

To define a cluster, you must provide the following information:

5.4.5.1. Adding Nodes to a Cluster

After you have added nodes to the pool and defined a cluster, you must provide the names of the nodes to include in the cluster.

5.4.5.2. Defining a Cluster with the Cluster Manager GUI

To define a cluster with the Cluster Manager GUI, perform the following steps:

  1. Launch the Linux FailSafe Manager.

  2. On the left side of the display, click on “Guided Configuration”.

  3. On the right side of the display click on “Set Up a New Cluster” to launch the task link.

  4. In the resulting window, click each task link in turn, as it becomes available. Enter the selected inputs for each task.

  5. When finished, click “OK” to close the taskset window.

5.4.5.3. Defining a Cluster with the Cluster Manager CLI

When you define a cluster with the CLI, you define and cluster and add nodes to the cluster with the same command.

Use the following cluster manager CLI command to define a cluster:

cmgr> define cluster A

Entering this command specifies the name of the node you are defining and puts you in a mode that allows you to add nodes to the cluster. The following prompt appears:

cluster A?

When this prompt appears during cluster creation, you can specify nodes to include in the cluster and you can specify an email address to direct messages that originate in this cluster.

You specify nodes to include in the cluster with the following command:

cluster A? add node C
cluster A? 

You can add as many nodes as you want to include in the cluster.

You specify an email program to use to direct messages with the following command:

cluster A? set notify_cmd to B
cluster A? 

You specify an email address to direct messages with the following command:

cluster A? set notify_addr to B
cluster A? 

You specify a mode for the cluster (normal or experimental) with the following command:

cluster A? set ha_mode to D
cluster A? 

When you are finished defining the cluster, enter done to return to the cmgr prompt.

5.4.6. Modifying and Deleting Clusters

After you have defined a cluster, you can modify the attributes of the cluster or you can delete the cluster. You cannot delete a cluster that contains nodes; you must move those nodes out of the cluster first.

5.4.6.1. Modifying and Deleting a Cluster with the Cluster Manager GUI

To modify a cluster with the Cluster Manager GUI, perform the following procedure:

  1. Launch the Linux FailSafe Manager.

  2. On the left side of the display, click on the “Nodes & Cluster” category.

  3. On the right side of the display click on the “Modify a Cluster Definition” task link to launch the task.

  4. Enter the selected inputs.

  5. Click on “OK” at the bottom of the screen to complete the task, or click on “Cancel” to cancel.

To delete a cluster with the Cluster Manager GUI, perform the following procedure:

  1. Launch the Linux FailSafe Manager.

  2. On the left side of the display, click on the “Nodes & Cluster” category.

  3. On the right side of the display click on the “Delete a Cluster” task link to launch the task.

  4. Enter the selected inputs.

  5. Click on “OK” at the bottom of the screen to complete the task, or click on “Cancel” to cancel.

5.4.6.2. Modifying and Deleting a Cluster with the Cluster Manager CLI

To modify an existing cluster, enter the following command:

cmgr> modify cluster A

Entering this command specifies the name of the cluster you are modifying and puts you in a mode that allows you to modify the cluster. The following prompt appears:

cluster A?

When this prompt appears, you can modify the cluster definition with the following commands:

cluster A? set notify_addr to B
cluster A? set notify_cmd to B
cluster A? add node C
cluster A? remove node D
cluster A? 

When you are finished modifying the cluster, enter done to return to the cmgr prompt.

You can delete a defined cluster with the following command:

cmgr> delete cluster A

5.4.7. Displaying Clusters

You can display defined clusters with the Cluster Manager GUI or the Cluster Manager CLI.

5.4.7.1. Displaying a Cluster with the Cluster Manager GUI

The Cluster Manager GUI provides a convenient display of a cluster and its components through the FailSafe Cluster View. You can launch the FailSafe Cluster View directly, or you can bring it up at any time by clicking on the “FailSafe Cluster View” prompt at the bottom of the “FailSafe Manager” display.

From the View menu of the FailSafe Cluster View, you can choose elements within the cluster to examine. To view details of the cluster, click on the cluster name or icon. Status and configuration information will appear in a new window. To view this information within the FailSafe Cluster View window, select Options. When you then click on the Show Details option, the status details will appear in the right side of the window.

5.4.8. Displaying a Cluster with the Cluster Manager CLI

After you have defined a cluster, you can display the nodes in that cluster with the following command:

cmgr> show cluster A

You can see a list of the clusters that have been defined with the following command:

cmgr> show clusters