Here is my CIB.xml config.
cib.xml:
========
primitive fs0 ocf:heartbeat:Filesystem \
params fstype="ext3" directory="/data" device="/dev/drbd0"
primitive VIP ocf:heartbeat:IPaddr \
params ip="10.50.26.250" \
op monitor interval="5s" timeout="5s"
primitive Emergency_Contact ocf:heartbeat:MailTo \
params email="[email protected]" subject="Failover Occured" \
op monitor interval="3s" timeout="3s"
primitive drbd0 ocf:heartbeat:drbd \
params drbd_resource="r0" \
op monitor interval="59s" role="Master" timeout="30s" \
op monitor interval="60s" role="Slave" timeout="30s"
group DRBD_Group fs0 VIP Emergency_Contact \
meta collocated="true" ordered="true" migration-threshold="1" failure-
timeout="10s" resource-stickiness="10"
ms ms-drbd0 drbd0 \
meta clone-max="2" notify="true" globally-unique="false" target-role="
Started"
colocation DRBD_Group-on-ms-drbd0 inf: DRBD_Group ms-drbd0:Master
order ms-drbd0-before-DRBD_Group inf: ms-drbd0:promote DRBD_Group:start
I did a bit more testing and here are the facts.
01) Based on the cib.xml config below, when a node owns the resource group
DRBD_Group, I would start the NFS service manually and I would get the error
below. Nevertheless, I would be able to access the NFS share from another
machine.
" # service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
Starting RPC idmapd: Error: RPC MTAB does not exist. "
02) When I failover the resource group DRBD_Group to the other node, I can
start NFS with the same error but would still be able to access the share from
another machine.
03) However, if I add the NFS into the resource group DRBD_Group (see below),
the share will still be accessible, but it will not failover due to the OCF
agent nfsserver will not be able to shutdown NFS service.
To add the NFS resource into the DRBD_Group, I would add the following via
crm(live) and also add nfs_share into the DRBD_group line.
primitive nfs_share ocf:heartbeat:nfsserver \
params nfs_init_script="/etc/init.d/nfs" \
params nfs_notify_cmd="/sbin/rpc.statd" \
params nfs_shared_infodir="/data/varlibnfs" \
params nfs_ip="10.50.26.250" \
op monitor interval="30s"
...
group DRBD_Group fs0 nfs_share VIP Emergency_Contact \
...
I think there is something wrong with the OCF agent nfsserver in that it cannot
stop the NFS service. As a result, the DRBD device will not failover. Hence,
the resource group will not failover.
Please help.
jerome
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jerome Yanga
Sent: Tuesday, April 28, 2009 5:28 PM
To: General Linux-HA mailing list
Subject: [Linux-HA] Cannot get Heartbeat, DRBD and NFS to work together
Hi peeps!
I cannot get my High Availability NFS server work right. Here is my
configuration.
primitive share_name ocf:heartbeat:nfsserver \
params nfs_init_script="/etc/init.d/nfs" \
params nfs_notify_cmd="/sbin/rpc.statd" \
params nfs_shared_infodir="/data" \
params nfs_ip="10.50.26.250" \
op monitor interval="30s"
drbd-8.2.7-3
heartbeat-2.99.2-6.1
pacemaker-1.0.2-11.1
nfs-utils-1.0.9-40.el5
nfs-utils-lib-1.0.8-7.2.z2
Without heartbeat running, NFS works properly. When I add NFS as a resource
into a group, it gets added but it does not seem to work as I cannot get to the
share from other systems.
I have tried following the site below, but I may have done something wrong
since the share does not work. :(
http://www.linux-ha.org/HaNFS
Help.
Thank you in advance.
jerome
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems