How to do it...

Assuming pg1 is our current primary node, follow these steps as the root user:

  1. Use this command to find the Linux kernel version:
        uname -r
  1. Create a mount location by executing this command:
        mkdir /db
  1. For kernel versions 3.0 and above, mount the filesystem with this command:
        mount -t xfs -o noatime,nodiratime \
              -o logbsize=256k,allocsize=1m \ 
                 /dev/VG_POSTGRES/LV_DATA /db
  1. For kernels below 3.0, mount with this command:
        mount -t xfs -o noatime,nodiratime \
              -o logbufs=8,logbsize=256k,attr2 \ 
              -o allocsize=1m /dev/VG_POSTGRES/LV_DATA /db
  1. Execute this command to confirm a successful mount:
        df /dev/mapper/VG_POSTGRES-LV_DATA

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.