Re: How to restart cluster ?

Andrew Beekhof <[email protected]>
Newsgroups gmane.linux.highavailability.user
Message-ID <[email protected]>
On 9 Jun 2014, at 7:58 pm, jarek <[email protected]> wrote:

> Hello!
> 
> Thank you for the answer, but this answer didn't solve my problem.
> I have simple two-node cluster with virtual ip address and Postgres with
> streaming replication, created with this tutorial:
> http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster
> I have two problems to solve:
> 1. I need some script, which will restart cluster on user demand. This
> script should stop postgres resource on both nodes and next restart them
> in that way, that postgres will be work without any additional
> operations (like removing lock files, cleaning resources etc). 

This sounds like a secondary problem. Perhaps back up and explain why you need this?
Also, the RA should be cleaning up lock files when it is asked to stop.

> 2. I have a virtual model of this cluster working under VMWare. VMWare
> is restarted from time to time, and I have no control when master or
> slave will be restarted. I would like to create script, which will be
> called from runlevel 6 and will safely stop postgres resource.
> I tried to do it with:
> 
> crm configure property stop-all-resources=true
> 
> but after reboot I had to remove PGSQL.lock manually, and also master
> node has been changed.
> 
> Do you have any idea how to do it ?
> 
> Taktoshi MATSUO wrote:
>> Do you use pgsql RA with Master/Slave setting ?
>> I recommend you to stop slave node's pacemaker at first
>> because pgsql RA removes PGSQL.lock automatically if the node is
>> master and there is no slaves.
>> 
>> Stop procedure
>> 1. stop slave node      -> suppose nodeB
>> 2. stop master node (PGSQL.lock file is removed)  -> suppose nodeA
>> 
>> Start procedure
>> 3. start the nodeA because it has the newest data.
>> 4. start the nodeB
>> 
>> If PGSQL.lock exists, the data may be inconsistent.
>> See http://www.slideshare.net/takmatsuo/2012929-pg-study-16012253
> (P36, P37)
> 
> best regards
> Jarek
> 
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
signature.asc (application/pgp-signature, 841 B)
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCgAGBQJTlkfkAAoJEBTzwpg4iwmNYUgP/RgwQp4yNCDhiqBiHn1BG0kt
+wyacZg/0US5yEHIVlpevdIgWdc7y4S/d7A0mqJavj8fMULAmiwR96TvOYlUWN4V
oWRgy6C6Jfa4e6I51mB0Ac4ZIXoS0Zo8AfyloraiJzkd9Th2xvs2MYehwj0hJ6Uw
sLj/CJtOcVXmXhjpLOf0AW0rwpcLdQdQrSyvvFgE4TYUQCdqFy8/6rvk3igkORyT
jiPBt4POEWUEMFtwy8RWTpn7PzEn6h4sPRlq2Z2v9wFl0mW54zSeqxEcXFnvuRzA
3tUPMgcGlVTubmnQgtDkCAFdirlum6OuDcannzz7El8R9GVIWPK1r7k4ZXhkCnJg
riSDzlh1PNaeQqgGSodFxtoKQ5gI2ksBMsrZRu3ZyFL38zwsJUZH+kx/R/nRqkcS
glYisnimVqq599BaTT0mc+Z2neGxUkGFoY/ZEXL96tjn+dfBbrfESmX986bSKH7U
7yJNTCKq7YMSs9X1T7PVVgu59ZzsDOBzO780hlIOZF0g9AXN1tFnu1iYe0vFUmk7
pl0X4OK43EzoNAWUzsvinoG1qbMJtdVrLoOq18tD1xaFVg8tVbaytQMrOjG9OL0K
zNkkWloGubl9U672AcLyL19B2Gms7fIv7iXpEVhmpxFa+hC6TH0uNK0uZt4sNrNG
Sohibfa9bHzhaTCU2FjZ
=FKKm
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.