How to do it...

Perform these steps on any Pacemaker node as the root user:

  1. Add a colocation for DRBD to Pacemaker with crm:
        crm configure colocation col_pg_drbd \
            inf: PGServer ms_drbd_pg:Master
  1. Add a colocation for the e-mail alert with crm:
        crm configure colocation col_pg_mail \
            inf: pg_mail PGServer
  1. Add a resource order to Pacemaker with crm:
          crm configure order ord_pg \
              inf: ms_drbd_pg:promote PGServer:start
  1. Display the status of our new group with crm:
        crm resource status

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.