MdAdm monitoring

by Gisle Hannemyr

[TBA]

Table of contents

Introduction

DegradeArray event

When a defective RAID array is detected, you will get an email like this:

Date: Sun, 19 Apr 2020 07:37:57 +0200 (CEST)
From: mdadm monitoring <root@example.com>
To: root@example.com
Subject: DegradedArray event on /dev/md/0:xyz.com

This is an automatically generated mail message from mdadm
running on pvn.no

A DegradedArray event had been detected on md device /dev/md/0.

Faithfully yours, etc.

P.S. The /proc/mdstat file currently contains the following:

Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sda1[0]
      488253248 blocks super 1.2 [2/1] [U_]
      
unused devices: <none>

From message you can read which Raid array is affected. Here it is /dev/md/0.
Now look deeper and understand the content of md0 block.
md0 is active and uses raid1. The array is build with disk sda1.
[U_] does mean, one of the drives is not synced.
However, this disc is not marked with a (F).

To get more details of the degraded array, use this command:

$ sudo mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Sat Feb  2 12:28:33 2013
     Raid Level : raid1
     Array Size : 488253248 (465.63 GiB 499.97 GB)
  Used Dev Size : 488253248 (465.63 GiB 499.97 GB)
   Raid Devices : 2
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Tue Apr 21 10:56:39 2020
          State : clean, degraded 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : bar:0
           UUID : cbb19dd9:5519aa64:25a091c6:fa7103e4
         Events : 34620651

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       2       0        0        2      removed

SaaS-secure.com.

Final word

[TBA]


Last update: 2020-02-28 [gh].