All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@arcor.de>
To: Hristo Chonov <chonov@vkm.tu-darmstadt.de>,
	linux-raid <linux-raid@vger.kernel.org>
Subject: Re: mdadm >= 3.0 - udev test rule
Date: Tue, 08 Oct 2013 20:40:36 +0200	[thread overview]
Message-ID: <525451A4.9070504@arcor.de> (raw)
In-Reply-To: <CAHsdBYNPTp1tB9RsLPHAsCaFbSxMA2OZ3cqbqyKsqrjcC7-jkA@mail.gmail.com>

On 10/08/2013 02:12 PM, Hristo Chonov wrote:
> Hello,
> 
> I have just a simple question about the udev rule:
> TEST!="md/array_state", GOTO="md_end" or in the last two releases with
> the systemd support: TEST!="md/array_state", ENV{SYSTEMD_READY}="0",
> GOTO="md_end".
> 
> We are running a XenSever 6.2 system which is based on CentOS 5.7 with
> included an old version of udev: udev-095. This version doesn't
> support the ATTR keyword so I am going to swap it with the old one
> SYSFS, but it appears that udev doesn't recognize as well the TEST
> keyword, so I am wondering what exactly this rule is there for? Is it
> checking if "md/array_state" appears somewhere in the attributes and
> if not it jumps to "md_end"?

from mdadm(8):
TEST{octal mode mask}
           Test the existence of a file. An octal mode mask can be
specified if needed.

So, this checks if the file "/sys/class/block/md$X/md/array_state"
exists, and exits otherwise.

> And do you have any idea how the rule should be rewritten for older
> versions of udev?

It could probably be done with PROGRAM="/bin/test -f md/array_state" or
the like (not tested).

Martin

  reply	other threads:[~2013-10-08 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08 12:12 mdadm >= 3.0 - udev test rule Hristo Chonov
2013-10-08 18:40 ` Martin Wilck [this message]
2013-10-09  9:08   ` Hristo Chonov

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=525451A4.9070504@arcor.de \
    --to=mwilck@arcor.de \
    --cc=chonov@vkm.tu-darmstadt.de \
    --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.