There's more...

The crm command is actually a fully functional pseudo-shell. If executed without parameters, it presents a prompt and waits for valid crm commands. These commands include help for every level chosen. For example, to see what options are available when putting a node into standby, we can type this input while in a crm shell:

node help standby

 

Then, we can use what we learned previously and put the node into standby state until it is rebooted and Corosync is started again. Like this:

node standby pg1 reboot

This is extremely helpful as Pacemaker has a lot of commands, and it's easy to forget the proper syntax.

Get PostgreSQL High Availability Cookbook - Second Edition 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.