From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: NeilBrown <neilb@suse.de>, Coly Li <colyli@suse.de>,
linux-raid@vger.kernel.org, Benjamin Brunner <bbrunner@suse.com>,
Franck Bui <fbui@suse.de>, Jes Sorensen <jes@trained-monkey.org>,
Xiao Ni <xni@redhat.com>
Subject: Re: [PATCH] mdadm/systemd: remove KillMode=none from service file
Date: Wed, 24 Aug 2022 11:52:39 +0200 [thread overview]
Message-ID: <20220824115239.00004ac4@linux.intel.com> (raw)
In-Reply-To: <Yv62jwZwp7kNPSUF@blackbook>
Hi Michal,
Thank you for support.
On Fri, 19 Aug 2022 00:00:47 +0200
Michal Koutný <mkoutny@suse.com> wrote:
> Hello.
>
> (Coming via
> https://lists.freedesktop.org/archives/systemd-devel/2022-August/048201.html.)
>
> On Tue, Aug 02, 2022 at 05:43:05PM +0200, Mariusz Tkaczyk
> <mariusz.tkaczyk@linux.intel.com> wrote:
> > https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/tree/udev-md-raid-arrays.rules#n41
> > but i can't find wants dependency in:
> > #systemctl show dev-md126.service
> > #systemctl show dev-md127.service
>
> Typo here
>
> s/service/device/
>
> But the Wants dependency won't help with shutdown ordering.
>
> > I got:
> > systemd[1]: /usr/lib/systemd/system/mdmon@.service:11: Failed to resolve
> > unit specifiers in 'dev-%I.device', ignoring: Invalid slot
>
> What was your exact directive in service unit file and what was the
> template parameter?
> (This may not work though, since there'd be no stop job for .device unit
> during shutdown to order against. (not tested))
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.
>
> > Probably it tries to umount every exiting .mount unit, i didn't check
> > deeply. https://www.freedesktop.org/software/systemd/man/systemd.mount.html
> >
> > I can see that we can define something for .mount units so I tried both:
> > # mount -o x-systemd.after=mdmon@md127.service /dev/mapper/vg0-lvm_raid /mnt
> > # mount -o x-systemd.requires=mdmon@md127.service /dev/mapper/vg0-lvm_raid
> > /mnt
> >
> > but I doesn't help either. I seems that it is ignored because I cannot find
> > mdmon dependency in systemctl show output for mnt.mount unit.
>
> These x-* options are parsed from fstab. If you mount manually like
> this, systemd won't learn about these non-kernel options (they don't get
> through /proc/mountinfo).
>
> Actually, I think if you add the .mount:After=mdmon@....service
> (via fstab), it should properly order the stop of mdmon after the
> particular unmount during shutdown.
>
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.
Thanks,
Mariusz
next prev parent reply other threads:[~2022-08-24 9:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 13:34 [PATCH] mdadm/systemd: remove KillMode=none from service file Coly Li
2022-04-06 6:36 ` Xiao Ni
2022-04-06 13:35 ` Jes Sorensen
2022-07-28 7:55 ` Mariusz Tkaczyk
2022-07-28 8:39 ` Coly Li
2022-07-28 9:01 ` Mariusz Tkaczyk
2022-07-28 10:55 ` Coly Li
2022-07-29 7:55 ` Mariusz Tkaczyk
2022-07-29 1:55 ` NeilBrown
2022-08-02 15:43 ` Mariusz Tkaczyk
2022-08-18 22:00 ` Michal Koutný
2022-08-24 9:52 ` Mariusz Tkaczyk [this message]
2022-08-24 12:03 ` Michal Koutný
2022-08-24 12:57 ` Mariusz Tkaczyk
2022-08-29 16:19 ` Michal Koutný
2022-10-04 10:24 ` Mariusz Tkaczyk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220824115239.00004ac4@linux.intel.com \
--to=mariusz.tkaczyk@linux.intel.com \
--cc=bbrunner@suse.com \
--cc=colyli@suse.de \
--cc=fbui@suse.de \
--cc=jes@trained-monkey.org \
--cc=linux-raid@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=neilb@suse.de \
--cc=xni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).