[RAID] LSI SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] 모니터링 툴 설치

리눅스/OS 일반|2014. 12. 31. 00:15
반응형

1. 다운로드 및 설치

본 매뉴얼을 작성할때 사용한 서버의 OS는 CentOS 6.2 (64bit) 이므로 아래의 링크로 다운받았습니다.

다른 OS종류나 버전을 사용하시는 분은 URL을 적당히 수정하여 다운로드 받으세요.

 

sas2ircu 다운로드

cd /usr/local/src
wget http://download1.obs.j0ke.net/hardware:/raid/CentOS_6/x86_64/sas2ircu-5.00.00-1.1.x86_64.rpm

rpm -ivh sas2ircu-5.00.00-1.1.x86_64.rpm

 

 

2. 사용 방법
sas2ircu list                  // RAID 구성된 INDEX 번호 보기

 

LSI Corporation SAS2 IR Configuration Utility.
Version 5.00.00.00 (2010.02.09)
Copyright (c) 2009 LSI Corporation. All rights reserved.


         Adapter      Vendor  Device                       SubSys  SubSys
 Index    Type          ID      ID    Pci Address          Ven ID  Dev ID
 -----  ------------  ------  ------  -----------------    ------  ------
   0     SAS2008     1000h    72h   00h:02h:00h:00h      1000h   0072h
SAS2IRCU: Utility Completed Successfully.

 

 

sas2ircu 0 display        // INDEX 0번 으로 구성된 RAID level 및 모든 디스크 상태보기

 

LSI Corporation SAS2 IR Configuration Utility.
Version 5.00.00.00 (2010.02.09)
Copyright (c) 2009 LSI Corporation. All rights reserved.

 

Read configuration has been initiated for controller 0
------------------------------------------------------------------------
Controller information
------------------------------------------------------------------------
  Controller type                         : SAS2008
  BIOS version                            : 7.03.00.00
  Firmware version                        : 5.00.00.00
  Channel description                     : 1 Serial Attached SCSI
  Initiator ID                            : 0
  Maximum physical devices                : 125
  Concurrent commands supported           : 2607
  Slot                                    : 27
  Segment                                 : 0
  Bus                                     : 2
  Device                                  : 0
  Function                                : 0
  RAID Support                            : Yes
------------------------------------------------------------------------
IR Volume information
------------------------------------------------------------------------
IR volume 1
  Volume ID                               : 172
  Status of volume                        : Okay (OKY)
  RAID level                              : RAID10
  Size (in MB)                            : 225064
  Physical hard disks                     :
  PHY[0] Enclosure#/Slot#                 : 1:0
  PHY[1] Enclosure#/Slot#                 : 1:1
  PHY[2] Enclosure#/Slot#                 : 1:2
  PHY[3] Enclosure#/Slot#                 : 1:3
  PHY[4] Enclosure#/Slot#                 : 1:5
  PHY[5] Enclosure#/Slot#                 : 1:4
  PHY[6] Enclosure#/Slot#                 : 1:6
  PHY[7] Enclosure#/Slot#                 : 1:7
------------------------------------------------------------------------
Physical device information
------------------------------------------------------------------------
Initiator at ID #0

 

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 0
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 57241/117231407
  Manufacturer                            : ATA
  Model Number                            : INTEL SSDSC2CW06
  Firmware Revision                       : 400i
  Serial No                               : CVCV153505L2060AGN
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

 

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 1
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 57241/117231407
  Manufacturer                            : ATA
  Model Number                            : INTEL SSDSC2CW06
  Firmware Revision                       : 400i
  Serial No                               : CVCV20300AS8060AGN
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

 

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 2
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 57241/117231407
  Manufacturer                            : ATA
  Model Number                            : INTEL SSDSC2CW06
  Firmware Revision                       : 400i
  Serial No                               : CVCV203007RB060AGN
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

 

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 3
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 57241/117231407
  Manufacturer                            : ATA
  Model Number                            : INTEL SSDSC2CW06
  Firmware Revision                       : 400i
  Serial No                               : CVCV15350377060AGN
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

 

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 4
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 57241/117231407
  Manufacturer                            : ATA
  Model Number                            : INTEL SSDSC2CW06
  Firmware Revision                       : 400i
  Serial No                               : CVCV1533019D060AGN
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

 

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 5
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 57241/117231407
  Manufacturer                            : ATA
  Model Number                            : INTEL SSDSC2CW06
  Firmware Revision                       : 400i
  Serial No                               : CVCV153201C4060AGN
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

 

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 6
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 57241/117231407
  Manufacturer                            : ATA
  Model Number                            : INTEL SSDSC2CW06
  Firmware Revision                       : 400i
  Serial No                               : CVCV153505DQ060AGN
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

 

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 7
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 57241/117231407
  Manufacturer                            : ATA
  Model Number                            : INTEL SSDSC2CW06
  Firmware Revision                       : 400i
  Serial No                               : CVCV203101HH060AGN
  Protocol                                : SATA
  Drive Type                              : SATA_SSD
------------------------------------------------------------------------
Enclosure information
------------------------------------------------------------------------
  Enclosure#                              : 1
  Logical ID                              : 500e0810:0004eae4
  Numslots                                : 8
  StartSlot                               : 0
------------------------------------------------------------------------
SAS2IRCU: Command DISPLAY Completed Successfully.
SAS2IRCU: Utility Completed Successfully.

 

 

3. 일일 체크 스크립트
아래 내용으로 스크립트 파일을 만들고 crontab 에 등록하여

30분 단위로 HDD 상태를 체크하도록 합니다.

> HDD 상태가 '최상'이 아닐 경우 메일 발송

 

crontab -e

mailto=""

00,30 * * * * sh /root/RAID_monitoring.sh

 

vi /root/hdd_list.txt

1

2

3

4

5

6

7                                                                   

 

vi /root/RAID_monitoring.sh

#!/bin/sh

 

check=`sas2ircu 0 display |grep State |grep -v Optimal |grep -v Rebuilding |wc -l`

 

if [ "$check" == "0" ]; then
echo "no problem"
else

  

    # 1~7 번 디스크중 에러난 디스크 체크
    check_hdd=`sas2ircu 0 display |grep 'Slot #' |awk '{print $4}'`
    echo "$check_hdd" > check_hdd.txt

    while read hdd_no trash
        do
    count=`cat check_hdd.txt |grep $hdd_no |wc -l`
    if [ "$count" == "1" ]; then
    echo ""
    else
    echo "$hdd_no" >> error_hdd_no.txt
    fi
        done < hdd_list.txt
 

    # 0 번 디스크 오류 여부 체크
     check0=`cat error_hdd_no.txt |wc -l`
    if [ "$check" == "$check0" ]; then
    echo ""
    else
    echo "0" >> error_hdd_no.txt
    fi

 

   # error_hdd_no.txt 에 입력된 값을 메일로 발송
    Email="admin@sysdocu.tistory.com"

    IP=`ifconfig |grep 'inet addr:' |awk '{print $2}' |sed 's/addr://g' |head -n 1`
    mail_subject="[중요] SYSDOCU ($IP) 서버의 HDD 상태를 체크해주세요."
    result=`cat error_hdd_no.txt`
    echo "SYSDOCU ($IP) 서버의 $result 번 디스크(들)에 오류가 생겼습니다." | mail -s "$mail_subject" $Email

 

fi

 

# 정리
rm -f check_hdd.txt error_hdd_no.txt

 

exit 0

 

반응형

댓글()