[Pacemaker] DRBD secondary to primary when primary lost connection

Felipe Gutierrez felipe.o.gutierrez at gmail.com
Thu Jan 10 05:59:51 EST 2013


Hi Andrew,

I solved the problem doing this on my DRBD configuration.

Thanks.

resource r8 {
handlers {
    fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
    after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh";
    split-brain "/usr/lib/drbd/notify-split-brain.sh root";
}
startup {
}
disk {
    fencing resource-only;
}
net {
    allow-two-primaries;
    after-sb-0pri discard-zero-changes;
    after-sb-1pri discard-secondary;
    after-sb-2pri disconnect;
}
syncer {
    rate 10M;
    al-extents 257;
}
on cloud10 {
    device /dev/drbd8;
    disk /dev/vg_8/lv_8;
    address 192.168.188.10:7789;
    meta-disk internal;
}
on cloud8 {
    device /dev/drbd8;
    disk /dev/vg_8/lv_8;
    address 192.168.188.8:7789;
    meta-disk internal;
}
}


On Thu, Jan 10, 2013 at 3:40 AM, Andrew Beekhof <andrew at beekhof.net> wrote:

> On Sun, Dec 16, 2012 at 2:31 PM, Felipe Gutierrez
> <felipe.o.gutierrez at gmail.com> wrote:
> > Hi,
> >
> > I research on the internet and I thing I should use ocf:pacemaker:ping.
> > And I did this, but I think it is missing some thing, because DRBD still
> > doesn't became primary on the secondary node.
> >
> > primitive ping_gateway ocf:pacemaker:ping op monitor interval="10"
> > timeout="60" params host_list="10.1.1.1" multiplier="100"
> > clone ping_clone ping_gateway meta interleave="true"
> > location grupo_ping grupo_ip_drbd rule -inf: not_defined pingd or pingd
> lte
> > 0
> >
> > Could someone help, please?
>
> We'd need more info. Try a crm_report for the time covered by your testing.
>
> >
> > Thanks
> > Felipe
> >
> >
> > On Sat, Dec 15, 2012 at 10:46 PM, Felipe Gutierrez
> > <felipe.o.gutierrez at gmail.com> wrote:
> >>
> >> Hi everyone,
> >>
> >> I did this configuration on my corosync(pacemaker) and my iintend was to
> >> failover the IP and the DRBD secondary to primary, when the
> master/primary
> >> lost connection. I was thinking if I configure the IP floating and
> create a
> >> group to it, it will carry on the DRBD to primary on the other node.
> >>
> >> Does anyone have a hint?
> >>
> >> Thanks in advance,
> >> Felipe
> >>
> >>
> >> crm configure
> >> primitive drbd ocf:linbit:drbd params drbd_resource="r1" op monitor
> >> interval="60s" role="Master" op monitor interval="59s" role="Slave"
> >> ms drbd_ms drbd meta master-max="1" master-node-max="1" clone-max="2"
> >> clone-node-max="1" notify="true"
> >>
> >> primitive drbd_fs ocf:heartbeat:Filesystem params device="/dev/drbd1"
> >> directory="/mnt/drbd1" fstype="ext3"
> >> colocation fs_on_drbd inf: drbd_fs drbd_ms:Master
> >> order fs_after_drbd inf: drbd_ms:promote drbd_fs:start
> >> commit
> >>
> >> primitive ClusterIP ocf:heartbeat:IPaddr2 params ip=192.168.0.80
> >> cidr_netmask=32 op monitor interval=30s
> >> location prefer-cloud11 ClusterIP 1: cloud11
> >>
> >> group grupo_ip_drbd drbd_fs ClusterIP
> >> colocation grupo_on_drbd inf: grupo_ip_drbd drbd_ms:Master
> >> commit--
> >> --
> >> -- Felipe Oliveira Gutierrez
> >> -- Felipe.o.Gutierrez at gmail.com
> >> -- https://sites.google.com/site/lipe82/Home/diaadia
> >
> >
> >
> >
> > --
> > --
> > -- Felipe Oliveira Gutierrez
> > -- Felipe.o.Gutierrez at gmail.com
> > -- https://sites.google.com/site/lipe82/Home/diaadia
> >
> > _______________________________________________
> > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >
> > Project Home: http://www.clusterlabs.org
> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> > Bugs: http://bugs.clusterlabs.org
> >
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>



-- 
*--
-- Felipe Oliveira Gutierrez
-- Felipe.o.Gutierrez at gmail.com
-- https://sites.google.com/site/lipe82/Home/diaadia*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20130110/9fc13cd8/attachment-0003.html>


More information about the Pacemaker mailing list