Skip to contentSkip to conversation

/etc/fstab.d yes or not

DISCUSSION Karel Zak 12 participants 29 messages Jan 20, 2012 – Jan 24, 2012

Subsystems (2)
lore
Share & tools
lore

Karel Zak

author maintainer
#0 lore raw

I'd like to add support for /etc/fstab.d to libmount. The library is currently used by mount, umount and mount.nfs. The goal is to use it on more places.

The /etc/fstab.d directory has been requested by people who maintains large number of mountpoints etc.

The directory is not replacement for /etc/fstab, it's additional place where you can describe your filesystems.

The disadvantage is that the stuff in the directory will be invisible for some tools (udisks, systemd, ...), so I have very vocal disagreement from some people who don't want to see /etc/fstab.d at all.

BTW, systemd allows to define addition mountpoints in systemd.mount(5) unit file(s), so we already have additional place for fstab stuff...

Commands? Objections?

Karel

Signature · 6 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw
Quoted 8 lines

I'd like to add support for /etc/fstab.d to libmount. The library is currently used by mount, umount and mount.nfs. The goal is to use it on more places.

The /etc/fstab.d directory has been requested by people who maintains large number of mountpoints etc.

Quoted 6 lines

The directory is not replacement for /etc/fstab, it's additional place where you can describe your filesystems.

The disadvantage is that the stuff in the directory will be invisible for some tools (udisks, systemd, ...), so I have very vocal disagreement from some people who don't want to see /etc/fstab.d at all.

I'm working on systemd to support /etc/fstab.d.

Masatake YAMATO

#2 lore raw
Quoted 8 lines · Masatake YAMATO
Quoted 8 lines

 I'd like to add support for /etc/fstab.d to libmount. The library is currently used by mount, umount and mount.nfs. The goal is to use it on more places.

 The /etc/fstab.d directory has been requested by people who maintains large number of mountpoints etc.

Quoted 8 lines
Quoted 6 lines

 The directory is not replacement for /etc/fstab, it's additional place where you can describe your filesystems.

 The disadvantage is that the stuff in the directory will be invisible for some tools (udisks, systemd, ...), so I have very vocal disagreement from some people who don't want to see /etc/fstab.d at all.

I'm working on systemd to support /etc/fstab.d.

And we don't want to support that in systemd.

It's an old glibc API, and /etc/fstab is ABI, not a service config file, which now can read more than one file. It's a very different problem. It an ABI change, not a config extension.

Tools rightfully expect that they find all system mounts in that file, and not in some new split-up directory. In some cases, fstab is used to 'check if the device is not a system volume', and that will just break now,

The gain of features from fstab.d/ vs. the amount of breakage it causes is not worth the trouble.

And yes, there are systemd units, but we don't recommend anybody working with a general purpose system to mount system volumes with them. They are primarily used for virtual filessytems, which do not belong in fstab. In special purpose setups, like embedded, which do not care about POSIX-like APIs, the systemd units can replace fstab, but it's an entirely different story than breaking fstab expectations.

Kay

#3 lore raw
Quoted 11 lines · Kay Sievers
Quoted 6 lines · Masatake YAMATO
Quoted 4 lines

 I'd like to add support for /etc/fstab.d to libmount. The library is currently used by mount, umount and mount.nfs. The goal is to use it on more places.

I'm working on systemd to support /etc/fstab.d.

It's an old glibc API, and /etc/fstab is ABI, not a service config file, which now can read more than one file. It's a very different problem. It an ABI change, not a config extension.

I think that's putting the problem a little too strongly. The glibc API is generic: it can (and is) used to parse any file using the fstab(5) file format; it's not restricted to only /etc/mtab and /etc/fstab. setmntent(3) accepts any filename.

You are entirely correct that it may break the assumptions made by some software, but it's certainly not "ABI" or even "API" breakage.

Quoted 4 lines

Tools rightfully expect that they find all system mounts in that file, and not in some new split-up directory. In some cases, fstab is used to 'check if the device is not a system volume', and that will just break now,

The number of tools which do this is tiny, and could (if we wished) be patched trivially to also look at the files in fstab.d.

Alternatively, glibc itself could be updated so that if e.g. setmntent(3) is called with "/etc/fstab" as its filename argument, it will additionally process and include the contents of /etc/fstab.d as well. This would have the advantage of transparency for all users of the glibc interface.

Regards,
Roger

Signature · 4 lines
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
#4 lore raw
Quoted 9 lines · Roger Leigh
Quoted 8 lines · Kay Sievers
Quoted 6 lines · Masatake YAMATO
Quoted 4 lines

 I'd like to add support for /etc/fstab.d to libmount. The library is currently used by mount, umount and mount.nfs. The goal is to use it on more places.

I'm working on systemd to support /etc/fstab.d.

Quoted 8 lines
Quoted 3 lines

It's an old glibc API, and /etc/fstab is ABI, not a service config file, which now can read more than one file. It's a very different problem. It an ABI change, not a config extension.

I think that's putting the problem a little too strongly.  The glibc API is generic: it can (and is) used to parse any file using the fstab(5) file format; it's not restricted to only /etc/mtab and /etc/fstab.  setmntent(3) accepts any filename.

That's right, but it's just not the way it's used. None of the old tools is prepared to just wrap that in a readdir() loop.

Quoted 2 lines

You are entirely correct that it may break the assumptions made by some software, but it's certainly not "ABI" or even "API" breakage.

It is surely the de-facto Linux/UNIX ABI for system mounts.

Quoted 5 lines
Quoted 4 lines

Tools rightfully expect that they find all system mounts in that file, and not in some new split-up directory. In some cases, fstab is used to 'check if the device is not a system volume', and that will just break now,

Quoted 8 lines

The number of tools which do this is tiny, and could (if we wished) be patched trivially to also look at the files in fstab.d.

Alternatively, glibc itself could be updated so that if e.g. setmntent(3) is called with "/etc/fstab" as its filename argument, it will additionally process and include the contents of /etc/fstab.d as well.  This would have the advantage of transparency for all users of the glibc interface.

That's true, but good luck with glibc changes. :)

Kay

#5 lore raw
In reply to Kay Sievers
Quoted 5 lines · Kay Sievers

It's an old glibc API, and /etc/fstab is ABI, not a service config file, which now can read more than one file. It's a very different problem. It an ABI change, not a config extension.

Can't we have our cake and eat it too?

I mean why not have both?

The subsystem that you currently plan to parse the /etc/fstab.d/ will intelligently add the /etc/fstab.d/ entries to /etc/fstab before actually processing and mounting /etc/fstab.

So the rpm guys have their /etc/fstab.d/ convenience and the rest of the ABI is kept intact. (If you can't bit them join them)

Since /etc/fstab is hand edited as well. There are lots of smart things that can be done like a remark (#) marker at the end of the file that all /etc/fstab.d/ entries get to be added after. (And a comment for the user) and some smart duplicate removal of, and so on ... Even a marker per line added.

Just my $0,017
Boaz
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
Quoted 13 lines · Boaz Harrosh
Quoted 3 lines · Kay Sievers

It's an old glibc API, and /etc/fstab is ABI, not a service config file, which now can read more than one file. It's a very different problem. It an ABI change, not a config extension.

Can't we have our cake and eat it too?

I mean why not have both?

The subsystem that you currently plan to parse the /etc/fstab.d/ will intelligently add the /etc/fstab.d/ entries to /etc/fstab before actually processing and mounting /etc/fstab.

Quoted 8 lines

So the rpm guys have their /etc/fstab.d/ convenience and the rest of the ABI is kept intact. (If you can't bit them join them)

Since /etc/fstab is hand edited as well. There are lots of smart things that can be done like a remark (#) marker at the end of the file that all /etc/fstab.d/ entries get to be added after. (And a comment for the user) and some smart duplicate removal of, and so on ... Even a marker per line added.

I agree. And moreover extensible if they want to use xml for /etc/fstab.d/.

Quoted 8 lines

Just my $0,017
Boaz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
In reply to Karel Zak
Quoted 9 lines · On Fri, 20 Jan 2012 15:04:44 +0100 Karel Zak <[email protected]> wrote:

I'd like to add support for /etc/fstab.d to libmount. The library is currently used by mount, umount and mount.nfs. The goal is to use it on more places.

The /etc/fstab.d directory has been requested by people who maintains large number of mountpoints etc.

The directory is not replacement for /etc/fstab, it's additional place where you can describe your filesystems.

It might not be my place to say anthing about this, as I am just a mere mortal ....

But I'd like to express my concerns on this. In the years i've been using Linux, the system has become a very complex beast. While in the beginning I could just dig trough a couple of scripts to figure out how a certain system worked, or more likely why it didn't work... nowadays i have to have knowledge of a dozen of complex interacting daemons to figure out why gedit refuses to edit a simple text file.

Complexity is added everywhere, to make a few corner cases a little bit more simple. Making it more difficult for the 99% who do not care about these corner cases. This in turn makes Linux this opaque system that only a handfull of selected can understand, who invest their whole life to the understanding of its many subsystems. If this continues like this, in a decade or two, Linux will become like windows. A system nobody clearly understands, which somehow works, but sometimes not.. and nobody knows why.

Hence, i would like to ask you to consider not adding /etc/fstab.d unless there is a very good reason to do it. And "to make it simpler for people who have a lot of mountpoints" is IMHO not a good reason. How many mountpoints must one use that a single file becomes a problem?

Attila Kinali

Signature · 4 lines
The trouble with you, Shev, is you don't say anything until you've saved
up a whole truckload of damned heavy brick arguments and then you dump
them all out and never look at the bleeding body mangled beneath the heap
		-- Tirin, The Dispossessed, U. Le Guin
author maintainer
#8 lore raw
Quoted 4 lines · Attila Kinali

Hence, i would like to ask you to consider not adding /etc/fstab.d unless there is a very good reason to do it. And "to make it simpler for people who have a lot of mountpoints" is IMHO not a good reason. How many mountpoints must one use that a single file becomes a problem?

Let's imagine that you have a network and you use the same configuration on all machines, then "*.d/" directories are very useful for you -- for example you can create a company.rpm with important configuration and distribute it to all machines.

Karel

Signature · 6 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#9 lore raw
Quoted 10 lines · Karel Zak
Quoted 4 lines · Attila Kinali

Hence, i would like to ask you to consider not adding /etc/fstab.d unless there is a very good reason to do it. And "to make it simpler for people who have a lot of mountpoints" is IMHO not a good reason. How many mountpoints must one use that a single file becomes a problem?

Let's imagine that you have a network and you use the same configuration on all machines, then "*.d/" directories are very useful for you -- for example you can create a company.rpm with important configuration and distribute it to all machines.

Isn't this what the automounter does for decades?

Berny

#10 lore raw
In reply to Karel Zak
Quoted 10 lines · Karel Zak
Quoted 4 lines · Attila Kinali

Hence, i would like to ask you to consider not adding /etc/fstab.d unless there is a very good reason to do it. And "to make it simpler for people who have a lot of mountpoints" is IMHO not a good reason. How many mountpoints must one use that a single file becomes a problem?

 Let's imagine that you have a network and you use the same configuration on all machines, then "*.d/" directories are very useful for you -- for example you can create a company.rpm with important configuration and distribute it to all machines.

Yeah, and all tools which read /etc/fstab with the glibc interface, to find out the properties for the mount point, are just broken now. And for what gain. Put a script in you RPM that merges your snippets into the one fstab, and you get the same behaviour without any breakage.

Always remember, /etc/fstab is ABI, not a private config file, you need a _very_ good reason to break it.

And you usually have not much problems convincing me that breakage is justified. I just totally fail to see the benefit vs. gain in this case.

Kay
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#11 lore raw
In reply to Karel Zak
Quoted 9 lines · Karel Zak

I'd like to add support for /etc/fstab.d to libmount. The library is currently used by mount, umount and mount.nfs. The goal is to use it on more places.

The /etc/fstab.d directory has been requested by people who maintains large number of mountpoints etc.

The directory is not replacement for /etc/fstab, it's additional place where you can describe your filesystems.

As a general comment, I would like to use fstab.d for replacing the initscripts which mount kernel filesystems in Debian initscripts (sysvinit). We currently hardcode the logic to mount each filesystem and additionally hardcode the defaults, and permit the defaults to be overridden by the user via /etc/default/* or via entries in /etc/fstab. This could be done much more straightforwardly using entries such as /etc/fstab.d/kernfs and /etc/fstab.d/tmpfs etc.

Quoted 1 line

From the distributor's POV, this can then take advantage of the

package manager's conffile handling, meaning it's much simpler for the user to customise.

Quoted 1 line

From the initscripts POV, were systemd to also use the same

approach, we could then share the configuration between the different init systems.

Note that I've not actually taken any of these steps yet; I'm about to test it with the upcoming util-linux release and the current prerelease, but it is something under consideration.

Regards,
Roger

Signature · 8 lines
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#12 lore raw
Quoted 11 lines · Roger Leigh
Quoted 9 lines · Karel Zak

 I'd like to add support for /etc/fstab.d to libmount. The library is currently used by mount, umount and mount.nfs. The goal is to use it on more places.

 The /etc/fstab.d directory has been requested by people who maintains large number of mountpoints etc.

 The directory is not replacement for /etc/fstab, it's additional place where you can describe your filesystems.

Quoted 7 lines

As a general comment, I would like to use fstab.d for replacing the initscripts which mount kernel filesystems in Debian initscripts (sysvinit).  We currently hardcode the logic to mount each filesystem and additionally hardcode the defaults, and permit the defaults to be overridden by the user via /etc/default/* or via entries in /etc/fstab.  This could be done much more straightforwardly using entries such as /etc/fstab.d/kernfs and /etc/fstab.d/tmpfs etc.

It is just very wrong to expose kernel filesystems to system mounts. Please invent your own config if you want that for packaging. The kernel filesystems do not belong in fstab, and for the same reason not in fstab.d/.

Quoted 7 lines

From the distributor's POV, this can then take advantage of the package manager's conffile handling, meaning it's much simpler for the user to customise.

From the initscripts POV, were systemd to also use the same approach, we could then share the configuration between the different init systems.

The init systems need to handle the mounts, but unlikely by sharing additional config files. For systemd it is a solved problem, we don't need fstab.d/ for that, and sysv should not start to try to solve it at that level, because it will conflict with systemd.

Kay

#13 lore raw
Quoted 20 lines · Kay Sievers
Quoted 11 lines · Roger Leigh
Quoted 9 lines · Karel Zak

 I'd like to add support for /etc/fstab.d to libmount. The library is currently used by mount, umount and mount.nfs. The goal is to use it on more places.

 The /etc/fstab.d directory has been requested by people who maintains large number of mountpoints etc.

 The directory is not replacement for /etc/fstab, it's additional place where you can describe your filesystems.

Quoted 7 lines

As a general comment, I would like to use fstab.d for replacing the initscripts which mount kernel filesystems in Debian initscripts (sysvinit).  We currently hardcode the logic to mount each filesystem and additionally hardcode the defaults, and permit the defaults to be overridden by the user via /etc/default/* or via entries in /etc/fstab.  This could be done much more straightforwardly using entries such as /etc/fstab.d/kernfs and /etc/fstab.d/tmpfs etc.

Quoted 4 lines

It is just very wrong to expose kernel filesystems to system mounts. Please invent your own config if you want that for packaging. The kernel filesystems do not belong in fstab, and for the same reason not in fstab.d/.

To be fair, these can be split into two categories: kernel filesystems such as procfs, sysfs etc., and special-purpose tmpfs mounts. The former could be kept in the init scripts, but the latter are commonly required to be customised (or disabled) by admins, and the fstab format is the natural way to express this. This would include tmpfs mounts for e.g. /run, /run/lock, /run/shm, potentially /tmp] and others, each of which has separate limits.

Inventing custom file formats for these (as is the current situation) is both opaque to the admin and less amenable to preservation/upgrading of the admins customisations and the defaults.

Regards,
Roger

Signature · 8 lines
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#14 lore raw
Quoted 34 lines · Roger Leigh
Quoted 20 lines · Kay Sievers
Quoted 11 lines · Roger Leigh
Quoted 9 lines · Karel Zak

 I'd like to add support for /etc/fstab.d to libmount. The library is currently used by mount, umount and mount.nfs. The goal is to use it on more places.

 The /etc/fstab.d directory has been requested by people who maintains large number of mountpoints etc.

 The directory is not replacement for /etc/fstab, it's additional place where you can describe your filesystems.

Quoted 7 lines

As a general comment, I would like to use fstab.d for replacing the initscripts which mount kernel filesystems in Debian initscripts (sysvinit).  We currently hardcode the logic to mount each filesystem and additionally hardcode the defaults, and permit the defaults to be overridden by the user via /etc/default/* or via entries in /etc/fstab.  This could be done much more straightforwardly using entries such as /etc/fstab.d/kernfs and /etc/fstab.d/tmpfs etc.

Quoted 4 lines

It is just very wrong to expose kernel filesystems to system mounts. Please invent your own config if you want that for packaging. The kernel filesystems do not belong in fstab, and for the same reason not in fstab.d/.

To be fair, these can be split into two categories: kernel filesystems such as procfs, sysfs etc., and special-purpose tmpfs mounts.  The former could be kept in the init scripts, but the latter are commonly required to be customised (or disabled) by admins, and the fstab format is the natural way to express this.  This would include tmpfs mounts for e.g. /run, /run/lock, /run/shm, potentially /tmp] and others, each of which has separate limits.

Quoted 3 lines

Inventing custom file formats for these (as is the current situation) is both opaque to the admin and less amenable to preservation/upgrading of the admins customisations and the defaults.

I'm not talking about custom file formats, better just add a mount -c, and do mount -c /etc/kernelfs.d/*.conf, or whatever will fit systemv needs.

This is nothing really to share between systemd and systemv here. This problem just does not exist for systemd.

And for systemv it should not be solved in mount(8), but in a systemv specific part.

A change in common tools at that level breaks much more than it solves.

Kay
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

author maintainer
#15 lore raw
Quoted 7 lines · Kay Sievers
Quoted 3 lines

Inventing custom file formats for these (as is the current situation) is both opaque to the admin and less amenable to preservation/upgrading of the admins customisations and the defaults.

I'm not talking about custom file formats, better just add a mount -c, and do mount -c /etc/kernelfs.d/*.conf, or whatever will fit systemv needs.

This is planned (I talked about it on dracut list few months ago). It means:

    mount --fstab=<path> /mountpoint

to override the default /etc/fstab path. The <path> could be also a directory. So you can maintain our mountpoints in multiple files and mount(8) will be able to search in the files if --fstab=<path> is explicitly specified. I think this should be enough for initramfs scripts.

The problem is that the configuration won't be visible if --fstab is not specified -- this is possible to resolve probably by regular /etc/fstab.d only ;-)

Quoted 2 lines

This is nothing really to share between systemd and systemv here. This problem just does not exist for systemd.

Well, Masatake has RHEL customers who want to deploy systems with rpm/yum, %post scripts are poor solution because it's not too reliable and verification with rpm -V doesn't work. Do we have any answer for this use case?

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
#16 lore raw

On Mon, 23 Jan 2012 13:21:15 +0100, Karel Zak <[email protected]> wrote

Quoted 27 lines · Kay Sievers
Quoted 7 lines
Quoted 3 lines

Inventing custom file formats for these (as is the current situation) is both opaque to the admin and less amenable to preservation/upgrading of the admins customisations and the defaults.

I'm not talking about custom file formats, better just add a mount -c, and do mount -c /etc/kernelfs.d/*.conf, or whatever will fit systemv needs.

This is planned (I talked about it on dracut list few months ago). It means:

    mount --fstab=<path> /mountpoint

to override the default /etc/fstab path. The <path> could be also a directory. So you can maintain our mountpoints in multiple files and mount(8) will be able to search in the files if --fstab=<path> is explicitly specified. I think this should be enough for initramfs scripts.

The problem is that the configuration won't be visible if --fstab is not specified -- this is possible to resolve probably by regular /etc/fstab.d only ;-)

Quoted 2 lines

This is nothing really to share between systemd and systemv here. This problem just does not exist for systemd.

Quoted 6 lines

Well, Masatake has RHEL customers who want to deploy systems with rpm/yum, %post scripts are poor solution because it's not too reliable and verification with rpm -V doesn't work. Do we have any answer for this use case?

Karel

The question is not for me but I had thought about it in this weekend. (Now I understand well the importance of the compatibility.)

How do you think following approach:
1. Initially (before booting), the system has /etc/fstab.d/*.fstab files only.
2. When the system booting, systemd merges the *.fstab file into /etc/fstab.
3. Then systemd loads /etc/fstab.
4. Other programs can loads /etc/fstab either directly or via glibc interface.

Though a rpm package must run something merge-fstab' command to update fstab after putting a file under /etc/fstab.d, rpm -V rpm -ql and rpm -qf works fine. Here I assume merge-fstab' is provided by util-linux.

This approach may need the modification of disro installer. /etc/fstab is always overwritten by systemd when booting. So the installer must generate not /etc/fstab but /etc/fstab.d/00.fstab or something. A tool which adds an entry to /etc/fstab doesn't work, too.

Masatake YAMATO

Quoted 7 lines
Signature · 6 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#17 lore raw
In reply to Karel Zak
Quoted 20 lines · Karel Zak
Quoted 7 lines · Kay Sievers
Quoted 3 lines

Inventing custom file formats for these (as is the current situation) is both opaque to the admin and less amenable to preservation/upgrading of the admins customisations and the defaults.

I'm not talking about custom file formats, better just add a mount -c, and do mount -c /etc/kernelfs.d/*.conf, or whatever will fit systemv needs.

 This is planned (I talked about it on dracut list few months ago). It means:

   mount --fstab=<path> /mountpoint

 to override the default /etc/fstab path. The <path> could be also a directory. So you can maintain our mountpoints in multiple files and mount(8) will be able to search in the files if --fstab=<path> is explicitly specified. I think this should be enough for initramfs scripts.

Quoted 3 lines

 The problem is that the configuration won't be visible if --fstab is not specified -- this is possible to resolve probably by regular /etc/fstab.d only ;-)

It creates many times more problems that anybody has today.

Quoted 7 lines
Quoted 2 lines

This is nothing really to share between systemd and systemv here. This problem just does not exist for systemd.

 Well, Masatake has RHEL customers who want to deploy systems with rpm/yum, %post scripts are poor solution because it's not too reliable and verification with rpm -V doesn't work. Do we have any answer for this use case?

We don't need one. System mounts just do not belong into packages, they are mandatory and hard-coded, or set by the admin and host-specific configured, and never to be dropped by RPM. RPM is not to be used for host-only system config.

Kay

#18 lore raw

On Mon, 23 Jan 2012 14:03:41 +0100, Kay Sievers <[email protected]> = wrote

Quoted 3 lines · Karel Zak
Quoted 2 lines · Kay Sievers
Quoted 1 line
Quoted 1 line

Inventing custom file formats for these (as is the current situat=

ion)

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

is both opaque to the admin and less amenable to preservation/upg=

rading

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

of the admins customisations and the defaults.

I'm not talking about custom file formats, better just add a mount =

-c,

Quoted 1 line
Quoted 1 line
Quoted 1 line

and do mount -c /etc/kernelfs.d/*.conf, or whatever will fit system=

v

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

needs.

=A0This is planned (I talked about it on dracut list few months ago)=

. It

Quoted 5 lines
Quoted 5 lines

=A0means:

=A0 =A0mount --fstab=3D<path> /mountpoint

=A0to override the default /etc/fstab path. The <path> could be also=

a

Quoted 1 line
Quoted 1 line

=A0directory. So you can maintain our mountpoints in multiple files =

and

Quoted 1 line
Quoted 1 line

=A0mount(8) will be able to search in the files if --fstab=3D<path> =

is

Quoted 4 lines
Quoted 4 lines

=A0explicitly specified. I think this should be enough for initramfs=

=A0scripts.

Quoted 9 lines
Quoted 3 lines

=A0The problem is that the configuration won't be visible if =A0--fstab is not specified -- this is possible to resolve probably =A0by regular /etc/fstab.d only ;-)

=

It creates many times more problems that anybody has today. =

Quoted 1 line
Quoted 1 line

This is nothing really to share between systemd and systemv here. T=

his

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

problem just does not exist for systemd.

=A0Well, Masatake has RHEL customers who want to deploy systems with=

=A0rpm/yum, %post scripts are poor solution because it's not too =A0reliable and verification with rpm -V doesn't work. Do we have an=

y

Quoted 7 lines
Quoted 1 line

=A0answer for this use case?

=

We don't need one. System mounts just do not belong into packages, they are mandatory and hard-coded, or set by the admin and host-specific configured, and never to be dropped by RPM. RPM is not to be used for host-only system config.

What I want is packaging the system mounts.
Consider setting up multiple hosts which mount the same nfs filesystem to the same mount point. It the mount point is in a rpm package, it can be used both in kickstart file and from yum command line. In addition yum update can be used when the name or ip of nfs server is changed; Just create the new release of the rpm package which holds new mount point deification. In stead of nfs, you can consider smb or =

iso images as examples. =

Masatake YAMATO
=

Quoted 3 lines

Kay
--
To unsubscribe from this list: send the line "unsubscribe util-linux"=

in

Quoted 2 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#19 lore raw
Quoted 8 lines · Masatake YAMATO

What I want is packaging the system mounts.
Consider setting up multiple hosts which mount the same nfs filesystem to the same mount point. It the mount point is in a rpm package, it can be used both in kickstart file and from yum command line. In addition yum update can be used when the name or ip of nfs server is changed; Just create the new release of the rpm package which holds new mount point deification. In stead of nfs, you can consider smb or iso images as examples.

That sounds very wrong to do. This is admin territory and not package management. There are tools sync and deploy /etc setting per-machine across big networks, and RPM is surely not the right thing to use here.

RPM is for the operating system, not for host configuration. Most stuff in /etc is marked as config for that exact reason. First, static system-config does not belong in /etc, second non-admin editable files just do not belong in /etc. It's all wrong, just as the misguided entire fstab.d/ feature to start with.

Kay

#20 lore raw

On Mon, 23 Jan 2012 14:37:22 +0100, Kay Sievers <[email protected]> wrote

Quoted 11 lines
Quoted 8 lines

What I want is packaging the system mounts.
Consider setting up multiple hosts which mount the same nfs filesystem to the same mount point. It the mount point is in a rpm package, it can be used both in kickstart file and from yum command line. In addition yum update can be used when the name or ip of nfs server is changed; Just create the new release of the rpm package which holds new mount point deification. In stead of nfs, you can consider smb or iso images as examples.

That sounds very wrong to do. This is admin territory and not package management.

I'm thiking about the admin manages packages which are installed to the host.

Quoted 3 lines

There are tools sync and deploy /etc setting per-machine across big networks, and RPM is surely not the right thing to use here.

(RPM works fine daily "yum update" done by users on the world.) Of course I'm thinking about the admin runs her/his own yum repository.

Quoted 5 lines

RPM is for the operating system, not for host configuration. Most stuff in /etc is marked as config for that exact reason. First, static system-config does not belong in /etc, second non-admin editable files just do not belong in /etc. It's all wrong, just as the misguided entire fstab.d/ feature to start with.

It is not so simple.

$ rpm -qf /etc/yum.repos.d/fedora.repo 
fedora-release-14-1.noarch

Admin can edit fedora.repo, but generally it is assumed as static file.

$ rpm -q --queryformat "%{NAME}: %{FILEFLAGS:fflags}\n" -f /etc/udev/rules.d/*.rules
hplip-common: 
hplip-common: 
libfprint: 
qemu-system-x86: 
alsa-utils: 
hal: c
libdrm: c
vbetool: 
bluez: 
fuse: 
gpsd: cn

Some are marked as config as you said. The other are not. I think the packages may think their rules files as static data.

Masatake YAMATO

#21 lore raw
Quoted 50 lines · Masatake YAMATO

On Mon, 23 Jan 2012 14:37:22 +0100, Kay Sievers <[email protected]> wrote

Quoted 11 lines
Quoted 8 lines

What I want is packaging the system mounts.
Consider setting up multiple hosts which mount the same nfs filesystem to the same mount point. It the mount point is in a rpm package, it can be used both in kickstart file and from yum command line. In addition yum update can be used when the name or ip of nfs server is changed; Just create the new release of the rpm package which holds new mount point deification. In stead of nfs, you can consider smb or iso images as examples.

That sounds very wrong to do. This is admin territory and not package management.

I'm thiking about the admin manages packages which are installed to the host.

Quoted 3 lines

There are tools sync and deploy /etc setting per-machine across big networks, and RPM is surely not the right thing to use here.

(RPM works fine daily "yum update" done by users on the world.) Of course I'm thinking about the admin runs her/his own yum repository.

Quoted 5 lines

RPM is for the operating system, not for host configuration. Most stuff in /etc is marked as config for that exact reason. First, static system-config does not belong in /etc, second non-admin editable files just do not belong in /etc. It's all wrong, just as the misguided entire fstab.d/ feature to start with.

It is not so simple.

$ rpm -qf /etc/yum.repos.d/fedora.repo
fedora-release-14-1.noarch

Admin can edit fedora.repo, but generally it is assumed as static file.

$ rpm -q --queryformat "%{NAME}: %{FILEFLAGS:fflags}\n" -f /etc/udev/rules.d/*.rules
hplip-common:
hplip-common:
libfprint:
qemu-system-x86:
alsa-utils:
hal: c
libdrm: c
vbetool:
bluez:
fuse:
gpsd: cn
Quoted 2 lines

Some are marked as config as you said. The other are not. I think the packages may think their rules files as static data.

Yes, and the udev rules in /etc are admin-only, it should be empty, static RPM-provided rules belong into /lib/udev/rules.d/. Many of them moved already in later OS releases. Everything else in the list is a bug, or legacy nobody cared so far.

Some stuff in /etc is hard to fix/change because it is like that since forever, but that is no reason to add new stuff to that broken model.

And inventing new static files in /etc is as wrong as packaging static system mounts with RPM and as wrong as the entire fstab.d/ thing.

Please just don't do anything like that, it's not where we want to be or want to go in the future.

Kay

#22 lore raw
In reply to Kay Sievers

I am extremely dubious about systemd, and would much rather it not be on any system that *I* run (and using UUID's to identify kernel notification is just whacko) , but I have to agree with Kay in that /etc/fstab.d is Just Wrong. The /etc/fstab file is parsed by many programs, shell scripts, and not just the ones in util-linux. We should consider it an ABI, and not mess with it.

-- Ted

#23 lore raw
Quoted 1 line · On Mon, 23 Jan 2012 08:55:21 -0500 Theodore Tso <[email protected]> wrote:

I am extremely dubious about systemd, and would much rather it not be on any system that *I* run (and using UUID's to identify kernel notification is just whacko) , but I have to agree with Kay in that /etc/fstab.d is Just Wrong. The /etc/fstab file is parsed by many programs, shell scripts, and not just the ones in util-linux. We should consider it an ABI, and not mess with it.

Pedantically speaking /etc/fstab is not API, getmntent is API.

In practical terms though it would be very 'interesting' to implement getmentent with an fstab.d, if not down right impossible because the argument is a FILE *.

So with a good coding hat on - please don't consider fstab API, it's got a programming interface 8). Otherwise I agree fstab.d is wrong.

Alan

#24 lore raw
Quoted 4 lines · Alan Cox

So with a good coding hat on - please don't consider fstab API, it's got a programming interface 8). Otherwise I agree fstab.d is wrong.

It has a programming interface for reading, but other programs can do modify (and read) the file directly. If some joker decided to change the formatting of /etc/fstab from tab-delimeted to some crazy XML encoding, I am certain things would break.

- Ted

#25 lore raw
In reply to Karel Zak
Quoted 3 lines · Karel Zak

 BTW, systemd allows to define addition mountpoints in systemd.mount(5) unit file(s), so we already have additional place for fstab stuff...

systemd needs a large blunt object be stuck into its eye.

systemd was supposed to be an init replacement. Its continuing attempts to infiltrate entire system are very worrying.

$ ls -l /lib/systemd/systemd*
-rwxr-xr-x. 1 root root  22068 Nov  2 00:41 /lib/systemd/systemd-ac-power
-rwxr-xr-x. 1 root root  38656 Nov  2 00:41 /lib/systemd/systemd-binfmt
-rwxr-xr-x. 1 root root  30356 Nov  2 00:41 /lib/systemd/systemd-cgroups-agent
-rwxr-xr-x. 1 root root  51072 Nov  2 00:41 /lib/systemd/systemd-cryptsetup
-rwxr-xr-x. 1 root root  26328 Nov  2 00:41 /lib/systemd/systemd-detect-virt
-rwxr-xr-x. 1 root root  42856 Nov  2 00:41 /lib/systemd/systemd-fsck
-rwxr-xr-x. 1 root root  63576 Nov  2 00:41 /lib/systemd/systemd-hostnamed
-rwxr-xr-x. 1 root root  38644 Nov  2 00:41 /lib/systemd/systemd-initctl
-rwxr-xr-x. 1 root root  38668 Nov  2 00:41 /lib/systemd/systemd-kmsg-syslogd
-rwxr-xr-x. 1 root root  75776 Nov  2 00:41 /lib/systemd/systemd-localed
-rwxr-xr-x. 1 root root 186724 Nov  2 00:41 /lib/systemd/systemd-logind
-rwxr-xr-x. 1 root root  34552 Nov  2 00:41 /lib/systemd/systemd-modules-load
-rwxr-xr-x. 1 root root  30436 Nov  2 00:41 /lib/systemd/systemd-quotacheck
-rwxr-xr-x. 1 root root  30392 Nov  2 00:41 /lib/systemd/systemd-random-seed
-rwxr-xr-x. 1 root root  51148 Nov  2 00:41
/lib/systemd/systemd-readahead-collect
-rwxr-xr-x. 1 root root  38756 Nov  2 00:41
/lib/systemd/systemd-readahead-replay
-rwxr-xr-x. 1 root root  34520 Nov  2 00:41 /lib/systemd/systemd-remount-api-vfs
-rwxr-xr-x. 1 root root  26216 Nov  2 00:41 /lib/systemd/systemd-reply-password
-rwxr-xr-x. 1 root root  59328 Nov  2 00:41 /lib/systemd/systemd-shutdown
-rwxr-xr-x. 1 root root  38668 Nov  2 00:41 /lib/systemd/systemd-shutdownd
-rwxr-xr-x. 1 root root  34508 Nov  2 00:41
/lib/systemd/systemd-stdout-syslog-bridge
-rwxr-xr-x. 1 root root  38664 Nov  2 00:41 /lib/systemd/systemd-sysctl
-rwxr-xr-x. 1 root root  63496 Nov  2 00:41 /lib/systemd/systemd-timedated
-rwxr-xr-x. 1 root root  22024 Nov  2 00:41 /lib/systemd/systemd-timestamp
-rwxr-xr-x. 1 root root  30364 Nov  2 00:41 /lib/systemd/systemd-uaccess
-rwxr-xr-x. 1 root root  38652 Nov  2 00:41 /lib/systemd/systemd-update-utmp
-rwxr-xr-x. 1 root root  42792 Nov  2 00:41 /lib/systemd/systemd-user-sessions
-rwxr-xr-x. 1 root root  34596 Nov  2 00:41 /lib/systemd/systemd-vconsole-setup

What a *heck* is this?

Signature · 1 line
vda
#26 lore raw
Quoted 8 lines · Denys Vlasenko
Quoted 3 lines · Karel Zak

 BTW, systemd allows to define addition mountpoints in systemd.mount(5) unit file(s), so we already have additional place for fstab stuff...

systemd needs a large blunt object be stuck into its eye.

systemd was supposed to be an init replacement.

It's much more, and I don't think you have been involved in defining the focus of it, and the systemd people do not necessary come to the same conclusion as you.

Quoted 2 lines

Its continuing attempts to infiltrate entire system are very worrying.

You are free to express your worries somewhere else. Don't hijack treads with completely unrelated stuff. That's not welcome in this thread and not in general.

Quoted 1 line

What a *heck* is this?

A platform.

Thanks,
Kay

maintainer
#27 lore raw
In reply to Denys Vlasenko
Quoted 10 lines · Denys Vlasenko
Quoted 3 lines · Karel Zak

?BTW, systemd allows to define addition mountpoints in ?systemd.mount(5) unit file(s), so we already have additional place ?for fstab stuff...

systemd needs a large blunt object be stuck into its eye.

systemd was supposed to be an init replacement. Its continuing attempts to infiltrate entire system are very worrying.

I'm not saying I like /etc/foo.d/* (hell, sed in post-install is not a big deal; not for fstab, not for inetd.conf, etc.), but yes, complaints about changes that make life somewhat more difficult for systemd are rather hypocritical, what with the embrace-and-extend games they are playing.
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

author maintainer
#28 lore raw

Re: /etc/fstab.d yes or not (resolved)

In reply to Karel Zak

I have reverted the fstab.d support. The libmount will NOT read /etc/fstab.d by default.

If you really need an additional configuration outside /etc/fstab then you have to explicitly add the option --fstab <path> to mount(8) command line. This option may be specified more than once and the <path> may be a directory. This solution should be enough for initramfs scripts.

Thanks for feedback.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com