From: Neil Brown <neilb@suse.de>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: nfs@lists.sourceforge.net, "Talpey,
Thomas" <Thomas.Talpey@netapp.com>,
Simon Peter <simon.peter@gmx.de>
Subject: Re: Delays on "first" access to a NFS mount
Date: Thu, 8 Mar 2007 10:51:04 +1100 [thread overview]
Message-ID: <17903.20457.448449.509272@notabene.brown> (raw)
In-Reply-To: message from J. Bruce Fields on Wednesday March 7
On Wednesday March 7, bfields@fieldses.org wrote:
> On Thu, Mar 08, 2007 at 09:37:18AM +1100, Neil Brown wrote:
> > On Wednesday March 7, bfields@fieldses.org wrote:
> > >
> > > Well, non-head-hurty ideas always welcomed. I've got two export-related
> > > problems to fix:
> > >
> > > - Our current NFSv4 pseudofs fsid=0 hack is a pain to administer
> > > and results in inconsistent paths across different NFS
> > > versions.
> >
> > You've got to put that v4 pseudo root somewhere...
> > It just needs cleverness in nfs-utils to auto-bind-mount things into
> > the pseudoroot...
>
> I've got make-mountd-clever patches here; if I can get them working in
> the next couple days then I'll pass them along so people can see what
> they're doing.
Cool.
>
> > but I guess people cannot magically unmount things then.
> >
> > How about this. We add an export option "follow-symlinks" so that
> > when nfsd is asked to stat a symlink it does a 'stat' instead of an
> > 'lstat' (effectively).
> > Then we get mountd to make a tmpfs in /var/lib/nfs/pseudoroot which
> > contains directories and symlinks to the various export points names
> > in etab. This tmpfs is exported as fsid=0,follow-symlinks.
> >
> > Problem solved?
>
> Maybe. Getting those symlink/mountpoints right sounds tricky.
Is it?
mount -t tmpfs tmpfs /var/lib/nfs/pseudoroot
grep '^/' /etc/exports | while read a b
do
d=`dirname $a`
mkdir -p /var/lib/nfs/pseudoroot/$d
ln -s $a /var/lib/nfs/pseudoroot/$a
done
(untested, and probably has some corner cases but the essence is
there).
>
> How different is this from the in-kernel automounting that the NFS
> client is using for fsid traversal, for example?
>
> > Ofcourse if different clients get to see different exports, then we
> > might need multiple tmpfs's in /var/lib/nfs/pseudoroot/$CLIENT/ ....
>
> Ugh. Is this something a lot of people do?
Well, if you export a different root filesystem to each diskless
client, or if you export /home to some places and /backup to others,
then you already have the potential for a different pseudo filesystem
for each client. My little hacky shell script above essentially
merges them all which might be OK, or might not.
Suppose you wanted to allow every diskless client to see it's root as
'/'? Is that a dumb thing to do, or just a difficult thing to do?
I was just looking at the RFC again and saw this in section 7.3:
Based on the construction of the server's name space, it is possible
that multiple pseudo filesystems may exist. For example,
/a pseudo filesystem
/a/b real filesystem
/a/b/c pseudo filesystem
/a/b/c/d real filesystem
Each of the pseudo filesystems are considered separate entities and
therefore will have a unique fsid.
That adds a whole new dimension of complexity..... do we really want
to go there?
NeilBrown
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2007-03-07 23:51 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 10:23 Delays on "first" access to a NFS mount Simon Peter
2007-03-07 12:38 ` Talpey, Thomas
2007-03-07 13:22 ` Simon Peter
2007-03-07 15:06 ` Simon Peter
2007-03-07 15:10 ` Simon Peter
2007-03-07 15:42 ` J. Bruce Fields
2007-03-07 18:44 ` Simon Peter
2007-03-07 20:29 ` J. Bruce Fields
2007-03-07 21:46 ` Simon Peter
2007-03-07 22:05 ` J. Bruce Fields
2007-03-07 23:19 ` Simon Peter
2007-03-07 22:09 ` Neil Brown
2007-03-08 15:49 ` Simon Peter
2007-03-09 13:02 ` Simon Peter
2007-03-09 14:59 ` J. Bruce Fields
2007-03-07 20:31 ` Talpey, Thomas
2007-03-07 20:50 ` J. Bruce Fields
2007-03-07 21:07 ` Talpey, Thomas
2007-03-07 21:17 ` J. Bruce Fields
2007-03-07 21:23 ` Talpey, Thomas
2007-03-07 21:54 ` J. Bruce Fields
2007-03-07 22:37 ` Neil Brown
2007-03-07 23:06 ` J. Bruce Fields
2007-03-07 23:39 ` Neil Brown
2007-03-08 5:14 ` J. Bruce Fields
2007-03-08 5:42 ` Neil Brown
2007-03-08 13:43 ` Olaf Kirch
2007-03-08 21:27 ` J. Bruce Fields
2007-03-09 15:02 ` Olaf Kirch
2007-03-16 21:47 ` Christoph Hellwig
2007-03-16 21:54 ` J. Bruce Fields
2007-03-16 21:57 ` Christoph Hellwig
2007-03-07 23:24 ` J. Bruce Fields
2007-03-07 23:51 ` Neil Brown [this message]
2007-03-08 4:36 ` J. Bruce Fields
2007-03-08 13:27 ` Olaf Kirch
2007-03-08 21:46 ` J. Bruce Fields
2007-03-07 22:15 ` Neil Brown
2007-03-07 21:40 ` Simon Peter
2007-03-07 22:17 ` Neil Brown
2007-03-07 22:36 ` Talpey, Thomas
2007-03-07 22:48 ` Neil Brown
2007-03-07 22:56 ` Talpey, Thomas
2007-03-07 22:12 ` Neil Brown
2007-03-07 22:23 ` 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=17903.20457.448449.509272@notabene.brown \
--to=neilb@suse.de \
--cc=Thomas.Talpey@netapp.com \
--cc=bfields@fieldses.org \
--cc=nfs@lists.sourceforge.net \
--cc=simon.peter@gmx.de \
/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