pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: CS DBA <cs_dba@consistentstate.com>
To: pgsql-admin@postgresql.org
Subject: Re: Postgres on NAS/NFS
Date: Thu, 10 Feb 2011 13:02:02 -0700
Message-ID: <4D54443A.3050600@consistentstate.com> (raw)
In-Reply-To: <AANLkTi=vkCQfQhQdp_cghbwrJaYYUVSt6E1_mLkEARn9@mail.gmail.com>
References: <9424C7B4-672D-4C64-BE6A-699708981C0B@gmail.com>
	<AANLkTi=vkCQfQhQdp_cghbwrJaYYUVSt6E1_mLkEARn9@mail.gmail.com>

On 02/09/2011 03:49 PM, Jim Mlodgenski wrote:
> On Wed, Feb 9, 2011 at 2:59 PM, Bryan Keller<bryanck@gmail.com>  wrote:
>> I am considering running a Postgres with the database hosted on a NAS via NFS. I have read a few things on the Web saying this is not recommended, as it will be slow and could potentially cause data corruption.
>>
>> My goal is to have the database on a shared filesystem so in case of server failure, I can start up a standby Postgres server and point it to the same database. I would rather not use a SAN as I have heard horror stories about managing them. Also they are extremely expensive. A DAS would be another option, but I'm not sure if a DAS can be connected to two servers for server failover purposes.
>>
>> Currently I am considering not using a shared filesystem and instead using replication between the two servers.
>>
>> I am wondering what solutions have others used for my active-passive Postgres failover scenario? Is a NAS still not a recommended approach? Will a DAS work? Or is replication the best approach?
> DAS will absolutely work. Just be careful to fence things properly so
> that you don't end up with 2 servers trying to start the data
> directory at the same time. It will lead to some pretty nasty
> corruption.
>
>> --
>> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-admin
>>

Jim is right, be very careful to fence things properly.  Also, depending 
on how the NAS/DAS is mounted to the servers you may need to tweak 
permissions. I've seen NFS scenarios where the postgres user on the 
secondary machine has a different UID than the one on the source box and 
the result was a mount point owned by nobody:nobody which of course 
disallows postgres from accessing the file system.

-- 
---------------------------------------------
Kevin Kempter       -       Constent State
A PostgreSQL Professional Services Company
           www.consistentstate.com
---------------------------------------------




view thread (13+ messages)  latest in thread

Message-ID: <4D54443A.3050600@consistentstate.com>
Permalink:  ../4D54443A.3050600@consistentstate.com/
Also on:    postgresql.org/message-id/4D54443A.3050600@consistentstate.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: cs_dba@consistentstate.com
  Subject: Re: Postgres on NAS/NFS
  In-Reply-To: <4D54443A.3050600@consistentstate.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox