[systemd-devel] Masking mount units
Andrei Borzenkov
arvidjaar at gmail.com
Thu Nov 21 18:12:22 UTC 2024
21.11.2024 20:47, Phillip Susi wrote:
> Andrei Borzenkov <arvidjaar at gmail.com> writes:
>
>> commit 142b8142d7bb84f07ac33fc00527a4d48ac8ef9f
>> Author: Tom Yan <tom.ty89 at gmail.com>
>> Date: Wed Jan 9 23:35:24 2019 +0800
>>
>> mount/generators: do not make unit wanted by its device unit
>>
>> As device units will be reloaded by systemd whenever the
>> corresponding device generates a "changed" event, if the mount unit /
>> cryptsetup service is wanted by its device unit, the former can be
>> restarted by systemd unexpectedly after the user stopped them
>> explicitly. It is not sensible at all and can be considered dangerous.
>> Neither is the behaviour conventional (as `auto` in fstab should only
>> affect behaviour on boot and `mount -a`) or ever documented at all
>> (not even in systemd, see systemd.mount(5) and crypttab(5)).
>
> Makes sense. So is there any way to convince the older versions of
> systemd to remove the WantedBy relationship? It seems that systemctl
> won't let you.
Only by explicitly using mount units instead of /etc/fstab. I am still
really surprised it was finally dropped at all - because every time this
was suggested it was vehemently opposed to. May be it did slip in by
accident :)
More information about the systemd-devel
mailing list