All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hxsrmeng <hxsrmeng@gmail.com>
To: linux-raid@vger.kernel.org
Subject: Why "mdadm --monitor --program" sometimes only gives 2 command-line arguments to the program?
Date: Sat, 5 Jan 2008 18:11:38 -0800 (PST)	[thread overview]
Message-ID: <14642331.post@talk.nabble.com> (raw)


Hi all,

I need to monitor my RAID and if it fails, I'd like to call my-script to
deal with the failure.

I did: 
mdadm --monitor --program my-script --delay 60 /dev/md1

And then, I simulate a failure with
mdadm --manage --set-faulty /dev/md1 /dev/sda2
mdadm /dev/md1 --remove /dev/sda2

I hope the mdadm monitor function can pass all three command-line
arguments to my-script, including the name of the event, the name of the
md device and the name of a related device if relevant.

But my-script doesn't get the third one, which should be /dev/sda2. Is
this not "relevant"?

If I really need to know it's /dev/sda2 that fails, what can I do?

Thanks.


-- 
View this message in context: http://www.nabble.com/Why-%22mdadm---monitor---program%22-sometimes-only-gives-2-command-line-arguments-to-the-program--tp14642331p14642331.html
Sent from the linux-raid mailing list archive at Nabble.com.


             reply	other threads:[~2008-01-06  2:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-06  2:11 Hxsrmeng [this message]
2008-01-06 11:06 ` Why "mdadm --monitor --program" sometimes only gives 2 command-line arguments to the program? Nagilum
2008-01-08  3:52 ` Neil Brown

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=14642331.post@talk.nabble.com \
    --to=hxsrmeng@gmail.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 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.