Product SiteDocumentation Site

2.6.3. Configure Corosync

On either node, use pcs cluster auth to authenticate as the hacluster user:
[root@pcmk-1 ~]# pcs cluster auth pcmk-1 pcmk-2
Username: hacluster
Password:
pcmk-2: Authorized
pcmk-1: Authorized
Next, use pcs cluster setup on the same node to generate and synchronize the corosync configuration:
[root@pcmk-1 ~]# pcs cluster setup --name mycluster pcmk-1 pcmk-2
Destroying cluster on nodes: pcmk-1, pcmk-2...
pcmk-2: Stopping Cluster (pacemaker)...
pcmk-1: Stopping Cluster (pacemaker)...
pcmk-1: Successfully destroyed cluster
pcmk-2: Successfully destroyed cluster

Sending 'pacemaker_remote authkey' to 'pcmk-1', 'pcmk-2'
pcmk-2: successful distribution of the file 'pacemaker_remote authkey'
pcmk-1: successful distribution of the file 'pacemaker_remote authkey'
Sending cluster config files to the nodes...
pcmk-1: Succeeded
pcmk-2: Succeeded

Synchronizing pcsd certificates on nodes pcmk-1, pcmk-2...
pcmk-2: Success
pcmk-1: Success
Restarting pcsd on the nodes in order to reload the certificates...
pcmk-2: Success
pcmk-1: Success
If you received an authorization error for either of those commands, make sure you configured the hacluster user account on each node with the same password.

Note

If you are not using pcs for cluster administration, follow whatever procedures are appropriate for your tools to create a corosync.conf and copy it to all nodes.
The pcs command will configure corosync to use UDP unicast transport; if you choose to use multicast instead, choose a multicast address carefully. [4]
The final corosync.conf configuration on each node should look something like the sample in Appendix B, Sample Corosync Configuration.