Any way to specify NFS version in exports?

Is there any way to specify NFS version in exports for certain hosts? vSphere/ESXi requires version 3, and when it sees version 4 it will not connect. At the moment I'm using the -o for the nfs flag, but that forces the server to run v3 for all.

Thanks!
 
I am a bit confused. Mount options to select which protocol to initiate communication with are on the client side. If ESXi doesn't support NFSv4 and connects using it's supported NFSv3, then the server will accept that request unless you've told it otherwise with the global sysctl() I've listed at the bottom. I am not aware of, nor see in man exports(), a way to set allowed protocol per exported filesystem. You should only have one line in your /etc/exports to denote the root of the filesystems NFSv4 clients can see then each other line will be normal.

Code:
vfs.nfsd.server_min_nfsvers: 2
vfs.nfsd.server_max_nfsvers: 4

Can you show the error you are seeing as well as the contents your current /etc/exports, /etc/rc.conf (NFS related only), and /etc/zfs/exports (if applicable).
 
Back
Top