linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 14:57:56 +0200	[thread overview]
Message-ID: <20220824145756.000048f8@linux.intel.com> (raw)
In-Reply-To: <20220824120325.GA19154@blackbody.suse.cz>

On Wed, 24 Aug 2022 14:03:25 +0200
Michal Koutný <mkoutny@suse.com> wrote:

> On Wed, Aug 24, 2022 at 11:52:39AM +0200, Mariusz Tkaczyk
> <mariusz.tkaczyk@linux.intel.com> 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).

Yes, I know that trick and we are setting '@' to prevent systemd from killing
it[1] but we do mdmon@ service restart after switch root. This is the simplest
way to reopen descriptors. We can try to change that.

It will be great if you can really prove that the mechanism is working. Do you
know any project which really uses this functionality?

>
> 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.)
> 

We need to handle dirty clean transaction. On shutdown, when umount is
requested them filesystem could flush in flight data, and them kernel is
waiting for mdmon to acknowledge the change in metadata[2].

Thanks,
Mariusz

[1] https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/tree/mdmon.c#n342
[2] https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/tree/mdmon-design.txt

  reply	other threads:[~2022-08-24 12:58 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
2022-08-24 12:03           ` Michal Koutný
2022-08-24 12:57             ` Mariusz Tkaczyk [this message]
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=20220824145756.000048f8@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).