On 26.03.2013 06:14, Vladislav Bogdanov wrote:
26.03.2013 04:23, Dennis Jacobfeuerborn wrote:
I have now reduced the configuration further and removed LVM from the
picture. Still the cluster fails when I set the master node to standby.
What's interesting is that things get fixed when I issue a simple
"cleanup" for the filesystem resource.

This is what my current config looks like:

node nfs1 \
     attributes standby="off"
node nfs2
primitive p_drbd_web1 ocf:linbit:drbd \
     params drbd_resource="web1" \
     op monitor interval="15" role="Master" \
     op monitor interval="30" role="Slave"
primitive p_fs_web1 ocf:heartbeat:Filesystem \
     params device="/dev/drbd0" \
     directory="/srv/nfs/web1" fstype="ext4" \
     op monitor interval="10s"
ms ms_drbd_web1 p_drbd_web1 \
     meta master-max="1" master-node-max="1" \
     clone-max="2" clone-node-max="1" notify="true"
colocation c_web1_on_drbd inf: ms_drbd_web1:Master p_fs_web1

Above means: "colocate ms_drbd_web1:Master with p_fs_web1", or "promote
ms_drbd_web1 where p_fs_web1 is (or "is about to be")".

Probably that is not exactly what you want (although that is also valid,
but uses different logic internally). I usually place resources in a
different order in colocation and order constraints, and that works.

Indeed I had the colocation semnatics backwards. With that change the failover work correctly, thanks!

I still have problems when using LVM although these don't seem to be pacemaker related. I have defined /dev/drbd0 with a backing device /dev/vdb. The problem is that when I create a physical volume on /dev/drbd0 and do a pvs the output shows the physical volume on /dev/vdb instead. I already disabled caching in /etc/lvm/lvm.conf, prepended a filter "r|/dev/vdb.*|" and recreated the initramfs and reboot but LVM still sees the backing device as the physical volume and not the actually replicated /dev/drbd0.

Any idea why LVM is still scanning /dev/vdb for physical volumes despite the filter?

Regards,
  Dennis

_______________________________________________
Pacemaker mailing list: Pacemaker@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

Reply via email to