public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* Filesystem specific mount options mixed with auto fs type
@ 2013-10-10 14:21 Phillip Susi
  2013-10-10 17:03 ` Matthias Schniedermeyer
  0 siblings, 1 reply; 8+ messages in thread
From: Phillip Susi @ 2013-10-10 14:21 UTC (permalink / raw)
  To: util-linux

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I came across an old bug report where the user had set the utf8 mount
option in /etc/fstab on a floppy, presumably to apply to a fat
filesystem, but when a disk formatted with ext2 was used, the mount
failed sine ext2 doesn't support this option.

That got me wondering, how are you supposed to specify mount options
with the auto fs type?  Certainly you don't just have to limit the
options to ones that are universal to all filesystems?  But how to
specify that these options are for fs A, and these for fs B?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEbBAEBAgAGBQJSVrfPAAoJEJrBOlT6nu75SeEH+KPG9gTtbp7tkrbOtgKNRi7l
W3sGIRMBKh47Ddl9AaX1K3gANVedcAQ5chPtCH6ANGXung2RSOkUDFfeZQsWe59C
gyuhwUwxH6NHq/4k0NR4IS0pUjRtiM1uwLL9VyYiDHr+Nx/edoMPiHRlo4c/M8oA
iYm2EEbHG147tfoZQ0cSUurdF4Hnh+mnVgWMt6/jcaL7AQTcZwY72GIHIrUMq/r5
dkwMiXF46GUxUGa8ToDbZWETbuToFv+wlL0+K8JDZaUvuYjKzdhawuM6Jb73kCtJ
1whHnnCQnzHm08fhB38kTDuCMOSVICU0FqQjtYY8c9nLI6fLL/+r9g2ycN+sqA==
=/BVh
-----END PGP SIGNATURE-----

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

* Re: Filesystem specific mount options mixed with auto fs type
  2013-10-10 14:21 Filesystem specific mount options mixed with auto fs type Phillip Susi
@ 2013-10-10 17:03 ` Matthias Schniedermeyer
  2013-10-10 17:29   ` Phillip Susi
  0 siblings, 1 reply; 8+ messages in thread
From: Matthias Schniedermeyer @ 2013-10-10 17:03 UTC (permalink / raw)
  To: Phillip Susi; +Cc: util-linux

On 10.10.2013 10:21, Phillip Susi wrote:
> 
> I came across an old bug report where the user had set the utf8 mount
> option in /etc/fstab on a floppy, presumably to apply to a fat
> filesystem, but when a disk formatted with ext2 was used, the mount
> failed sine ext2 doesn't support this option.
> 
> That got me wondering, how are you supposed to specify mount options
> with the auto fs type?  Certainly you don't just have to limit the
> options to ones that are universal to all filesystems?  But how to
> specify that these options are for fs A, and these for fs B?

AFAIK "mount -s" is just for that case:

- man mount -
      -s Tolerate sloppy mount options rather than failing. This will 
ignore mount options not supported by a filesystem type. Not all 
filesystems support this option. This option exists for support of the 
Linux autofs-based automounter.
- man mount -




-- 

Matthias

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

* Re: Filesystem specific mount options mixed with auto fs type
  2013-10-10 17:03 ` Matthias Schniedermeyer
@ 2013-10-10 17:29   ` Phillip Susi
  2013-10-11  8:37     ` Karel Zak
  0 siblings, 1 reply; 8+ messages in thread
From: Phillip Susi @ 2013-10-10 17:29 UTC (permalink / raw)
  To: Matthias Schniedermeyer; +Cc: util-linux

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/10/2013 1:03 PM, Matthias Schniedermeyer wrote:
> AFAIK "mount -s" is just for that case:
> 
> - man mount - -s Tolerate sloppy mount options rather than failing.
> This will ignore mount options not supported by a filesystem type.
> Not all filesystems support this option. This option exists for
> support of the Linux autofs-based automounter. - man mount -

This doesn't seem to actually work.  Trying to mount an ext2 fs with
the utf8 option still fails with an unknown option error.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSVuPqAAoJEJrBOlT6nu75svUH/0zi7revng47Q7PUWkV7g1qq
nMqwYyRYlC2txaBoote53gKxGoRuppvp43f2IvrMgGNTpnwPgoJdGKHSPA/wW7b6
5jzLanmozlWBvmEOOZD9HLR1RYmb/sexQAaRL99zHy5q2Bk9L+81fDp0AsK8lnNl
rHn3CJ1iKGLTTcB0CSvjayrs7r1zdIRNF31NVgV83CN9LaMdrtYGuY8bLgi9+3RF
aedqpR9PZztXPhf3lQz1CR/EToJO6fDX2IxJ0KuThCtUvT1aq1r++eJTNjHgp2mm
iwGj/b4GeEMYKtyIdzp4RPOjLL4LvuhKL2SKw6TytDiOwfzBCp5WDIJod6KA1WA=
=XX4w
-----END PGP SIGNATURE-----

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

* Re: Filesystem specific mount options mixed with auto fs type
  2013-10-10 17:29   ` Phillip Susi
@ 2013-10-11  8:37     ` Karel Zak
  2013-10-11 13:45       ` Phillip Susi
  0 siblings, 1 reply; 8+ messages in thread
From: Karel Zak @ 2013-10-11  8:37 UTC (permalink / raw)
  To: Phillip Susi; +Cc: Matthias Schniedermeyer, util-linux

On Thu, Oct 10, 2013 at 01:29:14PM -0400, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 10/10/2013 1:03 PM, Matthias Schniedermeyer wrote:
> > AFAIK "mount -s" is just for that case:
> > 
> > - man mount - -s Tolerate sloppy mount options rather than failing.
> > This will ignore mount options not supported by a filesystem type.
> > Not all filesystems support this option. This option exists for
> > support of the Linux autofs-based automounter. - man mount -
> 
> This doesn't seem to actually work.  Trying to mount an ext2 fs with
> the utf8 option still fails with an unknown option error.

"sloppy" is userspace command line option and I guess it was introduced
for NFS (nfs4, nfs, ...) and if I good remember nothing else uses this
option.

There is also "silent" (MS_SILENT) kernel mount flag, but it's usually 
used to avoid unwanted printk() when superblok not found.

Notes:

 * the "auto" fs type is usually used with generic mount options or
   with no options at all ("default" options)

 * well designed filesystems allows to save the filesystem specific 
   options to the FS superblock by some tune util (e.g. tune2fs)

 * for removable media users usually use udisks based solutions

 * mount by FS identifier

        LABEL=FOO       /mnt/floppy     vfat    utf8
        LABEL=BAR       /mnt/floppy     ext2    default

    and then "mount LABEL= ... "
  

 * for example NFS has nfsmount.conf where you can specify additional
   options, but I don't think it's a good idea to introduce this for
   all filesystems


Maybe we can improve mount(8) to test all entries from /etc/fstab
with the same mountpoint (if you want to mount-by-mountpoint)
until the filesystem will be mounted successfully. But I have doubts
that we really need to resolve this very old disadvantage.

    Karel

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

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

* Re: Filesystem specific mount options mixed with auto fs type
  2013-10-11  8:37     ` Karel Zak
@ 2013-10-11 13:45       ` Phillip Susi
  2013-10-11 14:09         ` Karel Zak
  2013-10-11 17:17         ` Karel Zak
  0 siblings, 2 replies; 8+ messages in thread
From: Phillip Susi @ 2013-10-11 13:45 UTC (permalink / raw)
  To: Karel Zak; +Cc: Matthias Schniedermeyer, util-linux

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/11/2013 4:37 AM, Karel Zak wrote:
> * well designed filesystems allows to save the filesystem specific
>  options to the FS superblock by some tune util (e.g. tune2fs)

Unfortunately, fat isn't well designed.

> * for removable media users usually use udisks based solutions

That works as long as udisks picks the defaults they want, but then if
they want a non default mount option ( or location ), they have to
specify it in fstab.

> * mount by FS identifier
> 
> LABEL=FOO       /mnt/floppy     vfat    utf8 LABEL=BAR
> /mnt/floppy     ext2    default

That ties it to the specific volume.

> Maybe we can improve mount(8) to test all entries from /etc/fstab 
> with the same mountpoint (if you want to mount-by-mountpoint) until
> the filesystem will be mounted successfully. But I have doubts that
> we really need to resolve this very old disadvantage.

Maybe something like:

/dev/fd0 /mnt/floppy auto,vfat utf8
/dev/fd0 /mnt/floppy auto generic-options

The auto would trigger blkid to identify the filesystem, and then only
if it matches one of the additional listed filesystems would that line
be applied.

I suppose that would also require changing other utilities like udisks
to understand it?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSWADrAAoJEJrBOlT6nu75bRYIAKF5CFzLr8hChG6+VoFvWSMY
1O5W8unfYSL4JH86OVuj14w9LaWWxbYaIwzhbAXp5X9Y96ZLXPNxcHaytyoBSmYg
xfDNpgj/Nm6Y8Zg2LM+qwFi+oO4qOb8RetD0uxz3uVBzxVC/PoV4W3AwoCsK3bQ9
xGjxDpMSi9lq3jA/pa8TtJnkUC8cL8vX8AWrGcSd/bBtxVZjM/mpxn4UhoBLSfOE
ICGijygUP+NUbZ7yvBb5LE2B0nqaXlpg8qqrGENhJuUGchhyd45MASzOP+I1030H
AgpMKgfg85qVneRiKl+/PmKKhrefqBkBbrWhXzjCpMNJH7H/BdupOIS+0DfQ/MI=
=QAmw
-----END PGP SIGNATURE-----

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

* Re: Filesystem specific mount options mixed with auto fs type
  2013-10-11 13:45       ` Phillip Susi
@ 2013-10-11 14:09         ` Karel Zak
  2013-10-11 14:40           ` Phillip Susi
  2013-10-11 17:17         ` Karel Zak
  1 sibling, 1 reply; 8+ messages in thread
From: Karel Zak @ 2013-10-11 14:09 UTC (permalink / raw)
  To: Phillip Susi; +Cc: Matthias Schniedermeyer, util-linux

On Fri, Oct 11, 2013 at 09:45:15AM -0400, Phillip Susi wrote:
> > Maybe we can improve mount(8) to test all entries from /etc/fstab 
> > with the same mountpoint (if you want to mount-by-mountpoint) until
> > the filesystem will be mounted successfully. But I have doubts that
> > we really need to resolve this very old disadvantage.
> 
> Maybe something like:
> 
> /dev/fd0 /mnt/floppy auto,vfat utf8
                       ^^^^^^^^^
 This is unacceptable, fstab is de-facto standard. We have to be
 backwardly compatible.

> /dev/fd0 /mnt/floppy auto generic-options
> 
> The auto would trigger blkid to identify the filesystem, and then only
> if it matches one of the additional listed filesystems would that line
> be applied.
 
 I thought something like:

        /dev/fd0 /mnt/floppy    vfat    utf8
        /dev/fd0 /mnt/floppy    auto    default

 and then try in loop all the filesystem types for the mountpoint (or 
 make it smart and ask blkid for the type).

    Karel


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

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

* Re: Filesystem specific mount options mixed with auto fs type
  2013-10-11 14:09         ` Karel Zak
@ 2013-10-11 14:40           ` Phillip Susi
  0 siblings, 0 replies; 8+ messages in thread
From: Phillip Susi @ 2013-10-11 14:40 UTC (permalink / raw)
  To: Karel Zak; +Cc: Matthias Schniedermeyer, util-linux

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/11/2013 10:09 AM, Karel Zak wrote:
> I thought something like:
> 
> /dev/fd0 /mnt/floppy    vfat    utf8 /dev/fd0 /mnt/floppy    auto
> default
> 
> and then try in loop all the filesystem types for the mountpoint
> (or make it smart and ask blkid for the type).

What would this do to other utilities?  Would this confuse udisks or
systemd or upstart's mountall?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSWA35AAoJEJrBOlT6nu75d/cH/Rqe9m5Ttw1hdnG9+e636vkE
YNBxfBnJKV2Ob7YywnxZdIxO/fj5YCnydW+68YDR0+okJAO2p0PPPzyRhHJw+H5T
lohuBuRKfeRTuDwEKfAeIsAIOji9ed5BwHUOH2A+abd/fysiyG+ZTuet8vuXBv/Y
3Rzjh5jvkYBT+gwY9aiBoA69ChHsU9HKLQGJXd7S/UDmshqNYxhH7n3kDFiNxU3m
tzoQdSIDYRk4VTKrRp0X5kF6OtQnW7askF6RYWrMJnOYInGPFQ+WKVftx3sgw/OW
vNmKR1zrVBD+DpYSzzgG95SUQVlnoL4eZr7Ri20HQpT+bSj8opPd9IFffMX8hws=
=dA7m
-----END PGP SIGNATURE-----

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

* Re: Filesystem specific mount options mixed with auto fs type
  2013-10-11 13:45       ` Phillip Susi
  2013-10-11 14:09         ` Karel Zak
@ 2013-10-11 17:17         ` Karel Zak
  1 sibling, 0 replies; 8+ messages in thread
From: Karel Zak @ 2013-10-11 17:17 UTC (permalink / raw)
  To: Phillip Susi; +Cc: Matthias Schniedermeyer, util-linux

On Fri, Oct 11, 2013 at 09:45:15AM -0400, Phillip Susi wrote:
> Maybe something like:
> 
> /dev/fd0 /mnt/floppy auto,vfat utf8
                       ^^^^^^^^
 Note that I wasn't right in the previous email, the list of the
 fs-types in fstab is also supported by mount(8), but it's very rarely
 used (in last 10 years a remember only one report with this setup).
 It works like "-t fs1,fs2" on mount(8) command line.

 I have doubts that anything else than mount(8) support this syntax.

    Karel

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

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

end of thread, other threads:[~2013-10-11 17:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-10 14:21 Filesystem specific mount options mixed with auto fs type Phillip Susi
2013-10-10 17:03 ` Matthias Schniedermeyer
2013-10-10 17:29   ` Phillip Susi
2013-10-11  8:37     ` Karel Zak
2013-10-11 13:45       ` Phillip Susi
2013-10-11 14:09         ` Karel Zak
2013-10-11 14:40           ` Phillip Susi
2013-10-11 17:17         ` Karel Zak

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