Bug 350211

Summary: Problem with --bind mounts when /etc/mtab is a symlink to /proc/mounts
Product: Red Hat Enterprise Linux 5 Reporter: Mark Hlawatschek <hlawatschek>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED WONTFIX QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: low    
Version: 5.1CC: grimme
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-25 08:58: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:

Description Mark Hlawatschek 2007-10-24 10:02:05 UTC
Description of problem:
When /etc/mtab is a symbolik link to /proc/mounts, the following problem 
occurs:
mount -a will mount entries in /etc/fstab with bind options several times.

Version-Release number of selected component (if applicable):
util-linux-2.13-0.45.el5

How reproducible:
Always

Steps to Reproduce:
1. create /etc/mtab as a symlink to /proc/mounts  
2. create a fstab entry with bind option:
/mnt/test/source        /mnt/test/dest          none    bind            0 0
3. exec mount -a twice
4. read mount information 
  
Actual results:
after executing mount -a twice, mount shows:
/dev/root on /mnt/test/dest type ext3 (rw,data=ordered)
/dev/root on /mnt/test/dest type ext3 (rw,data=ordered)

Expected results:
after executing mount -a twice, mount should only show
/dev/root on /mnt/test/dest type ext3 (rw,data=ordered)
once.

Additional info:

Comment 1 Karel Zak 2007-10-25 08:58:56 UTC
The symlink to /proc/mounts is non-standard and **unsupported** change (yet).
It's source for many problems. The /proc/mounts doesn't contains all relevant
information.