Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 433702

Summary: nfs read-only root errors
Product: Red Hat Enterprise Linux 5 Reporter: Andrew Hecox <ahecox>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED ERRATA QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.1CC: brsmith, dkovalsk, dmair, harald, mike, mmarcini, tao, woodard
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 22:15:56 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:
Attachments:
Description Flags
rc.sysinit patch
none
network init patch
none
halt patch
none
rwtab addendum none

Description Andrew Hecox 2008-02-20 22:05:08 UTC
The following are a list of issues associated with a "stateless" read-only nfs
root disk. The test case was a diskless ppc blade, using a tmpfs RW_MOUNT and no
STATE_MOUNT. I have tested all of these changes on this test system but not on
any other architectures; however, I believe them to be generally applicable in
read-only nfs root configurations.

Changes to init scripts to better support stateless:

--rc.sysinit--

 - don't update mtab in a r/o root
 - mount on sys and /dev/pts returns EBUSY on a readonly root
 - [ -n $CLIENTSTATE ] is always returning true, causing an unnecessary timeout

--network--

 - /etc/mtab may not have any mount information in the readonly-root
   cause, but the root mount is likely to be a network mount.  Without
   this, nfs hangs the reboot process.

--halt-- 

 - don't try and update a read-only mtab 

--rwtab--

 - /var/empty/sshd/etc/localtime needs to be overwritten by sshd at
   startup
 - /var/lib/random-seed is written to at shutdown; this fixes the 
   error but doesn't return the functionality lost in a r/o /var/lib.

Comment 1 Andrew Hecox 2008-02-20 22:05:08 UTC
Created attachment 295456 [details]
rc.sysinit patch

Comment 2 Andrew Hecox 2008-02-20 22:05:45 UTC
Created attachment 295457 [details]
network init patch

Comment 3 Andrew Hecox 2008-02-20 22:06:10 UTC
Created attachment 295458 [details]
halt patch

Comment 4 Andrew Hecox 2008-02-20 22:06:28 UTC
Created attachment 295459 [details]
rwtab addendum

Comment 5 RHEL Program Management 2008-06-02 20:17:54 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Bill Nottingham 2008-06-12 18:06:22 UTC
Acking, but some of the patches need more investigation.

Comment 8 Michael Spiegle 2008-07-17 21:03:09 UTC
Regarding mount issue:
I believe other distributions have solved the mount/lockfile issue by using a
patched version of mount that doesn't create lockfiles in RO-root situations.

Regarding /etc/mtab:
Since other tools/utilities might need information in /etc/mtab, I think it
might be more appropriate to symlink it to /proc/mounts.  I noticed that the
netboot root preparation tool from Redhat appears to do this already.

Thanks for the patches Andrew!

Comment 17 errata-xmlrpc 2009-01-20 22:15:56 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 therefore 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-2009-0245.html