On a mounted NFS Share, listing an existing directory fails with “no such file or directory”
Issue
As an example, /my/test/parent_dir/failing_dir is an existing dir of a mounted NFS share.
nfs_server:/path/to/my/exported/dir on /my/test/parent_dir type nfs (rw,nosuid,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.0.0.2,mountvers=3,mountport=28900,mountproto=udp,local_lock=none,addr=10.0.0.2)
The example above uses NFSv3 but the problem is present in all NFS protocol versions.
# ls /my/test/parent_dir/failing_dir
ls: cannot access : /my/test/parent_dir/failing_dir No such file or directory
Long listing the contents of the parent directory, shows the affected directory, but information (permissions, user/group info,...) is not shown. Instead, it prints question marks:
# cd /my/test/parent_dir/failing_dir
# ls -l
...
drwxr-xr-x 2 testuser testuser 4096 sep 17 08:25 test_dir
d????????? ? ? ? ? ? failing_dir
...
The issue occurs intermittently.
Environment
- NFS client (Red Hat Enterprise Linux 7.6/7.7)
- NFSv3, NFSv4, NFSv4.1 are affected
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.