Linux – RedHat Server 7.3 trying to mount nfs share using NFS4

linuxmountnfsnfs4redhat

I am trying to mount a share located on Server1 using NFSv4, instead of NFSv3. The host server is running RHEL 5.1 (don't ask), and the client is running RHEL 7.3. I am able to mount it using NFSv3 without problems, but I am doing a ton of file moving daily with small files, and I think performance would improve significantly if I used NFSv4.

I am running the following command:

mount -v -type nfs4 server1:/export/foo /nfsmnt/foo

And I get:

mount(2): Input/output error
mount system call failed

If I do

mount -v -type nfs -o nfsvers=3 server1:/export/foo /nfsmnt/foo

It works just fine.

I have confirmed that NFSv4 is supported on both client and server, using rpcinfo -p. The firewall is currently turned off on both.

Best Answer

When you have an older NFS server, it sometimes helps to use nolock on a mount:

mount -v -type nfs4 -o nolock server1:/export/foo /nfsmnt/foo