For this recipe, we have two PostgreSQL nodes: pg1 and pg2, which are assigned IP addresses in the 192.168.56.0 subnet. Follow these steps as a root-capable user:
- On pg1, run this command to generate an authorization key file:
corosync-keygen
- Open another connection to pg1 and perform several activities to generate sufficient entropy until corosync-keygen completes. A good source of random events is software compilation, for example.
- Copy the resulting /etc/corosync/authkey file to pg2. Make sure it is copied to /etc/corosync/authkey on pg1 as well.
- Modify the bindnetaddr, crypto_cipher, and crypto_hash lines in the /etc/corosync/corosync.conf file on both pg1 and pg2 so that it contains the following values:
bindnetaddr: ...