Re: [PATCH] mdadm/systemd: remove KillMode=none from service file
From: Michal Koutný <mkoutny@suse.com>
Date: 2022-08-24 12:03:32
On Wed, Aug 24, 2022 at 11:52:39AM +0200, Mariusz Tkaczyk [off-list ref] wrote:
I removed those setting but it was something like: Before=initrd-switch-root.target dev-%I.device I can test more if you have suggestions.
Sorry, I realize it won't work, device deps are restricted [1]. (I considered relaxing that [2] in order to terminate loop devs properly.)
Will check but it can be considered as workaround, not as a solution. VROC arrays are automatically configured in installers, also users may mount them manually, without any additional settings (as standalone disk). We need to resolve it globally.
It's not the only setup when a device requires a userspace daemon. There is a generic solution for root devices [3] (when the daemon is marked to run indefinitely). The device job ordering dependencies during shutdown would need better handling in systemd. (But I don't understand how much mdmon@.serice is necessary for device existence and teardown.) HTH, Michal [1] https://github.com/systemd/systemd/blob/98f3e84342dbb9da48ffa22bfdf122bdae4da1c6/src/core/unit.c#L3101 [2] https://github.com/Werkov/systemd/commit/bdaa49d34e78981f3535c42ec19ac0f314135c07 (forked repo, not an upstream commit) [3] https://systemd.io/ROOT_STORAGE_DAEMONS/