It is quite common to use NFS share in Linux server, but we might have some problems when there are mount points below the exported folder.
For example:
/export -> NFS export folder, fs1
/export/mount -> a mount point with fs2
When nfsd try to open the files, it use the vfs_mount info in export folder “/export”. That means fs2 will never know any file operations.
And according to nfs man info, there are options nohide and crossmnt, that will check the mount points inside the export folder.
But unfortunately, it doesn’t work with that options only.
After checking NFS source code, infact, nfsd only check the inside NFS exported folder, and use the vfs_mount info in that sub export folder. So we need to export the sub mount point.
And in my ENV, I got “Stale NFS file handle” error after the above options, seems nfs get confused of the fs types, and it works after fsid option.
And here is the exports file:
/usr/rha 155.35.88.75(rw,sync,no_root_squash,nohide,crossmnt,fsid=0) /usr/rha/root 155.35.88.75(rw,sync,no_root_squash,nohide,crossmnt,fsid=1)