Setting Cluster Parameters
Fencing is an important part of setting up a production-level HA
cluster. For simplicity, it is disabled in this example. If you
intend to take advantage of stonith
, see
About Fencing Configuration (stonith) for additional
information.
To set cluster parameters:
-
Disable the fencing feature by running the following command:
sudo pcs property set stonith-enabled=false
Fencing is an advanced feature that helps protect your data from being corrupted by nodes that might be failing or are unavailable. Pacemaker uses the term
stonith
(shoot the other node in the head) to describe fencing options. This configuration depends on particular hardware and a deeper understanding of the fencing process. For this reason, it is recommended that you disable the fencing feature. -
Optionally, configure the cluster to ignore the quorum state by running the following command:
sudo pcs property set no-quorum-policy=ignore
Because this example uses a two-node cluster, disabling the no-quorum policy makes the most sense, as quorum technically requires a minimum of three nodes to be a viable configuration. Quorum is only achieved when more than half of the nodes agree on the status of the cluster.
In the current release of Corosync, this issue is treated specially for two-node clusters, where the quorum value is artificially set to 1 so that the primary node is always considered in quorum. In the case where a network outage results in both nodes going offline for a period, the nodes race to fence each other and the first to succeed wins quorum. The fencing agent can usually be configured to give one node priority so that it is more likely to win quorum if this is preferred.
-
Configure a migration policy by running the following command:
sudo pcs resource defaults update
Running this command configures the cluster to move the service to a new node after a single failure.