Re: mdadm and --program

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

 



On Thu, 3 Oct 2002, Jeff Byrkit wrote:

> # mdadm --follow --program /etc/handle-mdadm-events  --delay 1 /dev/md0
>
> where handle-mdadm-events is (culled from previous posts):
>
> echo $*
> logger -p kern.crit -t RAID $*

Does your script have a #! line at the top, for example:

#!/bin/bash

You could alternatively use:

# mdadm --follow --program='/bin/bash /etc/handle-mdadm-events' --delay=1 /dev/md0

> but I never get anything at my terminal or in the log. If I don't use the
> --program, it gives me:

Don't forget to make sure /etc/syslog.conf has an appropriate entry too.

> anyone have any ideas? can I do --program "echo $*" ? just to get it to do
> something?

Yeah, but you don't need $* and you should use the full path to echo.

# mdadm -F /dev/md0 -p/bin/echo -d1

---
Derek Vadala, derek@cynicism.com, http://www.cynicism.com/~derek

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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