컨트롤러 장착 확인
lshw -c "storage" |more
1. Mega Radi tool 설치
web bios에서 Raid를 설정한 후 os로 부팅하여 megacli을 설치한다.
#wget http://mirror.nforce.com/pub/software/raidtools/Megaraid/8-07-14_MegaCLI.zip
#unzip 8-07-14_MegaCLI.zip
#cd Linux (운영체제에 맞게 선택한다.)
#rpm -ivh MegaCli-8.07.14-1.noarch.rpm
#ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/bin/megacli
(필요할 경우 다른 툴 storcli Raid tool 설치)
# tar xvfz 17.05.00.02_Linux-46_MSM.gz
# cd disk
# sh RunRPM
2. 디스크 정보 확인
물리 디스크 확인 명령어
[root@localhost Linux]# /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL
Adapter #0
Enclosure Device ID: 252
Slot Number: 0 --> 0번 주기가되어 있는 슬롯의 디스크 상태
Drive's position: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: N/A
Device Id: 10
WWN: 50014ee15903630b
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 465.761 GB [0x3a386030 Sectors]
Non Coerced Size: 465.261 GB [0x3a286030 Sectors]
Coerced Size: 464.729 GB [0x3a175800 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: 1H15
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x4433221103000000
Connected Port Number: 3(path0)
Inquiry Data: WD-WCAYUE212980WDC WD5000AAKX-001CA0 15.01H15
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive: Not Certified
Drive Temperature :44C (111.20 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
↑하나의 디스크에 대한 정보의 출력이다.
grep으로 모든 디스크의 상태가 Spun Up 이나 Failed가 있는 지 확인한다.
[root@localhost Linux]# /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL |grep Firmware
Firmware state: Online, Spun Up
Device Firmware Level: 1H15
Firmware state: Online, Spun Up
Device Firmware Level: CC46
Firmware state: Online, Spun Up
Device Firmware Level: JC45
Firmware state: Online, Spun Up
Device Firmware Level: KC48
Firmware state: Online, Spun Up
Device Firmware Level: JC45
Firmware state: Online, Spun Up
Device Firmware Level: 1H15
Firmware state: Online, Spun Up
Device Firmware Level: 1D05
Firmware state: Rebuild <- 리빌드 중인 디스크가 확인 됨.
Device Firmware Level: 1H15
3.Raid Controller 정보 확인
[root@localhost Linux]# /opt/MegaRAID/MegaCli/MegaCli64 -ShowSummary -aALL
System
Operating System: Linux version 3.10.0-957.el7.x86_64
Driver Version: 07.705.02.00-rh1
CLI Version: 8.07.14
Hardware
Controller
ProductName : LSI MegaRAID SAS 9261-8i(Bus 0, Dev 0)
SAS Address : 500605b00516b7b1
FW Package Version: 12.12.0-0036
Status : Need Attention
Enclosure
Product Id : SGPIO
Type : SGPIO
Status : OK
PD
Connector : Port 0 - 3: Slot 3
Vendor Id : ATA
Product Id : ST500DM002-1BD14
State : Online
Disk Type : SATA,Hard Disk Device
Capacity : 464.729 GB
Power State : Active
Connector : Port 0 - 3: Slot 2
Vendor Id : ATA
Product Id : ST3500413AS
State : Online
Disk Type : SATA,Hard Disk Device
Capacity : 464.729 GB
Power State : Active
Connector : Port 0 - 3: Slot 0
Vendor Id : ATA
Product Id : WDC WD5000AAKX-0
State : Online
Disk Type : SATA,Hard Disk Device
Capacity : 464.729 GB
Power State : Active
Connector : Port 0 - 3: Slot 1
Vendor Id : ATA
Product Id : ST3500418AS
State : Online
Disk Type : SATA,Hard Disk Device
Capacity : 464.729 GB
Power State : Active
Connector : Port 4 - 7: Slot 7
Vendor Id : ATA
Product Id : WDC WD5000AAKX-0
State : Rebuild
Disk Type : SATA,Hard Disk Device
Capacity : 464.729 GB
Power State : Active
Operation In Progress : Rebuild
Connector : Port 4 - 7: Slot 6
Vendor Id : ATA
Product Id : WDC WD5000AAKS-0
State : Online
Disk Type : SATA,Hard Disk Device
Capacity : 464.729 GB
Power State : Active
Connector : Port 4 - 7: Slot 5
Vendor Id : ATA
Product Id : WDC WD5000AAKX-0
State : Online
Disk Type : SATA,Hard Disk Device
Capacity : 464.729 GB
Power State : Active
Connector : Port 4 - 7: Slot 4
Vendor Id : ATA
Product Id : ST3500413AS
State : Online
Disk Type : SATA,Hard Disk Device
Capacity : 464.729 GB
Power State : Active
Storage
Virtual Drives
Virtual drive : Target Id 0 ,VD name
Size : 2.722 TB --> 레이드로 잡힌 디스크의 총 크기
State : Partially Degraded
RAID Level : 6 --> 레이드 번호
4.위 명령어로 확인 후 문제 발생 시 디스크 교체 및 재 장착 시도 후 자동으로 리빌딩 걸리는 지 확인해야 함.
#./MegaCli64 -AdpAutoRbld -Dsply -a0
Adapter 0: AutoRebuild is Disabled.
Exit Code: 0x00
# ./MegaCli64 -AdpAutoRbld -enbl -a0
Adapter 0: AutoRebuild is Enabled.
Exit Code: 0x00
5.위의 명령어로 자동 리빌딩을 걸었다면 실제 디스크를 배고 30초 혹은 1분뒤에 다시 꽂아서 자동 리빌딩 되는 지 확인 할 것.
만약 자동으로 리빌딜이 되지 않을 경우, 수동으로 진행해야 함.
# ./MegaCli64 -PDList -aALL |grep Firm
Firmware state: Online, Spun Up
Device Firmware Level: 1H15
Firmware state: Online, Spun Up
Device Firmware Level: CC46
Firmware state: Online, Spun Up
Device Firmware Level: JC45
Firmware state: Online, Spun Up
Device Firmware Level: KC48
Firmware state: Online, Spun Up
Device Firmware Level: JC45
Firmware state: Online, Spun Up
Device Firmware Level: 1H15
Firmware state: Online, Spun Up
Device Firmware Level: 1D05
Firmware state: Unconfigured(bad)
Device Firmware Level: 1H1
# ./MegaCli64 -PDList -aALL |grep Slot
Slot Number: 0
Slot Number: 1
Slot Number: 2
Slot Number: 3
Slot Number: 4
Slot Number: 5
Slot Number: 6
문제가있는 디스크의 순서를 잘 기억해야 한다.
위의 명령어 중에서 레이드 구성 정보를 확인할 때 부여되는 ID 값 252와 문제되는 슬롯의 번호를 아래와 같이 입력하여 디스크를 리빌딩할 수 있는 상태로 변경할 것.
# ./MegaCli64 -pdmakegood -physdrv [252:7] -a0
Adapter: 0: EnclId-252 SlotId-7 state changed to Unconfigured-Good.
Exit Code: 0x00
디스크 상태를 foreign 디스크 상태를 clear 할 것
# ./MegaCli64 -cfgforeign -clear -a0
Foreign configuration 0 is cleared on controller 0.
Exit Code: 0x00
디스크를 hot spare 설정하여 auto rebuild 진행할 것
# ./MegaCli64 -pdhsp -set -physdrv [252:7] -a0
Adapter: 0: Set Physical Drive at EnclId-252 SlotId-7 as Hot Spare Success.
Exit Code: 0x00
디스크가 리빌딩 되고 있는지 확인할 수 있는 명령어
# ./MegaCli64 -pdrbld -showprog -physdrv[252:7] -a0
Rebuild Progress on Device at Enclosure 252, Slot 7 Completed 0% in 0 Minutes.
Exit Code: 0x00
StorCLI tool 명령어
진행중인 리빌딩 확인 : /usr/local/MegaRAID\ Storage\ Manager/StorCLI/storcli64 -pdrbld -showprog -physdrv[252:4] -a0
'RAID' 카테고리의 다른 글
RAID 설정 메뉴얼 (0) | 2019.08.24 |
---|---|
raid 설정 (0) | 2019.08.05 |