Re: request for patches: showing mount options

Miklos Szeredi
2007-07-28T05:37:09Z

> >> Some mount options are never passed to the kernel, and thus can't appear
> >> in /proc/mounts. Examples include user, users, and _netdev for NFS.
> >
> > These options control *who* may mount and *when* to mount. They are
> > not a property of the mount itself and are not added to /etc/mtab.
> >
> > There's a "user=ID" option that is added to /etc/mtab in case of user
> > mounts. This identifies the owner of the mount, so that it can be
> > unmounted by that user. There are patches in -mm that enable the
> > kernel to store this info.
> >
> > Do you have other examples in mind?
>
> [no]quota comes to mind;

These are passed to the kernel.

> also auto,

This controls when a filesystem is mounted, same category as '_netdev'

> [no]owner, [no]group,

These control who can mount the filesystem, same category as 'user' and 'users'

> quiet/loud,

I can't find these in the manual as universal options. Quiet is
defined for a couple of filesystems but with different meaning for
each of them.

> Aside: It's a confusing artifact of the mount CLI that these options
> control who/when but are passed to the mount command in the same way the
> other options are.

Yes, slightly. Actually most of these options are just ignored on the
command line. They only have an affect in /etc/fstab.

The right behavior of mount(8) would probably be to error out on these
options, since they make no sense on the command line. But this is
not a kernel issue.

Miklos