Ubuntu – NFS4: 18.04 Client : force NFS ver=4.0 ? (ldap map, multiple client versions)


  • autofs map via LDAP.
  • NFS4 – Server: Ubuntu 10.04
  • NFS4 – Clients: Ubuntu 10.04, 14.04, 18.04

To mount a NFS4 resource of a 10.04-server to a 18.04-client mount-option "vers=4.0" is required. Otherwise the client only tries 4.2 and 4.1 and then gives up.

This mount-option "vers=4.0" is however not understood by 10.04 – clients so that I can not change the common ldap-based autofs-map.

How can I force the client to use "vers=4.0" ? There is a variable "MOUNT_NFS_DEFAULT_PROTOCOL" in /etc/default/autofs. But it is apparentely only ment to distinguisch between "3" and "4", not between "4.0" and "4.1"

Thanks for any idea.

Best Answer

Use an OpenLDAP translucent proxy overlay

You could set up an OpenLDAP server on top of the existing one, using the slapo-translucent overlay. With this overlay you can proxy all requests to your existing ldap server, but override certain attributes with local values.

So you would make your main ldap server contain the mount options most clients can understand, and then, in the overlay ldap server, rewrite the automountInformation attribute to not contain the vers=4.0 mount option and make your 10.04 clients use this other server. Every other attribute should be handled transparently by the overlay and sent back to your main ldap.