Chapter 8. Modifying, displaying, and exporting the corosync.conf file
To set cluster parameters, corosync uses the corosync.conf file. Do not edit corosync.conf directly. Use the pcs interface instead.
8.1. Modifying the corosync.conf file with the pcs command Copy linkLink copied to clipboard!
Modify corosync.conf parameters, such as token timeouts and logging levels, using pcs. pcs validates input and synchronizes changes across all nodes, ensuring consistency. While some updates apply immediately, modifying core transport settings requires a cluster restart.
Procedure
The following command modifies the parameters in the
corosync.conffile:pcs cluster config update [transport pass:quotes[transport options]] [compression pass:quotes[compression options]] [crypto pass:quotes[crypto options]] [totem pass:quotes[totem options]] [--corosync_conf pass:quotes[path]]
# pcs cluster config update [transport pass:quotes[transport options]] [compression pass:quotes[compression options]] [crypto pass:quotes[crypto options]] [totem pass:quotes[totem options]] [--corosync_conf pass:quotes[path]]Copy to Clipboard Copied! Toggle word wrap Toggle overflow The following example command udates the
knet_pmtud_intervaltransport value and thetokenandjointotem values:pcs cluster config update transport knet_pmtud_interval=35 totem token=10000 join=100
# pcs cluster config update transport knet_pmtud_interval=35 totem token=10000 join=100Copy to Clipboard Copied! Toggle word wrap Toggle overflow
8.2. Displaying the corosync.conf file with the pcs command Copy linkLink copied to clipboard!
Display the contents of the corosync.conf configuration file to verify cluster settings, network parameters, and quorum configuration.
Procedure
Display the contents of the
corosync.conffile:pcs cluster corosync
# pcs cluster corosyncCopy to Clipboard Copied! Toggle word wrap Toggle overflow You can print the contents of the
corosync.conffile in a human-readable format with thepcs cluster configcommand, as in the following example.The output for this command includes the UUID for the cluster if the UUID was added manually as described in Identifying clusters by UUID.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
8.3. Exporting the corosync.conf file Copy linkLink copied to clipboard!
You can run the pcs cluster config show command with the --output-format=cmd option to display the pcs configuration commands that can be used to recreate the existing corosync.conf file on a different system.
Procedure
Export the
corosync.conffile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow