Public bug reported:

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/$k/file-$k
echo "/tmp/exported/$k *(rw)" >> /etc/exports
done
/etc/int.d/nfs-kernel-server reload

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/tmp/exported/ , if you run
"mount" you will see only a few directories (100 or so) are mounted in
here.  If you "cd" into one of the ones that isn't mounted (e.g., 751 on
my system):

[EMAIL PROTECTED]:/net/machine1/tmp/exported$ cd 751
-bash: cd: 751: No such file or directory

Now the directory no longer shows up in "ls" either:

[EMAIL PROTECTED]:/net/machine1/tmp/exported$ ls | grep 751
[EMAIL PROTECTED]:/net/machine1/tmp/exported$ 

But manually mounting it works:

[EMAIL PROTECTED]:/net/machine1/tmp/exported$ sudo mount 
machine1:/tmp/exported/751 /mnt
[EMAIL PROTECTED]:/net/machine1/tmp/exported$ ls /mnt/
file-751
[EMAIL PROTECTED]:/net/machine1/tmp/exported$

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!

** Affects: autofs (Ubuntu)
     Importance: Undecided
         Status: Unconfirmed

-- 
Autofs gives spurious "No such file or directory" with lots of NFS mounts, 
breaking a typical use pattern
https://launchpad.net/bugs/65499

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to