Bug 168384 - extra_opts not parsed before calling nfsmount in anaconda
extra_opts not parsed before calling nfsmount in anaconda
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: anaconda (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Anaconda Maintenance Team
Mike McLean
: FutureFeature
: 169851 (view as bug list)
Depends On: 192938
Blocks: 181409
  Show dependency treegraph
Reported: 2005-09-15 11:42 EDT by Brian Long
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2006-0524
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-10 17:23:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch adding nfsmountopts cmdline option to Anaconda (13.33 KB, patch)
2005-09-15 11:44 EDT, Brian Long
no flags Details | Diff
allow specification of NFS mount options for kickstart (3.63 KB, patch)
2006-04-28 12:04 EDT, David Lehman
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0524 normal SHIPPED_LIVE anaconda enhancement and bug fix update 2006-08-10 00:00:00 EDT

  None (edit)
Description Brian Long 2005-09-15 11:42:30 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050909 Red Hat/1.0.6-1.4.2 Firefox/1.0.6

Description of problem:
The NFS client code in Anaconda/Loader relies on the kernel to determine the best mount options.  This is not ideal in most networks.  For example, the kernel defaults to rsize=32768,wsize=32768,udp on my network and this causes very painful installs.  I wanted to be able to mount with tcp and or reduce the rsize and wsize, so I wrote a patch.

The NFS client code in isys/nfsclient.c allows for extra_opts to be defined and passed to the NFS mount (i.e. rsize, wsize, tcp).  However, the isys/imount.c function doPwMount does not accept an argument with mount options.  This proposed patch adds a new argument to doPwMount char * extra_opts.  This is only used in the loader2/nfsinstall.c file.  All other calls to doPwMount pass NULL as an extra_opts argument.

This patch adds char * nfsmountopts to the loaderData struct and takes anything passed on /proc/cmdline and sticks it into loaderData->nfsmountopts.  This then gets passed to doPwMount extra_opts.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install RHEL 4 via NFS
2. cat /proc/mounts
3. /mnt/source is mounted rsize=32768,wsize=32768,udp.

Actual Results:  Install takes longer on any busy network because a loss of a single 32K UDP packet causes a full retransmission of the packet.

Expected Results:  Reduced rsize/wsize (like older releases of RHEL) or using the tcp mount option would be ideal.

Additional info:

This is also an Issue Tracker 79818.
Comment 1 Brian Long 2005-09-15 11:44:02 EDT
Created attachment 118859 [details]
Patch adding nfsmountopts cmdline option to Anaconda
Comment 2 Jeremy Katz 2005-09-19 14:11:56 EDT
Per my mail to anaconda-devel-list...

I'd rather try to approach this from a less brute force approach.  As it
stands now, the number of arguments to doPwMount is getting fairly

If we're going to make changes to doPwMount, we should probably make it
closer to just a wrapper of mount(2).  The various integer flags should
probably become a bitmask.  The account and password arguments are only
there for (obsolete) SMB support, so should just be dropped.  Instead of
adding an NFS specific option, maybe doing just a pointer to fs specific
options makes more sense.  I'll probably do this later tonight now that
I've written out a description of it ;)

For the other side of things, I'd rather see the nfs options in the
'nfs' kickstart directive and with special handling in ks=nfs:... rather
than making another bit of global data.  Although this doesn't help the
interactive case right now, we'll probably going to have to do something
for when we add NFSv4 support anyway, so this is a logical step to move
things in the right direction.
Comment 3 Brian Long 2005-09-19 16:36:19 EDT
I understand this approach going forward in Anaconda CVS HEAD, but what about
RHEL 4?  :)  Is there any chance your completely-revamped doPwMount could be
back-ported to RHEL4 Anaconda?  If not, I'd like separate consideration for my
patch (or a similar tweak) just on the RHEL 4 branch.  Thanks.
Comment 4 Jeremy Katz 2005-09-19 16:46:53 EDT
The changes to doPwMount() probably wouldn't make sense to push back to RHEL4,
but doing things right as far as handling of where to get the options does to
avoid one-off ways of specifying things.

Also, have to get it right on HEAD before its really viable to push back in an
update release.
Comment 9 David Lehman 2006-04-28 12:04:49 EDT
Created attachment 128364 [details]
allow specification of NFS mount options for kickstart

This patch provides per-mount specification of NFS mount options during
kickstart installs. For kickstart (ks.cfg) we add the an option to the nfs
directive (opts), eg:

    nfs --server=filer --dir=/inst/fc5 --opts="rsize=8192,wsize=8192"

    NOTE: this obviously doesn't affect the options used when grabbing the
	  ks.cfg since we won't have seen the above line at that point

For the command line ks=nfs specifier, we add the options into the argument,


    NOTE: this only sets the mount options for the mount of filer:/inst to
	  retrieve ks-fc5.cfg

The patch is fairly simple, but untested. If someone can has an FC5 devel box I
can play with I'll be happy to test it.
Comment 11 Jeremy Katz 2006-05-01 13:23:05 EDT
Tested Dave's patch against HEAD and it seems to work, so committed to HEAD.  

Based on successful integration of support for doing this into the development
tree, I've gone ahead and merged Brian's initial patch into the rhel4 branch. 
NOTE NOTE NOTE: that syntax will *ONLY* be valid in RHEL4 updates.  Future
releases will follow the syntax as outlined in comment #9.
Comment 23 Red Hat Bugzilla 2006-08-10 17:23:33 EDT
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.

Comment 24 Peter Jones 2006-08-21 13:50:36 EDT
*** Bug 169851 has been marked as a duplicate of this bug. ***
Comment 27 Colin Coe 2006-09-27 23:29:15 EDT
We use EL3u7 and would love to be able to parse the NFS client options to force 
the use of tcp and NFSv3.  Could this be backported to EL3 in time for update 9?


Note You need to log in before you can comment on or make changes to this bug.