Show Table of Contents
2.3.2. Database Partitioning
A mounted database partition provides various benefits such as scaling storage to accomodate a growing database, easy backup and transfer through replication, and encryption for added security.
To set up a database partition mount point, follow this procedure prior to installation.
Procedure 2.1. Creating and Mounting a Database Partition
- Log in to the database server as
root. For Embedded Databases, this is the same server as the Red Hat Satellite. - Create the
postgresuser.# useradd -d /var/lib/pgsql -M -r -s /bin/bash -U postgres
- Add the mount point in
/etc/fstab. For example:UUID="xxxxxxxx-xxxx-xxxx" /opt/rh/postgresql92/root/var/lib/pgsql ext4 defaults 0 0
Important
Red Hat does not support storing the database on a network filesystem. - Mount the partition to
/opt/rh/postgresql92/root/var/lib/pgsqland change ownership topostgres:postgres:# mkdir -p /opt/rh/postgresql92/root/var/lib/pgsql # mount /opt/rh/postgresql92/root/var/lib/pgsql # chown postgres:postgres /opt/rh/postgresql92/root/var/lib/pgsql # chmod 700 /opt/rh/postgresql92/root/var/lib/pgsql # restorecon -Rv /opt/rh/postgresql92/root/var/lib/pgsql
The Red Hat Satellite Installation Script will install the database to the partition mounted at
/opt/rh/postgresql92/root/var/lib/pgsql.
Important
Due to an updated version of the PostgreSQL Embedded Database, the database location has changed from
/var/lib/pgsql in Red Hat Satellite 5.6 to /opt/rh/postgresql92/root/var/lib/pgsql in Red Hat Satellite 5.7. Make sure to allocate enough hard disk space to this location.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.