All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: Jes Sorensen <jes@trained-monkey.org>
Cc: NeilBrown <neilb@suse.de>,
	linux-raid@vger.kernel.org, Martin Wilck <martin.wilck@suse.com>,
	Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>,
	Paul Menzel <pmenzel@molgen.mpg.de>
Subject: Re: [PATCH 0/6 v2] Assorted patches relating to mdmon
Date: Tue, 14 Mar 2023 09:33:27 +0100	[thread overview]
Message-ID: <20230314093327.0000203e@linux.intel.com> (raw)
In-Reply-To: <167867886675.11443.523512156999408649.stgit@noble.brown>

On Mon, 13 Mar 2023 14:42:58 +1100
NeilBrown <neilb@suse.de> wrote:

> This series is a minor revision of the previous series with the same
> name.
> It includes the important bugfix identified by Mariusz and a few minor
> improvements suggested by Paul.
> 
> Original comment:
> 
> mdmon is a root-storage daemon is the sense defined by systemd
> documentation, but it does not follow the practice that systemd
> recommends.  Specifically it is run from the root filesystem when
> possible.  The instance started in the initrd hands-over to a root-fs
> based instance, which then hands-over to an initrd-based instance
> started by dracut at shutdown.
> 
> Part of the reason that we ignore systemd advise is that mdmon needs
> access to the filesystem - specifically /dev and /sys - which is not
> available in the initrd context after switchroot.  We could possibly
> change mdmon to work in the systemd-preferred way by splitting mdmon
> into two processes instead of just having 2 threads.  The "monitor"
> process could running entirely in the initrd context, the "manager"
> process could safely run in the root-fs context, passing newly opened
> file descriptors to the monitor over a unix-domain socket.
> 
> But we aren't there yet and may never be.
> 
> For now, mdmon doesn't work correctly.  There is no mechanism to ensure
> a new instance starts after switchroot.  Until recently the initrd
> instance of the systemd mdmon unit would be stopped at switchroot time
> because udev would temporarily forget about md devices.  This would
> allow the "udevadm trigger" process to start a new instance.  udev was
> recently fixed:
> 
> Commit: 7ec624147a41 ("udevadm: cleanup-db: don't delete information for kept
> db entries")
> 
> so now the attempt to start mdmon via "udevadm trigger" does nothing as
> mdmon already has an active unit.
> 
> The net result is that mdmon continues running in the initrd mount
> namespace and so cannot access new devices.  Adding a device to a root
> md array that depends on mdmon will no longer work.
> 
> We want the initrd instance of mdmon to continue running until the
> root-fs based instance starts, and that really requires we have two
> different systemd units.  This series achieves this in the final patch by
> using a different instance name inside or initrd and outside.
> "initrd-mdfoo" and "mdfoo".
> 
> Other patches in the series are mostly clean-ups and minor improvements
> in related code.
> 
> NeilBrown
> 
> 
> 

Hi Jes,
Sorry for the delay. We found one grow related problem and needed to determine
if it is the patchset related. It seems not, so for all patches:

Reviewed-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>

Thanks to Neil we can revert "revert of Remove KillMode" patch (hopefully)
forever this time. Please apply those paches, then I will send a revert.

Thanks,
Mariusz

  parent reply	other threads:[~2023-03-14  8:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13  3:42 [PATCH 0/6 v2] Assorted patches relating to mdmon NeilBrown
2023-03-13  3:42 ` [PATCH 4/6] mdmon: change systemd unit file to use --foreground NeilBrown
2023-03-13  3:42 ` [PATCH 2/6] Improvements for IMSM_NO_PLATFORM testing NeilBrown
2023-03-19 16:30   ` Jes Sorensen
2023-03-19 22:05     ` NeilBrown
2023-03-20 14:58       ` Jes Sorensen
2023-03-13  3:42 ` [PATCH 1/6] Use existence of /etc/initrd-release to detect initrd NeilBrown
2023-03-13  3:42 ` [PATCH 5/6] mdmon: Remove need for KillMode=none NeilBrown
2023-03-13  3:42 ` [PATCH 6/6] mdmon: Improve switchroot interactions NeilBrown
2023-03-13  3:42 ` [PATCH 3/6] mdmon: don't test both 'all' and 'container_name' NeilBrown
2023-03-14  8:33 ` Mariusz Tkaczyk [this message]
2023-03-19 16:34 ` [PATCH 0/6 v2] Assorted patches relating to mdmon Jes Sorensen

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=20230314093327.0000203e@linux.intel.com \
    --to=mariusz.tkaczyk@linux.intel.com \
    --cc=jes@trained-monkey.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=mariusz.tkaczyk@intel.com \
    --cc=martin.wilck@suse.com \
    --cc=neilb@suse.de \
    --cc=pmenzel@molgen.mpg.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.