[Linux-HA] Perplexing NFS configurations and iLo devices.

Dave Dykstra dwdha at drdykstra.us
Thu Jun 23 15:30:45 MDT 2005


I'm running a HA NFS server pair on Debian, but I can't help you with the
HP iLo.  I have not tried the userspace daemon, but nfs-kernel-server works
except that "/etc/init.d/nfs-kernel start" has a problem in that it will
return an error code if the service is already started, and heartbeat does
that sometimes.  I wrote a resource.d script (below) to insulate that which
implements the 'status' parameter by checking if a given daemon is running.
Instead of the 'nfslock' referred to on HaNFS web page, I use nfs-common.
Here's the NFS-related subset of my haresources file:

    drbddisk::home \
    Filesystem::/dev/drbd0::/mnt/home::ext3 \
    StartStop::nfs-common::/sbin/rpc.statd \
    StartStop::nfs-kernel-server::/usr/sbin/rpc.mountd \
    IPaddr2::172.18.30.21 \

Other than that, I highly discourage NFS-mounting any filesystem on
your NFS servers.  I wanted both servers to NFS-mount the replicated
filesystem from the active server, and through a lot of trouble I got it
mostly working but I still saw scenarios where "NFS server not responding"
could interfere with heartbeat failovers so I finally gave up.

- Dave

------ /etc/ha.d/resource.d/StartStop -----

#!/bin/bash
#
# This script is intended to be used as resource script by heartbeat.
# The first parameter is a script name in /etc/init.d and the second
#   parameter is a path of a background daemon started by the 
#   /etc/init.d script, used to determine whether or not the resource
#   is running. 
#
# Written June 2005 by Dave Dykstra
#

ME=StartStop

usage()
{
    echo "Usage: $ME init.d_script daemon_path {start|stop|status}" >&2
    exit 1
}

if [ "$#" != 3 ]; then
    echo "$ME: wrong number of parameters" >&2
    usage
fi

if [ ! -f /etc/init.d/$1 ]; then
    echo "$ME: /etc/init.d/$1 not found" >&2
    usage
fi

if [ ! -f $2 ]; then
    echo "$ME: $2 not found" >&2
    usage
fi

case "$3" in
    start|stop)
        set -e
        /etc/init.d/$1 $3
        ;;
    status)
        if start-stop-daemon -K -s 0 --quiet --exec $2; then
            echo "running"
        else
            echo "stopped"
        fi
        ;;
    *)
        usage
        ;;
esac

exit 0


On Tue, Jun 21, 2005 at 06:32:14PM +0200, Emanuele Balla wrote:
> Hello,
> I'm on the step of building up a couple of machines to redundantly 
> provide NFS services.
> I'm using debian sarge as OS.
> Looking for topics about NFS clusters, i found out both the article by 
> Andre Bonhote and the documents at http://wwnew.linux-ha.org/HaNFS
> None of the two explicitly reports if the service is going to be 
> provided by kernel-builtin nfs server or by the userspace daemon (don't 
> use redhat since a long time, and don't remember what the example 
> configuration means). Is there any problem using one or the other?
> 
> Another question.
> 
> The two nodes are HP DL360. Since they provide the useful iLo interface, 
> I'm obviously interested in using them to get resource fencing.
> I've been searching for a while in the list's archive and I've been able 
> to locate a couple of references here and there, but found nothing as 
> clear as I hoped.
> 
> Is there anyone using these who provides a working set of scripts, just 
> to avoid reinventing wheels?
> 
> 
> Thank you for attention.
> 
> -- 
> Balla Emanuele            balla at spin.it
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha


More information about the Linux-HA mailing list