pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
clustering with shared storage
5+ messages / 4 participants
[nested] [flat]

* clustering with shared storage
@ 2012-03-20 19:26  Gary Webster <webster@lexmark.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Gary Webster @ 2012-03-20 19:26 UTC (permalink / raw)
  To: pgsql-admin

Hello.

Sorry if this is redundant, but I can't find any 'cookbook' for getting
this setup.

The best I've found is here:
http://wiki.postgresql.org/images/5/58/06.5_-_Devrim_Gunduz_-_PostgreSQLClusteringWithRedHatClusterS...
but, it doesn't go into setup details.

I have a few questions/issues, but figure I will attack it piecemeal, in
chronological order.

RHCS is handling the fencing.
I have installed postgres on the local drive of the primary, with pgdata on
the shared drive.
I am generally using the EnterpriseDB install package for v9.1.3 .

So, first, just how to install postgres on the secondary?

1)  If I leave it as secondary (non-active), it can't see the shared drive.
 Is this correct/OK ?
If so, it will create its own pgdata locally, which is later ignored?

or

2)  Do I make it primary, then point its pgdata to the already existing
data during install ?!?


Thanks.

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: clustering with shared storage
@ 2012-03-20 19:58  Devrim GÜNDÜZ <devrim@gunduz.org>
  parent: Gary Webster <webster@lexmark.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Devrim GÜNDÜZ @ 2012-03-20 19:58 UTC (permalink / raw)
  To: Gary Webster <webster@lexmark.com>; +Cc: pgsql-admin

Hi,

On Tue, 2012-03-20 at 15:26 -0400, Gary Webster wrote:

> The best I've found is here:
> http://wiki.postgresql.org/images/5/58/06.5_-_Devrim_Gunduz_-_PostgreSQLClusteringWithRedHatClusterS...
> but, it doesn't go into setup details.

http://www.gunduz.org/download.php?dlid=190

has a newer version (still not that detailed, but much better)

> I have a few questions/issues, but figure I will attack it piecemeal, in
> chronological order.
> 
> RHCS is handling the fencing.
> I have installed postgres on the local drive of the primary, with pgdata on
> the shared drive.
> I am generally using the EnterpriseDB install package for v9.1.3 .
> 
> So, first, just how to install postgres on the secondary?

Just install the binaries -- don't initdb, and then use the shared disk
as the $PGDATA. RHCS will mount the shared filesystem to only one
server, and that one will use the $PGDATa.

> 1)  If I leave it as secondary (non-active), it can't see the shared drive.
>  Is this correct/OK ?

It *can* see, but it does not see (or it should not see) and it *cannot*
use.  

> If so, it will create its own pgdata locally, which is later ignored?
> 
> or
> 
> 2)  Do I make it primary, then point its pgdata to the already existing
> data during install ?!?

See above.

Regards,
-- 
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz

Attachments:

  signature.asc (application/pgp-signature, 197B) download

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: clustering with shared storage
@ 2012-03-20 20:33  amador alvarez <aalvarez@d2.com>
  parent: Devrim GÜNDÜZ <devrim@gunduz.org>
  0 siblings, 2 replies; 5+ messages in thread

From: amador alvarez @ 2012-03-20 20:33 UTC (permalink / raw)
  To: pgsql-admin

Hi there,
I wonder why are you considering this solution, as if something wrong 
comes within the data (logical corruption, user error) it will be spread 
on both locations, Would not be better a delayed standby database.

I am curious because I am setting this up right now and do not get all 
the advantages of the shared disk solution,

Thanks in advance,
AA

On 03/20/2012 12:58 PM, Devrim GÜNDÜZ wrote:
> Hi,
>
> On Tue, 2012-03-20 at 15:26 -0400, Gary Webster wrote:
>
>> The best I've found is here:
>> http://wiki.postgresql.org/images/5/58/06.5_-_Devrim_Gunduz_-_PostgreSQLClusteringWithRedHatClusterS...
>> but, it doesn't go into setup details.
> http://www.gunduz.org/download.php?dlid=190
>
> has a newer version (still not that detailed, but much better)
>
>> I have a few questions/issues, but figure I will attack it piecemeal, in
>> chronological order.
>>
>> RHCS is handling the fencing.
>> I have installed postgres on the local drive of the primary, with pgdata on
>> the shared drive.
>> I am generally using the EnterpriseDB install package for v9.1.3 .
>>
>> So, first, just how to install postgres on the secondary?
> Just install the binaries -- don't initdb, and then use the shared disk
> as the $PGDATA. RHCS will mount the shared filesystem to only one
> server, and that one will use the $PGDATa.
>
>> 1)  If I leave it as secondary (non-active), it can't see the shared drive.
>>   Is this correct/OK ?
> It *can* see, but it does not see (or it should not see) and it *cannot*
> use.
>
>> If so, it will create its own pgdata locally, which is later ignored?
>>
>> or
>>
>> 2)  Do I make it primary, then point its pgdata to the already existing
>> data during install ?!?
> See above.
>
> Regards,



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: clustering with shared storage
@ 2012-03-20 20:53  Devrim GÜNDÜZ <devrim@gunduz.org>
  parent: amador alvarez <aalvarez@d2.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Devrim GÜNDÜZ @ 2012-03-20 20:53 UTC (permalink / raw)
  To: amador alvarez <aalvarez@d2.com>; +Cc: pgsql-admin

On Tue, 2012-03-20 at 13:33 -0700, amador alvarez wrote:
> I wonder why are you considering this solution

* Automatic failover detection
* No replication overhead, in case you don't need it.

RHCS+PostgreSQL can also be used when you shard your data to multiple
databases, and use each server as "active" server, like I told in the
25th slide of the presentation that I just in the previous email.

So, RHCS and SR/HS are not competitive to each other. We have installed
them in parallel several times, like to 3 servers.

Regards,
-- 
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz

Attachments:

  signature.asc (application/pgp-signature, 197B) download

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: clustering with shared storage
@ 2012-03-20 20:55  Rosser Schwarz <rosser.schwarz@gmail.com>
  parent: amador alvarez <aalvarez@d2.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Rosser Schwarz @ 2012-03-20 20:55 UTC (permalink / raw)
  To: amador alvarez <aalvarez@d2.com>; +Cc: pgsql-admin

On Tue, Mar 20, 2012 at 1:33 PM, amador alvarez <aalvarez@d2.com> wrote:
> I wonder why are you considering this solution, as if something wrong comes
> within the data (logical corruption, user error) it will be spread on both
> locations, Would not be better a delayed standby database.

That's a risk, to be sure. That's why you also keep backups (such as a
PITR slave).  If you're doing HA without also doing backups, you're
Doing It Wrong.

The benefit of Shared Storage clustering is immediate availability if
your "primary" node goes down for some reason.  You simply fence off
the downed node, mount the shared volume, and bring up the db on the
secondary node.  I've used commercial solutions that manage all this,
and reliably have the DB back in service in tens of seconds, at the
outside.

rls

-- 
:wq



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2012-03-20 20:55 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-03-20 19:26 clustering with shared storage Gary Webster <webster@lexmark.com>
2012-03-20 19:58 ` Devrim GÜNDÜZ <devrim@gunduz.org>
2012-03-20 20:33   ` amador alvarez <aalvarez@d2.com>
2012-03-20 20:53     ` Devrim GÜNDÜZ <devrim@gunduz.org>
2012-03-20 20:55     ` Rosser Schwarz <rosser.schwarz@gmail.com>

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