Bug 865543

Summary: Enable NFS v4.1 server support
Product: Red Hat Enterprise Linux 7 Reporter: Steve Dickson <steved>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: bfields
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 947073 (view as bug list) Environment:
Last Closed: 2013-11-26 18:08:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve Dickson 2012-10-11 17:33:01 UTC
Description of problem:

Currently NFS v4.1 is off by default. To turn this support on,
rpc.nfsd has to be modified and recompiled. 

I propose we enable v4.1 by default and be able to disable
the support with the -N flag.

Comment 1 J. Bruce Fields 2012-10-11 18:02:15 UTC
(In reply to comment #0)
> Currently NFS v4.1 is off by default. To turn this support on,
> rpc.nfsd has to be modified and recompiled. 

We also need to fix some protocol violations that we're just fortunate happen not to affect interoperability with the current Linux client.

For example, 4.1 clients are allowed to request whatever security flavor they wish on the backchannel.  However, the current security code ignores what the client requests and uses auth_sys on the backchannel--just because we happen to know that's what the current Linux client always asks for.

I have six of those todo's left, on this list:

  http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues#Highest_priority

> I propose we enable v4.1 by default and be able to disable
> the support with the -N flag.

I'll make a push to get through those list of issues for the 2.8 kernel, at which point we can backport the additional patches if necessary and change the default.

Any help there would be appreciated.

Comment 2 J. Bruce Fields 2012-10-11 18:08:24 UTC
(In reply to comment #1)
> I'll make a push to get through those list of issues for the 2.8 kernel

(Sorry, 3.8!)

Comment 3 Anthony Messina 2012-12-04 17:30:06 UTC
In the meantime, would it be unreasonable to add something like the following to nfs-utils in Fedora?  I'm testing this out as a "fix" to the performance issues I've seen where the nfsv4.0 server cannot connect to the client for callbacks due to the firewall on the client:

kernel: [250695.159949] RPC: AUTH_GSS upcall timed out.
kernel: [250695.159949] Please check user daemon is running.

diff --git a/nfs-server.preconfig b/nfs-server.preconfig
index d965dbe..d6f752e 100644
--- a/nfs-server.preconfig
+++ b/nfs-server.preconfig
@@ -7,4 +7,9 @@ if [ -n "$NFSD_V4_GRACE" ]; then
        echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
 fi
 
+# Enable v4.1 if requested
+if [ "$NFSD_V41_ENABLED" == "4.1" ]; then
+       echo "+4.1" > /proc/fs/nfsd/versions
+fi
+
 exit 0
diff --git a/nfs.sysconfig b/nfs.sysconfig
index 2d33cf3..3b01bb1 100644
--- a/nfs.sysconfig
+++ b/nfs.sysconfig
@@ -38,3 +38,6 @@ RPCSVCGSSDARGS=""
 #
 # Optional arguments passed to blkmapd. See blkmapd(8)
 BLKMAPDARGS=""
+#
+# Set to "4.1" to enable NFSv4.1 server.
+#NFSD_41_ENABLE="4.1"

If something like the above cannot be implemented the workaround is a little painful and needs to be done on each client:

1. Create /etc/modprobe.d/nfs.conf containing 'options nfs callback_tcpport=20490' (or any port of choice)

2. Open port 20490 on the client's firewall.

Comment 4 Anthony Messina 2012-12-04 18:26:00 UTC
Sorry for the spelling errors:

diff --git a/nfs-server.preconfig b/nfs-server.preconfig
index d965dbe..d6f752e 100644
--- a/nfs-server.preconfig
+++ b/nfs-server.preconfig
@@ -7,4 +7,9 @@ if [ -n "$NFSD_V4_GRACE" ]; then
        echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
 fi
 
+# Enable v4.1 if requested
+if [ "$NFSD_V41_ENABLED" == "4.1" ]; then
+       echo "+4.1" > /proc/fs/nfsd/versions
+fi
+
 exit 0
diff --git a/nfs.sysconfig b/nfs.sysconfig
index 2d33cf3..1992457 100644
--- a/nfs.sysconfig
+++ b/nfs.sysconfig
@@ -38,3 +38,6 @@ RPCSVCGSSDARGS=""
 #
 # Optional arguments passed to blkmapd. See blkmapd(8)
 BLKMAPDARGS=""
+#
+# Set to "4.1" to enable NFSv4.1 server.
+#NFSD_V41_ENABLED="4.1"