So my current environment is centos7 on a pair of identical bare metal servers. I've installed drbd and carved up 3 x 100G block devices for DRBD to mirror. Then I installed a Centos7 image on one of those block devices.
I wanted Pacemaker to manage DRBD as well as the xen virtual images, so I followed the directions specified in clusterlabs.org's "Clusters From Scratch" doc:
pcs cluster cib drbd_cfg pcs -f drbd_cfg resource create XenHost01_Storage ocf:linbit:drbd drbd_resource=XenHost01 op monitor interval=60s pcs -f drbd_cfg resource master XenHost01_StorageClone XenHost01_Storage master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true pcs cluster cib-push drbd_cfg
Then I added in the Xen vm to be managed as well.
pcs cluster cib vmstate_cfg pcs -f vmstate_cfg resource create XenHosts --group vminit systemd:vmstate op monitor interval=10s pcs cluster cib-push vmstate_cfg
So my cluster resources would look like this:
Full list of resources: Master/Slave Set: XenHost01_StorageClone [XenHost01_Storage] Masters: [ ha1 ] Slaves: [ ha2 ] Resource Group: vminit XenHosts (systemd:vmstate): Started ha1 PCSD Status: ha1: Online ha2: Online
What I'm trying to figure out, and the reason for my post, is how to stick that DRBD master/slave pair under the vminit group, so that the Xen virtual machines only get started on the primary DRBD host. Without them in a group, if the other host shows up as primary in DRBD, the cluster doesn't care and still tries to start up the virtual images and will fail.
Anybody know how to get that master/slave drbd resource under a group? I've been tearing my hair out.