uncategorized

How to force NFSv4 via config files instead of mount options

As a whole, Linux can be configured to enforce all NFS mounts to use version 3 instead of defaulting to version 4. While the easiest solution is to specify nfsvers=3 or vers=3 as a mount option to fstab entries or within an automount config file, there are other options available.

/etc/nfsmount.conf

Change Defaultvers=4 to Defaultvers=3 and uncomment out the entry in /etc/nfsmount.conf:

[ NFSMount_Global_Options ]
# This statically named section defines global mount
# options that can be applied on all NFS mount.
#
# Protocol Version [2,3,4]
# This defines the default protocol version which will
# be used to start the negotiation with the server.
# Defaultvers=4
Defaultvers=3

/etc/sysconfig/autofs

Change OPTIONS="" to OPTIONS="-O vers=3" in /etc/sysconfig/autofs: (option is towards bottom of config file)

OPTIONS="-O vers=3"

Restart autofs:
/etc/init.d/autofs restart

END

Share