Autofs gives spurious "No such file or directory" with lots of NFS mounts, breaking a typical use pattern
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
autofs (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: autofs
We at acm.jhu.edu use a Solaris NFS server with one filesystem per home directory. We rely on autofs to have user home directories be available on access rather than having them all mounted at once.
To ensure the problem was not our Solaris server, I created a test case between two Ubuntu 6.06 LTS workstations. Note that in an enterprise environment, having a broken autofs is a very important problem.
As root on machine1:
cd /tmp/
for k in $(seq -w 0 999)
do
mkdir -p /tmp/exported/$k
touch /tmp/exported/
echo "/tmp/exported/$k *(rw)" >> /etc/exports
done
/etc/int.
As any user on machine2:
cd /net/machine1 # command will hang for a while
cd tmp
cd exported
ls # all dirs appear
Now, even though you are in /net/machine1/
paulproteus@
-bash: cd: 751: No such file or directory
Now the directory no longer shows up in "ls" either:
paulproteus@
paulproteus@
But manually mounting it works:
paulproteus@
paulproteus@
file-751
paulproteus@
NOTE: In this bug, I created 1000 exports, but the problem appears with as few 150 exports for me.
In summary, with lots of NFS exports:
* autofs mounts all NFS dirs first, which may fail at doing huge numbers of NFS mounts at once
* some fail to mount, and "cd"ing into those gives incorrect "No such file or directory" results
* This is reproducible easily
* this is a huge problem for enterprise NFS scenarios that depend on autofs
The problem may not be in autofs user-space code but could be in autofs kernel code, I don't know. If there's anything more I can do to provide information about this problem, ask!
I have the same problem. It makes some work impossible. I even tried different distros like gentoo and it still happens.