* Per-filesystem default mount options
@ 2013-10-15 17:31 Aleksey Midenkov
2013-10-16 14:13 ` Aleksey Midenkov
0 siblings, 1 reply; 7+ messages in thread
From: Aleksey Midenkov @ 2013-10-15 17:31 UTC (permalink / raw)
To: util-linux
Are they possible for normal mount (not pmount)?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Per-filesystem default mount options
2013-10-15 17:31 Per-filesystem default mount options Aleksey Midenkov
@ 2013-10-16 14:13 ` Aleksey Midenkov
2013-10-18 8:34 ` Karel Zak
0 siblings, 1 reply; 7+ messages in thread
From: Aleksey Midenkov @ 2013-10-16 14:13 UTC (permalink / raw)
To: util-linux
Hi!
Is it possible to specify per-filesystem default mount options
somewhere in configuration file?
On Tue, Oct 15, 2013 at 9:31 PM, Aleksey Midenkov <midenok@gmail.com> wrote:
> Are they possible for normal mount (not pmount)?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Per-filesystem default mount options
2013-10-16 14:13 ` Aleksey Midenkov
@ 2013-10-18 8:34 ` Karel Zak
2013-10-22 14:12 ` Aleksey Midenkov
[not found] ` <CAF8BazB4jsWj0_3Ns14o5qDF2wVch9_K5u_ZsJ8GwjMyNZb6Uw@mail.gmail.com>
0 siblings, 2 replies; 7+ messages in thread
From: Karel Zak @ 2013-10-18 8:34 UTC (permalink / raw)
To: Aleksey Midenkov; +Cc: util-linux
On Wed, Oct 16, 2013 at 06:13:17PM +0400, Aleksey Midenkov wrote:
> Is it possible to specify per-filesystem default mount options
> somewhere in configuration file?
/etc/fstab, or tune2fs for extN, or /etc/nsfmount.conf for NFS.
The per-filesystem-type default options are also hardcoded in kernel.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Per-filesystem default mount options
2013-10-18 8:34 ` Karel Zak
@ 2013-10-22 14:12 ` Aleksey Midenkov
[not found] ` <CAF8BazB4jsWj0_3Ns14o5qDF2wVch9_K5u_ZsJ8GwjMyNZb6Uw@mail.gmail.com>
1 sibling, 0 replies; 7+ messages in thread
From: Aleksey Midenkov @ 2013-10-22 14:12 UTC (permalink / raw)
To: util-linux
On Fri, Oct 18, 2013 at 12:34 PM, Karel Zak <kzak@redhat.com> wrote:
> On Wed, Oct 16, 2013 at 06:13:17PM +0400, Aleksey Midenkov wrote:
>> Is it possible to specify per-filesystem default mount options
>> somewhere in configuration file?
>
> /etc/fstab, or tune2fs for extN, or /etc/nsfmount.conf for NFS.
>
> The per-filesystem-type default options are also hardcoded in kernel.
>
> Karel
That's true, they are hardcoded in kernel. But, there is a need to
have them customized. I know, there is a ton of user-level utils that
maybe can provide it. IMHO this basic feature is important for the
core.
>
>
> --
> Karel Zak <kzak@redhat.com>
> http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Per-filesystem default mount options
[not found] ` <CAF8BazB4jsWj0_3Ns14o5qDF2wVch9_K5u_ZsJ8GwjMyNZb6Uw@mail.gmail.com>
@ 2013-10-23 15:27 ` Karel Zak
2013-12-13 12:49 ` Aleksey Midenkov
0 siblings, 1 reply; 7+ messages in thread
From: Karel Zak @ 2013-10-23 15:27 UTC (permalink / raw)
To: Aleksey Midenkov; +Cc: util-linux
On Sat, Oct 19, 2013 at 08:03:29AM +0400, Aleksey Midenkov wrote:
> On Fri, Oct 18, 2013 at 12:34 PM, Karel Zak <kzak@redhat.com> wrote:
> > On Wed, Oct 16, 2013 at 06:13:17PM +0400, Aleksey Midenkov wrote:
> >> Is it possible to specify per-filesystem default mount options
> >> somewhere in configuration file?
> >
> > /etc/fstab, or tune2fs for extN, or /etc/nsfmount.conf for NFS.
> >
> > The per-filesystem-type default options are also hardcoded in kernel.
> >
>
> I'm sorry for my misguide and, perhaps, a wrong start. What I mean is
> per-fs type default mount options. That's true, they are hardcoded in
> kernel. But, there is a need to have them customized. I know, there is
> ton of user-level utils that maybe can provide it. But... I feel that
> this basic feature is important for the core. That's why I decided to
> ask here in hope that you will discuss this with me.
If you really need a generic (on device independent solution), then I
don't see a better way than improve libmount for read something
like /etc/mount/<fsname>.conf. The problem is that such feature will
not be usable for non-libmount applications.
> I keep stumbling upon this lack for a million-th times for as long as
> 15 years. Every barely installed host, f.ex. even routers that have no
> ability to install another utils except the 'mount', they require me
> each time to put charset from command line. And you know, this is the
> common source for errors for non-latin countries like your servant's.
I understand the pain for removable media, but for regular disks you
can use /etc/fstab, right?
> When charset option is forgotten the filenames are garbled after copy.
> And you not always notice it because non-latin ones are somewhere deep
> inside. But after some time passed you see the surprise...
I understand.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Per-filesystem default mount options
2013-10-23 15:27 ` Karel Zak
@ 2013-12-13 12:49 ` Aleksey Midenkov
2013-12-19 10:58 ` Karel Zak
0 siblings, 1 reply; 7+ messages in thread
From: Aleksey Midenkov @ 2013-12-13 12:49 UTC (permalink / raw)
To: Karel Zak; +Cc: Mikhail Mukovnikov, util-linux
Karel,
I'm sorry for long delay. We are getting ready to start development.
But we need to settle some questions before we can start development
(please, see below).
On Wed, Oct 23, 2013 at 7:27 PM, Karel Zak <kzak@redhat.com> wrote:
> On Sat, Oct 19, 2013 at 08:03:29AM +0400, Aleksey Midenkov wrote:
>> On Fri, Oct 18, 2013 at 12:34 PM, Karel Zak <kzak@redhat.com> wrote:
>> > On Wed, Oct 16, 2013 at 06:13:17PM +0400, Aleksey Midenkov wrote:
>> >> Is it possible to specify per-filesystem default mount options
>> >> somewhere in configuration file?
>> >
>> > /etc/fstab, or tune2fs for extN, or /etc/nsfmount.conf for NFS.
>> >
>> > The per-filesystem-type default options are also hardcoded in kernel.
>> >
>>
>> I'm sorry for my misguide and, perhaps, a wrong start. What I mean is
>> per-fs type default mount options. That's true, they are hardcoded in
>> kernel. But, there is a need to have them customized. I know, there is
>> ton of user-level utils that maybe can provide it. But... I feel that
>> this basic feature is important for the core. That's why I decided to
>> ask here in hope that you will discuss this with me.
>
> If you really need a generic (on device independent solution), then I
> don't see a better way than improve libmount for read something
> like /etc/mount/<fsname>.conf. The problem is that such feature will
> not be usable for non-libmount applications.
I guess, it is possible to do it in /etc/fstab. This solution would
bring us additional advantages (f.ex. better readability of /etc/fstab
itself). An example draft is available here:
https://github.com/better-oss/util-linux/issues/1#issuecomment-30503845
What are these non-libmount applications? Do they mount without
/bin/mount invocation? Why would they do this?
>
>> I keep stumbling upon this lack for a million-th times for as long as
>> 15 years. Every barely installed host, f.ex. even routers that have no
>> ability to install another utils except the 'mount', they require me
>> each time to put charset from command line. And you know, this is the
>> common source for errors for non-latin countries like your servant's.
>
> I understand the pain for removable media, but for regular disks you
> can use /etc/fstab, right?
Yes, for regular disks usual /etc/fstab is enough.
>
>> When charset option is forgotten the filenames are garbled after copy.
>> And you not always notice it because non-latin ones are somewhere deep
>> inside. But after some time passed you see the surprise...
>
> I understand.
>
> Karel
>
> --
> Karel Zak <kzak@redhat.com>
> http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Per-filesystem default mount options
2013-12-13 12:49 ` Aleksey Midenkov
@ 2013-12-19 10:58 ` Karel Zak
0 siblings, 0 replies; 7+ messages in thread
From: Karel Zak @ 2013-12-19 10:58 UTC (permalink / raw)
To: Aleksey Midenkov; +Cc: Mikhail Mukovnikov, util-linux
On Fri, Dec 13, 2013 at 04:49:00PM +0400, Aleksey Midenkov wrote:
> On Wed, Oct 23, 2013 at 7:27 PM, Karel Zak <kzak@redhat.com> wrote:
> > If you really need a generic (on device independent solution), then I
> > don't see a better way than improve libmount for read something
> > like /etc/mount/<fsname>.conf. The problem is that such feature will
> > not be usable for non-libmount applications.
>
> I guess, it is possible to do it in /etc/fstab. This solution would
> bring us additional advantages (f.ex. better readability of /etc/fstab
> itself). An example draft is available here:
>
> https://github.com/better-oss/util-linux/issues/1#issuecomment-30503845
OK, I have read the discussion.
> What are these non-libmount applications? Do they mount without
> /bin/mount invocation? Why would they do this?
/etc/fstab is de-facto standard, we have libc functions to parse this
file, it's used by many applications (mount, fsck, backup tools, etc.).
The mount(2) syscall is directly called for example by systemd (usually
for pseudo filesystems), for regular filesystem it uses mount(8), but
it generates units according to entries in the file (for dependencies
etc.), I guess udisks also uses fstab.
In the discussion at github (it's really bad place for such topics:-)
you have suggested:
/dev/sda2 / ext4 defaults,errors=remount-ro 0 1
* * ext4 noatime,discard,nobarrier,iocharset=utf8
* * vfat ro,codepage=866,iocharset=utf8
where '*' entries are default mount options. Right?
Notes:
- we really don't need a way how to specify default mount options for
filesystems *already specified* in fstab (e.g. /dev/sda2). If there
is an entry for the filesystem than you have to use it for all
options -- merge two entries ('*' and sda2) to compose the final
options is bad way.
I really really don't want to change the current semantic how we
compose mount options for fstab entries.
- currently we don't read fstab at all if mount(8) command line contains
all necessary information -- it means source and target. For example:
mount /dev/sdb2 /mnt
will not read fstab for mount options although fstab contains 'sdb2'.
This is pretty ugly feature in some cases. In the TODO file we have
--options-mode={ignore,append,prepend,replace}
to resolve this problem (it's already supported by libmount, but no
exported to mount(8) command line).
- at the first glance the '*' entries seems like elegant way how to
avoid filesystem specific /etc/filesystems/<fstype>.conf files, but I
have still doubts that add a new extension to the fstab is the right
way.
If we really need to resolve this issue, then filesystem specific files
with default mount options will provide more opportunities:
* not restricted by fstab syntax
* possible to add another sections for another tasks [fsck, ...]
* possible to distribute/modify the files independently on fstab
* backwardly compatible (you don't have to care about systemd,
udisk, ...)
* we already have /etc/nfsmount.conf
Again, the problem is to have a way to specify default mount options
for filesystems which are *nowhere* specified and configured so user
has to specify all the options on mount(8) command line now.
> > I understand the pain for removable media, but for regular disks you
> > can use /etc/fstab, right?
>
> Yes, for regular disks usual /etc/fstab is enough.
Well, on many systems udisks mounts removable media, not sure which
role it plays in your proposal.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-12-19 10:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 17:31 Per-filesystem default mount options Aleksey Midenkov
2013-10-16 14:13 ` Aleksey Midenkov
2013-10-18 8:34 ` Karel Zak
2013-10-22 14:12 ` Aleksey Midenkov
[not found] ` <CAF8BazB4jsWj0_3Ns14o5qDF2wVch9_K5u_ZsJ8GwjMyNZb6Uw@mail.gmail.com>
2013-10-23 15:27 ` Karel Zak
2013-12-13 12:49 ` Aleksey Midenkov
2013-12-19 10:58 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox