Bug 300421

Summary: cannot mount 1000 folder in storm on LAN
Product: Red Hat Enterprise Linux 5 Reporter: Petr Sklenar <psklenar>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.0CC: jlayton, staubach
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-09 18:30:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Sklenar 2007-09-21 14:28:56 UTC
Description of problem:
When mounting more then 500 mount-point then mount ends.

Version-Release number of selected component (if applicable):
nfs-utils-1.0.9-23, util-linux-2.13-0.45, kernel2.6.18-8.1.8.el5

How reproducible:
always

Steps to Reproduce:
Server share some directory,
0. [root@server] cat /etc/exports
/mount2

Client:
1.[root@client]# cat script1
MOUNT=/bin/mount
for i in `seq 1 1020`
do
    [ ! -d /mount3/$i ] && mkdir -p /mount3/$i
    $MOUNT -o tcp server:/mount2/$i /mount3/$i || exit 1
    ls -d /mount3/$i;
done

2. [root@client]#./script1
/mount3/1
/mount3/2
#etc
/mount3/506
/mount3/507
mount: vepro:/mount2/508 failed, reason given by server: Permission denied
 
Actual results:
When I am trying to "mount" in storm in LAN and the number exceed +-500 than
there is no free ports, because it's fast like 30 seconds and ports are in state
"TIME_WAIT" ... "netstat -an | grep 2049". 
Some customer wants to mount all mount-point because of some mailing list, see
https://bugzilla.redhat.com/show_bug.cgi?id=246254#c0. 

Expected results:
mounting in storm, mount could wait for ports which are in TIME_WAIT state.

Additional info:
Now you can mount many folders in storm like that: 
If you change "type of port" to "insecure" on server side .
[root@server]#cat /etc/exports
/mount *(ro,insecure)
# there is more free ports like 1024 to 61000.

Or you make some changes to files in "/proc/sys/net/ipv4/*" on client side,
for ex "echo 8 > /proc/sys/net/ipv4/tcp_max_tw_buckets" -- faster ports unlocking.

Comment 1 Jeff Layton 2007-10-01 10:41:37 UTC
Do you get better results if you don't use '-o tcp' here? That option makes it
so that mount.nfs uses TCP sockets for everything and can prematurely make you
run out of reserved ports in userspace. If you don't use that you'll still get
TCP mounts by default, but the communication with mountd and the portmapper is
done with UDP.


Comment 2 Petr Sklenar 2007-10-09 07:43:21 UTC
All 1020 mount-points are mounted without "-o tcp"

Comment 3 Steve Dickson 2007-10-09 13:44:48 UTC
So can we close this as not a bug? 

Comment 4 Petr Sklenar 2007-10-09 13:59:19 UTC
Ok close it.