Hello,

I have a two node cluster with ip and drbd failover, controlled by
pacemaker -- all working perfectly.

I now have a requirement to add a third node, which will sync all drbd
changes but never actually become a master node, it's simply there to
copy data offsite.

To start, I removed pacemaker/heartbeat and got drbd working on three
nodes; I can get the nodes to behave correctly by manually demoting
and promoting and manually mounting and unmounting the file system.

Now when I try bring pacemaker/heartbeat into the three node setup, I
can't seem to get it all working together.  I've tried following the
guide on drbd.org but I'm not making any progress.

If you consider the configurations below, here's what I'm having problems with:

- drbd is not being started on nodes after I power them on.
- The file system controlled by drbd is never auto mounted on the master node.
- I want to ensure that services never failover to node charlie.
- The virtual ip address and the drbd service should move as a group
and always be hosted on the same node (either alpha or bravo).

Can anyone help?

Thanks,
Craig.


cr...@alpha:~$ sudo crm configure show
node $id="14a1a86a-0fff-42a0-af43-88db6a456823" bravo
node $id="6ab6e703-0174-4248-9dff-991231d111e" charlie
node $id="b8d85682-41fa-4f2e-b040-7789dcd103f2" alpha
primitive p_drbd_data ocf:linbit:drbd \
        params drbd_resource="data"
primitive p_drbd_datastacked ocf:linbit:drbd \
        params drbd_resource="datastacked"
primitive p_ip_stacked ocf:heartbeat:IPaddr2 \
        params ip="192.168.56.110" cidr_netmask="32" \
        op monitor interval="30s"
ms ms_drbd_data p_drbd_data \
        meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true" globally-unique="false"
ms ms_drbd_datastacked p_drbd_datastacked \
        meta master-max="1" clone-max="1" clone-node-max="1"
master-node-max="1" notify="true" globally-unique="false"
colocation c_drbd_datastacked_on_drbd_data inf: ms_drbd_datastacked
ms_drbd_data:Master
colocation c_drbd_datastacked_on_ip inf: ms_drbd_datastacked p_ip_stacked
colocation c_ip_on_data_master inf: p_ip_stacked ms_drbd_data:Master
order o_drbd_data_before_datastacked inf: ms_drbd_data:promote
ms_drbd_datastacked:start
order o_ip_before_datastacked inf: p_ip_stacked ms_drbd_datastacked:start
property $id="cib-bootstrap-options" \
        dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
        cluster-infrastructure="Heartbeat" \
        no-quorum-policy="ignore" \
        stonith-enabled="false" \
        expected-quorum-votes="2"


cr...@alpha:~$ sudo cat /etc/drbd.conf
global {
        usage-count             no;
}
common {
        protocol C;
        handlers {}
        startup {}
        disk {}
        net {
                cram-hmac-alg   sha1;
                shared-secret   "foobar";
        }
        syncer {
                verify-alg      sha1;
                rate            100M;
        }
}
resource data {
        device                  /dev/drbd1;
        disk                    /dev/sdb1;
        meta-disk               internal;
        on alpha {
                address         192.168.56.101:7789;
        }
        on bravo {
                address         192.168.56.102:7789;
        }
}
resource datastacked {
        stacked-on-top-of data {
                device          /dev/drbd10;
                address         192.168.56.110:7789;
        }
        on charlie {
                device          /dev/drbd10;
                disk            /dev/sdb1;
                meta-disk       internal;
                address         192.168.56.103:7789;
        }
}


cr...@alpha:~$ sudo cat /etc/ha.d/ha.cf
# Heartbeat cluster members
node alpha
node bravo
node charlie
keepalive 2
warntime 5
deadtime 15
initdead 60
mcast eth0 239.0.0.43 694 1 0
bcast eth0
use_logd yes
autojoin none
crm respawn


p.s. Here's the pacemaker config I was successfully using for the 2
node cluster:

cr...@alpha:~$ sudo crm configure show
node $id="14a1a86a-0fff-42a0-af43-88db6a456823" bravo
node $id="6ab6e703-0174-4248-9dff-991231d111e" charlie
node $id="b8d85682-41fa-4f2e-b040-7789dcd103f2" alpha
primitive drbd_disk ocf:linbit:drbd \
        params drbd_resource="data" \
        op monitor interval="30s"
primitive fs_drbd ocf:heartbeat:Filesystem \
        params device="/dev/drbd/by-res/data" directory="/media/data" 
fstype="ext3"
primitive virtual_ip ocf:heartbeat:IPaddr2 \
        params ip="192.168.56.110" cidr_netmask="32" \
        op monitor interval="30s"
group cluster_services virtual_ip fs_drbd
ms ms_drbd drbd_disk \
        meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true"
location preferred_master cluster_services inf: alpha
colocation mnt_on_master inf: cluster_services ms_drbd:Master
order mount_after_drbd inf: ms_drbd:promote cluster_services:start
property $id="cib-bootstrap-options" \
        dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
        cluster-infrastructure="Heartbeat" \
        no-quorum-policy="ignore" \
        stonith-enabled="false" \
        expected-quorum-votes="2"
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to