From: "J. Bruce Fields" <bfields@redhat.com>
To: Pavel A <free.lan.c2.718r@gmail.com>
Cc: Bryan Schumaker <bjschuma@netapp.com>,
"J. Bruce Fields" <bfields@fieldses.org>,
linux-nfs@vger.kernel.org
Subject: Re: clients fail to reclaim locks after server reboot or manual sm-notify
Date: Wed, 16 Nov 2011 15:08:37 -0500 [thread overview]
Message-ID: <20111116200837.GD2955@pad.fieldses.org> (raw)
In-Reply-To: <CAA-yEOLYRSxxOWPEe+e_C4T=qkQcKenzw=PNjq4cACYYXA8ncA@mail.gmail.com>
On Wed, Nov 16, 2011 at 09:09:07PM +0200, Pavel A wrote:
> I've read about this issue here:
> http://www.time-travellers.org/shane/papers/NFS_considered_harmful.html
>
> /*-----
> In the event of server failure (e.g. server reboot or lock daemon
> restart), all client locks are lost. However, the clients are not
> informed of this, and because the other operations (read, write, and
> so on) are not visibly interrupted, they have no reliable way to
> prevent other clients from obtaining a lock on a file they think they
> have locked.
> -----*/
That's incorrect. Perhaps the article is out of date, I don't know.
> Can't get this. If there is a grace period after reboot and clients
> can successfully reclaim locks, then how other clients can obtain
> locks?
That's right, in the absence of bugs, if a client succesfully reclaims a
lock, then it knows that no other client can have acquired that lock in
the interim: since the reclaim succeeded, that means the server is still
in the grace period, which means the only other locks that it has
allowed are also reclaims. If some reclaim conflicts with this lock,
then the other client must have reclaimed a lock that it didn't actually
hold before (hence must be buggy).
> > You need to restart nfsd on the node that is taking over. That means
> > that clients usings both filesystems (A and B) will have to do lock
> > recovery, when in theory only those using volume B should have to, and
> > that is suboptimal. But it is also correct.
> >
>
> Seems to work. As of a more optimal solution: what do you think of the
> contents of /proc/locks? May it be possible to use this info to then
> perform locking locally on the other node (after failover)?
No, I don't think so. And I'd be careful about using /proc/locks for
anything but debugging.
--b.
next prev parent reply other threads:[~2011-11-16 20:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 17:11 clients fail to reclaim locks after server reboot or manual sm-notify Pavel
2011-11-14 19:10 ` Bryan Schumaker
2011-11-14 21:55 ` Bryan Schumaker
2011-11-15 15:50 ` Pavel
2011-11-15 17:19 ` Pavel
2011-11-15 21:48 ` Bryan Schumaker
2011-11-15 22:16 ` J. Bruce Fields
2011-11-16 14:25 ` Bryan Schumaker
2011-11-16 14:58 ` Pavel
2011-11-16 15:30 ` J. Bruce Fields
2011-11-16 17:15 ` Pasha Z
2011-11-16 17:28 ` J. Bruce Fields
2011-11-16 17:37 ` Bryan Schumaker
2011-11-16 19:09 ` Pavel A
2011-11-16 20:08 ` J. Bruce Fields [this message]
2011-11-16 20:21 ` Bryan Schumaker
2011-11-16 21:56 ` Pavel A
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=20111116200837.GD2955@pad.fieldses.org \
--to=bfields@redhat.com \
--cc=bfields@fieldses.org \
--cc=bjschuma@netapp.com \
--cc=free.lan.c2.718r@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.