Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 782326

Summary: move mtab out of etc
Product: Red Hat Enterprise Linux 6 Reporter: Fred van Zwieten <fvzwieten>
Component: filesystemAssignee: Ondrej Vasik <ovasik>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.2Keywords: FutureFeature
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-17 07:32:35 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 Fred van Zwieten 2012-01-17 07:14:10 UTC
Description of problem:
mtab lives in /etc and it shouldn't live there but in /var/run because it holds session specific information and it keeps me from making etc readonly on a secured box. workaround, or probably fix would be to symlink /etc/mtab to /var/run/mtab.


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

How reproducible:
make /etc read-only and make subsequently other mount commands

Steps to Reproduce:
1. mount /etc mountpoint readonly
2. mount some other fs to some mountpoint
3.
  
Actual results:
it will complain

Expected results:
it won't complain

Additional info:
I want to build a system where all is readony exept for the /var et al. This is done for security, backup, provisioning, performance (r/o fs) and knowing exactly what the system looks like.

Comment 2 Ondrej Vasik 2012-01-17 07:32:35 UTC
Thanks for your suggestion, but that's not something what should happen in released RHEL-6 ... in current Fedora /etc/mtab is just symlink to /proc/mounts ... however even this caused (and is still causing) a lot of troubles. Change you have described would probably mean some changes in SELinux policies and maybe more distro changes would be required. If you really think that you need this feature, please contact RHEL product support.

Comment 3 Ondrej Vasik 2012-01-17 11:49:48 UTC
Just a side note from discussion with util-linux maintainer:
"With /etc/mtab being symlink mount(8) will stop to update it properly, as it doesn't handle the symlink destination - with symlink it just doesn't care about that file. So to achieve this, you will need to update mount, umount and likely many other mount* tools. For read-only /etc/ is probably best way to use bind mount, however this is likely unsupported thing in RHEL." - see e.g. http://karelzak.blogspot.com/2011/04/bind-mounts-mtab-and-read-only.html for this topic...