How to monitor hardware RAID array status from Linux

Posted by Md. Mahidul Hasan on 11:24 PM with No comments

 


First check which raid card we are using:

To find out which RAID you are using, just type one command to the command line:

[root@school ~]# lspci -vv | grep -i raid

15:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS-3 3108 [Invader] (rev 02)

Kernel driver in use: megaraid_sas

Kernel modules: megaraid_sas


There may be several responses to this request:

 1. Hewlett-Packard is your HP RAID array

 2. 3ware is your 3ware RAID array

 3. megaRAID is your MegaRAID array

If we do not receive a response or some other answer, then most likely you have software RAID. Here we are using the MegaRAID array.


Let’s install the driver:

Download file from below link

"https://www.broadcom.com/products/storage/raid-controllers/megaraid-sas-9361-8i#downloads"

root@school ~]# wget https://repo.aerisnetwork.com/stable/centos/7/x86_64/megaraid-utils-1.8-2.el7.x86_64.rpm --no-check-certificate


[root@school ~]# yum install mutt

[root@school ~]# rpm -ivh megaraid-utils-1.8-2.el7.x86_64.rpm 

warning: megaraid-utils-1.8-2.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 66e70bec: NOKEY

Preparing...                ########################################### [100%]

   1:megaraid-utils         ########################################### [100%]


Megacli and StorCLI have been installed. We recommend adding the following to your profile:

alias megacli="/opt/megaraid/megacli"

alias storcli="/opt/megaraid/storcli"


Check the RAID status:

[root@school ~]# /opt/megaraid/storcli show

Status Code = 0

Status = Success

Description = None


Number of Controllers = 1

Host Name = school.surecashbd.com

Operating System  = Linux2.6.32-431.el6.x86_64


System Overview:

================


--------------------------------------------------------------------------

Ctl Model          Ports PDs DGs DNOpt VDs VNOpt BBU sPR DS EHS ASOs Hlth 

--------------------------------------------------------------------------

  0 ServeRAIDM5210     8   2   1     0   1     0 Opt On  -  Y      2 Opt  

--------------------------------------------------------------------------


Ctl=Controller Index

DGs=Drive groups

VDs=Virtual drives

Fld=Failed

PDs=Physical drives

DNOpt=DG NotOptimal

VNOpt=VD NotOptimal

Opt=Optimal

Msng=Missing

Dgd=Degraded

NdAtn=Need Attention

Unkwn=Unknown

sPR=Scheduled Patrol Read

DS=DimmerSwitch

EHS=Emergency Hot Spare

Y=Yes|N=No

ASOs=Advanced Software Options

BBU=Battery backup unit

Hlth=Health

Safe=Safe-mode boot


RESULT:

In the Hlth column, the status should be Opt. If not, it means there are problems with the array. Here, our result is "Opt" which means our raid array health is good.


Note:

The command for other server vendors:

  1. Hewlett-Packard is your HP RAID array

~# hpacucli ctrl all show config

  1. 3ware is your 3ware RAID array

~# cat /proc/mdstat

  1. Check Software RAID Status

~# cat /proc/mdstat


blocks [2/1] [_U]

blocks [2/2] [UU]

[UU] or U = healthy, full-featured RAID partition. 

[_U] or [U_] = failed disk.


Categories: