24

NFS Mount is not working in my RHEL 7 AWS instance.

When I do a

mount -o nfsvers=3 10.10.11.10:/ndvp2 /root/mountme2/

I get the error:

mount.nfs: requested NFS version or transport protocol is not supported

Can anyone point me where I am wrong? Thanks.

Akki
  • 2,179
  • 8
  • 21
  • 37
  • 3
    Yes, NFS Utils was not installed on my AWS instance, >yum install -y nfs-utils fixed it – Akki Jul 12 '17 at 10:44

9 Answers9

20

Check the nfs service is started or reboot the nfs service.

user_dev
  • 1,357
  • 3
  • 20
  • 46
3

sudo systemctl status nfs-kernel-server In my case this package was not running and the issue was in /etc/exports file where i was having same IP address for two machines. So i commented one ip address for the machine and restarted nf-kernel-server using sudo systemctl restart nfs-kernel-server and reload the machine. It worked.

jazeb007
  • 578
  • 1
  • 5
  • 11
3

A precision which might be useful for the dump (like me): systemctl status nfs-server.service and systemctl start nfs-server.service must be executed on the server!

saitas
  • 31
  • 1
3

Some additional data

If, like me, you've deleted a VM without shutting it down right you might also need to manually edit the file /etc/exports because NFS is trying to connect to it and fails but doesn't continue with the next, it just dies.

After that you can manually restart as mentioned in other answers.

Adaddinsane
  • 535
  • 6
  • 11
2

In my case, it didn't work correctly with version NFS 4.1. So in Vargantfile in each place where is type: 'nfs' I added coma and nfs_version: 4, nfs_udp: false

Here is more detailing explanation NFS

2

If you're giving a specific protocol to connect with, also check to make sure your NFS server has that protocol enabled.

I got this error when trying to start up a Vagrant box, and my nfs server was running. It turns out that the command Vagrant uses is:

mount -o vers=3,udp,rw,actimeo=1 192.168.56.1:/dir/on/host /vagrant

Which specifically asks for UDP. My server was running but it was not configured to enable connecting over UDP. After consulting /etc/nfs.conf, I created /etc/nfs.conf.d/10-enable-udp.conf with the following contents to enable udp:

[nfsd]
udp=y

The name of the file doesn't matter, as long as it's in the conf.d directory and ends in .conf. Depending on your distribution it may be configured differently. You can directly edit nfs.conf, but using a conf.d file is more likely to preserve the changes after upgrading your system.

cincodenada
  • 2,877
  • 25
  • 35
1

In my case, a simple reload didn't suffice. I had to perform a full restart:

sudo systemctl restart nfs-kernel-server
Michał Leon
  • 2,108
  • 1
  • 15
  • 15
0

Try to ping IP address of the server "ping " from client "ping , if you get reply then install nfs server on the host. Then edit /etc/exports file don't forget to add port along with IP address

-3

I got the solution: make an entry in nfs server /etc/nfsmount.conf with Defaultvers=3 .

There will # Defaultvers=3 just unhash it and then mount on nfs client.

Issue will be resolved!