Re: Why "mdadm --monitor --program" sometimes only gives 2 command-line arguments to the program?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Message from hxsrmeng@xxxxxxxxx ---------
    Date: Sat, 5 Jan 2008 18:11:38 -0800 (PST)
    From: Hxsrmeng <hxsrmeng@xxxxxxxxx>

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?

Since you have the array name (e.g. /dev/md1) you could run "mdadm -Q --detail /dev/md1" and parse the output or have a look at /proc/mdstat or /sys/block/md1/* .
Kind regards,
Alex.


========================================================================
#    _  __          _ __     http://www.nagilum.org/ \n icq://69646724 #
#   / |/ /__ ____ _(_) /_ ____ _  nagilum@xxxxxxxxxxx \n +491776461165 #
#  /    / _ `/ _ `/ / / // /  ' \  Amiga (68k/PPC): AOS/NetBSD/Linux   #
# /_/|_/\_,_/\_, /_/_/\_,_/_/_/_/   Mac (PPC): MacOS-X / NetBSD /Linux #
#           /___/     x86: FreeBSD/Linux/Solaris/Win2k  ARM9: EPOC EV6 #
========================================================================


----------------------------------------------------------------
cakebox.homeunix.net - all the machine one needs..

Attachment: pgpbTncTzI2QV.pgp
Description: PGP Digital Signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux