Re: BUG in exports(5), no example for refer= Re: Examples for refer= in /etc/exports?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> 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... and FedFS has gone
the way of the dodo.


>> 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.


> 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?


> 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.

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.


> PS: Sorry for being moody, but I tried to get nfsref(5) working for a
> month on Debian bullseye, and it just didn't work.

Did you report problems or ask for help?

If getting it working is that difficult, perhaps your distro's
nfs-utils maintainer couldn't get it working either.


--
Chuck Lever






[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux