How to initialize a fresh bare-metal PostgreSQL 18 cluster directly onto a dedicated 500GB mount point (/mnt/dbdata)? [migrated]
01:21 16 Nov 2026

I am setting up a brand new bare-metal/VM installation of PostgreSQL 18 on Linux and want the database cluster initialized directly onto a dedicated 500GB volume mounted at /mnt/dbdata from day one (no existing data to migrate).

Environment

  • OS & Kernel: RHEL 9.9

  • PostgreSQL Version: PostgreSQL 18

  • Target Volume: 500GB disk mounted at /mnt/dbdata

Rather than initializing the cluster on the OS root disk and moving it later, I want PostgreSQL 18's initial cluster (PGDATA) and systemd service configured to use /mnt/dbdata cleanly right after package installation.

database postgresql rhel