Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EC5981337B7E for ; Thu, 10 Feb 2011 16:27:55 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 01488-09 for ; Thu, 10 Feb 2011 20:27:48 +0000 (UTC) X-Greylist: delayed 00:25:40.652973 by SQLgrey-1.7.6 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mail.postgresql.org (Postfix) with ESMTP id 3FE411337B54 for ; Thu, 10 Feb 2011 16:27:48 -0400 (AST) Received: by pwj3 with SMTP id 3so422569pwj.19 for ; Thu, 10 Feb 2011 12:27:47 -0800 (PST) Received: by 10.142.193.2 with SMTP id q2mr20293098wff.409.1297368126317; Thu, 10 Feb 2011 12:02:06 -0800 (PST) Received: from Issac.consistentstate.com (173-164-51-9-colorado.hfc.comcastbusiness.net [173.164.51.9]) by mx.google.com with ESMTPS id b11sm421543wff.21.2011.02.10.12.02.04 (version=SSLv3 cipher=OTHER); Thu, 10 Feb 2011 12:02:05 -0800 (PST) Message-ID: <4D54443A.3050600@consistentstate.com> Date: Thu, 10 Feb 2011 13:02:02 -0700 From: CS DBA User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Red Hat/3.1.7-3.el6_0 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Postgres on NAS/NFS References: <9424C7B4-672D-4C64-BE6A-699708981C0B@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.6 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201102/70 X-Sequence-Number: 36709 On 02/09/2011 03:49 PM, Jim Mlodgenski wrote: > On Wed, Feb 9, 2011 at 2:59 PM, Bryan Keller 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 ---------------------------------------------