[HEADS-UP] util-linux[-ng] and mtab

Karel Zak kzak at redhat.com
Thu Jan 20 08:55:07 UTC 2011


On Thu, Jan 20, 2011 at 02:08:50PM +0800, Ian Kent wrote:
> On Wed, 2011-01-19 at 18:35 +0100, Karel Zak wrote:
> > I have pushed new util-linux into rawhide. The project has been
> >  renamed from util-linux-ng back to util-linux.
> > 
> >  The util-linux v2.19-rc1 contains support for systems without
> >  /etc/mtab (the file is replaced with symlink to /proc/mounts). 
> >  This feature is enabled by default on Fedora (due to systemd).
> > 
> >  If your system depends on regular mtab then you can remove the
> >  symlink -- mount(8) still supports old mtab too.
> 
> Once again I say, what about mount entries that should not be reported
> against by utilities that look at the mount table?

 Ideally there is only one mount table -- in kernel. Every other mount
 table sucks, because:

    - kernel supports namespaces
    - everyone can call mount(2) syscall independently on mount(8)
    - exclusive write access to userspace mount table is performance
      problem (e.g. mtab lockig)
    - mtab mount options don't match with real kernel options
    - etc.

 So, our goal is to minimize number of situations where userspace
 mount options are required.
 
 For backward compatibility and for some special cases (e.g. uhelper=,
 or NFS) libmount maintains userspace mount options, but there is no
 reason to care about all options for all entries. 

 I hope that the user= option will be handled by kernel (by fsuid in
 /proc/mounts) one day.

 The another solution is to store more information to kernel, but this
 has to be individually handled by FS drivers, any generic solution 
 for userspace options in kernel is not planned.

> I can tell you from experience with old versions of AIX that without
> something in the mount table to allow utilities to ignore mount entries
  ^^^^^^^^^^
 What exactly? Special mount options, tags?

> when appropriate, as is done in Solaris, these utilities is just about
> unusable.

 findmnt(8) allows to browse mount tables (kernel, mtab, fstab).

 Now it supports select/ignore entries by FS type, mount options,
 mount point (target), spec (source). Suggestions and feature requests
 are welcomed.

 For example:

 $ findmnt | wc -l
 32

 $ findmnt -t noautofs | wc -l                                              
 27

    Karel

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


More information about the devel mailing list