[Bug 712892] Missing required logs.

Brad Figg brad.figg at canonical.com
Sat Sep 17 18:37:21 UTC 2011


This bug is missing log files that will aid in diagnosing the problem.
>From a terminal window please run:

apport-collect 712892

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable
to run this command, please add a comment stating that fact and change
the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the
Ubuntu Kernel Team.

** Changed in: linux (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/712892

Title:
  mount (silently) ignores options for bind mounts

Status in The Util-Linux-ng Set of Utilities:
  New
Status in “linux” package in Ubuntu:
  Incomplete
Status in “util-linux” package in Ubuntu:
  Triaged

Bug description:
  Binary package hint: util-linux

  mount ignores any options given for bind mounts and adds an incorrect line to mtab.
  there is (at least) one exception: the option ro (== read-only). it warns that the bind mount is mounted read-write, if one tries to use that option together with bind.

  some examples of the current behavior (with comments):
  ~/bla# mkdir foo
  ~/bla# mkdir bar
  ~/bla# touch foo/test
  ~/bla# mount foo/ bar/ -obind,ro
  mount: warning: bar/ seems to be mounted read-write.
  # at least it says so
  ~/bla# rm bar/test 
  ~/bla# ls bar/test
  ls: cannot access bar/test: No such file or directory
  # expected after that warning
  ~/bla# touch foo/test
  ~/bla# mount foo/ bar/ -obind,somebogusoption1
  ~/bla# mount foo/ bar/ -obind,somebogusoption2
  ~/bla# mount foo/ bar/ -obind,somebogusoption3
  ~/bla# mount
  ...
  /root/bla/foo on /root/bla/bar type none (rw,bind)
  /root/bla/foo on /root/bla/bar type none (rw,bind,somebogusoption1)
  /root/bla/foo on /root/bla/bar type none (rw,bind,somebogusoption2)
  /root/bla/foo on /root/bla/bar type none (rw,bind,somebogusoption3)
  # mount adds bogus lines to mtab...
  ~/bla# ls bar/
  test
  # but at least it does mount
  umount bar
  mount
  ...
  /root/bla/foo on /root/bla/bar type none (rw,bind)
  /root/bla/foo on /root/bla/bar type none (rw,bind,somebogusoption1)
  /root/bla/foo on /root/bla/bar type none (rw,bind,somebogusoption2)
  # and umount only removes one (bogus) line per execution :)

  the behavior is kinda documented in the manpage (well the bogus lines are clearly a bug (two actually), but i don't care right now).
  a workaround is to first bind mount and then use the remount option for setting other options e.g.:
  ~/bla# mount foo/ bar/ -obind
  ~/bla# mount bar/ -oremount,ro
  ~/bla# rm bar/test 
  rm: cannot remove `bar/test': Read-only file system

  the problem is... this does not work with fstab:
  neither setting up one line with options bind,ro such as
  /root/bla/foo	/root/bla/bar	none	bind,ro
  (this gives the same warning as above)
  nor using two, one with the remount option:
  /root/bla/foo	/root/bla/bar	none	bind
  /root/bla/foo	/root/bla/bar	none	remount,ro
  (this even fails silently to remount read-only!)

  the warning was introduced by Karel Zak in november 2009. i read that debian had a patch for correcting at least some of the issues above, but i could not find anything.
  one workaround for certain situations could be to use pam_mount.

  this war reported/tested on ubuntu 10.10 with kernel 2.6.35-25 and
  mount 2.17.2-0ubuntu1.10.10.1.

To manage notifications about this bug go to:
https://bugs.launchpad.net/util-linux-ng/+bug/712892/+subscriptions




More information about the foundations-bugs mailing list