[Pacemaker] drbd + lvm

Digimer lists at alteeve.ca
Thu Mar 13 15:39:50 EDT 2014

On 13/03/14 03:26 PM, Infoomatic wrote:
> Hi list,
> I am having troubles with pacemaker and lvm and stacked drbd resources.
> The system consists of 2 Ubuntu 12 LTS servers, each having two partitions of an underlying raid 1+0 as volume group with one LV each as a drbd backing device. The purpose is for usage with VMs and adjusting needed disk space flexible, so on top of the drbd resources there are LVs for each VM.
> I created a stack with LCMC, which is like:
> DRBD->LV->libvirt and
> DRBD->LV->Filesystem->lxc
> The problem now: the system has "hickups" - when VM01 runs on HOST01 (being primary DRBD) and HOST02 is restarting, lvm is reloaded (at boot time) and the LVs are being activated. This of course results in an error, the log entry:
> Mar 13 17:58:42 host01 pengine: [27563]: ERROR: native_create_actions: Resource res_LVM_1 (ocf::LVM) is active on 2 nodes attempting recovery
> Therefore, as configured, the resource is stopped and started again (on only one node). Thus, all VMs and containers relying on this are also restared.
> When I disable the LVs that use the DRBD resource at boot (lvm.conf: volume_list only containing the VG from the partitions of the raidsystem) a reboot of the secondary does not restart the VMs running on the primary. However, if the primary goes down (e.g. power interruption), the secondary cannot activate the LVs of the VMs because they are not in the list of lvm.conf to be activated.
> Has anyone had this issue and resolved it? Any ideas? Thanks in advance!
> infoomatic

Are you using clustered LVM?

I don't know much about ubuntu, but I do it this way:

https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_DRBD (and the 
section after it on LVM setup). You can obviously ignore the EL6 
specific stuff and the concepts will map. I've used this setup (DRBD + 
clvmd + LV-per-VM) for years now without issue.

I'm in the early stages of testing this on Pacemaker, and so far, so 
good. So I see no reason why the concepts from that tutorial can't be 
well ported to pacemaker in your environment.


Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without 
access to education?

More information about the Pacemaker mailing list