linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Raid, resync and hotspare
@ 2005-07-12 15:33 Laurent CARON
  2005-07-13 14:54 ` Louis-David Mitterrand
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent CARON @ 2005-07-12 15:33 UTC (permalink / raw)
  To: linux-raid@vger.kernel.org

Hi,

I recently moved a server from old disks to now ones and added a 
hotspare (mdadm /dev/md1 -a /dev/sdf2)

the hotspare appears in  /proc/mdstat

Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6]
md1 : active raid5 sdf2[5] sde2[4] sdd2[3] sdc2[2] sdb2[1] sda2[0]
      285699584 blocks level 5, 64k chunk, algorithm 2 [5/5] [UUUUU]


when I fail a disk, mdadm does *not* send me any warning.

Only at the second failure when the array is in degraded state I receive 
a warning.

How may I receive a warning when the hotspare disk has been used to cope 
with a disk failure?

Thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Raid, resync and hotspare
  2005-07-12 15:33 Raid, resync and hotspare Laurent CARON
@ 2005-07-13 14:54 ` Louis-David Mitterrand
  0 siblings, 0 replies; 2+ messages in thread
From: Louis-David Mitterrand @ 2005-07-13 14:54 UTC (permalink / raw)
  To: linux-raid@vger.kernel.org; +Cc: Laurent Caron

On Tue, Jul 12, 2005 at 05:33:08PM +0200, Laurent Caron wrote:
> Hi,
> 
> I recently moved a server from old disks to now ones and added a 
> hotspare (mdadm /dev/md1 -a /dev/sdf2)
> 
> the hotspare appears in  /proc/mdstat
> 
> Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6]
> md1 : active raid5 sdf2[5] sde2[4] sdd2[3] sdc2[2] sdb2[1] sda2[0]
>      285699584 blocks level 5, 64k chunk, algorithm 2 [5/5] [UUUUU]
> 
> 
> when I fail a disk, mdadm does *not* send me any warning.

From the mdamd man page:

	Only  Fail , FailSpare , DegradedArray , and TestMessage cause Email to be
	sent.

Your event is "SpareActive" which does not trigger an alert mail,
however all events can be reported through the "--program" switch:

	All events cause the program to be run.  The program  is  run with
	two or  three  arguments,  they  being the event name, the array
	device and possibly a second device.

> Only at the second failure when the array is in degraded state I receive 
> a warning.

> How may I receive a warning when the hotspare disk has been used to cope 
> with a disk failure?

--program "my_mail_script.sh"

	#!/bin/sh
	nail -s "$1 event detected on device $2 $3" root < EOF

	Dear admin,

	You array seems to have suffered to breakage:

	A $1 event was received on for device $2 $3.

	Fix it ASAP!

	Regards,

	EOF

-- 
This space for rent.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-13 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-12 15:33 Raid, resync and hotspare Laurent CARON
2005-07-13 14:54 ` Louis-David Mitterrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).