Re: NFSv4 referrals - custom (non-2049) port numbers in fs_locations?

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

 



On Fri, 10 Nov 2023 at 19:14, Chuck Lever III <chuck.lever@xxxxxxxxxx> wrote:
>
>
> > On Nov 10, 2023, at 8:49 AM, Benjamin Coddington <bcodding@xxxxxxxxxx> wrote:
> >
> > On 10 Nov 2023, at 2:54, Martin Wege wrote:
> >
> >> On Wed, Nov 1, 2023 at 3:42 PM Benjamin Coddington <bcodding@xxxxxxxxxx> wrote:
> >>>
> >>> On 1 Nov 2023, at 5:06, Martin Wege wrote:
> >>>
> >>>> Good morning!
> >>>>
> >>>> We have questions about NFSv4 referrals:
> >>>> 1. Is there a way to test them in Debian Linux?
> >>>>
> >>>> 2. How does a fs_locations attribute look like when a nonstandard port
> >>>> like 6666 is used?
> >>>> RFC5661 says this:
> >>>>
> >>>> * http://tools.ietf.org/html/rfc5661#section-11.9
> >>>> * 11.9. The Attribute fs_locations
> >>>> * An entry in the server array is a UTF-8 string and represents one of a
> >>>> * traditional DNS host name, IPv4 address, IPv6 address, or a zero-length
> >>>> * string.  An IPv4 or IPv6 address is represented as a universal address
> >>>> * (see Section 3.3.9 and [15]), minus the netid, and either with or without
> >>>> * the trailing ".p1.p2" suffix that represents the port number.  If the
> >>>> * suffix is omitted, then the default port, 2049, SHOULD be assumed.  A
> >>>> * zero-length string SHOULD be used to indicate the current address being
> >>>> * used for the RPC call.
> >>>>
> >>>> Does anyone have an example of how the content of fs_locations should
> >>>> look like with a custom port number?
> >>>
> >>> If you keep following the references, you end up with the example in
> >>> rfc5665, which gives an example for IPv4:
> >>>
> >>> https://datatracker.ietf.org/doc/html/rfc5665#section-5.2.3.3
> >>
> >> So just <address>.<upper-byte-of-port-number>.<lower-byte-of-port-number>?
> >>
> >> How can I test that with the refer= option in /etc/exports? nfsref
> >> does not seem to have a ports option...
> >
> > Just test it!
> >
> > I thought the nfsref program actually populates the "trusted.junction.nfs"
> > xattr, which is part of the "fedfs" project's metadata to link filesystems
> > together.  I don't think that's what you want here.
>
> No, nfsref is what Martin wants.
>
>
> > Chuck - am I right to say that the nfsref program does not populate
> > nfsd4_fs_locations on knfsd?
>
> nfsref is the proper tool to use.

nfsref is not being packaged. And likely will not be available for a
couple of years, even if nfs-utils builds it by default.

So what do I have to set in /usr/setfattr to define a junction?

>
> nfsref turns a directory into a junction by doing two things:
>
> 1. It adds a trusted.junction.nfs xattr containing the information
>    that the server returns when a client does a GETATTR(fs_locations)
>    on that directory
>
> 2. It updates the directory's mode bits to mark it as a junction

Which directory mode bits are that?

And maybe that is the reason that having a junction redirect to /home
when /home is controlled by the automounter makes it fail?

Ced
-- 
Cedric Blancher <cedric.blancher@xxxxxxxxx>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur




[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