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.

1
  • 3
    Yes, NFS Utils was not installed on my AWS instance, >yum install -y nfs-utils fixed it
    – Akki
    Jul 12, 2017 at 10:44

9 Answers 9

20

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

2
  • 4
    On Ubuntu you can check the status with sudo systemctl status nfs-kernel-server Jun 7, 2020 at 15:55
  • This was it for me - on OpenSUSE, it's systemctl status nfs-server.service and systemctl start nfs-server.service. Oct 7, 2020 at 23:09
4

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!

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.

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.

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.

1

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

sudo systemctl restart nfs-kernel-server
0
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!

1
  • its not solved for me and solved as the given above steps. Jul 31, 2020 at 8:49

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.