[DRBD-user] Can't Get DRBD Master/Slave out of secondary/secondary using pacemaker

Nick Khamis symack at gmail.com
Fri Sep 23 14:58:10 CEST 2011

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hello Everyone,

I am having a problem getting DRBD out of:

m:res     cs         ro                   ds                 p  mounted  fstype
0:r0_res  Connected  Secondary/Secondary  UpToDate/UpToDate  C

When within pacemaker. Log reports:

Sep 23 08:31:32 mydrbd1 crmd: [8254]: info: te_rsc_command: Initiating
action 6: start fs_mysql_start_0 on mydrbd1 (local)
Sep 23 08:31:32 mydrbd1 crmd: [8254]: info: do_lrm_rsc_op: Performing
key=6:1:0:d358f330-0c0b-417b-9936-cbe56e0d97c7 op=fs_mysql_start_0 )
Sep 23 08:31:32 mydrbd1 lrmd: [8251]: info: rsc:fs_mysql:8: start
Sep 23 08:31:32 mydrbd1 lrmd: [8251]: info: RA output:
(fs_mysql:start:stderr) FATAL: Module scsi_hostadapter not found.

Sep 23 08:31:32 mydrbd1 lrmd: [8251]: info: RA output:
(fs_mysql:start:stderr) /dev/drbd0: Wrong medium type

Sep 23 08:31:32 mydrbd1 lrmd: [8251]: info: RA output:
(fs_mysql:start:stderr) mount: block device /dev/drbd0 is
write-protected, mounting read-only
Sep 23 08:31:32 mydrbd1 lrmd: [8251]: info: RA output: (fs_mysql:start:stderr)

Sep 23 08:31:32 mydrbd1 lrmd: [8251]: info: RA output:
(fs_mysql:start:stderr) mount: Wrong medium type
Sep 23 08:31:32 mydrbd1 lrmd: [8251]: info: RA output: (fs_mysql:start:stderr)

I suspect the following warning can help:

Sep 23 08:31:33 mydrbd1 pengine: [8253]: WARN:
common_apply_stickiness: Forcing fs_mysql away from mydrbd1 after
1000000 failures (max=1000000)

But I am not sure how to tell pacemaker I want mydrbd1 to be the
master. I am just prototyping right now on a laptop using virutal box
and one network card.

crm_mon:

============
Last updated: Fri Sep 23 08:50:26 2011
Last change: Fri Sep 23 08:31:12 2011 via cibadmin on mydrbd1
Stack: openais
Current DC: mydrbd1 - partition with quorum
Version: 1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c
4 Nodes configured, 2 expected votes
5 Resources configured.
============

Online: [ mydrbd1 mydrbd2 ]
OFFLINE: [ lb2 lb1 ]

 Resource Group: HAServices
     ip1        (ocf::heartbeat:IPaddr2):       Started mydrbd2
     fs_mysql   (ocf::heartbeat:Filesystem):    Stopped
     mysql      (ocf::heartbeat:mysql): Stopped
 Master/Slave Set: ms_drbd_mysql [drbd_mysql]
     Slaves: [ mydrbd2 mydrbd1 ]

Failed actions:
    mysql_monitor_0 (node=mydrbd1, call=4, rc=5, status=complete): not installed
    fs_mysql_start_0 (node=mydrbd1, call=8, rc=1, status=complete):
unknown error
    mysql_monitor_0 (node=mydrbd2, call=4, rc=5, status=complete): not installed
    fs_mysql_start_0 (node=mydrbd2, call=10, rc=1, status=complete):
unknown error

my RA config looks like:

node mydrbd1 \
       attributes standby="off"
node mydrbd2 \
       attributes standby="off"
primitive ip1 ocf:heartbeat:IPaddr2 \
        params ip="192.168.2.5" cidr_netmask=24 \
	nic="eth1"
primitive drbd_mysql ocf:linbit:drbd \
	params drbd_resource="r0.res" \
	op monitor role=Master interval="10" \
	op monitor role=Slave interval="30" 	
ms ms_drbd_mysql drbd_mysql \
	meta master-max="1" master-node-max="1" \
	clone-max="2" clone-node-max="1" \
	notify="true"
primitive fs_mysql ocf:heartbeat:Filesystem \
	params device="/dev/drbd0" directory="/service" fstype="ext3" \
        op monitor interval="15" timeout="60" \
        meta target-role="Started"
primitive mysql ocf:heartbeat:mysql \
	params binary="/usr/local/mysql/bin/mysqld_safe" \
	config="/etc/my.cnf" datadir="/service/data" \
	socket="/tmp/mysql.sock" pid="/service/data/mydrbd2.pid" \
	op start interval="0" timeout="120" \
	op stop interval="0" timeout="120" \
	op monitor interval="60" timeout="30" depth="0" \
	meta target-role="Started"
group HAServices ip1 fs_mysql mysql \
	meta target-role="Started"
colocation mysql_on_drbd \
	inf: ms_drbd_mysql:Master HAServices
order mysql_after_drbd \
      inf: ms_drbd_mysql:promote mysql:start
property $id="cib-bootstrap-options" \
        no-quorum-policy="ignore" \
        stonith-enabled="false" \
        expected-quorum-votes="2" \
        dc-version="1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c" \
        cluster-recheck-interval="0" \
        cluster-infrastructure="openais"
	rsc_defaults $id="rsc-options" \
	resource-stickiness="100"


I just want to add that I can get DRBD to mount when removing the
mysql primitive. And running:

node mydrbd1 \
       attributes standby="off"
node mydrbd2 \
       attributes standby="off"
primitive ip1 ocf:heartbeat:IPaddr2 \
        params ip="192.168.2.5" cidr_netmask=24 \
	nic="eth1"
primitive drbd_mysql ocf:linbit:drbd \
	params drbd_resource="r0.res" \
	op monitor role=Master interval="10" \
	op monitor role=Slave interval="30" 	
ms ms_drbd_mysql drbd_mysql \
	meta master-max="1" master-node-max="1" \
	clone-max="2" clone-node-max="1" \
	notify="true"
primitive fs_mysql ocf:heartbeat:Filesystem \
	params device="/dev/drbd0" directory="/service" fstype="ext3" \
        op monitor interval="15" timeout="60" \
        meta target-role="Started"
group HAServices ip1 fs_mysql \
	meta target-role="Started"
colocation mysql_on_drbd \
	inf: ms_drbd_mysql:Master HAServices
property $id="cib-bootstrap-options" \
        no-quorum-policy="ignore" \
        stonith-enabled="false" \
        expected-quorum-votes="2" \
        dc-version="1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c" \
        cluster-recheck-interval="0" \
        cluster-infrastructure="openais"
	rsc_defaults $id="rsc-options" \
	resource-stickiness="100"

With this config, DRBD connects, assigns master to drbd2 (I actually
want drbd1 to be master), and mounts the filesystem.

Please Help,

Nick.



More information about the drbd-user mailing list