public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Clark <michael@metaparadigm.com>
To: "Ragnar Kjørstad" <kernel@ragnark.vestdata.no>
Cc: Jesse Pollard <pollard@admin.navo.hpc.mil>,
	Rashmi Agrawal <rashmi.agrawal@wipro.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Failover in NFS
Date: Tue, 19 Nov 2002 09:36:47 +0800	[thread overview]
Message-ID: <3DD995AF.6090000@metaparadigm.com> (raw)
In-Reply-To: 20021118232230.F30589@vestdata.no

On 11/19/02 06:22, Ragnar Kjørstad wrote:

> But it would not work as described above. There are some important
> limitations here:
> 
> - I assumed that /var/lib/nfs is shared. If you want two servers to
>   be active at once you need a different way to share lock-data.

I'm looking at this problem right now. Basically to support multiple
virtual NFS servers with failover support, lockd could be modified to
communicate with the local statd using the dest IP used in the locking
operation - then statd can modified to look at the peer address
(which is normally 127.0.0.1) to find out which NFS virtual server
the monitor request is for. This would also allow you to run a statd
per virtual NFS server (bound to the specific address instead of
IPADDR_ANY).

> - AFAIK there is no way for statd to service 2 IP's at once.
>   It will (AFAIK) bind to both adresses, but the problem is the
>   message that is sent out at startup and includes the ip of
>   the local host.

The nfs-utils in cvs has an undocumented notify-only mode and the
hostname used in the reboot notify message can also overriden
on the commandline.

So during a take over for a virtual NFS server - the new taking over
node (already has its statd running) can run another copy of statd in
notify-only mode to send out the reboot messages using the name
of the virtual host.

This all assumes /var/lib/nfs/sm can be synchronised between the
hosts either with something like GFS or possibly a modified statd
that communicates monitor requests to its cluster peers.

I have just written some code to sync the /var/lib/nfs/sm directories.
It is a little deamon that uses dnotify to get realtime directory
update notifications, it then sends UDP messages to its cluster peers
to keep the /var/lib/nfs/sm in sync.

The problem is that until statd is virtual IP aware, if a host
is connected to 2 of the virtual NFS servers and sends an unmonitor
for one, both will get unmonitored.

I'm thinking that instead of statd just storing the monitor IP
adress in /var/lib/nfs/sm/1.2.3.4  that instead with the lockd changes,
it could also store the peer address (virtual NFS server) ie.
/var/lib/nfs/sm/5.6.7.8:1.2.3.4 (this would be compatible for a
old lock as the monitor would be stored as /var/lib/nfs/sm/127.0.0.1:1.2.3.4

> Neither limitation is a law of nature. They can be fixed. I think there
> is work going on to change the way locks are stored, and I'm sure the
> second problem can be solved as well.

Yes, i hope so.

~mc


  parent reply	other threads:[~2002-11-19  1:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-18 15:04 Failover in NFS Rashmi Agrawal
2002-11-18 15:44 ` Ragnar Kjørstad
2002-11-18 22:11   ` Jesse Pollard
2002-11-18 22:22     ` Ragnar Kjørstad
2002-11-18 22:41       ` Jesse Pollard
2002-11-18 22:51         ` Ragnar Kjørstad
2002-11-19  1:36       ` Michael Clark [this message]
2002-11-19  5:07         ` Rashmi Agrawal
2002-11-19  7:40           ` Michael Clark
2002-11-22  7:07       ` Rashmi Agrawal
2002-11-21 20:58     ` Bill Davidsen
2002-11-21 22:52       ` Jesse Pollard
2002-11-22 19:19         ` Gunther Mayer
2002-11-18 22:33 ` Jan Niehusmann
  -- strict thread matches above, loose matches on Subject: below --
2002-11-19 18:24 Juan Gomez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DD995AF.6090000@metaparadigm.com \
    --to=michael@metaparadigm.com \
    --cc=kernel@ragnark.vestdata.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pollard@admin.navo.hpc.mil \
    --cc=rashmi.agrawal@wipro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox