[DRBD-user] RHCS and dual primary

splitbrain jay.cee.el at gmail.com
Tue Apr 26 20:35:45 CEST 2011

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

Digimer wrote:
> On 04/08/2011 11:22 AM, Cristian Mammoli - Apra Sistemi wrote:
>> Hi, as far as I understand from the docs, DRBD as a RHCS resource is
>> only supported as single primary.
>> If I need to use it as a dual primary device for GFS or CLVM I need to
>> start it BEFORE cman and manage it outside of the cluster.
>> Right?
> Nope. :)
> I use DRBD Primary/Primary extensively in RHCS. What I do is add it as a
> script resource along with clvmd and gfs2. Then I create two failover
> domains, one for each node, that is restricted and contains only that
> node. Then for each failover domain, I create a service tree that
> starts, in order, drbd -> clvmd -> gfs2.
> Then you can create normal services, failover groups and whatnot.
> -- 
> Digimer
> E-Mail: digimer at alteeve.com
> AN!Whitepapers: http://alteeve.com
> Node Assassin:  http://nodeassassin.org
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user

I was able to do this as well except I also used a virtual IP. I tried to
get the drdb.sh and drbd.metadata stuff working with RHCS but I didn't have
any luck. I ended up just using the /etc/init.d/drbd script and it appears
to work fine.

So I used a nested service with the following resources Virtual IP -> DRBD
-> CLVM -> GFS2 -> nfs export.

My DRBD resource as defined in system-config-cluster is just a script which
points to /etc/init.d/drbd.

I tested relocating the resource via "clusvcadm -r <service> -m <node> and
it worked. I tested powering off the working node and the service migrated
to the other node, and I tested just running "/etc/init.d/drbd stop" on the
working node and the service relocated.

The tricky thing was the drbd.conf. I didn't use the "on host" keyword. I
used "floating" and listed both virtual IPs:port. Also, you have to list the
floating IP:port last. If you put meta-data after them, drbd startup

My drbd.conf looks like this:

resource r0 {
   startup {
      become-primary-on both;
   protocol C;
               device        /dev/drbd1;
               disk           /dev/dm-1;
               metadisk    internal;
               floating       <insert virtual IP:port here>;
               floating        <insert other virtual IP:port here>;
     net {
           after-sb-0pri discard-zero-changes;
           after-sb-1pri  discard-secondary;
           after-sb-2pri call-pri-lost-after-sb;
View this message in context: http://old.nabble.com/RHCS-and-dual-primary-tp31352855p31481065.html
Sent from the DRBD - User mailing list archive at Nabble.com.

More information about the drbd-user mailing list