My intention:
- use
/exports
as my virtual root of NFSv4 - export dir
/my/dir
through NFS
So I created a symlink under /exports
like this
# ln -s /my/dir /exports/dir
and my /etc/exports looks like:
/exports *(async,rw,fsid=0,no_root_squash,insecure,no_subtree_check,crossmnt)
When I mount from client using:
# mount -t nfs4 192.168.1.52:/dir /mnt
I got following error message:
mount.nfs4: mounting 192.168.1.52:/dir failed, reason given by server:
No such file or directory
According to this it should work. Any idea?
Best Answer
You need to mount
Edit: Strike that - it's my daily NFSv3 practice shining through (and missing the crucial
v4
part in the question).Try to remove the link and bind the dir instead:
and if it works, add the mount to
/etc/fstab
.Restart NFS server
If this still fails, try to make
/exports/dir
an explicit line it/etc/exports
.