I'm new with Pacemaker and DRBD but I have to configure them together.
I created 2 drbd resources : Drbdwww and DrbdMysql
But when I use drbd_mon I have the following errors :
Stack: corosync
Current DC: s-ha-web1 (version 1.1.15-e174ec8) - partition with quorum
Last updated: Mon May 8 21:58:45 2017 Last change: Mon May 8 21:58:36 2017 by hacluster via crmd on s-ha-web1
2 nodes and 7 resources configured
Online: [ s-ha-web1 s-ha-web2 ]
Resource Group: haweb
vip (ocf::heartbeat:IPaddr2): Started s-ha-web1
httpd (ocf::heartbeat:apache): Started s-ha-web1
Drbdwww (ocf::linbit:drbd): FAILED (blocked)[ s-ha-web1 s-ha-web2 ]
fsDrbdwww (ocf::heartbeat:Filesystem): Stopped
DrbdMysql (ocf::linbit:drbd): FAILED (blocked)[ s-ha-web1 s-ha-web2 ]
fsDrbdMysql (ocf::heartbeat:Filesystem): Stopped
mysql (ocf::heartbeat:mysql): Stopped
Failed Actions:
* Drbdwww_monitor_0 on s-ha-web1 'not configured' (6): call=14, status=complete, exitreason='none',
last-rc-change='Mon May 8 21:58:40 2017', queued=0ms, exec=21ms
* DrbdMysql_stop_0 on s-ha-web1 'not configured' (6): call=23, status=complete, exitreason='none',
last-rc-change='Mon May 8 21:58:40 2017', queued=0ms, exec=30ms
* Drbdwww_stop_0 on s-ha-web2 'not configured' (6): call=32, status=complete, exitreason='none',
last-rc-change='Mon May 8 21:58:40 2017', queued=0ms, exec=17ms
* DrbdMysql_stop_0 on s-ha-web2 'not configured' (6): call=31, status=complete, exitreason='none',
last-rc-change='Mon May 8 21:58:40 2017', queued=0ms, exec=17ms
Here is my pacemaker configuration :
crm configure property stonith-enabled=false
crm configure property no-quorum-policy=ignore
crm configure primitive vip ocf:heartbeat:IPaddr2 params ip=192.168.100.100 cidr_netmask=24 nic="eth1" op monitor interval="30s" timeout="20s"
crm configure primitive Drbdwww ocf:linbit:drbd params drbd_resource="rwww" op monitor interval="30s" role="Slave" op monitor interval="29s" role="Master"
crm configure primitive fsDrbdwww ocf:heartbeat:Filesystem params device="/dev/drbd0" directory="/var/www/html" fstype="ext4"
crm configure primitive DrbdMysql ocf:linbit:drbd params drbd_resource="rmysql" op monitor interval="30s" role="Slave" op monitor interval="29s" role="Master"
crm configure primitive fsDrbdMysql ocf:heartbeat:Filesystem params device="/dev/drbd1" directory="/var/lib/mysql_drbd" fstype="ext4"
Can someone help me ?
If you need some more informations, please tell me.
Best Answer
You're missing quite a bit here.
First, you're going to need a master slave resource set for each of your DRBD devices.
Then, you'll probably want to to create groups of resources (fs, ip, service), using colocation and ordering constraints to tell those groups to start only where/after their respective DRBD device has been promoted to master. Resource groups imply colocation and ordering of resources inside the group.
Google should turn up numerous guides on setting up HA LAMP stacks using DRBD and Pacemaker.
EDIT: More information was supplied in the form of an answer... I can get more specific now.
This is what your CIB (pacemaker configuration) should look like:
The failed actions on your DRBD resources likely means you haven't properly setup your DRBD devices. Did you already create the metadata for the devices? If so, did you already force promote one node to Primary in order to start the initial sync? What does the output of
cat /proc/drbd
look like?