linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Schwartzkopff <misch@schwartzkopff.org>
To: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: NFSv4 grace time
Date: Fri, 22 Jul 2011 13:24:22 +0200	[thread overview]
Message-ID: <201107221324.22512.misch@schwartzkopff.org> (raw)
In-Reply-To: <20110722070742.776ae99d@tlielax.poochiereds.net>

[-- Attachment #1: Type: Text/Plain, Size: 1721 bytes --]

> On Thu, 21 Jul 2011 15:40:05 +0200
> 
> Michael Schwartzkopff <misch@schwartzkopff.org> wrote:
> > Hi,
> > 
> > setting up a linux NFS server cluster I experience a strange problem
> > during a failover. A client can access a file only after 60 to 90
> > seconds. On the line I see a NFS4ERR_GRACE from the server to the
> > client.
> > 
> > I already set the /proc/fs/nfsd/nfsv4leastime to 10.
> > 
> > Any other idea?
> > 
> > For the tests I have a simple setup:
> > 
> > One host with a simple script that simulates failover:
> > 
> > #!/bin/bash
> > 
> > ip a d 1.2.3.4/24 dev eth0
> > exportfs -u *:/srv/nfs/home
> > exportfs -u *:/srv/nfs
> > /etc/init.d/nfsserver stop
> > #
> > /etc/init.d/nfsserver start
> > exportfs -o fsid=0,rw,crossmnt,no_root_squash *:/srv/nfs
> > exportfs -o fsid=1000,rw,mountpoint,no_root_squash *:/srv/nfs/home
> > ip a a 1.2.3.4/24 dev eth0
> 
> This is normal. The grace period is there to allow clients to reclaim
> their state without other clients racing in and grabbing their locks on
> the new server, etc.

Ok. But this is the same client that cannot its own data.
 
> You can play with /proc/fs/nfsd/nfsv4gracetime too but I'd be very
> leery of setting that too low. It should never be lower than the
> previous leasetime (see the comments on write_gracetime in the kernel).

I did already set this to 10 seconds without success. The client still has to 
wait 60 seconds to access its data.

By the way: Is there a nice way to set this during startup of the nfsserver, 
i.e. a mount option for nfsd?

Greetings,

-- 
Dr. Michael Schwartzkopff
Guardinistr. 63
81375 München

Tel: (0163) 172 50 98
Fax: (089) 620 304 13

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2011-07-22 11:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 13:40 NFSv4 grace time Michael Schwartzkopff
2011-07-22 11:07 ` Jeff Layton
2011-07-22 11:24   ` Michael Schwartzkopff [this message]
2011-07-22 11:41     ` Jeff Layton
2011-07-22 17:16       ` J. Bruce Fields

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=201107221324.22512.misch@schwartzkopff.org \
    --to=misch@schwartzkopff.org \
    --cc=linux-nfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).