How to do it...

In the previous chapter, we created a DRBD resource named pg. With this in mind, follow these steps as the root user to add DRBD to Pacemaker:

  1. Create a basic Pacemaker primitive for DRBD with this command:
        crm configure primitive drbd_pg ocf:linbit:drbd \
            params drbd_resource="pg" \
            op monitor interval="15" role="Master" \
            op monitor interval="20" role="Slave" \
            op start interval="0" timeout="240" \
            op stop interval="0" timeout="120"
  1. Create a master/slave resource with this command:
        crm configure ms ms_drbd_pg drbd_pg \
            meta master-max="1" master-node-max="1" \
            clone-max="2" clone-node-max="1" notify="true"
  1. Clean up any errors that might have accumulated with crm:
        crm resource cleanup drbd_pg
  1. Display the ...

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.