On Sa, 06.06.20 02:19, Kevin Kofler (kevin.kofler(a)chello.at) wrote:
Chris Murphy wrote:
> So yes it's well suited for these cases and the proposal does include
> them. If they wish to be left out, that's up to those working groups.
> It's possible to make sure /etc/systemd/zram-generator is not present.
Also, why does this have to be a systemd generator? As a user administrating
his own systems, I find those to be extremely annoying, because they do
stuff behind my back that I never asked to happen and I have to mask them
(and/or uninstall them completely) to get rid of the unwanted behavior.
E.g., the systemd generator that tries to automount partitions not listed in
fstab based on their GPT UUIDs is just broken. If I do not have the
partition in the fstab, I left it out for a reason (e.g., the swap partition
I have on my SSD in case I ever need it, which is normally NOT mounted to
avoid wearing out the SSD). So why does systemd want to second-guess me and
mount that partition behind my back unless I go out of my way to mask the
magic generator?
Well, if you don#t want that behaviour don't use the partition type
UUIDs from the "discoverable partition spec" for your partitions.
It's how these type uuids are defined:
https://systemd.io/DISCOVERABLE_PARTITIONS/
By using these partition type uuids you basically say: "please
automatically mount me, thank you".
So why can this zram feature not be a line in fstab, a parameter
passed
through the kernel CLI, or some other solution that is easily tweakable and
that will definitely not affect upgrades of existing installations (unlike
yet another systemd generator, if it happens to get installed for whatever
reason)?
I am sorry, but in this day and age I am sure we should default to
stuff that just works, and that means: defaults should apply with
empty or immutable /etc.
By making this a default but list it in a configuration file to work,
you require /etc to be writable or populated, and that just sucks.
IMHO, the only systemd generator that should ever mount partitions of
any
kind (including virtual ones such as zram) is the systemd-fstab-generator.
If you want more stuff mounted, it should be added to /etc/fstab, that's
what that file is for!
I disagree. We should strive for a system that works with empty /etc/
and if booted that way uses default settings. So that /etc is admin
territory where the admin makes changes from the defaults. Thus, if
zram is something to use by default then it should not be stored in
/etc.
Lennart
--
Lennart Poettering, Berlin