pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgres on NAS/NFS
13+ messages / 11 participants
[nested] [flat]
* Postgres on NAS/NFS
@ 2011-02-09 19:31 Bryan Keller <bryanck@gmail.com>
0 siblings, 0 replies; 13+ messages in thread
From: Bryan Keller @ 2011-02-09 19:31 UTC (permalink / raw)
To: pgsql-admin
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 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?
^ permalink raw reply [nested|flat] 13+ messages in thread
* Postgres on NAS/NFS
@ 2011-02-09 19:59 Bryan Keller <bryanck@gmail.com>
2011-02-09 20:05 ` Re: Postgres on NAS/NFS Anibal David Acosta <aa@devshock.com>
2011-02-09 22:49 ` Re: Postgres on NAS/NFS Jim Mlodgenski <jimmy76@gmail.com>
2011-02-11 17:09 ` Re: Postgres on NAS/NFS Frederiko Costa <frederiko@gmail.com>
2011-02-14 10:07 ` Re: Postgres on NAS/NFS Stuart Bishop <stuart@stuartbishop.net>
2011-02-16 20:45 ` Re: Postgres on NAS/NFS Bruce Momjian <bruce@momjian.us>
0 siblings, 5 replies; 13+ messages in thread
From: Bryan Keller @ 2011-02-09 19:59 UTC (permalink / raw)
To: pgsql-admin
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?
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Postgres on NAS/NFS
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
@ 2011-02-09 20:05 ` Anibal David Acosta <aa@devshock.com>
4 siblings, 0 replies; 13+ messages in thread
From: Anibal David Acosta @ 2011-02-09 20:05 UTC (permalink / raw)
To: 'Bryan Keller' <bryanck@gmail.com>; pgsql-admin
I think SAN is better for block access instead of file access (NAS)
-----Mensaje original-----
De: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] En nombre de Bryan Keller
Enviado el: miƩrcoles, 09 de febrero de 2011 05:00 p.m.
Para: pgsql-admin@postgresql.org
Asunto: [ADMIN] Postgres on NAS/NFS
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?
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Postgres on NAS/NFS
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
@ 2011-02-09 22:49 ` Jim Mlodgenski <jimmy76@gmail.com>
2011-02-10 20:02 ` Re: Postgres on NAS/NFS CS DBA <cs_dba@consistentstate.com>
4 siblings, 1 reply; 13+ messages in thread
From: Jim Mlodgenski @ 2011-02-09 22:49 UTC (permalink / raw)
To: Bryan Keller <bryanck@gmail.com>; +Cc: pgsql-admin
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
>
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Postgres on NAS/NFS
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
2011-02-09 22:49 ` Re: Postgres on NAS/NFS Jim Mlodgenski <jimmy76@gmail.com>
@ 2011-02-10 20:02 ` CS DBA <cs_dba@consistentstate.com>
0 siblings, 0 replies; 13+ messages in thread
From: CS DBA @ 2011-02-10 20:02 UTC (permalink / raw)
To: pgsql-admin
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
---------------------------------------------
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Postgres on NAS/NFS
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
@ 2011-02-11 17:09 ` Frederiko Costa <frederiko@gmail.com>
2011-02-11 23:00 ` Re: Postgres on NAS/NFS Joseph Conway <mail@joeconway.com>
4 siblings, 1 reply; 13+ messages in thread
From: Frederiko Costa @ 2011-02-11 17:09 UTC (permalink / raw)
To: Bryan Keller <bryanck@gmail.com>; +Cc: pgsql-admin
Hello,
I have had the experience of running a database hosted on a dedicated
NFS share. I have not had any problems. I would rather have this
solution than having to use SAN, due to the flexibility I would get
plus the less overhead in management.
I recommend that you skim through a paper from Oracle/Netapp (from
2004, I think), where they talk a little bit about running a database
on NFS (I'm not recommending neither Oracle, nor Netapp). But I think
it's worth to mention it because it clarified a few things to me. In
this scenario, the conclusion I get is that performance gain in a SAN
does not payoff the management overhead you get. Specially in the
scenario you're describing, which does not seem to have a heavy usage.
Paying close attention to details to avoid any corruption issue in a
shared environment, I don't think it would be a problem going for NFS.
Regards,
~Frederiko Costa
Linkedin profile: http://www.linkedin.com/in/frederikocosta
On Wed, Feb 9, 2011 at 11:59 AM, 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?
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Postgres on NAS/NFS
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
2011-02-11 17:09 ` Re: Postgres on NAS/NFS Frederiko Costa <frederiko@gmail.com>
@ 2011-02-11 23:00 ` Joseph Conway <mail@joeconway.com>
0 siblings, 0 replies; 13+ messages in thread
From: Joseph Conway @ 2011-02-11 23:00 UTC (permalink / raw)
To: Frederiko Costa <frederiko@gmail.com>; +Cc: Bryan Keller <bryanck@gmail.com>; pgsql-admin
On 2/11/11 9:09 AM, Frederiko Costa wrote:
> Paying close attention to details to avoid any corruption issue in a
> shared environment, I don't think it would be a problem going for NFS.
FYI -- beware of NFS related kernel bugs in recent Red Hat 5.x kernels:
http://archives.postgresql.org/pgsql-hackers/2011-01/msg02611.php
Joe
--
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Postgres on NAS/NFS
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
@ 2011-02-14 10:07 ` Stuart Bishop <stuart@stuartbishop.net>
2011-02-14 18:05 ` Re: Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
4 siblings, 1 reply; 13+ messages in thread
From: Stuart Bishop @ 2011-02-14 10:07 UTC (permalink / raw)
To: Bryan Keller <bryanck@gmail.com>; +Cc: pgsql-admin
On Thu, Feb 10, 2011 at 2:59 AM, 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.
Its not recommended if you have a crap NFS implementation. I think it
was about 10 years ago I ran Oracle under Solaris with a Netapp for
storage. Rock solid, supported configuration, and actually
outperformed using local disk. Hopefully the open source NFS clients
have caught up by now - if you see problem reports or recommendations,
pay attention to the platform and implementation rather than the
protocol.
--
Stuart Bishop <stuart@stuartbishop.net>
http://www.stuartbishop.net/
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Postgres on NAS/NFS
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
2011-02-14 10:07 ` Re: Postgres on NAS/NFS Stuart Bishop <stuart@stuartbishop.net>
@ 2011-02-14 18:05 ` Bryan Keller <bryanck@gmail.com>
2011-02-14 18:27 ` Re: Postgres on NAS/NFS Scott Marlowe <scott.marlowe@gmail.com>
2011-02-16 20:56 ` Re: Postgres on NAS/NFS Greg Smith <greg@2ndquadrant.com>
0 siblings, 2 replies; 13+ messages in thread
From: Bryan Keller @ 2011-02-14 18:05 UTC (permalink / raw)
To: pgsql-admin
Thanks for the feedback. It sounds like NFS is a viable solution nowadays. I a still going to shoot for using iSCSI, given it is a block-level protocol rather than file-level, it seems to me it would be better suited to database I/O.
On Feb 14, 2011, at 2:07 AM, Stuart Bishop wrote:
> On Thu, Feb 10, 2011 at 2:59 AM, 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.
>
> Its not recommended if you have a crap NFS implementation. I think it
> was about 10 years ago I ran Oracle under Solaris with a Netapp for
> storage. Rock solid, supported configuration, and actually
> outperformed using local disk. Hopefully the open source NFS clients
> have caught up by now - if you see problem reports or recommendations,
> pay attention to the platform and implementation rather than the
> protocol.
>
>
> --
> Stuart Bishop <stuart@stuartbishop.net>
> http://www.stuartbishop.net/
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Postgres on NAS/NFS
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
2011-02-14 10:07 ` Re: Postgres on NAS/NFS Stuart Bishop <stuart@stuartbishop.net>
2011-02-14 18:05 ` Re: Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
@ 2011-02-14 18:27 ` Scott Marlowe <scott.marlowe@gmail.com>
1 sibling, 0 replies; 13+ messages in thread
From: Scott Marlowe @ 2011-02-14 18:27 UTC (permalink / raw)
To: Bryan Keller <bryanck@gmail.com>; +Cc: pgsql-admin
On Mon, Feb 14, 2011 at 11:05 AM, Bryan Keller <bryanck@gmail.com> wrote:
> Thanks for the feedback. It sounds like NFS is a viable solution nowadays. I a still going to shoot for using iSCSI, given it is a block-level protocol rather than file-level, it seems to me it would be better suited to database I/O.
Please note that until you've tested what happens when you pull the
power plugs on the NAS server midday to simulate a motherboard / PS /
UPS failure you don't really know how well this setup will survive
when things go wrong. The worst time to find out your pgsql -> NAS
setup can't handle sudden power loss etc is when the lights just went
out.
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Postgres on NAS/NFS
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
2011-02-14 10:07 ` Re: Postgres on NAS/NFS Stuart Bishop <stuart@stuartbishop.net>
2011-02-14 18:05 ` Re: Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
@ 2011-02-16 20:56 ` Greg Smith <greg@2ndquadrant.com>
2011-02-16 21:12 ` Re: Postgres on NAS/NFS Joshua D. Drake <jd@commandprompt.com>
1 sibling, 1 reply; 13+ messages in thread
From: Greg Smith @ 2011-02-16 20:56 UTC (permalink / raw)
To: Bryan Keller <bryanck@gmail.com>; +Cc: pgsql-admin
Bryan Keller wrote:
> It sounds like NFS is a viable solution nowadays. I a still going to shoot for using iSCSI, given it is a block-level protocol rather than file-level, it seems to me it would be better suited to database I/O.
>
Please digest carefully where Joe Conway pointed out that it took them
major kernel-level work to get NFS working reliably on Linux. On
anything but Solaris, I consider NFS a major risk still; nothing has
improved "nowadays" relative to when people used to report regular
database corruption running it on other operating systems. Make sure
you read
http://www.time-travellers.org/shane/papers/NFS_considered_harmful.html
and mull over the warnings in there before you assume it will work, too.
I don't think I've ever heard from someone happy with an iSCSI
deployment, either. The only way you could make an NFS+iSCSI storage
solution worse is to also use RAID5 on the NAS.
I'd suggest taking a look at
http://wiki.postgresql.org/wiki/Shared_Storage and consider how you're
going to handle fencing issues as well here. One of the reasons SANs
tend to be preferred in this area is because fencing at the
fiber-channel switch level is pretty straightforward. DAS running over
fiber-channel can offer the same basic features though, it's just not as
common to use a switch in that environment.
--
Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Postgres on NAS/NFS
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
2011-02-14 10:07 ` Re: Postgres on NAS/NFS Stuart Bishop <stuart@stuartbishop.net>
2011-02-14 18:05 ` Re: Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
2011-02-16 20:56 ` Re: Postgres on NAS/NFS Greg Smith <greg@2ndquadrant.com>
@ 2011-02-16 21:12 ` Joshua D. Drake <jd@commandprompt.com>
0 siblings, 0 replies; 13+ messages in thread
From: Joshua D. Drake @ 2011-02-16 21:12 UTC (permalink / raw)
To: Greg Smith <greg@2ndquadrant.com>; +Cc: Bryan Keller <bryanck@gmail.com>; pgsql-admin
On Wed, 2011-02-16 at 15:56 -0500, Greg Smith wrote:
> Bryan Keller wrote:
> > It sounds like NFS is a viable solution nowadays. I a still going to shoot for using iSCSI, given it is a block-level protocol rather than file-level, it seems to me it would be better suited to database I/O.
> >
>
> Please digest carefully where Joe Conway pointed out that it took them
> major kernel-level work to get NFS working reliably on Linux. On
> anything but Solaris, I consider NFS a major risk still; nothing has
> improved "nowadays" relative to when people used to report regular
> database corruption running it on other operating systems. Make sure
> you read
> http://www.time-travellers.org/shane/papers/NFS_considered_harmful.html
> and mull over the warnings in there before you assume it will work, too.
>
> I don't think I've ever heard from someone happy with an iSCSI
> deployment, either. The only way you could make an NFS+iSCSI storage
> solution worse is to also use RAID5 on the NAS.
>
> I'd suggest taking a look at
> http://wiki.postgresql.org/wiki/Shared_Storage and consider how you're
> going to handle fencing issues as well here. One of the reasons SANs
> tend to be preferred in this area is because fencing at the
> fiber-channel switch level is pretty straightforward. DAS running over
> fiber-channel can offer the same basic features though, it's just not as
> common to use a switch in that environment.
In short, use DAS or a SAN. iSCSI suffers from all kinds of performance
issues and NFS is just Michael Myers scary.
With DAS systems able to handle up 192 drives over 6Gb/s a second these
days, combined with a volume manager you can solve a lot of problems
without breaking the bank.
JD
--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Postgres on NAS/NFS
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
@ 2011-02-16 20:45 ` Bruce Momjian <bruce@momjian.us>
4 siblings, 0 replies; 13+ messages in thread
From: Bruce Momjian @ 2011-02-16 20:45 UTC (permalink / raw)
To: Bryan Keller <bryanck@gmail.com>; +Cc: pgsql-admin
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?
The last section of this documentation page talks about NFS usage:
http://www.postgresql.org/docs/9.0/static/creating-cluster.html
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
^ permalink raw reply [nested|flat] 13+ messages in thread
end of thread, other threads:[~2011-02-16 21:12 UTC | newest]
Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09 19:31 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
2011-02-09 19:59 Postgres on NAS/NFS Bryan Keller <bryanck@gmail.com>
2011-02-09 20:05 ` Anibal David Acosta <aa@devshock.com>
2011-02-09 22:49 ` Jim Mlodgenski <jimmy76@gmail.com>
2011-02-10 20:02 ` CS DBA <cs_dba@consistentstate.com>
2011-02-11 17:09 ` Frederiko Costa <frederiko@gmail.com>
2011-02-11 23:00 ` Joseph Conway <mail@joeconway.com>
2011-02-14 10:07 ` Stuart Bishop <stuart@stuartbishop.net>
2011-02-14 18:05 ` Bryan Keller <bryanck@gmail.com>
2011-02-14 18:27 ` Scott Marlowe <scott.marlowe@gmail.com>
2011-02-16 20:56 ` Greg Smith <greg@2ndquadrant.com>
2011-02-16 21:12 ` Joshua D. Drake <jd@commandprompt.com>
2011-02-16 20:45 ` Bruce Momjian <bruce@momjian.us>
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