6.5. Configuring Fence Devices
Configuring fence devices consists of creating, updating, and deleting fence devices for the cluster. You must create and name the fence devices in a cluster before you can configure fencing for the nodes in the cluster. For information on configuring fencing for the individual nodes in the cluster, see Section 6.7, “Configuring Fencing for Cluster Members”.
Before configuring your fence devices, you may want to modify some of the fence daemon properties for your system from the default values. The values you configure for the fence daemon are general values for the cluster. The general fencing properties for the cluster you may want to modify are summarized as follows:
post_fail_delayattribute is the number of seconds the fence daemon (
fenced) waits before fencing a node (a member of the fence domain) after the node has failed. The
post_fail_delaydefault value is
0. Its value may be varied to suit cluster and network performance.
post-join_delayattribute is the number of seconds the fence daemon (
fenced) waits before fencing a node after the node joins the fence domain. The
post_join_delaydefault value is
6. A typical setting for
post_join_delayis between 20 and 30 seconds, but can vary according to cluster and network performance.
You reset the values of the
post_join_delayattributes with the
--setfencedaemonoption of the
ccscommand. Note, however, that executing the
ccs --setfencedaemoncommand overwrites all existing fence daemon properties that have been explicitly set and restores them to their default values.
For example, to configure a value for the
post_fail_delayattribute, execute the following command. This command will overwrite the values of all other existing fence daemon properties that you have set with this command and restore them to their default values.
ccs -h host --setfencedaemon post_fail_delay=value
To configure a value for the
post_join_delayattribute, execute the following command. This command will overwrite the values of all other existing fence daemon properties that you have set with this command and restore them to their default values.
ccs -h host --setfencedaemon post_join_delay=value
To configure a value for both the
post_join_delayattribute and the
post_fail_delayattribute, execute the following command:
ccs -h host --setfencedaemon post_fail_delay=value post_join_delay=value
For more information about the
post_fail_delayattributes as well as the additional fence daemon properties you can modify, see the fenced(8) man page and see the cluster schema at
/usr/share/cluster/cluster.rng, and the annotated schema at
To configure a fence device for a cluster, execute the following command:
ccs -h host --addfencedev devicename [fencedeviceoptions]
For example, to configure an APC fence device in the configuration file on the cluster node
my_apcwith an IP address of
apc_ip_example, a login of
login_example, and a password of
password_example, execute the following command:
ccs -h node1 --addfencedev myfence agent=fence_apc ipaddr=apc_ip_example login=login_example passwd=password_example
The following example shows the
fencedevicessection of the
cluster.confconfiguration file after you have added this APC fence device:
<fencedevices> <fencedevice agent="fence_apc" ipaddr="apc_ip_example" login="login_example" name="my_apc" passwd="password_example"/> </fencedevices>
When configuring fence devices for a cluster, you may find it useful to see a listing of available devices for your cluster and the options available for each device. You may also find it useful to see a listing of fence devices currently configured for your cluster. For information on using the
ccscommand to print a list of available fence devices and options or to print a list of fence devices currently configured for your cluster, see Section 6.6, “Listing Fence Devices and Fence Device Options”.
To remove a fence device from your cluster configuration, execute the following command:
ccs -h host --rmfencedev fence_device_name
For example, to remove a fence device that you have named
myfencefrom the cluster configuration file on cluster node
node1, execute the following command:
ccs -h node1 --rmfencedev myfence
If you need to modify the attributes of a fence device you have already configured, you must first remove that fence device then add it again with the modified attributes.
Note that when you have finished configuring all of the components of your cluster, you will need to sync the cluster configuration file to all of the nodes, as described in Section 6.15, “Propagating the Configuration File to the Cluster Nodes”.