Bug 519411

Summary: bind mounts in /etc/fstab are not mounted automatically
Product: [Fedora] Fedora Reporter: Mads Kiilerich <mads>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: notting, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-27 10:20:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
possible patch none

Description Mads Kiilerich 2009-08-26 14:27:52 UTC
Created attachment 358726 [details]
possible patch

Description of problem:

The fstab man page says that all filesystems without noauto will be mounted on boot time, just as "mount -a" does.

That NFS and proc is handled in a special way by rc.sysinit is an implementation detail.

It must thus be a bug that bind mounts not are mounted automatically.

It seems like bind (and perhaps other missing types?) just should be added to the mount -a in rc.sysinit.

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


Comment 1 Bill Nottingham 2009-08-26 19:57:02 UTC
You're misunderstanding that statement. By adding bind to the list, you're telling it to not mount filesystems that have 'bind' as the filesystem type.

Comment 2 Bill Nottingham 2009-08-26 20:00:58 UTC
What does your fstab look like? A line like:

/var  /usr/local/var  none  bind  0 0

works fine for me on boot.

Comment 3 Mads Kiilerich 2009-08-27 10:20:15 UTC
notting: You are absolutely right. My bad. Thanks for the hints on IRC.

Forensic analysis:

I was probably mostly confused by not being aware that Live CDs /mnt/live is mounted _after_ /etc/rc.sysinit and "mount -a" has been executed. Seeing that the bind-mounted mount point was empty I must have concluded that nothing had been mounted.

I misunderstood the -t option from the manpage. Not knowing the exclusive list of file systems by heart I assumed that -t was an exclude list (which surprised me) and that nomsdos (and nonfs) was file systems. Assuming that the -t option was just a list I randomly but "bind" before or after the "no", so my test results were completely broken and supported my wrong conclusions.

After having tried "none" as file system type in fstab and concluded that it didn't work for the reasons above I changed to "bind". Apparently anything can be specified as file system type for bind mounts, and it will (only?) be used for filtering when doing "mount -a -t". So "mount -a -t bind" works just as well as "mount -a -t foo" if the fstab file system type is specified accordingly.