So what I am doing wrong? Now our cluster is offline (corosync is stopped) because it was promoting, demoting, starting, stopping DRBD services and finnaly such node got declared as Unclean and then shooting started.

Funny thing is that if I start drbd manually (by /etc/init.d/drbd start) it starts almost instantly and all resources are up and Primary/Primary. Of cours I don't use that init.d when I use corosync.

Any help will be greatly apperciated.

Thank you!


Try this way:
1. pacemaker multistate drbd resource. Target-role must be "Started"
2. colocation for msdrbd resource with other dependent resources. drbd resource in colocation must be in Master state. 3. order rule for resources. First action drbd promote folowing actions on another resources can be start, for example.

VitualDomain example (in crmsh notation and cutted from working configuration):

primitive drbd_YOURVM ocf:linbit:drbd \
        params drbd_resource="YOURVM" \
        op monitor interval="29s" role="Master" \
        op monitor interval="31s" role="Slave"


primitive kvm_YOURVM ocf:heartbeat:VirtualDomain \
params config="/etc/libvirt/qemu/YOURVM.xml" migration_transport="ssh" \ meta allow-migrate="false" target-role="Started" is-managed="true" \
        op start interval="0" timeout="120s" \
        op stop interval="0" timeout="120s" \
        op monitor interval="60s" timeout="120s"


ms ms_drbd_YOURVM drbd_YOURVM \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true" target-role="Started" is-managed="true"

location kvm_YOURVM_prefer_YOURFIRSTSERVER kvm_YOURVM 50: YOURFIRSTSERVER

order kvm_YOURVM_after_drbd_YOURVM inf: ms_drbd_YOURVM:promote kvm_YOURVM:start


In my configuration VM's works with primary/secondary drbd.

_______________________________________________
Pacemaker mailing list: [email protected]
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

Reply via email to