How to do it...

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

  1. Export our list of XFS mount options to avoid long lines by executing these commands:
        OPS=noatime,nodiratime,logbufs=8,logbsize=256k
        OPS=$OPS,attr2,allocsize=1m
  1. Add an XFS primitive to Pacemaker with crm:
        crm configure primitive pg_fs ocf:heartbeat:Filesystem \
            params device="/dev/VG_POSTGRES/LV_DATA" \
                   directory="/db" \
                   fstype="xfs" \
                   options="$OPS" \
            op start interval="0" timeout="60" \
            op stop interval="0" timeout="120"
  1. Clean up any errors that might have accumulated with crm:
        crm resource cleanup pg_fs
  1. Display the status of our new XFS resource 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.