public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* mount -f regression in v2.21's new-mount
@ 2012-03-06 22:43 Matt Burgess
  2012-03-07  7:49 ` Karel Zak
  0 siblings, 1 reply; 13+ messages in thread
From: Matt Burgess @ 2012-03-06 22:43 UTC (permalink / raw)
  To: util-linux

Hi,

First off, apologies in advance for the probably useless bug report that
follows!  I'm only reporting it here because it *appears* to be a
regression but I can't reproduce it under a minimised test-case.

Linux From Scratch's bootscripts mount a tmpfs at /run using the rather
trivial 'mount -n /run'.  The corresponding fstab entry is:

# file system  mount-point  type   options   dump  fsck order
tmpfs          /run         tmpfs  defaults  0     0

A little later on in the boot sequence, it then does a 'mount -f /run'
in order to do update /etc/mtab.

Now, when I build 2.21 with a plain './configure' run, everything works
as expected.  However, when I build 2.21 with './configure
--enable-new-mount', the 2nd call to 'mount' appears to actually perform
the mount, as opposed to simply updating /etc/mtab, thereby meaning that
files/directories we expect to be there are no longer visible.

As mentioned above, I tried to reproduce this with a minimal test-case
executed after boot, but the following *always* works correctly with
both old and new (libmount-based) mount:

mkdir /tmp/run
mount -n /tmp/run
touch /tmp/run/test
ls -l /tmp/run/test
mount -f /tmp/run
ls -l /tmp/run/test

If the test case was successful at reproducing the fault, I'd expect the
1st 'ls' command to show 1 file, and the 2nd to show 0 files.

Any ideas on either where this bug may be, or how I may go about trying
to reproduce/debug it further would be gratefully received.

Thanks,

Matt.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: mount -f regression in v2.21's new-mount
  2012-03-06 22:43 mount -f regression in v2.21's new-mount Matt Burgess
@ 2012-03-07  7:49 ` Karel Zak
  2012-03-07 22:10   ` Matt Burgess
  0 siblings, 1 reply; 13+ messages in thread
From: Karel Zak @ 2012-03-07  7:49 UTC (permalink / raw)
  To: Matt Burgess; +Cc: util-linux

On Tue, Mar 06, 2012 at 10:43:41PM +0000, Matt Burgess wrote:
> Hi,
> 
> First off, apologies in advance for the probably useless bug report that
> follows!  I'm only reporting it here because it *appears* to be a
> regression but I can't reproduce it under a minimised test-case.
> 
> Linux From Scratch's bootscripts mount a tmpfs at /run using the rather
> trivial 'mount -n /run'.  The corresponding fstab entry is:
> 
> # file system  mount-point  type   options   dump  fsck order
> tmpfs          /run         tmpfs  defaults  0     0
> 
> A little later on in the boot sequence, it then does a 'mount -f /run'
> in order to do update /etc/mtab.
> 
> Now, when I build 2.21 with a plain './configure' run, everything works
> as expected.  However, when I build 2.21 with './configure
> --enable-new-mount', the 2nd call to 'mount' appears to actually perform
> the mount, as opposed to simply updating /etc/mtab, thereby meaning that
> files/directories we expect to be there are no longer visible.
> 
> As mentioned above, I tried to reproduce this with a minimal test-case
> executed after boot, but the following *always* works correctly with
> both old and new (libmount-based) mount:
> 
> mkdir /tmp/run
> mount -n /tmp/run
> touch /tmp/run/test
> ls -l /tmp/run/test
> mount -f /tmp/run
> ls -l /tmp/run/test
> 
> If the test case was successful at reproducing the fault, I'd expect the
> 1st 'ls' command to show 1 file, and the 2nd to show 0 files.
> 
> Any ideas on either where this bug may be, or how I may go about trying
> to reproduce/debug it further would be gratefully received.

 Try to modify your init scripts:

    LIBMOUNT_DEBUG=0xffff mount -f /run 2> /root/mount-run.debug

 we will see more details in the log.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: mount -f regression in v2.21's new-mount
  2012-03-07  7:49 ` Karel Zak
@ 2012-03-07 22:10   ` Matt Burgess
  2012-03-08  9:23     ` Karel Zak
  0 siblings, 1 reply; 13+ messages in thread
From: Matt Burgess @ 2012-03-07 22:10 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

On Wed, 2012-03-07 at 08:49 +0100, Karel Zak wrote:

>  Try to modify your init scripts:
> 
>     LIBMOUNT_DEBUG=0xffff mount -f /run 2> /root/mount-run.debug
> 
>  we will see more details in the log.

Thanks, Karel.  Debug log attached.

Regards,

Matt.

[-- Attachment #2: mount-run.debug --]
[-- Type: text/plain, Size: 4813 bytes --]

243: libmount:      CXT: [0x178f060]: ----> allocate 
243: libmount:    UTILS: mtab: /etc/mtab
243: libmount:      CXT: [0x178f060]: enabling flag 0004
243: libmount:      CXT: [0x178f060]: mount: preparing
243: libmount:      CXT: [0x178f060]: use default optmode
243: libmount:      CXT: [0x178f060]: OPTSMODE: ignore=0, append=0, prepend=1, replace=0, force=0, fstab=1, mtab=1
243: libmount:      CXT: [0x178f060]: trying to apply fstab (src=(null), target=/run)
243: libmount:      TAB: [0x178f200]: alloc
243: libmount:      TAB: [0x178f200]: /etc/fstab: start parsing (0 entries)
243: libmount:      TAB: [0x178f200]: add entry: /dev/sda3 /
243: libmount:      TAB: [0x178f200]: add entry: /dev/sda5 swap
243: libmount:      TAB: [0x178f200]: add entry: proc /proc
243: libmount:      TAB: [0x178f200]: add entry: sysfs /sys
243: libmount:      TAB: [0x178f200]: add entry: devpts /dev/pts
243: libmount:      TAB: [0x178f200]: add entry: tmpfs /run
243: libmount:      TAB: [0x178f200]: add entry: devtmpfs /dev
243: libmount:      TAB: [0x178f200]: /etc/fstab: stop parsing (7 entries)
243: libmount:    CACHE: [0x1790480]: alloc
243: libmount:      TAB: [0x178f200]: lookup TARGET: /run
243: libmount:      CXT: [0x178f060]: apply entry:
243: libmount:      CXT: ------ fs: 0x17900f0
source: tmpfs
target: /run
fstype: tmpfs
optstr: defaults
243: libmount:      CXT: [0x178f060]: merging mount flags
243: libmount:      CXT: [0x178f060]: final flags: VFS=00000000 user=00000000
243: libmount:      CXT: [0x178f060]: mount: evaluating permissions
243: libmount:      CXT: [0x178f060]: mount: fixing optstr
243: libmount:      CXT: applying 0x00000000 flags to '(null)'
243: libmount:      CXT: new optstr 'rw'
243: libmount:      CXT: applying 0x00000000 flags to '(null)'
243: libmount:      CXT: new optstr '(null)'
243: libmount:      CXT: [0x178f060]: fixed options [rc=0]: vfs: 'rw' fs: '(null)' user: '(null)', optstr: 'rw'
243: libmount:      CXT: [0x178f060]: preparing source path
243: libmount:      CXT: [0x178f060]: srcpath 'tmpfs'
243: libmount:      CXT: [0x178f060]: PROPAGATION/pseudo FS source: tmpfs
243: libmount:      CXT: [0x178f060]: preparing target path
243: libmount:    CACHE: [0x1790480]: add entry [ 1] (path): /run: /run
243: libmount:      CXT: [0x178f060]: final target '/run'
243: libmount:      CXT: [0x178f060]: FS type: tmpfs
243: libmount:      CXT: [0x178f060]: /sbin/mount.tmpfs         ... not found
243: libmount:      CXT: [0x178f060]: /sbin/fs.d/mount.tmpfs    ... not found
243: libmount:      CXT: [0x178f060]: /sbin/fs/mount.tmpfs      ... not found
243: libmount:      CXT: [0x178f060]: prepare update
243: libmount:   UPDATE: [0x1790220]: allocate
243: libmount:   UPDATE: [0x1790220]: resetting FS [fs=0x0x178f140, target=(null), flags=0x00000000]
243: libmount:   UPDATE: [0x1790220]: FS template:
243: libmount:   UPDATE: ------ fs: 0x178f140
source: tmpfs
target: /run
fstype: tmpfs
optstr: rw
VFS-optstr: rw
243: libmount:   UPDATE: [0x1790220]: ready
243: libmount:      CXT: [0x178f060]: mount: do mount
243: libmount:      CXT: [0x178f060]: (FAKE) mount(2) [source=tmpfs, target=/run, type=tmpfs,  mountflags=0xc0ed0000, mountdata=<none>]
243: libmount:   UPDATE: [0x1790220]: /etc/mtab: update tab
243: libmount:   UPDATE: ------ fs: 0x17904f0
source: tmpfs
target: /run
fstype: tmpfs
optstr: rw
VFS-optstr: rw
243: libmount:    LOCKS: [0x178f2c0]: alloc: default linkfile=/etc/mtab~.243, lockfile=/etc/mtab~
243: libmount:    LOCKS: [0x178f2c0]: signals: BLOCKED
243: libmount:   UPDATE: [0x1790220]: /etc/mtab: add entry
243: libmount:    LOCKS: [0x178f2c0]: /etc/mtab~: (243) successfully locked
243: libmount:      TAB: [0x1790030]: alloc
243: libmount:      TAB: [0x1790030]: /etc/mtab: start parsing (0 entries)
243: libmount:      TAB: [0x1790030]: add entry: /dev/sda3 /
243: libmount:      TAB: [0x1790030]: add entry: proc /proc
243: libmount:      TAB: [0x1790030]: add entry: sysfs /sys
243: libmount:      TAB: [0x1790030]: /etc/mtab: stop parsing (3 entries)
243: libmount:      TAB: [0x1790030]: add entry: tmpfs /run
243: libmount:   UPDATE: [0x1790220]: /etc/mtab: updating
243: libmount:    LOCKS: [0x178f2c0]: (243) unlocking
243: libmount:    LOCKS: [0x178f2c0]: unlink /etc/mtab~
243: libmount:    LOCKS: [0x178f2c0]: restoring sigmask
243: libmount:      TAB: [0x1790030]: reset
243: libmount:      TAB: [0x1790030]: free
243: libmount:   UPDATE: [0x1790220]: /etc/mtab: update tab: done [rc=0]
243: libmount:    LOCKS: [0x178f2c0]: free
243: libmount:      CXT: [0x178f060]: <---- reset [status=1] ---->
243: libmount:      TAB: [0x178f200]: reset
243: libmount:      TAB: [0x178f200]: free
243: libmount:    CACHE: [0x1790480]: free
243: libmount:   UPDATE: [0x1790220]: free
243: libmount:      CXT: [0x178f060]: <---- free

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: mount -f regression in v2.21's new-mount
  2012-03-07 22:10   ` Matt Burgess
@ 2012-03-08  9:23     ` Karel Zak
  2012-03-08 20:25       ` Matt Burgess
  0 siblings, 1 reply; 13+ messages in thread
From: Karel Zak @ 2012-03-08  9:23 UTC (permalink / raw)
  To: Matt Burgess; +Cc: util-linux

On Wed, Mar 07, 2012 at 10:10:01PM +0000, Matt Burgess wrote:
> On Wed, 2012-03-07 at 08:49 +0100, Karel Zak wrote:
> 
> >  Try to modify your init scripts:
> > 
> >     LIBMOUNT_DEBUG=0xffff mount -f /run 2> /root/mount-run.debug
> > 
> >  we will see more details in the log.
> 
> Thanks, Karel.  Debug log attached.

.. but it seems like debug output from the situation when mount(2)
was not called. I don't see any bug here.

    Karel

> 
> Regards,
> 
> Matt.

> 243: libmount:      CXT: [0x178f060]: ----> allocate 
> 243: libmount:    UTILS: mtab: /etc/mtab
> 243: libmount:      CXT: [0x178f060]: enabling flag 0004
> 243: libmount:      CXT: [0x178f060]: mount: preparing
> 243: libmount:      CXT: [0x178f060]: use default optmode
> 243: libmount:      CXT: [0x178f060]: OPTSMODE: ignore=0, append=0, prepend=1, replace=0, force=0, fstab=1, mtab=1
> 243: libmount:      CXT: [0x178f060]: trying to apply fstab (src=(null), target=/run)
> 243: libmount:      TAB: [0x178f200]: alloc
> 243: libmount:      TAB: [0x178f200]: /etc/fstab: start parsing (0 entries)
> 243: libmount:      TAB: [0x178f200]: add entry: /dev/sda3 /
> 243: libmount:      TAB: [0x178f200]: add entry: /dev/sda5 swap
> 243: libmount:      TAB: [0x178f200]: add entry: proc /proc
> 243: libmount:      TAB: [0x178f200]: add entry: sysfs /sys
> 243: libmount:      TAB: [0x178f200]: add entry: devpts /dev/pts
> 243: libmount:      TAB: [0x178f200]: add entry: tmpfs /run
> 243: libmount:      TAB: [0x178f200]: add entry: devtmpfs /dev
> 243: libmount:      TAB: [0x178f200]: /etc/fstab: stop parsing (7 entries)
> 243: libmount:    CACHE: [0x1790480]: alloc
> 243: libmount:      TAB: [0x178f200]: lookup TARGET: /run
> 243: libmount:      CXT: [0x178f060]: apply entry:
> 243: libmount:      CXT: ------ fs: 0x17900f0
> source: tmpfs
> target: /run
> fstype: tmpfs
> optstr: defaults
> 243: libmount:      CXT: [0x178f060]: merging mount flags
> 243: libmount:      CXT: [0x178f060]: final flags: VFS=00000000 user=00000000
> 243: libmount:      CXT: [0x178f060]: mount: evaluating permissions
> 243: libmount:      CXT: [0x178f060]: mount: fixing optstr
> 243: libmount:      CXT: applying 0x00000000 flags to '(null)'
> 243: libmount:      CXT: new optstr 'rw'
> 243: libmount:      CXT: applying 0x00000000 flags to '(null)'
> 243: libmount:      CXT: new optstr '(null)'
> 243: libmount:      CXT: [0x178f060]: fixed options [rc=0]: vfs: 'rw' fs: '(null)' user: '(null)', optstr: 'rw'
> 243: libmount:      CXT: [0x178f060]: preparing source path
> 243: libmount:      CXT: [0x178f060]: srcpath 'tmpfs'
> 243: libmount:      CXT: [0x178f060]: PROPAGATION/pseudo FS source: tmpfs
> 243: libmount:      CXT: [0x178f060]: preparing target path
> 243: libmount:    CACHE: [0x1790480]: add entry [ 1] (path): /run: /run
> 243: libmount:      CXT: [0x178f060]: final target '/run'
> 243: libmount:      CXT: [0x178f060]: FS type: tmpfs
> 243: libmount:      CXT: [0x178f060]: /sbin/mount.tmpfs         ... not found
> 243: libmount:      CXT: [0x178f060]: /sbin/fs.d/mount.tmpfs    ... not found
> 243: libmount:      CXT: [0x178f060]: /sbin/fs/mount.tmpfs      ... not found
> 243: libmount:      CXT: [0x178f060]: prepare update
> 243: libmount:   UPDATE: [0x1790220]: allocate
> 243: libmount:   UPDATE: [0x1790220]: resetting FS [fs=0x0x178f140, target=(null), flags=0x00000000]
> 243: libmount:   UPDATE: [0x1790220]: FS template:
> 243: libmount:   UPDATE: ------ fs: 0x178f140
> source: tmpfs
> target: /run
> fstype: tmpfs
> optstr: rw
> VFS-optstr: rw
> 243: libmount:   UPDATE: [0x1790220]: ready
> 243: libmount:      CXT: [0x178f060]: mount: do mount
> 243: libmount:      CXT: [0x178f060]: (FAKE) mount(2) [source=tmpfs, target=/run, type=tmpfs,  mountflags=0xc0ed0000, mountdata=<none>]
> 243: libmount:   UPDATE: [0x1790220]: /etc/mtab: update tab
> 243: libmount:   UPDATE: ------ fs: 0x17904f0
> source: tmpfs
> target: /run
> fstype: tmpfs
> optstr: rw
> VFS-optstr: rw
> 243: libmount:    LOCKS: [0x178f2c0]: alloc: default linkfile=/etc/mtab~.243, lockfile=/etc/mtab~
> 243: libmount:    LOCKS: [0x178f2c0]: signals: BLOCKED
> 243: libmount:   UPDATE: [0x1790220]: /etc/mtab: add entry
> 243: libmount:    LOCKS: [0x178f2c0]: /etc/mtab~: (243) successfully locked
> 243: libmount:      TAB: [0x1790030]: alloc
> 243: libmount:      TAB: [0x1790030]: /etc/mtab: start parsing (0 entries)
> 243: libmount:      TAB: [0x1790030]: add entry: /dev/sda3 /
> 243: libmount:      TAB: [0x1790030]: add entry: proc /proc
> 243: libmount:      TAB: [0x1790030]: add entry: sysfs /sys
> 243: libmount:      TAB: [0x1790030]: /etc/mtab: stop parsing (3 entries)
> 243: libmount:      TAB: [0x1790030]: add entry: tmpfs /run
> 243: libmount:   UPDATE: [0x1790220]: /etc/mtab: updating
> 243: libmount:    LOCKS: [0x178f2c0]: (243) unlocking
> 243: libmount:    LOCKS: [0x178f2c0]: unlink /etc/mtab~
> 243: libmount:    LOCKS: [0x178f2c0]: restoring sigmask
> 243: libmount:      TAB: [0x1790030]: reset
> 243: libmount:      TAB: [0x1790030]: free
> 243: libmount:   UPDATE: [0x1790220]: /etc/mtab: update tab: done [rc=0]
> 243: libmount:    LOCKS: [0x178f2c0]: free
> 243: libmount:      CXT: [0x178f060]: <---- reset [status=1] ---->
> 243: libmount:      TAB: [0x178f200]: reset
> 243: libmount:      TAB: [0x178f200]: free
> 243: libmount:    CACHE: [0x1790480]: free
> 243: libmount:   UPDATE: [0x1790220]: free
> 243: libmount:      CXT: [0x178f060]: <---- free


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: mount -f regression in v2.21's new-mount
  2012-03-08  9:23     ` Karel Zak
@ 2012-03-08 20:25       ` Matt Burgess
  2012-03-09 10:53         ` Karel Zak
  0 siblings, 1 reply; 13+ messages in thread
From: Matt Burgess @ 2012-03-08 20:25 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]

On Thu, 2012-03-08 at 10:23 +0100, Karel Zak wrote:
> On Wed, Mar 07, 2012 at 10:10:01PM +0000, Matt Burgess wrote:
> > On Wed, 2012-03-07 at 08:49 +0100, Karel Zak wrote:
> > 
> > >  Try to modify your init scripts:
> > > 
> > >     LIBMOUNT_DEBUG=0xffff mount -f /run 2> /root/mount-run.debug
> > > 
> > >  we will see more details in the log.
> > 
> > Thanks, Karel.  Debug log attached.
> 
> .. but it seems like debug output from the situation when mount(2)
> was not called. I don't see any bug here.

Right you are.  My diagnosis was a bit off the other night, but now I've
got a nice simple reproducer for you:

Given the following entry in fstab:

tmpfs          /tmp/run     tmpfs    defaults            0     0

run the following with libmount-enabled mount:

mkdir /tmp/run
mount -n /tmp/run
mount -f /tmp/run
mount -a

It's actually the call to 'mount -a' that causes the overlay of an empty
tmpfs on top of the existing /run mount.

I've attached LIBMOUNT_DEBUG output from the 'mount -a' call that our
bootscript does.  Note how mount correctly detects that /proc, /sys
and /dev are already mounted (although the stderr messages stating as
much are also new as of this version of mount).  It doesn't detect
that /dev/pts is already mounted, but that doesn't appear to impact
anything.  It also doesn't detect that /run is also already mounted,
hence the issue I'm currently seeing.

I can workaround the new stderr messages and the tmpfs being overwritten
by adding 'noauto' to the relevant lines in /etc/fstab, but should this
be required?

Thanks,

Matt.

[-- Attachment #2: mount-all.debug --]
[-- Type: text/plain, Size: 18085 bytes --]

239: libmount:      CXT: [0x184f060]: ----> allocate 
239: libmount:    UTILS: mtab: /etc/mtab
239: libmount:      CXT: [0x184f060]: <---- reset [status=0] ---->
239: libmount:      TAB: [0x184f180]: alloc
239: libmount:      TAB: [0x184f180]: /etc/fstab: start parsing (0 entries)
239: libmount:      TAB: [0x184f180]: add entry: /dev/sda3 /
239: libmount:      TAB: [0x184f180]: add entry: /dev/sda5 swap
239: libmount:      TAB: [0x184f180]: add entry: proc /proc
239: libmount:      TAB: [0x184f180]: add entry: sysfs /sys
239: libmount:      TAB: [0x184f180]: add entry: devpts /dev/pts
239: libmount:      TAB: [0x184f180]: add entry: tmpfs /run
239: libmount:      TAB: [0x184f180]: add entry: devtmpfs /dev
239: libmount:      TAB: [0x184f180]: /etc/fstab: stop parsing (7 entries)
239: libmount:    CACHE: [0x1850400]: alloc
239: libmount:      CXT: [0x184f060]: next-mount: trying /
239: libmount:      CXT: [0x184f060]: next-mount: not-match [fstype: ext3, t-pattern: (null), options: defaults, O-pattern: no_netdev]
239: libmount:      CXT: [0x184f060]: <---- reset [status=0] ---->
239: libmount:      CXT: [0x184f060]: next-mount: trying swap
239: libmount:      CXT: [0x184f060]: next-mount: not-match [fstype: swap, t-pattern: (null), options: pri=1, O-pattern: no_netdev]
239: libmount:      CXT: [0x184f060]: <---- reset [status=0] ---->
239: libmount:      CXT: [0x184f060]: next-mount: trying /proc
239: libmount:      TAB: [0x1850390]: alloc
239: libmount:    UTILS: mtab: /etc/mtab
239: libmount:      TAB: [0x1850390]: force /etc/mtab usage
239: libmount:      TAB: [0x1850390]: /etc/mtab: start parsing (0 entries)
239: libmount:      TAB: [0x1850390]: add entry: /dev/sda3 /
239: libmount:      TAB: [0x1850390]: add entry: proc /proc
239: libmount:      TAB: [0x1850390]: add entry: sysfs /sys
239: libmount:      TAB: [0x1850390]: add entry: tmpfs /run
239: libmount:      TAB: [0x1850390]: add entry: devtmpfs /dev
239: libmount:      TAB: [0x1850390]: /etc/mtab: stop parsing (5 entries)
239: libmount:      TAB: lookup fs-root for proc
239: libmount:      TAB: FS root result: /
239: libmount:      CXT: [0x184f060]: enabling flag 8000
239: libmount:      CXT: [0x184f060]: mount: preparing
239: libmount:      CXT: [0x184f060]: use default optmode
239: libmount:      CXT: [0x184f060]: OPTSMODE: ignore=0, append=0, prepend=1, replace=0, force=0, fstab=1, mtab=1
239: libmount:      CXT: [0x184f060]: fstab not required -- skip
239: libmount:      CXT: [0x184f060]: merging mount flags
239: libmount:      CXT: [0x184f060]: final flags: VFS=0000000e user=00000000
239: libmount:      CXT: [0x184f060]: mount: evaluating permissions
239: libmount:      CXT: [0x184f060]: mount: fixing optstr
239: libmount:      CXT: applying 0x00000014 flags to 'nosuid,noexec,nodev'
239: libmount:      CXT: new optstr 'rw,nosuid,noexec,nodev'
239: libmount:      CXT: applying 0x00000000 flags to '(null)'
239: libmount:      CXT: new optstr '(null)'
239: libmount:      CXT: [0x184f060]: fixed options [rc=0]: vfs: 'rw,nosuid,noexec,nodev' fs: '(null)' user: '(null)', optstr: 'rw,nosuid,noexec,nodev'
239: libmount:      CXT: [0x184f060]: preparing source path
239: libmount:      CXT: [0x184f060]: srcpath 'proc'
239: libmount:      CXT: [0x184f060]: PROPAGATION/pseudo FS source: proc
239: libmount:      CXT: [0x184f060]: preparing target path
239: libmount:    CACHE: [0x1850400]: add entry [ 1] (path): /proc: /proc
239: libmount:      CXT: [0x184f060]: final target '/proc'
239: libmount:      CXT: [0x184f060]: FS type: proc
239: libmount:      CXT: [0x184f060]: /sbin/mount.proc          ... not found
239: libmount:      CXT: [0x184f060]: /sbin/fs.d/mount.proc     ... not found
239: libmount:      CXT: [0x184f060]: /sbin/fs/mount.proc       ... not found
239: libmount:      CXT: [0x184f060]: prepare update
239: libmount:   UPDATE: [0x1850000]: allocate
239: libmount:   UPDATE: [0x1850000]: resetting FS [fs=0x0x184f8f0, target=(null), flags=0x0000000e]
239: libmount:   UPDATE: [0x1850000]: FS template:
239: libmount:   UPDATE: ------ fs: 0x184f8f0
source: proc
target: /proc
fstype: proc
optstr: rw,nosuid,noexec,nodev
VFS-optstr: rw,nosuid,noexec,nodev
239: libmount:   UPDATE: [0x1850000]: ready
239: libmount:      CXT: [0x184f060]: mount: do mount
239: libmount:      CXT: [0x184f060]: mount(2) [source=proc, target=/proc, type=proc,  mountflags=0xc0ed000e, mountdata=<none>]
239: libmount:      CXT: [0x184f060]: mount(2) failed [errno=16 Device or resource busy]
mount: proc is already mounted or /proc busy
       proc is already mounted on /proc
239: libmount:      CXT: [0x184f060]: <---- reset [status=0] ---->
239: libmount:      CXT: [0x184f060]: next-mount: trying /sys
239: libmount:      TAB: lookup fs-root for sysfs
239: libmount:      TAB: FS root result: /
239: libmount:      CXT: [0x184f060]: enabling flag 8000
239: libmount:      CXT: [0x184f060]: mount: preparing
239: libmount:      CXT: [0x184f060]: OPTSMODE: ignore=0, append=0, prepend=1, replace=0, force=0, fstab=1, mtab=1
239: libmount:      CXT: [0x184f060]: fstab not required -- skip
239: libmount:      CXT: [0x184f060]: merging mount flags
239: libmount:      CXT: [0x184f060]: final flags: VFS=0000000e user=00000000
239: libmount:      CXT: [0x184f060]: mount: evaluating permissions
239: libmount:      CXT: [0x184f060]: mount: fixing optstr
239: libmount:      CXT: applying 0x00000014 flags to 'nosuid,noexec,nodev'
239: libmount:      CXT: new optstr 'rw,nosuid,noexec,nodev'
239: libmount:      CXT: applying 0x00000000 flags to '(null)'
239: libmount:      CXT: new optstr '(null)'
239: libmount:      CXT: [0x184f060]: fixed options [rc=0]: vfs: 'rw,nosuid,noexec,nodev' fs: '(null)' user: '(null)', optstr: 'rw,nosuid,noexec,nodev'
239: libmount:      CXT: [0x184f060]: preparing source path
239: libmount:      CXT: [0x184f060]: srcpath 'sysfs'
239: libmount:      CXT: [0x184f060]: PROPAGATION/pseudo FS source: sysfs
239: libmount:      CXT: [0x184f060]: preparing target path
239: libmount:    CACHE: [0x1850400]: add entry [ 2] (path): /sys: /sys
239: libmount:      CXT: [0x184f060]: final target '/sys'
239: libmount:      CXT: [0x184f060]: FS type: sysfs
239: libmount:      CXT: [0x184f060]: /sbin/mount.sysfs         ... not found
239: libmount:      CXT: [0x184f060]: /sbin/fs.d/mount.sysfs    ... not found
239: libmount:      CXT: [0x184f060]: /sbin/fs/mount.sysfs      ... not found
239: libmount:      CXT: [0x184f060]: prepare update
239: libmount:   UPDATE: [0x1850000]: resetting FS [fs=0x0x184fb70, target=(null), flags=0x0000000e]
239: libmount:   UPDATE: [0x1850000]: FS template:
239: libmount:   UPDATE: ------ fs: 0x184fb70
source: sysfs
target: /sys
fstype: sysfs
optstr: rw,nosuid,noexec,nodev
VFS-optstr: rw,nosuid,noexec,nodev
239: libmount:   UPDATE: [0x1850000]: ready
239: libmount:      CXT: [0x184f060]: mount: do mount
239: libmount:      CXT: [0x184f060]: mount(2) [source=sysfs, target=/sys, type=sysfs,  mountflags=0xc0ed000e, mountdata=<none>]
239: libmount:      CXT: [0x184f060]: mount(2) failed [errno=16 Device or resource busy]
mount: sysfs is already mounted or /sys busy
       sysfs is already mounted on /sys
239: libmount:      CXT: [0x184f060]: <---- reset [status=0] ---->
239: libmount:      CXT: [0x184f060]: next-mount: trying /dev/pts
239: libmount:      TAB: lookup fs-root for devpts
239: libmount:      TAB: FS root result: /
239: libmount:      CXT: [0x184f060]: enabling flag 8000
239: libmount:      CXT: [0x184f060]: mount: preparing
239: libmount:      CXT: [0x184f060]: OPTSMODE: ignore=0, append=0, prepend=1, replace=0, force=0, fstab=1, mtab=1
239: libmount:      CXT: [0x184f060]: fstab not required -- skip
239: libmount:      CXT: [0x184f060]: merging mount flags
239: libmount:      CXT: [0x184f060]: final flags: VFS=00000000 user=00000000
239: libmount:      CXT: [0x184f060]: mount: evaluating permissions
239: libmount:      CXT: [0x184f060]: mount: fixing optstr
239: libmount:      CXT: applying 0x00000000 flags to '(null)'
239: libmount:      CXT: new optstr 'rw'
239: libmount:      CXT: applying 0x00000000 flags to '(null)'
239: libmount:      CXT: new optstr '(null)'
239: libmount:      CXT: fixing gid
239: libmount:      CXT: [0x184f060]: fixed options [rc=0]: vfs: 'rw' fs: 'gid=4,mode=620' user: '(null)', optstr: 'rw,gid=4,mode=620'
239: libmount:      CXT: [0x184f060]: preparing source path
239: libmount:      CXT: [0x184f060]: srcpath 'devpts'
239: libmount:      CXT: [0x184f060]: PROPAGATION/pseudo FS source: devpts
239: libmount:      CXT: [0x184f060]: preparing target path
239: libmount:    CACHE: [0x1850400]: add entry [ 3] (path): /dev/pts: /dev/pts
239: libmount:      CXT: [0x184f060]: final target '/dev/pts'
239: libmount:      CXT: [0x184f060]: FS type: devpts
239: libmount:      CXT: [0x184f060]: /sbin/mount.devpts        ... not found
239: libmount:      CXT: [0x184f060]: /sbin/fs.d/mount.devpts   ... not found
239: libmount:      CXT: [0x184f060]: /sbin/fs/mount.devpts     ... not found
239: libmount:      CXT: [0x184f060]: prepare update
239: libmount:   UPDATE: [0x1850000]: resetting FS [fs=0x0x184fdf0, target=(null), flags=0x00000000]
239: libmount:   UPDATE: [0x1850000]: FS template:
239: libmount:   UPDATE: ------ fs: 0x184fdf0
source: devpts
target: /dev/pts
fstype: devpts
optstr: rw,gid=4,mode=620
VFS-optstr: rw
FS-opstr: gid=4,mode=620
239: libmount:   UPDATE: [0x1850000]: ready
239: libmount:      CXT: [0x184f060]: mount: do mount
239: libmount:      CXT: [0x184f060]: mount(2) [source=devpts, target=/dev/pts, type=devpts,  mountflags=0xc0ed0000, mountdata=yes]
239: libmount:      CXT: [0x184f060]: mount(2) success
239: libmount:   UPDATE: [0x1850000]: /etc/mtab: update tab
239: libmount:   UPDATE: ------ fs: 0x184f1b0
source: devpts
target: /dev/pts
fstype: devpts
optstr: rw,gid=4,mode=620
VFS-optstr: rw
FS-opstr: gid=4,mode=620
239: libmount:    LOCKS: [0x1851c00]: alloc: default linkfile=/etc/mtab~.239, lockfile=/etc/mtab~
239: libmount:    LOCKS: [0x1851c00]: signals: BLOCKED
239: libmount:   UPDATE: [0x1850000]: /etc/mtab: add entry
239: libmount:    LOCKS: [0x1851c00]: /etc/mtab~: (239) successfully locked
239: libmount:      TAB: [0x18501c0]: alloc
239: libmount:      TAB: [0x18501c0]: /etc/mtab: start parsing (0 entries)
239: libmount:      TAB: [0x18501c0]: add entry: /dev/sda3 /
239: libmount:      TAB: [0x18501c0]: add entry: proc /proc
239: libmount:      TAB: [0x18501c0]: add entry: sysfs /sys
239: libmount:      TAB: [0x18501c0]: add entry: tmpfs /run
239: libmount:      TAB: [0x18501c0]: add entry: devtmpfs /dev
239: libmount:      TAB: [0x18501c0]: /etc/mtab: stop parsing (5 entries)
239: libmount:      TAB: [0x18501c0]: add entry: devpts /dev/pts
239: libmount:   UPDATE: [0x1850000]: /etc/mtab: updating
239: libmount:    LOCKS: [0x1851c00]: (239) unlocking
239: libmount:    LOCKS: [0x1851c00]: unlink /etc/mtab~
239: libmount:    LOCKS: [0x1851c00]: restoring sigmask
239: libmount:      TAB: [0x18501c0]: reset
239: libmount:      TAB: [0x18501c0]: free
239: libmount:   UPDATE: [0x1850000]: /etc/mtab: update tab: done [rc=0]
239: libmount:    LOCKS: [0x1851c00]: free
239: libmount:      CXT: [0x184f060]: <---- reset [status=1] ---->
239: libmount:      CXT: [0x184f060]: next-mount: trying /run
239: libmount:      TAB: lookup fs-root for tmpfs
239: libmount:      TAB: FS root result: /
239: libmount:      CXT: [0x184f060]: enabling flag 8000
239: libmount:      CXT: [0x184f060]: mount: preparing
239: libmount:      CXT: [0x184f060]: OPTSMODE: ignore=0, append=0, prepend=1, replace=0, force=0, fstab=1, mtab=1
239: libmount:      CXT: [0x184f060]: fstab not required -- skip
239: libmount:      CXT: [0x184f060]: merging mount flags
239: libmount:      CXT: [0x184f060]: final flags: VFS=00000000 user=00000000
239: libmount:      CXT: [0x184f060]: mount: evaluating permissions
239: libmount:      CXT: [0x184f060]: mount: fixing optstr
239: libmount:      CXT: applying 0x00000000 flags to '(null)'
239: libmount:      CXT: new optstr 'rw'
239: libmount:      CXT: applying 0x00000000 flags to '(null)'
239: libmount:      CXT: new optstr '(null)'
239: libmount:      CXT: [0x184f060]: fixed options [rc=0]: vfs: 'rw' fs: '(null)' user: '(null)', optstr: 'rw'
239: libmount:      CXT: [0x184f060]: preparing source path
239: libmount:      CXT: [0x184f060]: srcpath 'tmpfs'
239: libmount:      CXT: [0x184f060]: PROPAGATION/pseudo FS source: tmpfs
239: libmount:      CXT: [0x184f060]: preparing target path
239: libmount:    CACHE: [0x1850400]: add entry [ 4] (path): /run: /run
239: libmount:      CXT: [0x184f060]: final target '/run'
239: libmount:      CXT: [0x184f060]: FS type: tmpfs
239: libmount:      CXT: [0x184f060]: /sbin/mount.tmpfs         ... not found
239: libmount:      CXT: [0x184f060]: /sbin/fs.d/mount.tmpfs    ... not found
239: libmount:      CXT: [0x184f060]: /sbin/fs/mount.tmpfs      ... not found
239: libmount:      CXT: [0x184f060]: prepare update
239: libmount:   UPDATE: [0x1850000]: resetting FS [fs=0x0x1850070, target=(null), flags=0x00000000]
239: libmount:   UPDATE: [0x1850000]: FS template:
239: libmount:   UPDATE: ------ fs: 0x1850070
source: tmpfs
target: /run
fstype: tmpfs
optstr: rw
VFS-optstr: rw
239: libmount:   UPDATE: [0x1850000]: ready
239: libmount:      CXT: [0x184f060]: mount: do mount
239: libmount:      CXT: [0x184f060]: mount(2) [source=tmpfs, target=/run, type=tmpfs,  mountflags=0xc0ed0000, mountdata=<none>]
239: libmount:      CXT: [0x184f060]: mount(2) success
239: libmount:   UPDATE: [0x1850000]: /etc/mtab: update tab
239: libmount:   UPDATE: ------ fs: 0x184f1b0
source: tmpfs
target: /run
fstype: tmpfs
optstr: rw
VFS-optstr: rw
239: libmount:    LOCKS: [0x1851e90]: alloc: default linkfile=/etc/mtab~.239, lockfile=/etc/mtab~
239: libmount:    LOCKS: [0x1851e90]: signals: BLOCKED
239: libmount:   UPDATE: [0x1850000]: /etc/mtab: add entry
239: libmount:    LOCKS: [0x1851e90]: /etc/mtab~: (239) successfully locked
239: libmount:      TAB: [0x184ff40]: alloc
239: libmount:      TAB: [0x184ff40]: /etc/mtab: start parsing (0 entries)
239: libmount:      TAB: [0x184ff40]: add entry: /dev/sda3 /
239: libmount:      TAB: [0x184ff40]: add entry: proc /proc
239: libmount:      TAB: [0x184ff40]: add entry: sysfs /sys
239: libmount:      TAB: [0x184ff40]: add entry: tmpfs /run
239: libmount:      TAB: [0x184ff40]: add entry: devtmpfs /dev
239: libmount:      TAB: [0x184ff40]: add entry: devpts /dev/pts
239: libmount:      TAB: [0x184ff40]: /etc/mtab: stop parsing (6 entries)
239: libmount:      TAB: [0x184ff40]: add entry: tmpfs /run
239: libmount:   UPDATE: [0x1850000]: /etc/mtab: updating
239: libmount:    LOCKS: [0x1851e90]: (239) unlocking
239: libmount:    LOCKS: [0x1851e90]: unlink /etc/mtab~
239: libmount:    LOCKS: [0x1851e90]: restoring sigmask
239: libmount:      TAB: [0x184ff40]: reset
239: libmount:      TAB: [0x184ff40]: free
239: libmount:   UPDATE: [0x1850000]: /etc/mtab: update tab: done [rc=0]
239: libmount:    LOCKS: [0x1851e90]: free
239: libmount:      CXT: [0x184f060]: <---- reset [status=1] ---->
239: libmount:      CXT: [0x184f060]: next-mount: trying /dev
239: libmount:      TAB: lookup fs-root for devtmpfs
239: libmount:      TAB: FS root result: /
239: libmount:      CXT: [0x184f060]: enabling flag 8000
239: libmount:      CXT: [0x184f060]: mount: preparing
239: libmount:      CXT: [0x184f060]: OPTSMODE: ignore=0, append=0, prepend=1, replace=0, force=0, fstab=1, mtab=1
239: libmount:      CXT: [0x184f060]: fstab not required -- skip
239: libmount:      CXT: [0x184f060]: merging mount flags
239: libmount:      CXT: [0x184f060]: final flags: VFS=00000002 user=00000000
239: libmount:      CXT: [0x184f060]: mount: evaluating permissions
239: libmount:      CXT: [0x184f060]: mount: fixing optstr
239: libmount:      CXT: applying 0x00000002 flags to 'nosuid'
239: libmount:      CXT: new optstr 'rw,nosuid'
239: libmount:      CXT: applying 0x00000000 flags to '(null)'
239: libmount:      CXT: new optstr '(null)'
239: libmount:      CXT: [0x184f060]: fixed options [rc=0]: vfs: 'rw,nosuid' fs: 'mode=0755' user: '(null)', optstr: 'rw,nosuid,mode=0755'
239: libmount:      CXT: [0x184f060]: preparing source path
239: libmount:      CXT: [0x184f060]: srcpath 'devtmpfs'
239: libmount:      CXT: [0x184f060]: PROPAGATION/pseudo FS source: devtmpfs
239: libmount:      CXT: [0x184f060]: preparing target path
239: libmount:    CACHE: [0x1850400]: add entry [ 5] (path): /dev: /dev
239: libmount:      CXT: [0x184f060]: final target '/dev'
239: libmount:      CXT: [0x184f060]: FS type: devtmpfs
239: libmount:      CXT: [0x184f060]: /sbin/mount.devtmpfs      ... not found
239: libmount:      CXT: [0x184f060]: /sbin/fs.d/mount.devtmpfs ... not found
239: libmount:      CXT: [0x184f060]: /sbin/fs/mount.devtmpfs   ... not found
239: libmount:      CXT: [0x184f060]: prepare update
239: libmount:   UPDATE: [0x1850000]: resetting FS [fs=0x0x18502d0, target=(null), flags=0x00000002]
239: libmount:   UPDATE: [0x1850000]: FS template:
239: libmount:   UPDATE: ------ fs: 0x18502d0
source: devtmpfs
target: /dev
fstype: devtmpfs
optstr: rw,nosuid,mode=0755
VFS-optstr: rw,nosuid
FS-opstr: mode=0755
239: libmount:   UPDATE: [0x1850000]: ready
239: libmount:      CXT: [0x184f060]: mount: do mount
239: libmount:      CXT: [0x184f060]: mount(2) [source=devtmpfs, target=/dev, type=devtmpfs,  mountflags=0xc0ed0002, mountdata=yes]
239: libmount:      CXT: [0x184f060]: mount(2) failed [errno=16 Device or resource busy]
mount: devtmpfs is already mounted or /dev busy
       devtmpfs is already mounted on /dev
239: libmount:      CXT: [0x184f060]: <---- reset [status=0] ---->
239: libmount:      CXT: [0x184f060]: <---- reset [status=0] ---->
239: libmount:      TAB: [0x1850390]: reset
239: libmount:      TAB: [0x1850390]: free
239: libmount:      TAB: [0x184f180]: reset
239: libmount:      TAB: [0x184f180]: free
239: libmount:    CACHE: [0x1850400]: free
239: libmount:   UPDATE: [0x1850000]: free
239: libmount:      CXT: [0x184f060]: <---- free

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: mount -f regression in v2.21's new-mount
  2012-03-08 20:25       ` Matt Burgess
@ 2012-03-09 10:53         ` Karel Zak
  2012-03-09 11:30           ` Matthew Burgess
  0 siblings, 1 reply; 13+ messages in thread
From: Karel Zak @ 2012-03-09 10:53 UTC (permalink / raw)
  To: Matt Burgess; +Cc: util-linux

On Thu, Mar 08, 2012 at 08:25:00PM +0000, Matt Burgess wrote:
> I've attached LIBMOUNT_DEBUG output from the 'mount -a' call that our
> bootscript does.  Note how mount correctly detects that /proc, /sys

 No, it calls mount(2) syscall for /proc. The problem is that the
 detection code expects /proc/self/mountinfo (used on systems with
 mtab -> /proc/mounts symlink), but your system uses regular mtab.

 I'll fix it. Thanks.

    Karel

> 239: libmount:      CXT: [0x184f060]: mount(2) [source=proc, target=/proc, type=proc,  mountflags=0xc0ed000e, mountdata=<none>]
> 239: libmount:      CXT: [0x184f060]: mount(2) failed [errno=16 Device or resource busy]
> mount: proc is already mounted or /proc busy
>        proc is already mounted on /proc


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: mount -f regression in v2.21's new-mount
  2012-03-09 10:53         ` Karel Zak
@ 2012-03-09 11:30           ` Matthew Burgess
  2012-03-09 12:29             ` Karel Zak
  2012-03-09 14:22             ` Petr Uzel
  0 siblings, 2 replies; 13+ messages in thread
From: Matthew Burgess @ 2012-03-09 11:30 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

On Fri, 9 Mar 2012 11:53:04 +0100, Karel Zak <kzak@redhat.com> wrote:
> On Thu, Mar 08, 2012 at 08:25:00PM +0000, Matt Burgess wrote:
>> I've attached LIBMOUNT_DEBUG output from the 'mount -a' call that our
>> bootscript does.  Note how mount correctly detects that /proc, /sys
> 
>  No, it calls mount(2) syscall for /proc. The problem is that the
>  detection code expects /proc/self/mountinfo (used on systems with
>  mtab -> /proc/mounts symlink), but your system uses regular mtab.
> 
>  I'll fix it. Thanks.

Thanks!  Is there a consensus opinion on whether users should be
using a regular mtab or a symlink to /proc/self/mountinfo?

Regards,

Matt.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: mount -f regression in v2.21's new-mount
  2012-03-09 11:30           ` Matthew Burgess
@ 2012-03-09 12:29             ` Karel Zak
  2012-03-11 19:06               ` Matt Burgess
  2012-03-09 14:22             ` Petr Uzel
  1 sibling, 1 reply; 13+ messages in thread
From: Karel Zak @ 2012-03-09 12:29 UTC (permalink / raw)
  To: Matthew Burgess; +Cc: util-linux

On Fri, Mar 09, 2012 at 04:30:02AM -0700, Matthew Burgess wrote:
> On Fri, 9 Mar 2012 11:53:04 +0100, Karel Zak <kzak@redhat.com> wrote:
> > On Thu, Mar 08, 2012 at 08:25:00PM +0000, Matt Burgess wrote:
> >> I've attached LIBMOUNT_DEBUG output from the 'mount -a' call that our
> >> bootscript does.  Note how mount correctly detects that /proc, /sys
> > 
> >  No, it calls mount(2) syscall for /proc. The problem is that the
> >  detection code expects /proc/self/mountinfo (used on systems with
> >  mtab -> /proc/mounts symlink), but your system uses regular mtab.
> > 
> >  I'll fix it. Thanks.

 Fixed, try git pull.

> Thanks!  Is there a consensus opinion on whether users should be
> using a regular mtab or a symlink to /proc/self/mountinfo?

 - disadvantage is that some userspace utils (e.g. df(1) are not able
   to de-duplicate list of mounted filesystem (bind mounts))

 + advantage is that there is only one list of mounted filesystems
   with always valid mount options (on systems with mtab is not problem
   to have 'rw' in mtab for read-only NFS, etc.), no problems with
   namespaces, not writable files in /etc, no mtab lock, etc.

 The symlink is required for systemd.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: mount -f regression in v2.21's new-mount
  2012-03-09 11:30           ` Matthew Burgess
  2012-03-09 12:29             ` Karel Zak
@ 2012-03-09 14:22             ` Petr Uzel
  1 sibling, 0 replies; 13+ messages in thread
From: Petr Uzel @ 2012-03-09 14:22 UTC (permalink / raw)
  To: util-linux

[-- Attachment #1: Type: text/plain, Size: 460 bytes --]

On Fri, Mar 09, 2012 at 04:30:02AM -0700, Matthew Burgess wrote:
> 
> Thanks!  Is there a consensus opinion on whether users should be
> using a regular mtab or a symlink to /proc/self/mountinfo?

I've seen a couple of quite nasty bugs with regular mtab (caused by
the fact that /etc/mtab got out of sync with /proc/self/mounts) so
I'd recommend to avoid regular /etc/mtab wherever possible.

My 2c,

Petr

--
Petr Uzel
IRC: ptr_uzl @ freenode

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: mount -f regression in v2.21's new-mount
  2012-03-09 12:29             ` Karel Zak
@ 2012-03-11 19:06               ` Matt Burgess
  2012-03-12 14:09                 ` Voelker, Bernhard
  2012-03-12 14:32                 ` Karel Zak
  0 siblings, 2 replies; 13+ messages in thread
From: Matt Burgess @ 2012-03-11 19:06 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

On Fri, 2012-03-09 at 13:29 +0100, Karel Zak wrote:
> On Fri, Mar 09, 2012 at 04:30:02AM -0700, Matthew Burgess wrote:
> > On Fri, 9 Mar 2012 11:53:04 +0100, Karel Zak <kzak@redhat.com> wrote:
> > > On Thu, Mar 08, 2012 at 08:25:00PM +0000, Matt Burgess wrote:
> > >> I've attached LIBMOUNT_DEBUG output from the 'mount -a' call that our
> > >> bootscript does.  Note how mount correctly detects that /proc, /sys
> > > 
> > >  No, it calls mount(2) syscall for /proc. The problem is that the
> > >  detection code expects /proc/self/mountinfo (used on systems with
> > >  mtab -> /proc/mounts symlink), but your system uses regular mtab.
> > > 
> > >  I'll fix it. Thanks.
> 
>  Fixed, try git pull.

Thanks, that's sorted it!
> 
> > Thanks!  Is there a consensus opinion on whether users should be
> > using a regular mtab or a symlink to /proc/self/mountinfo?
> 
>  - disadvantage is that some userspace utils (e.g. df(1) are not able
>    to de-duplicate list of mounted filesystem (bind mounts))
> 
>  + advantage is that there is only one list of mounted filesystems
>    with always valid mount options (on systems with mtab is not problem
>    to have 'rw' in mtab for read-only NFS, etc.), no problems with
>    namespaces, not writable files in /etc, no mtab lock, etc.
> 
>  The symlink is required for systemd.

Thanks for the info.  Looks like there are more advantages than
disadvantages.  Without wishing to stray too far off-topic, do you know
if the Coreutils folks are aware of/looking at the 'df' issue?

Matt.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: mount -f regression in v2.21's new-mount
  2012-03-11 19:06               ` Matt Burgess
@ 2012-03-12 14:09                 ` Voelker, Bernhard
  2012-03-12 14:32                 ` Karel Zak
  1 sibling, 0 replies; 13+ messages in thread
From: Voelker, Bernhard @ 2012-03-12 14:09 UTC (permalink / raw)
  To: Matt Burgess, Karel Zak; +Cc: util-linux

Matt Burgess wrote:
> Karel Zak wrote:
> > Matt Burgess wrote:
> > > Thanks!  Is there a consensus opinion on whether users should be
> > > using a regular mtab or a symlink to /proc/self/mountinfo?
> >=20
> >  - disadvantage is that some userspace utils (e.g. df(1) are not able
> >    to de-duplicate list of mounted filesystem (bind mounts))
> >=20
> >  + advantage is that there is only one list of mounted filesystems
> >    with always valid mount options (on systems with mtab is not problem
> >    to have 'rw' in mtab for read-only NFS, etc.), no problems with
> >    namespaces, not writable files in /etc, no mtab lock, etc.
> >=20
> >  The symlink is required for systemd.
>=20
> Thanks for the info.  Looks like there are more advantages than
> disadvantages.  Without wishing to stray too far off-topic, do you know
> if the Coreutils folks are aware of/looking at the 'df' issue?

It is:
http://lists.gnu.org/archive/html/bug-coreutils/2011-12/msg00153.html=20
(along with the point that the long uuid names of the devices
are annoying).

Have a nice day,
Berny=

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: mount -f regression in v2.21's new-mount
  2012-03-11 19:06               ` Matt Burgess
  2012-03-12 14:09                 ` Voelker, Bernhard
@ 2012-03-12 14:32                 ` Karel Zak
  2012-03-12 17:17                   ` Pádraig Brady
  1 sibling, 1 reply; 13+ messages in thread
From: Karel Zak @ 2012-03-12 14:32 UTC (permalink / raw)
  To: Matt Burgess; +Cc: util-linux

On Sun, Mar 11, 2012 at 07:06:26PM +0000, Matt Burgess wrote:
> On Fri, 2012-03-09 at 13:29 +0100, Karel Zak wrote:
> > On Fri, Mar 09, 2012 at 04:30:02AM -0700, Matthew Burgess wrote:
> > > On Fri, 9 Mar 2012 11:53:04 +0100, Karel Zak <kzak@redhat.com> wrote:
> > > > On Thu, Mar 08, 2012 at 08:25:00PM +0000, Matt Burgess wrote:
> > > >> I've attached LIBMOUNT_DEBUG output from the 'mount -a' call that our
> > > >> bootscript does.  Note how mount correctly detects that /proc, /sys
> > > > 
> > > >  No, it calls mount(2) syscall for /proc. The problem is that the
> > > >  detection code expects /proc/self/mountinfo (used on systems with
> > > >  mtab -> /proc/mounts symlink), but your system uses regular mtab.
> > > > 
> > > >  I'll fix it. Thanks.
> > 
> >  Fixed, try git pull.
> 
> Thanks, that's sorted it!
> > 
> > > Thanks!  Is there a consensus opinion on whether users should be
> > > using a regular mtab or a symlink to /proc/self/mountinfo?
> > 
> >  - disadvantage is that some userspace utils (e.g. df(1) are not able
> >    to de-duplicate list of mounted filesystem (bind mounts))
> > 
> >  + advantage is that there is only one list of mounted filesystems
> >    with always valid mount options (on systems with mtab is not problem
> >    to have 'rw' in mtab for read-only NFS, etc.), no problems with
> >    namespaces, not writable files in /etc, no mtab lock, etc.
> > 
> >  The symlink is required for systemd.
> 
> Thanks for the info.  Looks like there are more advantages than
> disadvantages.  Without wishing to stray too far off-topic, do you know
> if the Coreutils folks are aware of/looking at the 'df' issue?

 My wish:

    - add FS de-duplicate function to libmount 
    - add SIZE, USE, AVAILABLE, USE% columns to findmnt
    - add --df to findmnt
    - try to implement df(1) compatible output if findmnt argv[0] is
      df ;-)))


 Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: mount -f regression in v2.21's new-mount
  2012-03-12 14:32                 ` Karel Zak
@ 2012-03-12 17:17                   ` Pádraig Brady
  0 siblings, 0 replies; 13+ messages in thread
From: Pádraig Brady @ 2012-03-12 17:17 UTC (permalink / raw)
  To: Karel Zak; +Cc: Matt Burgess, util-linux

On 03/12/2012 02:32 PM, Karel Zak wrote:
> On Sun, Mar 11, 2012 at 07:06:26PM +0000, Matt Burgess wrote:
>> On Fri, 2012-03-09 at 13:29 +0100, Karel Zak wrote:
>>> On Fri, Mar 09, 2012 at 04:30:02AM -0700, Matthew Burgess wrote:
>>>> On Fri, 9 Mar 2012 11:53:04 +0100, Karel Zak <kzak@redhat.com> wrote:
>>>>> On Thu, Mar 08, 2012 at 08:25:00PM +0000, Matt Burgess wrote:
>>>>>> I've attached LIBMOUNT_DEBUG output from the 'mount -a' call that our
>>>>>> bootscript does.  Note how mount correctly detects that /proc, /sys
>>>>>
>>>>>  No, it calls mount(2) syscall for /proc. The problem is that the
>>>>>  detection code expects /proc/self/mountinfo (used on systems with
>>>>>  mtab -> /proc/mounts symlink), but your system uses regular mtab.
>>>>>
>>>>>  I'll fix it. Thanks.
>>>
>>>  Fixed, try git pull.
>>
>> Thanks, that's sorted it!
>>>
>>>> Thanks!  Is there a consensus opinion on whether users should be
>>>> using a regular mtab or a symlink to /proc/self/mountinfo?
>>>
>>>  - disadvantage is that some userspace utils (e.g. df(1) are not able
>>>    to de-duplicate list of mounted filesystem (bind mounts))
>>>
>>>  + advantage is that there is only one list of mounted filesystems
>>>    with always valid mount options (on systems with mtab is not problem
>>>    to have 'rw' in mtab for read-only NFS, etc.), no problems with
>>>    namespaces, not writable files in /etc, no mtab lock, etc.
>>>
>>>  The symlink is required for systemd.
>>
>> Thanks for the info.  Looks like there are more advantages than
>> disadvantages.  Without wishing to stray too far off-topic, do you know
>> if the Coreutils folks are aware of/looking at the 'df' issue?

Well we know about it.
I've not looked at it as I was holding out hope
that those that changed the interface might know
how to handle it, and propose a fix.

>  My wish:
> 
>     - add FS de-duplicate function to libmount 
>     - add SIZE, USE, AVAILABLE, USE% columns to findmnt
>     - add --df to findmnt
>     - try to implement df(1) compatible output if findmnt argv[0] is
>       df ;-)))

That sounds like a bit of an extreme solution,
which doesn't help any other processes that want
to query file systems like df does.
For example is `stat %m` handled OK these days?

Is there really no way to know if something is a bind mount?
For example they were handled fine with some heuristics
before this symlink was introduced:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=0380e4c9
Could we perhaps depend on the order of returned entries.

cheers,
Pádraig.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-03-12 17:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 22:43 mount -f regression in v2.21's new-mount Matt Burgess
2012-03-07  7:49 ` Karel Zak
2012-03-07 22:10   ` Matt Burgess
2012-03-08  9:23     ` Karel Zak
2012-03-08 20:25       ` Matt Burgess
2012-03-09 10:53         ` Karel Zak
2012-03-09 11:30           ` Matthew Burgess
2012-03-09 12:29             ` Karel Zak
2012-03-11 19:06               ` Matt Burgess
2012-03-12 14:09                 ` Voelker, Bernhard
2012-03-12 14:32                 ` Karel Zak
2012-03-12 17:17                   ` Pádraig Brady
2012-03-09 14:22             ` Petr Uzel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox