Bug 242935 - faulty mounting of loop and bind entries from /etc/fstab
Summary: faulty mounting of loop and bind entries from /etc/fstab
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 6
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Karel Zak
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-06 15:01 UTC by vikram goyal
Modified: 2008-03-09 10:31 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-03-09 10:30:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
mount output in various scenarios (3.01 KB, text/plain)
2007-06-06 15:01 UTC, vikram goyal
no flags Details

Description vikram goyal 2007-06-06 15:01:34 UTC
Description of problem:
I wanted to mount F-7 dvd iso through loop device on a dir /home/nfs
Also I wanted the same mount on /var/www/html/install through bind

So I made two entries in /etc/fstab:
/mnt/e/Fedora-7-i386/F-7-i386-DVD.iso  /home/nfs  iso9660 ro,loop  0 0

/home/nfs  /var/www/html/install  none  ro,bind  0 0

Version-Release number of selected component (if applicable):
setup-2.6.1.1-1.fc6

How reproducible:
When I mount /home/nfs from command line by doing:
mount /home/nfs
/var/www/html/install gets mounted of the empty /home/nfs dir
If I delete or hash second entry and then mount /home/nfs
The iso gets properly mounted on loop device and shows its contents.

Steps to Reproduce:
1.make the entries in /etc/fstab
2.mount the first entry
3.second entry gets mounted
  
Actual results:
second entry gets mounted


Expected results:
First entry should be mounted

Additional info:
attaching appropriate mount output
kernel 2.6.19-1.2911.6.5.fc6xen

Comment 1 vikram goyal 2007-06-06 15:01:34 UTC
Created attachment 156359 [details]
mount output in various scenarios

Comment 2 Karel Zak 2007-06-18 09:38:28 UTC
This is nothing new, see #193094.

The problem is that we can't change a way how the mount command interprets
command line options due to backward compatibility. The mount(8) is trying (in
sequence):

  1. option is a source (filesystem, device, dir, ...)
  2. option is a target (mountpoint)

it means your "/home/nfs" is always interpreted as a source (the bind mount).

Comment 3 vikram goyal 2008-03-09 10:30:48 UTC

*** This bug has been marked as a duplicate of 193094 ***


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