<div dir="ltr">I use Debian 7 and got:<div><div>Reconnecting...root@a:~# crm_resource --resource msPostgresql --ban --master --host <a href="http://a.geocluster.e-autopay.com">a.geocluster.e-autopay.com</a></div><div>crm_resource: unrecognized option '--ban'</div>
</div><div><br></div><div><br></div><div>No other way to move master?</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/13 Andrew Beekhof <span dir="ltr"><<a href="mailto:andrew@beekhof.net" target="_blank">andrew@beekhof.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 13 Jan 2014, at 8:32 pm, Andrey Rogovsky <<a href="mailto:a.rogovsky@gmail.com">a.rogovsky@gmail.com</a>> wrote:<br>
<br>
> Hi<br>
><br>
> I have 3 node postgresql cluster.<br>
> It work well. But I have some trobule with change master.<br>
><br>
> For now, if I need change master, I must:<br>
> 1) Stop PGSQL on each node and cluster service<br>
> 2) Start Setup new manual PGSQL replication<br>
> 3) Change attributes on each node for point to new master<br>
> 4) Stop PGSQL on each node<br>
> 5) Celanup resource and start cluster service<br>
><br>
> It take a lot of time. Is it exist better way to change master?<br>
<br>
</div>Newer versions support:<br>
<br>
crm_resource --resource msPostgresql --ban --master --host <a href="http://a.geocluster.e-autopay.com" target="_blank">a.geocluster.e-autopay.com</a><br>
<div><div class="h5"><br>
><br>
><br>
><br>
> This is my cluster service status:<br>
> Node Attributes:<br>
> * Node <a href="http://a.geocluster.e-autopay.com" target="_blank">a.geocluster.e-autopay.com</a>:<br>
> + master-pgsql:0 : 1000<br>
> + pgsql-data-status : LATEST<br>
> + pgsql-master-baseline : 000000002F000090<br>
> + pgsql-status : PRI<br>
> * Node <a href="http://c.geocluster.e-autopay.com" target="_blank">c.geocluster.e-autopay.com</a>:<br>
> + master-pgsql:0 : 1000<br>
> + pgsql-data-status : SYNC<br>
> + pgsql-status : STOP<br>
> * Node <a href="http://b.geocluster.e-autopay.com" target="_blank">b.geocluster.e-autopay.com</a>:<br>
> + master-pgsql:0 : 1000<br>
> + pgsql-data-status : SYNC<br>
> + pgsql-status : STOP<br>
><br>
> I was use <a href="http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster" target="_blank">http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster</a> for my 3<br>
> nodes cluster without hard stik.<br>
> Now I got strange situation all nodes stay slave:<br>
> ============<br>
> Last updated: Sat Dec 7 04:33:47 2013<br>
> Last change: Sat Dec 7 12:56:23 2013 via crmd on a<br>
> Stack: openais<br>
> Current DC: c - partition with quorum<br>
> Version: 1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff<br>
> 5 Nodes configured, 3 expected votes<br>
> 4 Resources configured.<br>
> ============<br>
><br>
> Online: [ a c b ]<br>
><br>
> Master/Slave Set: msPostgresql [pgsql]<br>
> Slaves: [ a c b ]<br>
><br>
> My config is:<br>
> node a \<br>
> attributes pgsql-data-status="DISCONNECT"<br>
> node b \<br>
> attributes pgsql-data-status="DISCONNECT"<br>
> node c \<br>
> attributes pgsql-data-status="DISCONNECT"<br>
> primitive pgsql ocf:heartbeat:pgsql \<br>
> params pgctl="/usr/lib/postgresql/9.3/bin/pg_ctl" psql="/usr/bin/psql"<br>
> pgdata="/var/lib/postgresql/9.3/main" start_opt="-p 5432" rep_mode="sync"<br>
> node_list="a b c" restore_command="cp /var/lib/postgresql/9.3/pg_archive/%f<br>
> %p" master_ip="192.168.10.200" restart_on_promote="true"<br>
> config="/etc/postgresql/9.3/main/postgresql.conf" \<br>
> op start interval="0s" timeout="60s" on-fail="restart" \<br>
> op monitor interval="4s" timeout="60s" on-fail="restart" \<br>
> op monitor interval="3s" role="Master" timeout="60s" on-fail="restart" \<br>
> op promote interval="0s" timeout="60s" on-fail="restart" \<br>
> op demote interval="0s" timeout="60s" on-fail="stop" \<br>
> op stop interval="0s" timeout="60s" on-fail="block" \<br>
> op notify interval="0s" timeout="60s"<br>
> primitive pgsql-master-ip ocf:heartbeat:IPaddr2 \<br>
> params ip="192.168.10.200" nic="peervpn0" \<br>
> op start interval="0s" timeout="60s" on-fail="restart" \<br>
> op monitor interval="10s" timeout="60s" on-fail="restart" \<br>
> op stop interval="0s" timeout="60s" on-fail="block"<br>
> group master pgsql-master-ip<br>
> ms msPostgresql pgsql \<br>
> meta master-max="1" master-node-max="1" clone-max="3" clone-node-max="1"<br>
> notify="true"<br>
> colocation set_ip inf: master msPostgresql:Master<br>
> order ip_down 0: msPostgresql:demote master:stop symmetrical=false<br>
> order ip_up 0: msPostgresql:promote master:start symmetrical=false<br>
> property $id="cib-bootstrap-options" \<br>
> dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \<br>
> cluster-infrastructure="openais" \<br>
> expected-quorum-votes="3" \<br>
> no-quorum-policy="ignore" \<br>
> stonith-enabled="false" \<br>
> crmd-transition-delay="0" \<br>
> last-lrm-refresh="1386404222"<br>
> rsc_defaults $id="rsc-options" \<br>
> resource-stickiness="100" \<br>
> migration-threshold="1"<br>
</div></div>> _______________________________________________<br>
> Linux-HA mailing list<br>
> <a href="mailto:Linux-HA@lists.linux-ha.org">Linux-HA@lists.linux-ha.org</a><br>
> <a href="http://lists.linux-ha.org/mailman/listinfo/linux-ha" target="_blank">http://lists.linux-ha.org/mailman/listinfo/linux-ha</a><br>
> See also: <a href="http://linux-ha.org/ReportingProblems" target="_blank">http://linux-ha.org/ReportingProblems</a><br>
<br>
<br>_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
<br></blockquote></div><br></div>