NFS share doesn't get mounted by hostname; however, mount succeeds when IP address is used instead of hostname.
Issue
- Why NFS share does not get mounted with hostname?
- When trying to mount the NFS share by hostname, it fails with an error
'No such file or directory'
# mount -t nfs server.example.com:/share /mnt/nfs -vvv
mount.nfs: trying text-based options 'vers=4.1,addr=xx.xx.x.xx,clientaddr=xx.xx.x.xx'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.0,addr=xx.xx.x.xx,clientaddr=xx.xx.x.xx'
mount.nfs: mount(2): No such file or directory
Environment
- Red Hat Enterprise Linux 7.6
- NFS Client
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.