How To Check Raid Status and Replace Using Megacli
On raid
In this case,im using raid 1 with 2 physical drive.
- Check the Raid status using this command
[root@linux ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL -NoLog
Adapter 0 -- Virtual Drive Information:Virtual Drive: 0 (Target Id: 0)Name :RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0Size : 136.125 GBMirror Data : 136.125 GBState : DegradedStrip Size : 64 KBNumber Of Drives : 2Span Depth : 1Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBUCurrent Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBUDefault Access Policy: Read/WriteCurrent Access Policy: Read/WriteDisk Cache Policy : Disk's DefaultEncryption Type : NoneIs VD Cached: NoExit Code: 0x00
And the raid status is Degraded,we need to replace the bad drive.
- Check which drive is bad
Use this command to list all physical drive with their status
[root@web01 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL
Adapter #0
Enclosure Device ID: 32
Slot Number: 0
Drive's postion: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: N/A
Device Id: 0
WWN:
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: 136.732 GB [0x11177328 Sectors]
Non Coerced Size: 136.232 GB [0x11077328 Sectors]
Coerced Size: 136.125 GB [0x11040000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: S527
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c5000aaff44d
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: SEAGATE ST3146855SS S5273LN5G5KH
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :26C (78.80 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 1
Drive's postion: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: N/A
Device Id: 1
WWN:
Sequence Number: 3
Media Error Count: 7
Other Error Count: 1
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 136.732 GB [0x11177328 Sectors]
Non Coerced Size: 136.232 GB [0x11077328 Sectors]
Coerced Size: 136.125 GB [0x11040000 Sectors]
Firmware state: Failed
Device Firmware Level: S527
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c5000aaffaf9
SAS Address(1): 0x0
Connected Port Number: 1(path0)
Inquiry Data: SEAGATE ST3146855SS S5273LN5G42B
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :26C (78.80 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No
Exit Code: 0x00
# From those result,there are 2 drive slot 0 and slot 1
slot 0 : Firmware state Online,spun up and no error (this drive should be normal)
slot 1 : Firmware state Failed ,Media error count 7 Other error count 1 (this should be the bad one)
slot 1 need to be replaced,so we should replace the second drive
- replace the second drive
it should be auto rebuild afterward
- Done !
# Megacli command reference : https://supportforums.cisco.com/document/62901/megacli-common-commands-and-procedures
# Megacli Raid level explanation : https://globalroot.wordpress.com/2013/06/18/megacli-raid-levels/
# Megacli Raid level explanation : https://globalroot.wordpress.com/2013/06/18/megacli-raid-levels/
No Comment to " How To Check Raid Status and Replace Using Megacli "