# Any way to specify NFS version in exports?



## IT_Architect (Apr 23, 2014)

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!


----------



## junovitch@ (Apr 25, 2014)

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.  


```
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).


----------

