Este contenido no está disponible en el idioma seleccionado.
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 Copiar enlaceEnlace copiado en el portapapeles!
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]]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
8.2. Displaying the corosync.conf file with the pcs command Copiar enlaceEnlace copiado en el portapapeles!
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 corosyncYou 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.
[root@r8-node-01 ~]# pcs cluster config Cluster Name: HACluster Cluster UUID: ad4ae07dcafe4066b01f1cc9391f54f5 Transport: knet Nodes: r8-node-01: Link 0 address: r8-node-01 Link 1 address: 192.168.122.121 nodeid: 1 r8-node-02: Link 0 address: r8-node-02 Link 1 address: 192.168.122.122 nodeid: 2 Links: Link 1: linknumber: 1 ping_interval: 1000 ping_timeout: 2000 pong_count: 5 Compression Options: level: 9 model: zlib threshold: 150 Crypto Options: cipher: aes256 hash: sha256 Totem Options: downcheck: 2000 join: 50 token: 10000 Quorum Device: net Options: sync_timeout: 2000 timeout: 3000 Model Options: algorithm: lms host: r8-node-03 Heuristics: exec_ping: ping -c 1 127.0.0.1
8.3. Exporting the corosync.conf file Copiar enlaceEnlace copiado en el portapapeles!
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:[root@r8-node-01 ~]# pcs cluster config show --output-format=cmd pcs cluster setup HACluster \ r8-node-01 addr=r8-node-01 addr=192.168.122.121 \ r8-node-02 addr=r8-node-02 addr=192.168.122.122 \ transport \ knet \ link \ linknumber=1 \ ping_interval=1000 \ ping_timeout=2000 \ pong_count=5 \ compression \ level=9 \ model=zlib \ threshold=150 \ crypto \ cipher=aes256 \ hash=sha256 \ totem \ downcheck=2000 \ join=50 \ token=10000