Change fixed NFS RPC ports to be outside the local port range autocluster-1.1
authorMartin Schwenke <martin@meltin.net>
Thu, 4 Apr 2019 04:24:04 +0000 (15:24 +1100)
committerMartin Schwenke <martin@meltin.net>
Tue, 9 Apr 2019 04:51:52 +0000 (14:51 +1000)
Seeing some instances where nfsd can't start because its port is in
use.

On Linux the default local port range is 32768-60999, so the ports
used for NFS should be outside this range.  The configured range can
be checked via:

  $ sysctl net.ipv4.ip_local_port_range
  net.ipv4.ip_local_port_range = 32768 60999

Signed-off-by: Martin Schwenke <martin@meltin.net>
ansible/node/roles/nas/templates/nfs_sysconfig.j2

index c103fc74814d2850865b6cf44be78f5f6e277f4b..5069c2460f54ec8d42a236f500859f79094c7974 100644 (file)
@@ -1,11 +1,11 @@
 NFS_HOSTNAME="{{ cluster }}"
 
-STATD_PORT=32765
-STATD_OUTGOING_PORT=32766
-MOUNTD_PORT=32767
-RQUOTAD_PORT=32768
-LOCKD_UDPPORT=32769
-LOCKD_TCPPORT=32769
+STATD_PORT=61001
+STATD_OUTGOING_PORT=61002
+MOUNTD_PORT=61003
+RQUOTAD_PORT=61004
+LOCKD_UDPPORT=61005
+LOCKD_TCPPORT=61005
 
 STATDARG="-n ${NFS_HOSTNAME}"
 STATD_HA_CALLOUT="/etc/ctdb/statd-callout"