Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Aug 2019 16:25:05 +0200
From:      hw <hw@adminart.net>
To:        Julien Cigar <julien@perdition.city>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Is NFS still broken in FreeBSD?
Message-ID:  <87ftmaxvpa.fsf@toy.adminart.net>
In-Reply-To: <20190809092141.GA67645@home.lan> (Julien Cigar's message of "Fri, 9 Aug 2019 11:21:42 %2B0200")
References:  <87v9v7nru4.fsf@toy.adminart.net> <20190809092141.GA67645@home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
Julien Cigar <julien@perdition.city> writes:

> On Fri, Aug 09, 2019 at 01:46:27AM +0200, hw wrote:
>> Hi,
>> 
>
> Hello,
>
>> according to [1], NFS in FreeBSD is broken, and I'm wondering if it
>> still is.
>> 
>
> define "broken"?

see my other post about that

> NFS is used in production here for years and works like
> a charm. The only annoying issue was PR 205193 (as we use jails
> extensively), but it has now been fixed.
>
>> I need to export some directories rw and some ro with an /etc/exports
>> like this:
>> 
>> 
>> /b/tftpboot/FreeBSD/install -ro -maproot=root
>> /p/default
>> 
>
> this is not a valid /etc/exports file, check man 5 exports

That man page is just bad.  Please explain what is not valid about it.
For all I can tell, it's perfectly valid for NFS v3.  You can also find
this in the FreeBSD handbook in section 31.8.1..

>> The "default" directory needs to be exported read-write.  That seems to
>> be impossible with FreeBSD --- if that is really so, NFS is totally
>> broken in FreeBSD.  To make it more strange, it worked as intended until
>> I restarted the server.  NFS v4 doesn't seem to work at all.
>> 
>
> use something like:
>
> V4: /someroot -sec=sys
> /someroot/default -rw -network somehost -mask somenetmask

-rw is nowhere mentioned in the man page.  It says:


  The -ro option specifies that the file system should be exported read-
  only (default read/write).


At first I was assuming that I should use -rw, but since that doesn't
exist and there were error messages in /var/log/messages, I removed it.

Omitting -rw, the error messages persisted, and even adding -ro to the
second entry, they persist.

>> This has cost me a whole day now :(
>
> also, for a NFS V4 only server/client you could set:
>
> vfs.nfsd.server_min_nfsvers=4
> vfs.nfsd.server_max_nfsvers=4

Both Centos 7 and Fedora support 4.2, so limiting to 4 doesn't make much
sense when they may get involved.  I have also verified that it is not
possible to mount a v4 export from FreeBSD as v4 on Centos 7:  It
doesn't mount when you explicitly specify the version, or it mounts as
v3 when you don't.

>> [1]: https://forums.freebsd.org/threads/nfs-exports.35966/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87ftmaxvpa.fsf>