[Nolug] NFS and fault-tolerance

From: Dustin Puryear <dpuryear_at_usa.net>
Date: Sat, 16 Mar 2002 17:10:15 -0600
Message-Id: <5.1.0.14.0.20020316165747.040f7fa0@pop.netaddress.com>

We are running two NAS devices offering NFS. One NAS is the primary and the
second a backup to the first. If the first goes down we would like our web
servers to automatically switch to the second NAS. My concern is how to
best implement this fail-over. One solution I've considered is to mount the
NAS devices as /mnt/nas1 and /mnt/nas2. Next, create a symlink /mnt/nas to
/mnt/nas1. We then read from /mnt/nas. (There is another reason we mount
both NAS devices, which isn't really related to this issue.) I would then
the following program:

loop forever
        if nas1 is down then
                stop server services
                rm -f /mnt/nas
                ln -s /mnt/nas2 /mnt/nas
                start server services
                send warning messages to administrator
        end if
end loop

I am wondering if there is a better way to do this?

Note that we are mounting the NFS exports as soft. Otherwise, we would have
problems with our running services once nas1 failed.

Regards, Dustin

---
Dustin Puryear <dpuryear@usa.net>
Information Systems Contractor
http://members.telocity.com/~dpuryear
PGP Key available at http://www.us.pgp.net
In the beginning the Universe was created.
This has been widely regarded as a bad move. - Douglas Adams
___________________
Nolug mailing list
nolug@nolug.org
Received on 03/20/02

This archive was generated by hypermail 2.2.0 : 12/19/08 EST