How it works...

Our first step is to find our current kernel version as this will dictate which settings have been defaulted to our desired values. Then, we continue with the mount command and specify -t to set the filesystem type to xfs. The last two parameters to the mount command define the device we are mounting and which directory it should be attached to. In this case, we use our /dev/VG_POSTGRES/LV_DATA device and the /db directory, which we've discussed throughout the book.

All of the parameters prefixed with -o are options that mount should apply during the mounting process. These options define how certain aspects of the filesystem behave. Here is a quick overview of the options we selected, and what they mean:

  • We use noatime

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.