How it works...

The first step involves securing our Corosync communication channel. The corosync-keygen utility will generate a 2,048-bit key that helps Pacemaker nodes to securely communicate with each other, but doing so may require a lot of random input. This random input must come from the server itself, so simply typing gibberish in the console while we wait will not suffice.

We can generate entropy by making the server perform tasks. If the server is otherwise idle, we may need to execute commands, test SQL, or compile basic software. Given enough server activity, the corosync-keygen command will eventually exit and save a file named authkey in the /etc/corosync configuration directory. As we want this file to be the same on all nodes, ...

Get PostgreSQL 12 High Availability Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.