multiple entries in fstab with same mount-point

Bug #503003 reported by tomcrus on 2010-01-04
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
mountall (Ubuntu)
Medium
Steve Langasek

Bug Description

Binary package hint: mountall

Release: 9.10
Package-Version: 1.0, 1.0.1

Multiple entries in fstab with the same mount-point get not mounted as expected. (see mount-point '/home' in attached fstab for example)

Probably it doesn't make very much sense to mount different sources with different options to the same mount-point but in case of dazukofs (which is used by avira antivir) the following is necessary
#> mount -t dazukofs /home /home
after the real partitions as been mounted to '/home' to tell the on-access-scanner to include '/home'

But this cannot be done automatically during boot by putting an according line to /etc/fstab since mountall just does a
'mount -a -t dazukofs -o defaults /home /home', but the real partition doesn't ever get mounted.

By invoking a manual 'mount -a' both fstab-lines get interpreted as expected.

tomcrus (tomcrus) wrote :
tomcrus (tomcrus) wrote :

As I looked at the sources of mountall I found the function parse_fstab, which already has a spacial-case-handling of lines for swap-partitions (which would get a mount-point of 'none' and so there also could be only one swap-entry).
I think probably this was the fix for bug #435027, but I didn't go deeper for this.

So if there is no other sane use-case for multiple fstab-lines with same mount-point, there just need to be another special-case for dazukofs, which I attached a patch against mountall_1.0.tar.gz for.

But somehow this seems to be a quick and dirty-patch, so maybe there should be some other tests if one fstab-line just updates another one or should be handled as a new one (like mentioned in bug #435027: "[...] we should check non-device mountpoints, and swap partitions")

tomcrus (tomcrus) wrote :

Note: the attached patch is just a suggestion and isn't even tested. As mountall seems to do more then just walk through fstab and mount each line, just applying the patch probably won't work. So maybe someone more familar with it should take a deeper look at it

tomcrus (tomcrus) on 2010-01-05
description: updated
Test-tools (roland-verifysoft) wrote :

Same story here,
mounting aufs over sqashfs on /usr breaks boot, relevant /etc/fstab entries:

/.filesystems/usr/usr.sqfs /usr squashfs ro,loop,nodev 0 0
aufs /usr aufs br:/.filesystems/usr/overlay=rw:/usr=ro 0 0

The workaround, I have to life for a while, is to #comment aufs,
after boot, un-comment, "mount -a", comment. Not that sane.

Daniel Hahler (blueyed) on 2010-02-21
Changed in mountall (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
tags: added: patch
Changed in mountall (Ubuntu):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Dimitri John Ledkov (xnox) wrote :

Hello I'm from ~ubuntu-reviewers team.

1) Bug is still present
2) Patch is ok, but it is a solution only for one special case. IMHO there should be a general solution to this issue.

Hence, I'm changing tag from patch to patch-needswork.

Further discussion about this problem should be done with Canonical Foundations Team.
I'm unsubscribing Ubuntu Reviewers team and I will *not* follow up on this patch cause it's beyond my technical abilities.

Thank you for reporting this issues and working on the patch to make Ubuntu better.

tags: added: patch-needswork
removed: patch
RK (kubuntu-rk) wrote :

See bug #705178 for a patch of a related issue.

Colin Watson (cjwatson) on 2011-06-14
Changed in mountall (Ubuntu):
assignee: Canonical Foundations Team (canonical-foundations) → James Hunt (jamesodhunt)

It sounds like this also stops BindFS from working to share a local directory on boot:
https://help.ubuntu.com/community/Bindfs-SharedDirectoryLocalUsers

Steve Langasek (vorlon) on 2013-09-10
Changed in mountall (Ubuntu):
status: Triaged → Fix Committed
assignee: James Hunt (jamesodhunt) → Steve Langasek (vorlon)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mountall - 2.50

---------------
mountall (2.50) unstable; urgency=low

  * Add support for pstore. Closes: #722212.
  * Allow multiple fstab entries with the same mountpoint: we still mask
    any entries that came from a different source (i.e., /etc/fstab will
    mask /lib/init/fstab), but if there are multiple entries in /etc/fstab,
    treat them all as separate mounts instead of letting the last one win.
    LP: #503003.
  * Don't set 'console output' anymore; now that we have upstart logging by
    default, logs will be captured and (assuming /var/log becomes writable
    at some point) mountall is debuggable without having to spew text to the
    console.
  * Support reading --verbose/--debug options from /proc/cmdline, so that
    we can give users a better way to debug mountall without having to
    edit the upstart job.
  * Since everything is in a single event loop, a request from plymouth to
    skip a mount may come in after the mount has already happened. So don't
    assert on a bogus request, just treat it as a no-op and continue.
    LP: #731800.

 -- Steve Langasek <email address hidden> Tue, 10 Sep 2013 04:01:19 +0000

Changed in mountall (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments