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