[Pacemaker] ocf:heartbeat:Filesystem doesn't work via corosync

Cotton Tenney cotton.tenney at rogerspos.com
Wed Aug 17 21:59:09 UTC 2011


 Hello all, 

I've been trying to get a 2-node mysql cluster up on Pacemaker/DRBD and I'm having issues getting corosync to mount the partition after starting DRBD. It seems like when running the ocf:Filesystem script via pacemaker, it fails to make the drbd device primary on the master node. I can manually run the ocf Filesystem, and DRBD starts and the partition is mounted as expected:

root at gila:/usr/lib/ocf/resource.d/heartbeat# export OCF_ROOT=/usr/lib/ocf
root at gila:/usr/lib/ocf/resource.d/heartbeat# export OCF_RESKEY_device="/dev/drbd0"
root at gila:/usr/lib/ocf/resource.d/heartbeat# export OCF_RESKEY_options=rw
root at gila:/usr/lib/ocf/resource.d/heartbeat# export OCF_RESKEY_fstype=ext4
root at gila:/usr/lib/ocf/resource.d/heartbeat# export OCF_RESKEY_directory="/var/lib/mysql"
root at gila:/usr/lib/ocf/resource.d/heartbeat# /etc/init.d/drbd start
 --== Thank you for participating in the global usage survey ==--
The server's response is:
node already registered
* Starting DRBD resources
[ 
disk0
Found valid meta data in the expected location, 320000978944 bytes into /dev/fioa.
d(disk0) s(disk0) n(disk0) ] ...done.
root at gila:/usr/lib/ocf/resource.d/heartbeat# drbdadm primary all 
root at gila:/usr/lib/ocf/resource.d/heartbeat# ./Filesystem start
Filesystem[28277]: INFO: Running start for /dev/drbd0 on /var/lib/mysql
FATAL: Module scsi_hostadapter not found.
Filesystem[28277]: INFO: Starting filesystem check on /dev/drbd0
fsck from util-linux-ng 2.17.2
/dev/drbd0: clean, 79439/19537920 files, 7781765/78122846 blocks
root at gila:/usr/lib/ocf/resource.d/heartbeat#


My config:

root at gila:~# crm configure show
node gila
node kanab
primitive drbd_mysql ocf:linbit:drbd \
params drbd_resource="disk0" \
op monitor interval="15s" \
op start interval="15s"
primitive fs_mysql ocf:heartbeat:Filesystem \
params device="/dev/drbd0" directory="/var/lib/mysql" fstype="ext4"
op monitor interval="15s" \
op start interval="15s"
primitive ip_mysql ocf:heartbeat:IPaddr2 \
params ip="192.168.10.101" nic="eth0"
primitive mysqld lsb:mysql
group mysqlgroup fs_mysql ip_mysql mysqld
ms ms_drbd_mysql drbd_mysql \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
colocation mysql_on_drbd inf: mysqlgroup ms_drbd_mysql:Master
property $id="cib-bootstrap-options" \
dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
cluster-infrastructure="openais" \
expected-quorum-votes="1" \
stonith-enabled="false"
root at gila:~# cat /etc/drbd.d/disk0.res 
resource disk0 {
protocol C;
net {
cram-hmac-alg sha1;
shared-secret "xxx";
}
on kanab {
device /dev/drbd0;
disk /dev/fioa;
address 10.10.1.2:7788;
meta-disk internal;
}
on gila {
device /dev/drbd0;
disk /dev/fioa;
address 10.10.1.1:7788;
meta-disk internal;
}
}
root at gila:~#

Log messages:

Aug 17 12:35:20 gila crmd: [24757]: info: te_rsc_command: Initiating action 32: start fs_mysql_start_0 on gila (local)
Aug 17 12:35:20 gila crmd: [24757]: info: do_lrm_rsc_op: Performing key=32:1:0:9b90831c-824b-462f-a2db-7e582c706638 op=fs_mysql_start_0 )
Aug 17 12:35:20 gila lrmd: [24754]: debug: on_msg_perform_op:2359: copying parameters for rsc fs_mysql
Aug 17 12:35:20 gila lrmd: [24754]: debug: on_msg_perform_op: add an operation operation start[8] on ocf::Filesystem::fs_mysql for client 24757, its parameters: fstype=[ext4] crm_feature_set=[3.0.1] device=[/dev/drbd0] CRM_meta_timeout=[20000] options=[rw] directory=[/var/lib/mysql] to the operation list.
Aug 17 12:35:20 gila lrmd: [24754]: info: rsc:fs_mysql:8: start
Aug 17 12:35:20 gila Filesystem[25276]: INFO: Running start for /dev/drbd0 on /var/lib/mysql
Aug 17 12:35:20 gila lrmd: [24754]: info: RA output: (fs_mysql:start:stderr) FATAL: Module scsi_hostadapter not found.
Aug 17 12:35:20 gila Filesystem[25276]: INFO: Starting filesystem check on /dev/drbd0
Aug 17 12:35:20 gila lrmd: [24754]: info: RA output: (fs_mysql:start:stdout) fsck from util-linux-ng 2.17.2
Aug 17 12:35:20 gila lrmd: [24754]: info: RA output: (fs_mysql:start:stdout) Disk write-protected; use the -n option to do a read-only#012check of the device.
Aug 17 12:35:20 gila lrmd: [24754]: info: RA output: (fs_mysql:start:stderr) fsck.ext4: Read-only file system while trying to open /dev/drbd0#015


Any help would be greatly appreciated.

Thanks,
Cotton Tenney
Systems Administrator
Rogers Software Development





More information about the Pacemaker mailing list