Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzNGO-0006Gx-B6 for pgsql-general@arkaria.postgresql.org; Mon, 10 Sep 2018 14:34:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fzNGM-00081u-Ii for pgsql-general@arkaria.postgresql.org; Mon, 10 Sep 2018 14:34:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzNGM-00081n-AT for pgsql-general@lists.postgresql.org; Mon, 10 Sep 2018 14:34:02 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzNGJ-0000sZ-8t for pgsql-general@lists.postgresql.org; Mon, 10 Sep 2018 14:34:01 +0000 Received: from crunchy.local (wsip-98-172-23-16.dc.dc.cox.net [98.172.23.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 6C38454669; Mon, 10 Sep 2018 14:33:56 +0000 (UTC) Subject: Re: Volume partitioning (was Re: pgbackrest when data/base is symlinked to another volume) To: Ron , pgsql-general@lists.postgresql.org References: <3db7c0dc-b5e8-fab6-3521-bc60e2c1375b@pgmasters.net> <83d9fd2e-49f2-7100-33b0-ff381a2c996b@pgmasters.net> From: David Steele Message-ID: <7d479816-e84b-00e9-bf87-17a19cc07581@pgmasters.net> Date: Mon, 10 Sep 2018 10:33:55 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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@pgmasters.net