Force NFS automounts to use NFSv3

autofsautomountfedora

I have a linux server that is exporting NFSv4 as well as NFSv3. I have a Fedora14 client that is defaulting to NFSv4 when automounting NFS shares off of the linux server, and it seems to be causing some problems. All my other linux clients on the network are mounting via NFSv3 without issue, so is there a way I can tell automount to mount the share via v3?

I am pulling my automount maps via LDAP, with an entry in my /etc/auto.master file like so:
+auto_master, so I assume it's a bit different than listing options with a regular automount map?

(.i.e. /home --nfsvers=3 fileserver:/DATA)

Best Answer

In /etc/sysconfig/autofs, change the MOUNT_NFS_DEFAULT_PROTOCOL variable.

# MOUNT_NFS_DEFAULT_PROTOCOL - specify the default protocol used by
#                              mount.nfs(8). Since we can't identify
#                              the default automatically we need to
#                              set it in our configuration. This will
#                              only make a difference for replicated
#                              map entries as availability probing isn't
#                              used for single host map entries.
#
#MOUNT_NFS_DEFAULT_PROTOCOL=3
MOUNT_NFS_DEFAULT_PROTOCOL=4