Re: Regarding the shared disk fail over cluster configuration

From: Scott Mead <scottm(at)openscg(dot)com>
To: Debasis Mishra <debasis1982(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Regarding the shared disk fail over cluster configuration
Date: 2011-11-02 17:31:49
Message-ID: CAKq0gv+foKW0psmhkZJdqMdyWDASOn9tVDYK0yA2ZF92JhC0qA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 2, 2011 at 11:55 AM, Debasis Mishra <debasis1982(at)gmail(dot)com>wrote:

> Thanks a lot Ondrej Ivanic.I have few more doubts.
>
> 1)While installing the postgress it asks for the data directory,which i
> refer to SAN volume(Shared LUN)-(example - /dbdata/pgsqldata).
>
> After that i am exporting $PGDATA= SAN Volume(example - /dbdata/pgsqldata).
> Where /dbdata is the shared LUN .
>
> Then I am running initdb - but it is not running successfully. The Error is
> /dbdata/pgsqldata is not empty.
>
> Because I can understand while installation postgress creates
> files/directory in the data folder. While running initdb also it is trying
> to create some directory which is already present.
>
> So I am not sure how to go ahead with this scenario.
>

It seems that your installer has already created the data for you. If you
have files like:

postgresql.conf
base/
pg_xlog/
......

Then your postgres data directory is already initialized, no need for
initdb.

>
> 2) Regarding the shared disk failover clustering you mentioned that if
> primary fails , cluster should bring it down and start postgres in
> secondary
> node.
>
> My doubt is - Whether cluster should start the postgres service in
> secondary
> node during failover or postgress will be running always. My undersatnding
> was in both the node postgress will be running and pointing to shared
> dbdata. And if node1/primary fails then cluster software should bring
> node2/secondary up.once it will bring node2 online there postgress must be
> running already.
>

> Is this feasible?
>
>
Do not do this. At first glance, you can actually run in this
configuration (i.e. you can start the postmasters) but it will cause data
corruption. DO NOT under ANY circumstances try to run both primary and
secondary on the same data directory simultaneously. You will corrupt your
entire database. The only way to run postgres with shared disk clustering
is in Active/Passive mode.

--
Scott Mead
OpenSCG http://www.openscg.com

> Thanks,
> Debasis
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Regarding-the-shared-disk-fail-over-cluster-configuration-tp4952316p4958449.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2011-11-02 17:40:58 Re: Recommendations for SSDs in production?
Previous Message David Boreham 2011-11-02 17:18:56 Re: Recommendations for SSDs in production?