RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 620461 - halt error with bind-mount fstab entries
Summary: halt error with bind-mount fstab entries
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On: 695373
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-02 15:20 UTC by Philip Rowlands
Modified: 2011-05-19 13:51 UTC (History)
4 users (show)

Fixed In Version: initscripts-9.03.18-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:51:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0647 0 normal SHIPPED_LIVE initscripts bug fix and enhancement update 2011-05-19 09:37:27 UTC

Description Philip Rowlands 2010-08-02 15:20:20 UTC
My /etc/fstab file has a line:

/    /mnt/rootbind     auto    defaults,bind   0 0

which confuses /etc/init.d/halt; specifically in the "Remounting remaining filesystems readonly" section.

This is because, when using its "device | dir" syntax, mount appears to prefer devices over directories.

When halt executes:
  fstab-decode mount -n -o ro,remount /

the error message I see is:
  mount: /mnt/rootbind not mounted already, or bad option

and that the / filesystem is not remounted read-only. Note that at this point /mnt/rootbind has already been successfully unmounted, and that mount is matching the "/" argument to fstab's fs_spec column, then trying to remount the corresponding fs_file.

The suggested fix is to prevent mount from reading /etc/fstab by passing both device and directory args, e.g.:

mount | awk '{ print $1,$3 }' | while read dev dir; do
    fstab-decode mount -n -o ro,remount $dev $dir
done

Comment 2 RHEL Program Management 2010-08-02 15:47:39 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 4 Philip Rowlands 2010-08-02 21:37:52 UTC
Thanks for the quick response. I think it'll need

-mount | awk '{ print $1,$3 }' | while read $dev $dir; do
+mount | awk '{ print $1,$3 }' | while read dev dir; do

Comment 5 Bill Nottingham 2010-08-02 21:47:43 UTC
Gah, you're right. Fixed.

Comment 14 errata-xmlrpc 2011-05-19 13:51:11 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-2011-0647.html


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