Re: Volume partitioning (was Re: pgbackrest when data/base is symlinked to another volume)

From: David Steele <david(at)pgmasters(dot)net>
To: Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Volume partitioning (was Re: pgbackrest when data/base is symlinked to another volume)
Date: 2018-09-10 14:33:55
Message-ID: 7d479816-e84b-00e9-bf87-17a19cc07581@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Ron

On 9/8/18 4:26 PM, Ron wrote:
>
> Googled "postgresql disk partitioning" and "postgresql volume
> partitioning" without much success.
>
> Is the best practice volume partitioning:
> /Database/9.6/data
> /Database/9.6/data/pg_log
> /Database/9.6/data/pg_xlog
>
> where /var/lib/pgsql/9.6 (on RHEL6) is a symlink to /Database/9.6/data
> and PGDATA=/Database/9.6/data
>
> *or *
>
> /Database/9.6/data/base
> /Database/9.6/data/pg_log
> /Database/9.6/data/pg_xlog
>
> where PGDATA=/var/lib/pgsql/9.6/data and base, pg_log and px_xlog are
> symlinks to the partitions?

This is really a matter of preference, but simpler is better, so the
first one looks better to me.

In general I prefer to keep everything in /var/lib/pgsql/9.6:

/var/lib/pgsql/9.6/data
/var/lib/pgsql/9.6/data/pg_xlog -> /var/lib/pgsql/9.6/wal

Then use the log_directory setting to put logs in:

/var/log/pgsql or /var/lib/pgsql/9.6/log

pgBackRest will expect to be pointed at a real directory (pg-path) and
expect the data_directory in PostgreSQL to match.

Regards,
--
-David
david(at)pgmasters(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alessandro Gherardi 2018-09-10 14:52:00 Re: scram-sha-256 authentication broken in FIPS mode
Previous Message Adrian Klaver 2018-09-10 14:21:25 Re: PG8.3->10 migration data differences