Subject: Re: RAIDframe: notify me when a drive fails?
To: Greg Oster <>
From: Geert Hendrickx <>
List: netbsd-users
Date: 02/28/2006 18:21:02
On Tue, Feb 28, 2006 at 10:31:55AM -0600, Greg Oster wrote:
> Geert Hendrickx writes:
> > Hi, 
> > 
> > can I configure raidframe to "do something" (e.g. send out an e-mail) when
> > one of the drives goes bad?  Otherwise my RAID-1 is only good in theory...  
> There's nothing currently in RAIDframe to handle that...  If you 
> havn't turned off "check_disks" in /etc/daily.conf, then the daily 
> script will contain a note about any failed components.... (of 
> course, one then needs to actually *read* those emails :-} )

I prefer to get mail only when there is something to report.  

> (more integrated solutions are certainly welcome -- I've had volunteers
> to work on a "raid monitoring daemon", but that was some number of years
> ago now, and nothing came of it. :( )

It doesn't have to be a separate daemon per se.  Something I can (easily)
check for via a cron-job is ok.  The grep-for-failed thing works, but it
would be more elegant if e.g. raidctl -s would return an exit status >0 if
something is wrong and needs human intervention.  Maybe combined with a -q
flag (for no output), it would get as easy as 

  raidctl -s -q raid0 || mail -s "RAID problem" ...

in an hourly cronjob.