Editing the corosync.conf file in Red Hat Enterprise Linux 7
Contents
Overview
Applicable Environments
- Red Hat Enterprise Linux (RHEL) 7 with the High Availability Add-On
References
- How to change totem token timeout value in a RHEL 5, 6, or 7 High Availability cluster?
- How to configure consensus timeout in Red Hat Enterprise Linux 5,6,7 with High Availability Add on?
- How do i add or remove support for RRP on a existing pacemaker cluster?
The corosync.conf Configuration File
The corosync.conf configuration file provides the cluster parameters used by corosync, the cluster manager that Pacemaker is built on. In general, you should not edit the corosync.conf directly but, instead, use the pcs or pcsd interface to set the corosync parameters when you create a Pacemaker cluster. If you need to modify any of the corosync values for an existing cluster, however, you may need to edit the corosync.conf file directly.
For information on the directives that are defined in the corosync.conf file, see the corosync.conf(5) man page.
As of RHEL 7.4, you can perform the following tasks to modify an existing cluster configuration with the pcs command, which will update the corosync.conf file:
- adding and removing cluster nodes
- changing quorum options:
auto_tie_breaker,last_man_standing,last_man_standing_windowandwait_for_all - adding and removing a quorum device (
qdevice) - modifying quorum device configuration
Note that the two_node configuration parameter is set automatically and does not require you to set this manually.
If you find that you need to modify any of the following corosync.conf parameters for an existing cluster, you will need to edit the corosync.conf file directly:
- cluster_name
- totem options:
- token
- token_coefficient
- join
- consensus
- miss_count_const
- fail_recv_const
- transport
- ip_version
- rrp_mode
- interface options:
- bindnetaddr
- broadcast (use of this parameter is discouraged)
- mcastaddr, mcastport, and ttl
- crypto_cipher and crypto_hash
Modifying the corosync.conf Configuration File
The following procedure modifies a value in the corosync.conf configuration file:
-
On one node in the cluster, edit the
/etc/corosync/corosync.conffile. For example, to change the token timeout value to 5000 ms, edit thetokenline in thetotemstanza.totem { version: 2 secauth: off cluster_name: rhel7-cluster transport: udpu rrp_mode: passive token: 5000 <--- } -
If you have changed any of the following parameters, you must propagate the change to all nodes in the cluster:
- cluster_name
- the following totem options: token, token_coefficient, join, consensus, miss_count_const, fail_recv_const, transport, ip_version, rrp_mode
- broadcast
- mcastaddr and mcastport
- crypto_cipher and crypto_hash
To propagate the change, run the following command on the node on which you have updated the
corosync.conffile:# pcs cluster sync -
If you have changed any of the following parameters, restart cluster services on all nodes:
- cluster_name
- transport
- ip_version
- rrp_mode
- broadcast
- mcastaddr and mcastport
- crypto_cipher and crypto_hash
- votequorum options, with expection of: votes, quorum_votes, expected_votes and two_node. Everything else requires a cluster restart.
To restart cluster services on all nodes, run the following command from one node in the cluster:
# pcs cluster stop --all
# pcs cluster start --all -
If you have changed any of the following parameters, you need to restart
corosync.serviceonly on the node on which you have changed the parameter:- bindnetaddr
- ttl
To restart
corosync.serviceon one node, run the following command from that node:# pcs cluster stop
# pcs cluster start