On Fri, Nov 10, 2023 at 3:20 AM Chuck Lever III <chuck.lever@xxxxxxxxxx> wrote: > > > > > On Nov 9, 2023, at 7:47 PM, Cedric Blancher <cedric.blancher@xxxxxxxxx> wrote: > > > > On Fri, 10 Nov 2023 at 01:37, Chuck Lever III <chuck.lever@xxxxxxxxxx> wrote: > >> > >>> On Nov 9, 2023, at 7:05 PM, Cedric Blancher <cedric.blancher@xxxxxxxxx> wrote: > >>> > >>> On Thu, 2 Nov 2023 at 10:51, Cedric Blancher <cedric.blancher@xxxxxxxxx> wrote: > >>>> > >>>> Good morning! > >>>> > >>>> Does anyone have examples of how to use the refer= option in /etc/exports? > >>> > >>> Short answer: > >>> To redirect an NFS mount from local machine /ref/baguette to > >>> /export/home/baguette on host 134.49.22.111 add this to Linux > >>> /etc/exports: > >>> > >>> /ref *(no_root_squash,refer=/export/home@134.49.22.111) > >>> > >>> This is basically an exports(5) manpage bug, which does not provide > >>> ANY examples. > >> > >> That's because setting up a referral this way is deprecated. > > > > Why did you do that? > > The nfsref command on Linux matches the same command on Solaris. > > nfsref was added years ago to manage junctions, as part of FedFS. > The "refer=" export option can't do that... Where in the kernel is the code for the refer= option? I'd like to get some of my students to contribute support for custom NFS ports. I would seriously suggest keeping it for "simple" use cases. nfsref(8) has ZERO deployment outside RHEL&RHEL clones > and FedFS has gone > the way of the dodo. Why did that happen? ;( > > >> The > >> preferred way to do it is to use nfsref(8). > > > > nfsref(8) is not shipped by ANY Linux distribution. > > It is installed on all of my Fedora systems, and it's on my > only RHEL 8 system. That suggests, though I can't immediately > confirm it, that nfsref is packaged also for CentOS, Oracle > Linux, and any other distro that is based on RedHat Enterprise. That are all RHEL clones... > > > The configure switch in nfs-utils to build it is OFF by default, > > You're talking about > > --enable-junction enable support for NFS junctions [default=no] > > Perhaps that default should change -- it's been part of > nfs-utils for five years now. However, that drags in > dependencies for the xml libraries... maybe someone thinks > that's a hazard? I would consider it a hazard when the kernel support code drags in XML. > > > > and the > > distribution maintainers refuse to enable it because it can be > > "dangerous", or may be "experimental". I got many excuses why they > > dont want to enable that damn configure option. > > > > Also, stable and oldstable Debian do not have it enabled either. > > This is an upstream mailing list. We can't answer for what > Linux distributors decide to enable or not. > > I've never heard that it was a dangerous feature. If a > distro maintainer has a concern, they should bring it to > upstream. > > > > Seriously, why was refer= in exports(5) depreciated? There is no > > realistic replacement, unless you fix every damn Linux distro first. > > Again, all the RHEL based distros package nfsref, as far > as I am aware. And as you found, refer= still works. It's > simply not documented. Then please document it. You have real world users for that one, who would be grateful if you don't pull away the floor under their feet. > > If your distro has decided not to support referrals, there's > not much we can do about that except gently suggest that you > switch to a distro that properly supports them. You could turn on --enable-junctions by default. And maybe get rid of the XML dependencies. Thanks, Martin