Bug 350211 - Problem with --bind mounts when /etc/mtab is a symlink to /proc/mounts
Problem with --bind mounts when /etc/mtab is a symlink to /proc/mounts
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: util-linux (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2007-10-24 06:02 EDT by Mark Hlawatschek
Modified: 2007-11-16 20:15 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-25 04:58:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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

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

How reproducible:

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)

Additional info:
Comment 1 Karel Zak 2007-10-25 04:58:56 EDT
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

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