Bug 246254

Summary: mount.nfs unnecessarily passes a socket to the kernel
Product: Red Hat Enterprise Linux 5 Reporter: Jeff Layton <jlayton>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.0CC: staubach, steved
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0651 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 17:15:45 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:
Bug Depends On: 240780    
Bug Blocks:    

Comment 1 Jeff Layton 2007-06-29 16:36:08 UTC
RHEL5's mount.nfs allocates a socket, binds it to a reserved port and then
passes that socket to the kernel. The kernel then ignores this socket and
creates one of its own. On a machine with a lot of NFS mount activity, this can
contribute to reserved port exhaustion.

This upstream patch should help alleviate this. We should consider its inclusion
for RHEL5:

http://linux-nfs.org/cgi-bin/gitweb.cgi?p=nfs-utils;a=commit;h=e6e19816da66cde1cc4fd062c898ce66a9b4e336

Comment 2 Steve Dickson 2007-07-05 19:36:49 UTC
Fixed in nfs-utils-1.0.9-23.el5.i386.rpm 

Comment 7 Steve Dickson 2007-08-31 19:05:17 UTC
fixed in nfs-utils-1.0.9-24.el5

Comment 8 Steve Dickson 2007-08-31 19:46:17 UTC
I'm using the following scripts and don't see the problem:
MOUNT=/bin/mount
for i in `seq 1 1020`
do
    [ ! -d /mnt/tree/$i ] && mkdir -p /mnt/tree/$i
    $MOUNT -o tcp rhel4hat:/home/tree/$i /mnt/tree/$i || exit 1
    ls -d /mnt/tree/$i;
done

and then to unmount I do:

#!/bin/bash
for i in `seq 1 1020`
do
    umount /mnt/tree/$i || exit 1;
done


Comment 17 errata-xmlrpc 2007-11-07 17:15:45 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0651.html