nfs on 17.04

Tom H tomh0665 at gmail.com
Thu Jun 29 12:12:16 UTC 2017


On Thu, Jun 29, 2017 at 7:34 AM, R Kimber
<richardkimber at politicsresources.net> wrote:
> On Thu, 29 Jun 2017 12:20:45 +0100 R Kimber wrote:
>
>> So the problem has been solved for the time being without my
>> understanding the solution, which is not the most satisfactory
>> outcome.
>
> OK. It seems it's a bit more complicated. If I reboot the client, the
> drives will not mount until I disable the firewall. If I re-enable it
> they continue to re-mount OK.
>
> Ideally, I need a solution that survives a reboot.

I more or less expected this :(

I don't understand why your RPi isn't defaulting to nfsv4 and
succeeding. Please add "-v" to your mount command and paste the output
here.

Port-wise, if you're using nfsv3, you need to set up static ports if
you're going to use a firewall on an nfs server in order to allow its
ports to be network-accessible.

Add "--port 32765 --outgoing-port 32766" to "STATDOPTS" in
"/etc/default/nfs-common".

Add "--port 32767" to "RPCMOUNTDOPTS" in "/etc/default/nfs-kernel-server"

Create /etc/modprobe.d/nfs-nlm-cb.conf" with these two lines:
options lockd nlm_udpport=32768 nlm_tcpport=32768
options nfs callback_tcpport=32764

(If you compile your own kernel and you compile in nlm, you have to
use "/etc/sysctl.d/")

If you then poke holes for these ports in your firewall, nfsv3 will work.

You can use other port numbers but these have somehow become
"standard". I've been using them for years. AFAIK, they were first
used in some Slackware documentation and others have simply followed
suit.




More information about the ubuntu-users mailing list