Re: Customize the error emails of `mdadm --monitor`
From: Gabor Gombas <hidden>
Date: 2007-06-06 20:49:26
From: Gabor Gombas <hidden>
Date: 2007-06-06 20:49:26
On Wed, Jun 06, 2007 at 04:24:31PM +0200, Peter Rabbitson wrote:
So I was asking if the component _number_, which is unique to a specific device regardless of the assembly mechanism, can be reported in case of a failure.
So you need to write an event-handling script and pass it to mdadm
(--program). In the script you can walk sysfs and/or call the
appropriate helper programs to extract all the information you need and
format it in the way you want. For example, if you want the slot number
of a failed disk, you can get it from /sys/block/$2/md/dev-$3/slot
(according to the manpage, not tested).
Gabor
--
---------------------------------------------------------
MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
---------------------------------------------------------