You are not logged in.

#1 2010-01-26 01:41:44

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Software RAID Failure Notification

I have 'Software RAID' configured and working well on my system. I have two Seagate 750 GB SATA drives in a RAID1 mirror:

[root@ion /]# mdadm --misc --detail /dev/md0
/dev/md0:
        Version : 0.90
  Creation Time : Thu Jan 14 06:02:07 2010
     Raid Level : raid1
     Array Size : 728571776 (694.82 GiB 746.06 GB)
  Used Dev Size : 728571776 (694.82 GiB 746.06 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Mon Jan 25 20:32:14 2010
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 628ada8a:a688bad8:5b69a113:4ec4a0dc
         Events : 0.24

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       8       18        1      active sync   /dev/sdb2

My concern is what would happen if one drive completely fails. It has never happened so far but if for some reason I did lose a drive, would my system notify me? I mean the machine is on 24/7 so would I get some kind of indication from the system that the drive has failed or is it only visible when I reboot? If I did reboot, would it tell me or just boot into the OS and wait for me to manually run 'mdadm' and see the RAID is running in a degraded 'state'?


./

Offline

#2 2010-01-27 02:17:36

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: Software RAID Failure Notification

Anyone?


./

Offline

#3 2010-01-27 02:45:19

Aedit
Member
Registered: 2009-10-29
Posts: 138

Re: Software RAID Failure Notification

You could use cron to run a script periodically to check your raid array and send you an email if there are any errors.

Also read through http://tldp.org/HOWTO/Software-RAID-HOWTO-6.html /etc/mdadm.conf, man mdadm and /etc/rc.d/mdadm.

Last edited by Aedit (2010-01-27 03:24:11)

Offline

#4 2010-01-27 03:31:26

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: Software RAID Failure Notification

In addition to mdadm you might wan't to look at smartd. mdadm will let you know once a disk has failed whereas smartd *may* give you advance notice of a failing disk.

Offline

#5 2010-02-22 23:49:28

Ultraman
Member
Registered: 2009-12-24
Posts: 242

Re: Software RAID Failure Notification

I've set up ssmtp over here to use my gmail account and configured mdadm to drop me an email using it.
First, set up ssmtp (there is a Wiki article which I recently updated) and test it.

Then:
Add the following to /etc/mdadm.conf:

MAILADDR yourmailaddress@example.com

Test if mdadm can email you, this will make it generate test messages:
# mdadm -Fs1t

Check you box, if it worked, you can now make use of the mdadm daemon which monitors the RAID and emails you if there is any change.
Start it with:
# /etc/rc.d/mdadm start

And don't forget to add it to your DAEMONS line in /etc/rc.conf.

Offline

Board footer

Powered by FluxBB