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:
- CentOS / Redhat: Setup NFS v4.0 File Server
- Debian / Ubuntu Linux: Setup NFSv4 File Server
- Mac Os X: Mount NFS Share / Set an NFS Client
- RHEL: How Do I Start and Stop NFS Service?
- How To Restart Linux NFS Server Properly When Network Become Unavailable
- Linux Iptables Allow NFS Clients to Access the NFS Server
- Debian / Ubuntu Linux Disable / Remove All NFS Services
- Linux: Tune NFS Performance
- Mount NFS file system over a slow and busy network
- Linux Track NFS Directory / Disk I/O Stats
- Linux Disable / Remove All NFS Services
- Linux: NFS4 mount Error reason given by server: No such file or directory
- Linux NFS Mount: wrong fs type, bad option, bad superblock on fs2:/data3 Error And Solution
- CentOS / RHEL CacheFS: Speed Up Network File System (NFS) File Access
- Increase NFS Client Mount Point Security
🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.
🐧 1 comment so far... add one ↓
🐧 1 comment so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
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