linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: harald@redhat.com
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] udev-rules: prevent systemd from mount devices before they are ready.
Date: Thu, 2 Aug 2012 10:09:30 +1000	[thread overview]
Message-ID: <20120802100930.20c5cb9b@notabene.brown> (raw)
In-Reply-To: <1343724827-2179-1-git-send-email-harald@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]

On Tue, 31 Jul 2012 10:53:47 +0200 harald@redhat.com wrote:

> From: Harald Hoyer <harald@redhat.com>
> 
> In the "add" uevent, ATTR{md/array_state} does not exist, so the next
> rule does not kick in.
> 
> When an array is assembled incrementally, systemd might see it
> before it is ready, try to mount it, fail, and give up.
> Result is that array doesn't get mounted.
> 
> If we ask udev to tell systemd that it isn't ready yet in this
> case, systemd waits until it is ready, and all are happy.
> ---
>  udev-md-raid.rules | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/udev-md-raid.rules b/udev-md-raid.rules
> index 814c897..da9d3c5 100644
> --- a/udev-md-raid.rules
> +++ b/udev-md-raid.rules
> @@ -27,7 +27,7 @@ ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
>  # container devices have a metadata version of e.g. 'external:ddf' and
>  # never leave state 'inactive'
>  ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
> -TEST!="md/array_state", GOTO="md_end"
> +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"
>  

Thanks!

applied.

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

      reply	other threads:[~2012-08-02  0:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31  8:53 [PATCH] udev-rules: prevent systemd from mount devices before they are ready harald
2012-08-02  0:09 ` 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=20120802100930.20c5cb9b@notabene.brown \
    --to=neilb@suse.de \
    --cc=harald@redhat.com \
    --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 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).