Re: Failover in NFS

From: Jesse Pollard (pollard@admin.navo.hpc.mil)
Date: Mon Nov 18 2002 - 17:11:06 EST


On Monday 18 November 2002 09:44 am, Ragnar Kjørstad wrote:
> On Mon, Nov 18, 2002 at 08:34:55PM +0530, Rashmi Agrawal wrote:
> > 1. I have a 4 node cluster and nfsv3 in all the nodes of cluster with
> > server running in one
> > of the 2 nodesconnected to shared storage and 2 other nodes are acting
> > as clients.
> > 2. If nfs server node crashes, I need to failover to another node
> > wherein I need to have access
> > to the lock state of the previous server and I need to tell the clients
> > that the IP address of the
> > nfs server node has changed. IS IT POSSIBLE or what can be done to
> > implement it?
>
> No, you need to move the IP-address from the old nfs-server to the new
> one. Then to the clients it will look like a regular reboot. (Check out
> heartbeat, at http://www.linux-ha.org/)
>
> You need to make sure that NFS is using the shared ip (the one you move
> around) rather than the fixed ip. (I assume you will have a fixed ip on
> each host in addition to the one you move around). Also, you need to put
> /var/lib/nfs on shared stoarage. See the archive for more details.

It would actually be better to use two floating IP numbers. That way during
normal operation, both servers would be functioning simultaneously
(based on the shared storage on two nodes).

Then during failover, the floating IP of the failed node is activated on the
remaining node (total of 3 IP numbers now, one real, two floating). The NFS
recovery cycle should then cause the clients to remount the filesystem from
the backup server.

When the failed node is recovered, the active server should then disable the
floating IP associated with the recovered server, causing only the mounts
using that IP number to fall back to the proper node, balancing the load
again.

-- 
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:24 EST