Re: FS: hardlinks on directories

Neil Brown
2003-08-07T02:27:48Z

On Wednesday August 6, skraw@ithnet.com wrote:
> On Wed, 6 Aug 2003 11:12:38 +1000
> Neil Brown <neilb@cse.unsw.edu.au> wrote:
>
> > On Tuesday August 5, skraw@ithnet.com wrote:
> > > > > Hm, and I just found out that re-exporting "mount --bind" volumes does
> > > > > not work over nfs...
> > > > >
> > > > > Is this correct, Neil?
> > > >
> > > > Yes, though there is a reasonable chance that it can be made to work
> > > > with linux-2.6.0 and nfs-utils-1.1.0 (neither of which have been
> > > > released yet:-)
> > >
> > > Is this a complex issue? Can you imagine a not-too-big sized patch can make
> > > it work in 2.4? What is the basic reason it does in fact not work?
> >
> > On reflection, it could probably work in 2.4 and current nfs-utils,
> > but admin might be a bit clumsy.
> >
> > To allow knfsd to see a mountpoint, you have to export the mounted
> > directory with the "nohide" option. Currently "nohide" only works
> > properly for exports to specific hosts, not to wildcarded hosts or
> > netgroups.
> > So if your /etc/export contains:
> >
> > /path/to/some/--bind/mountpoint servername(nohide,....)
> >
> > for every mountpoint and every server, then it should work.
>
> Hm, bad luck. I tried and it did not work. I used 2.4.20 kernel, are there
> chances a later kernel might work?

It worked for me. There is nothing in recent kernels that would
affect this.

What errors do you get?
Can you describe your setup in a bit more detail.

One thing to be careful of is that you cannot export a directory and a
parent of that directory in the same filesystem to the same client.
This tripped me up the first time I tried it.
Here "parent" means in the real filesystem, ignoring any --bind
mounts.

NeilBrown