2007-12-26 16:12:44

by Fabian Steiner

[permalink] [raw]
Subject: Attempting to mount a large number of directories

Hello!

After having finished the migration to our new setup (user home directories
are mounted automatically using autofs [4.1.4-8ubuntu1] and NFSv3) we are
experiencing some problems which use to occur whenever many users attempt to
access their directories. If such an issue appears the following messages
will be seen in /var/log/syslog of the server:

Dec 23 18:38:00 ubuntu1 mountd[8995]: refused mount request from client
for /exports/dir157 (/exports): illegal port 59537

At first we thought it would be an autofs problem but after having tried to
reproduce the problem employing normal nfs mounts we encountered the same
issues. The attached scripts might help you to reproduce it.

Running these scripts reveal that mounting 105 directories work, the 106th
fails, however, resulting in the following error:

[...]
Working on dir 105 ...nfs bindresvport: Address already in use
OK
Working on dir 106 ...mount: 192.168.0.46:/exports/dir106: can't read
superblock
OK
[...]

At next, I added the "insecure" option to my /etc/exports file and increased
the value of /proc/sys/sunrpc/max_resvport from 1023 to 5000. Now 139
directories can be mounted without any single error, then "nfs bindresvport:
Address already in use" appears again and mounting 141-172 also works fine.
Afterwards all the other mount attempts are failing.

Could you explain this behaviour? What does "nfs bindresvport: Address already
in use" try to tell me? Generally speaking both the server as well as the
client should run out of open ports.

Cheers,
Fabian


Attachments:
(No filename) (1.52 kB)
CONSTANTS (72.00 B)
create_dirs.sh (185.00 B)
mount_all.sh (454.00 B)
Download all attachments