From: "Thomas Bächler" <thomas@archlinux.org>
To: linux-raid@vger.kernel.org
Cc: "Thomas Bächler" <thomas@archlinux.org>
Subject: [PATCH 1/2] udev: Set SYSTEMD_READY to 1 when the array becomes active
Date: Tue, 18 Aug 2015 13:51:32 +0200 [thread overview]
Message-ID: <1439898693-936-2-git-send-email-thomas@archlinux.org> (raw)
In-Reply-To: <1439898693-936-1-git-send-email-thomas@archlinux.org>
In some cases, the rules set SYSTEMD_READY to 0 in order to tell systemd
to delay activation of the .device unit. It should also be set to 1 when
the array is ready.
---
udev-md-raid-arrays.rules | 2 ++
1 file changed, 2 insertions(+)
diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
index c95ec7b..90d1aa5 100644
--- a/udev-md-raid-arrays.rules
+++ b/udev-md-raid-arrays.rules
@@ -17,6 +17,8 @@ TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
LABEL="md_ignore_state"
+ENV{SYSTEMD_READY}="1"
+
IMPORT{program}="BINDIR/mdadm --detail --export $devnode"
ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
--
2.5.0
next prev parent reply other threads:[~2015-08-18 11:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 11:51 [PATCH 0/2] mdadm: Fix udev rule interaction with systemd Thomas Bächler
2015-08-18 11:51 ` Thomas Bächler [this message]
2015-08-18 11:51 ` [PATCH 2/2] udev: Work around race condition on array activation Thomas Bächler
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=1439898693-936-2-git-send-email-thomas@archlinux.org \
--to=thomas@archlinux.org \
--cc=linux-raid@vger.kernel.org \
/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.