Linux: NFS4 mount Error reason given by server: No such file or directory

I recently installed NFS server v4 on my HP Linux server. However, I’m not able to mount it from Linux nfs4 client using the following command:

ADVERTISEMENTS

mount.nfs4 server2:/data /data

I’m getting the following error:

mount.nfs4: mounting server2:/data failed, reason given by server:
No such file or directory

How do I fix this problem?

First, make sure fsid is set to 0 on server2 using /etc/exports file:

/data	192.168.1.0/255.255.255.0(rw,no_root_squash,subtree_check,fsid=0)

Make sure you reload the NFSv4 server after making changes to the /etc/exports file.

NFSv4 Client Mount

The command syntax is as follows:

mount.nfs4 server2:/ /data

OR

mount -t nfs4 server2:/ /data

Please do not specify the server path /data for NFSv4. You need to specify only / as fsid is set to 0.

This entry is 12 of 15 in the Linux / UNIX NFS File Server Tutorial series. Keep reading the rest of the series:
  1. CentOS / Redhat: Setup NFS v4.0 File Server
  2. Debian / Ubuntu Linux: Setup NFSv4 File Server
  3. Mac Os X: Mount NFS Share / Set an NFS Client
  4. RHEL: How Do I Start and Stop NFS Service?
  5. How To Restart Linux NFS Server Properly When Network Become Unavailable
  6. Linux Iptables Allow NFS Clients to Access the NFS Server
  7. Debian / Ubuntu Linux Disable / Remove All NFS Services
  8. Linux: Tune NFS Performance
  9. Mount NFS file system over a slow and busy network
  10. Linux Track NFS Directory / Disk I/O Stats
  11. Linux Disable / Remove All NFS Services
  12. Linux: NFS4 mount Error reason given by server: No such file or directory
  13. Linux NFS Mount: wrong fs type, bad option, bad superblock on fs2:/data3 Error And Solution
  14. CentOS / RHEL CacheFS: Speed Up Network File System (NFS) File Access
  15. Increase NFS Client Mount Point Security
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
Network Utilitiesdig host ip nmap
Package Managerapk apt
Processes Managementbg chroot disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w

ADVERTISEMENTS
1 comment… add one
  • Ronaldo Garcia Oct 27, 2015 @ 21:30

    mount.nfs4 192.168.8.10:/ /mnt/lhome
    mount.nfs4: access denied by server while mounting 192.168.8.10:/
    Same error without fsid=0
    mount -t nfs -o proto=tcp,port=2049 192.168.8.10:/export/lhome /mnt/lhome/
    mount.nfs: access denied by server while mounting 192.168.8.10:/export/lhome

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.