Andrew,

Yes I agree there is a bug in the init script that it does return the correct status. But the environment that heartbeat calls the init script from must be causing the different behaviour. As the same script (/etc/init.d/nfs) called with the same parameters called from the command line works fine.

Also for others who have this problem, the work around described at http://linux-ha.org/DRBD/NFS is fine for Heartbeat when it is run in V1 mode. But for V2 this method does not work. You can just edit the Redhat nfs init script, but this is not a permanent solution as Redhat may release an RPM that over writes the changes.

I have now created a wrapper script called nfsinit that calls the Redhat nfs init script, and performs the kill for stop commands and also passes the return codes faithfully.

Place this in /etc/ha.d/resources.d and call it instead of nfs

#!/bin/bash
#Wrapper script for the nfs init script that enures the nfsd really has stopped
cmd=$1
/etc/init.d/nfs $1
res=$?
if [ "$cmd" == "stop" ]
then
       killall -9 nfsd 2>1 > /dev/null
fi
exit $res

regards
Adrian


_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to