From: NeilBrown <neilb@suse.de>
To: Pawel Baldysiak <pawel.baldysiak@intel.com>
Cc: linux-raid@vger.kernel.org, artur.paszkiewicz@intel.com
Subject: Re: [PATCH] mdmon@.service: Change type of process start-up to 'forking'.
Date: Tue, 11 Mar 2014 14:44:30 +1100 [thread overview]
Message-ID: <20140311144430.19f87195@notabene.brown> (raw)
In-Reply-To: <20140306145144.9690.29220.stgit@gklab-154-222.igk.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1809 bytes --]
On Thu, 06 Mar 2014 15:51:44 +0100 Pawel Baldysiak
<pawel.baldysiak@intel.com> wrote:
> Mdadm does not wait enough time when mdmon is started by systemd.
> It causes various problems with behaviour of a RAID volume with external metadata.
> For example: mdmon does not update a value of checkpoint during migration
> and second RAID5 volume is read-only after reboot done during
> container reshape (both problems occur with IMSM matadata).
> If a type of process start-up is changed to 'forking', systemctl will
> wait until mdmon (parent) process exits after calling fork.
> This way mdmon will always be fully initialized after start_mdmon
> and these problems will not occur.
> In this case it is recommended to add a path to PIDFile, so that systemd
> does not have to guess a PID of the mdmon process.
>
> Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
> Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
> Reviewed-by: Lukasz Dorau <lukasz.dorau@intel.com>
> ---
> systemd/mdmon@.service | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/systemd/mdmon@.service b/systemd/mdmon@.service
> index 5520cd0..304b26e 100644
> --- a/systemd/mdmon@.service
> +++ b/systemd/mdmon@.service
> @@ -14,5 +14,7 @@ Before=initrd-switch-root.target
> # mdmon should never complain due to lack of a platform,
> # that is mdadm's job if at all.
> Environment=IMSM_NO_PLATFORM=1
> -ExecStart=/sbin/mdmon --foreground %I
> +ExecStart=/sbin/mdmon %I
> +Type=forking
> +PIDFile=/run/mdadm/%I.pid
> KillMode=none
>
applied, thanks.
I wonder if we should try to make it use MDMON_DIR instead of /run/mdadm ...
though anyone who uses systemd almost certainly uses /run so it probably
doesn't matter.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2014-03-11 3:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 14:51 [PATCH] mdmon@.service: Change type of process start-up to 'forking' Pawel Baldysiak
2014-03-11 3:44 ` NeilBrown [this message]
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=20140311144430.19f87195@notabene.brown \
--to=neilb@suse.de \
--cc=artur.paszkiewicz@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=pawel.baldysiak@intel.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).