[Pacemaker] DRBD+LVM+NFS problems

Vladislav Bogdanov bubble at hoster-ok.com
Tue Mar 26 16:05:11 EDT 2013

Dennis Jacobfeuerborn <dennisml at conversis.de> wrote:

>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
>>> picture. Still the cluster fails when I set the master node to
>>> 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
>> 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
>> 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
>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
>the filter?

That is because /dev has a lot of symlinks which point to that vdb device file. You'd better allow what is allowed and deny everything else.

>   Dennis
>Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>Project Home: http://www.clusterlabs.org
>Getting started:
>Bugs: http://bugs.clusterlabs.org

More information about the Pacemaker mailing list