The Corosync configuration is normally located in /etc/corosync/corosync.conf and an example for a machine with an address of 1.2.3.4
in a cluster communicating on port 1234 (without peer authentication and message encryption) is shown below.
La sezione logging risulta piuttosto ovvia e la sezione amf si riferisce all'Availability Management Framework e non è affrontata in questo documento.
The interesting part of the configuration is the totem section. This is where we define how the node can communicate with the rest of the cluster and what protocol version and options (including encryption
) it should use. Beginners are encouraged to use the values shown and modify the interface section based on their network.
It is also possible to configure Corosync for an IPv6 based environment. Simply configure bindnetaddr
and mcastaddr
with their IPv6 equivalents, eg.
Per indicare a Corosync di utilizzare il cluster manager Pacemaker è necessario aggiungere il seguente frammento ad una configurazione Corosync funzionante e riavviare il cluster.
The cluster needs to be run as root so that its child processes (the lrmd
in particular) have sufficient privileges to perform the actions requested of it. After all, a cluster manager that can’t add an IP address or start apache is of little use.
La seconda direttiva istruisce il cluster nell'utilizzare Pacemaker.