<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-html" lang="x-unicode"><span
 class="Apple-style-span"
 style="font-size: medium; font-family: monospace;">Hi,<br>
<br>
I'm
trying to simulate various scenarios and what to do to correct the
problem. I have a DRBD cluster as defined below; if the
primary fails (ie power cycled drbd01.test), the secondary
(drbd02.test)
takes over successfully, so DRBD:master now runs on drbd02.test. When
node drbd01.test comes back up, DRBD:master remains on drbd02.st (ie
due to resource stickness); and drbd01.test simply becomes DRBD:Slave;
this is what I
want. <br>
<br>
Now what command/s would I need to run to move the master back to
drbd01.test, and make drbd02.test the new slave? The name of the
multi-state resource is ms-drbd0, below is the config I am currently
running.<br>
<br>
<br>
node drbd01.test \<br>
    attributes standby="off"<br>
node drbd02.test \<br>
    attributes standby="off"<br>
primitive drbd0 ocf:linbit:drbd \<br>
    params drbd_resource="drbd0" \<br>
    op monitor interval="60s" \<br>
    op start interval="0" timeout="240s" \<br>
    op promote interval="0" timeout="90s" start-delay="3s" \<br>
    op demote interval="0" timeout="90s" start-delay="3s" \<br>
    op notify interval="0" timeout="90s" \<br>
    op stop interval="0" timeout="100s" \<br>
    op monitor interval="10s" role="Master" timeout="20s"
start-delay="5s" \<br>
    op monitor interval="20s" role="Slave" timeout="20s"
start-delay="5s"<br>
primitive fs0 ocf:heartbeat:Filesystem \<br>
    params directory="/var/lib/pgsql/9.0/data" device="/dev/drbd0"
fstype="ext3" \<br>
    op start interval="0" timeout="60s" start-delay="1s" \<br>
    op stop interval="0"<br>
primitive ip ocf:heartbeat:IPaddr \<br>
    params ip="192.168.1.50" cidr_netmask="24" \<br>
    op monitor interval="10s"<br>
primitive pgsql0 ocf:heartbeat:pgsql \<br>
    params pgctl="/usr/pgsql-9.0/bin/pg_ctl" \<br>
    params psql="/usr/pgsql-9.0/bin/psql" \<br>
    params pgdata="/var/lib/pgsql/9.0/data" \<br>
    op monitor interval="30s" timeout="30s" \<br>
    op start interval="0" timeout="120s" start_delay="1s" \<br>
    op stop interval="0" timeout="120s"<br>
primitive ping_gateway ocf:pacemaker:ping \<br>
    params host_list="192.168.1.1" multiplier="1000" \<br>
    op monitor interval="10s" timeout="60s" \<br>
    op start interval="0" timeout="60s" \<br>
    op stop interval="0" timeout="20s"<br>
ms ms-drbd0 drbd0 \<br>
    meta master-max="1" master-node-max="1" notify="true"
clone-node-max="1" clone-max="2"<br>
clone connectivity_check ping_gateway \<br>
    meta globally-unique="false"<br>
location master-connected-node ms-drbd0 \<br>
    rule $id="master-connected-node-rule" $role="master" -inf:
not_defined pingd or pingd lte 0<br>
location primary_location ip 50: drbd01.test<br>
colocation fs0-with-drbd0 inf: fs0 ms-drbd0:Master<br>
colocation ip-with-pgsql0 inf: ip pgsql0<br>
colocation pgsql0-with-fs0 inf: pgsql0 fs0<br>
order fs0-after-drbd0 inf: ms-drbd0:promote fs0:start<br>
order ip-after-pgsql0 inf: pgsql0 ip<br>
order pgsql0-after-fs0 inf: fs0:start pgsql0<br>
property $id="cib-bootstrap-options" \<br>
    cluster-infrastructure="openais" \<br>
    expected-quorum-votes="2" \<br>
    stonith-enabled="false" \<br>
    no-quorum-policy="ignore" \<br>
    dc-version="1.0.10-da7075976b5ff0bee71074385f8fd02f296ec8a3"<br>
rsc_defaults $id="rsc-options" \<br>
    resource-stickiness="100"<br>
<br>
<br>
Cheers,<br>
Dominic.</span></div>
</body>
</html>