[systemd-devel] Mounting a new device to a mount point with an old (auto-generated) but inactive mount unit triggers an immediate unmount

Mantas Mikulėnas grawity at gmail.com
Thu Jul 8 08:39:02 UTC 2021


On Thu, Jul 8, 2021 at 10:12 AM Christian Rohmann <
christian.rohmann at frittentheke.de> wrote:

> Hey Silvio,
> On 07/07/2021 20:04, Silvio Knizek wrote:
>
> after touching /etc/fstab you're supposed to run `systemctl daemon-
> reload` to re-trigger the generators. This is in fact a feature to
> announce changes in configuration files to systemd. See
> man:systemd.generator for more information.
>
> Thanks for the quick reply and the kind hint to the (right) documentation.
>
>
> I am then just wondering why the issue referred to (
> https://github.com/systemd/systemd/issues/1741) is still open?
> Are there still further plans to make systemd properly recognize that the
> inactive unit (pointing to a mount point that is used in a new and active
> unit) actually is superseeded and unmounting it makes now sense as that
> hits the new, working, active mount.
>

I *think* this was supposed to improve with v249:

https://github.com/systemd/systemd/pull/19322
https://github.com/systemd/systemd/issues/19983

In any case I'd suggest then is to somehow give a warning to the user as
> with changes to the systemd units:
>   "Warning: myfancyservice.service changed on disk. Run 'systemctl
> daemon-reload' to reload units."
>

systemd can't make non-systemd tools (such as `mount`) display warnings.

-- 
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210708/fb85759f/attachment.htm>


More information about the systemd-devel mailing list