OS

2024.06.28 10:53

LINUX MegaRAID 점검 megacli 사용법

  • 비아웹 오래 전 2024.06.28 10:53 인기
  • 455
    0

LSI의 MegaRAID Controller를 사용하는 시스템에서는 MegaCLI 명령을 사용하여, RAID 구성 및 디스크 상태 체크 및 정보를 확인 할 수 있습니다.

먼저 서버에서 사용중인 RAID Controller를 확인해보면

lspci | grep RAID 

03:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2008 [Falcon] (rev 03)

 

OS버전 및 레이드 종류에 따라 알맞은 소프트웨어를 다운로드 해줍니다.

최근에는 StorCli를 사용하기도 합니다.

  • 설치를 위한 라이브러리 설치 

# yum -y install wget unzip
  • megacli 설치파일 다운로드 

# wget http://mirror.nforce.com/pub/software/raidtools/Megaraid/8-07-14_MegaCLI.zip
  • 압축 풀고 megacli rpm 설치

# unzip 8-07-14_MegaCLI.zip
 # cd Linux 
# rpm -ivh MegaCli-8.07.14-1.noarch.rpm Preparing... ################################# [100%] 
Updating / installing...1:MegaCli-8.07.14-1 ################################# [100%]
  • megacli path 설정 

ln -s /opt/MegaRAID/Megacli/Megacli64 /usr/bin/megacli

이렇게 해주시면 어느 디렉토리에서든 megacli 명령어가 동작합니다.

 

  • megacli 명령어 사용법

물리디스크 정보 확인

# megacli -pdlist -aall


Adapter #0


Enclosure Device ID: 32

Slot Number: 0

Drive's position: DiskGroup: 0, Span: 0, Arm: 0

Enclosure position: 1

Device Id: 0

WWN: 5000C5008FB496B0

Sequence Number: 2

Media Error Count: 0

Other Error Count: 0

Predictive Failure Count: 0

Last Predictive Failure Event Seq Number: 0

PD Type: SAS


Raw Size: 558.911 GB [0x45dd2fb0 Sectors]

Non Coerced Size: 558.411 GB [0x45cd2fb0 Sectors]

Coerced Size: 558.375 GB [0x45cc0000 Sectors]

Sector Size:  0

Firmware state: Online, Spun Up

Device Firmware Level: VT31

Shield Counter: 0

Successful diagnostics completion on :  N/A

SAS Address(0): 0x5000c5008fb496b1

SAS Address(1): 0x0

Connected Port Number: 0(path0)

Inquiry Data: SEAGATE ST600MP0005     VT31S7M0TR86

FDE Capable: Not Capable

FDE Enable: Disable

Secured: Unsecured

Locked: Unlocked

Needs EKM Attention: No

Foreign State: None

Device Speed: Unknown

Link Speed: 6.0Gb/s

Media Type: Hard Disk Device

Drive Temperature :33C (91.40 F)

PI Eligibility:  No

Drive is formatted for PI information:  No

PI: No PI

Port-0 :

Port status: Active

Port's Linkspeed: 6.0Gb/s

Port-1 :

Port status: Active

Port's Linkspeed: Unknown

Drive has flagged a S.M.A.R.T alert : No


Exit Code: 0x00

 중요시 봐야할 부분은

Media Error Count: 0

Other Error Count: 0

Predictive Failure Count: 0

Last Predictive Failure Event Seq Number: 0

이 4가지 이며, 이중 한가지라도 카운트가 올라간다면 디스크 점검이 필요합니다.

 

논리 디스크 정보 확인

# megacli -ldinfo -lall -aall

Adapter 0 -- Virtual Drive Information:

Virtual Drive: 0 (Target Id: 0)

Name                :

RAID Level          : Primary-0, Secondary-0, RAID Level Qualifier-0

Size                : 558.375 GB

Sector Size         : 512

Parity Size         : 0

State               : Optimal

Strip Size          : 64 KB

Number Of Drives    : 1

Span Depth          : 1

Default Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU

Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU

Default Access Policy: Read/Write

Current Access Policy: Read/Write

Disk Cache Policy   : Disk's Default

Encryption Type     : None

Default Power Savings Policy: Controller Defined

Current Power Savings Policy: None

Can spin up in 1 minute: Yes

LD has drives that support T10 power conditions: Yes

LD's IO profile supports MAX power savings with cached writes: No

Bad Blocks Exist: No

Is VD Cached: No


Exit Code: 0x00

논리 디스크 정보를 보는 명령어이며,

Raid Level에 Primary 다음에 오는 숫자가 레이드레벨 입니다. ex ) 0,1,5,6

 

레이드 컨트롤러 정보 확인

# megacli -adpallinfo -aall


Adapter #0


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

                    Versions

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

Product Name    : PERC H310 Mini

Serial No       : 39H007P

FW Package Build: 20.11.0-0002


                    Mfg. Data

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

Mfg. Date       : 09/20/13

Rework Date     : 09/20/13

Revision No     : A05

Battery FRU     : N/A


                Image Versions in Flash:

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

BIOS Version       : 4.29.00_4.12.05.00_0x05110000

Preboot CLI Version: 03.02-015:#%00008

Ctrl-R Version     : 3.00-0020

NVDATA Version     : 3.09.03-0038

FW Version         : 2.120.14-1730

Boot Block Version : 2.02.00.00-0001


                Pending Images in Flash

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

None


                PCI Info

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

Controller Id   : 0000

Vendor Id       : 1000

Device Id       : 0073

SubVendorId     : 1028

SubDeviceId     : 1f51


Host Interface  : PCIE

(이하 중략)

 
추가적으로 실무에 도움될만한 명령어 모음입니다.

* LSI MegaRAID CLI 비프음 끄기(일시적)

 
# megacli -adpsetprop alarmsilence -aall
 

* 자동리빌딩 설정 상태

#>MegaCli -AdpAutoRbld -Enbl -a0 //사용

#>MegaCli -AdpAutoRbld -Dsbl -a0 //사용안함

#>MegaCli -AdpAutoRbld -Dsply -a0 //사용여부 체크 

 

* 리빌드 진행상태 

# megacli -pdrbld -showprog -physdrv [32:0]-a0 
  [E:S][Enclosure Device ID:Slot Number]

[]안에 들어가는 번호는 서버마다 다르기에 점검을 필요로 하는 서버에서

물리디스크 정보 확인 명령어를 통해 알 수 있습니다.

# megacli -pdlist -aall


Adapter #0


Enclosure Device ID: 32

Slot Number: 0

 


 

 

  • 공유링크 복사

    댓글목록

    등록된 댓글이 없습니다.