From: Valerie Aurora <vaurora@redhat.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Jeff Layton <jlayton@redhat.com>,
linux-fsdevel@vger.kernel.org,
Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: Re: NFS hard read-only mount option - again
Date: Tue, 4 May 2010 18:51:56 -0400 [thread overview]
Message-ID: <20100504225156.GA4108@shell> (raw)
In-Reply-To: <20100428205600.GB21875@fieldses.org>
On Wed, Apr 28, 2010 at 04:56:00PM -0400, J. Bruce Fields wrote:
> On Wed, Apr 28, 2010 at 04:34:47PM -0400, Jeff Layton wrote:
> > On Wed, 28 Apr 2010 16:07:46 -0400
> > Valerie Aurora <vaurora@redhat.com> wrote:
> >
> > >
> > > What I need can be summarized in the distinction between the following
> > > scenarios:
> > >
> > > Scenario A: The NFS server reboots while a client has the file system
> > > mounted as the r/o layer of a union mount. The server does not change
> > > the exported file system at all and re-exports it as hard read-only.
> > > This should work.
> > >
> >
> > Nitpick: This should be fine regardless of how it's exported. You
> > don't want the clients going bonkers just because someone pulled the
> > plug on the server accidentally. NFS was designed such that clients
> > really shouldn't be affected when the server reboots (aside from
> > stalling out on RPC calls while the server comes back up).
> >
> > > Scenario B: The NFS server reboots as in the above scenario, but
> > > performs "touch /exports/client_root/a_file" before re-exporting the
> > > file system as hard read-only. This is _not_ okay and in some form
> > > will cause a panic on the client if the client doesn't detect it and
> > > stop accessing the mount.
> > >
> > > How to tell the difference between scenarios A and B?
> > >
> >
> > I don't believe you can, at least not with standard NFS protocols. I
> > think the best you can do is detect these problems on an as-needed
> > basis. Anything that relies on server behavior won't be very robust.
>
> Yeah. Even if the server had a way to tell the client "this filesystem
> will never ever change, I promise" (and actually I think 4.1 might have
> something like that--see STATUS4_FIXED?)--there's still so many
> opportunities for operator error, network problems, etc., that in
> pratice a client that panics in that situation probably isn't going to
> be considered reliable or secure.
>
> So the unionfs code has to be prepared to deal with the possibility. If
> dealing with it fairly harshly is the simplest thing to do for now, I
> agree, that sounds fine--but panicking sounds too harsh!
>
> I'm not sure if we're answering your question.
This is definitely going in the right direction, thank you. Mainly
I'm just really ignorant of actual NFS implementation. :)
Let's focus on detecting a write to a file or directory the client has
read and still has in cache. This would be the case of an NFS dentry
in cache on the client that is written on the server. So what is the
actual code path if the client has an NFS dentry in cache and it is
altered or goes away on the client? Can we hook in there and disable
the union mount? Is this a totally dumb idea?
-VAL
next prev parent reply other threads:[~2010-05-04 22:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 23:58 NFS hard read-only mount option - again Valerie Aurora
2010-04-27 11:51 ` Jeff Layton
2010-04-28 20:07 ` Valerie Aurora
2010-04-28 20:34 ` Jeff Layton
2010-04-28 20:56 ` J. Bruce Fields
2010-05-04 22:51 ` Valerie Aurora [this message]
2010-05-05 7:22 ` Jeff Layton
2010-05-06 15:01 ` Valerie Aurora
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=20100504225156.GA4108@shell \
--to=vaurora@redhat.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@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).