Raid1磁盘故障更换

监控显示服务器的磁盘故障,查看是插槽0的磁盘有问题,联系机房进行更换,Raid1更换磁盘直接在故障盘的槽位热插拔即可,切记不要拔错了。

服务器:R640

一、查看硬盘信息

megacli -PDList -aAll -NoLog
                                     
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: 5000C500D213ECE0
Sequence Number: 12
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS

Raw Size: 1.636 TB [0xd196e9b0 Sectors]
Non Coerced Size: 1.636 TB [0xd186e9b0 Sectors]
Coerced Size: 1.636 TB [0xd1840000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  4096
Firmware state: Rebuild
Device Firmware Level: ST58
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000c500d213ece1
SAS Address(1): 0x0
Connected Port Number: 0(path0) 
Inquiry Data: SEAGATE DL1800MM0159    ST58WBN3PQQ0            
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: 12.0Gb/s 
Link Speed: 12.0Gb/s 
Media Type: Hard Disk Device
Drive Temperature :24C (75.20 F)
PI Eligibility:  No 
Drive is formatted for PI information:  Yes 
PI: PI with type 2
Port-0 :
Port status: Active
Port's Linkspeed: 12.0Gb/s 
Port-1 :
Port status: Active
Port's Linkspeed: 12.0Gb/s 
Drive has flagged a S.M.A.R.T alert : No



Enclosure Device ID: 32
Slot Number: 1
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: 1
Device Id: 1
WWN: 5000039968186540
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: 1.636 TB [0xd196e9b0 Sectors]
Non Coerced Size: 1.636 TB [0xd186e9b0 Sectors]
Coerced Size: 1.636 TB [0xd1840000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  4096
Firmware state: Online, Spun Up
Device Firmware Level: EF03
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000039968186542
SAS Address(1): 0x0
Connected Port Number: 0(path0) 
Inquiry Data: TOSHIBA AL15SEB18EQY    EF035950A3KSFQZF        
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: 12.0Gb/s 
Link Speed: 12.0Gb/s 
Media Type: Hard Disk Device
Drive Temperature :27C (80.60 F)
PI Eligibility:  No 
Drive is formatted for PI information:  Yes 
PI: PI with type 2
Port-0 :
Port status: Active
Port's Linkspeed: 12.0Gb/s 
Port-1 :
Port status: Active
Port's Linkspeed: 12.0Gb/s 
Drive has flagged a S.M.A.R.T alert : No

二、卸载故障盘

megacli -PDOffline -PhysDrv[32:0] -a0

32和0的对应关系

Enclosure Device ID: 32
Slot Number: 0

三、让机房更换磁盘

megacli -PDList -aAll -NoLog
                                     
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: 5000C500D213ECE0
Sequence Number: 12
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS

Raw Size: 1.636 TB [0xd196e9b0 Sectors]
Non Coerced Size: 1.636 TB [0xd186e9b0 Sectors]
Coerced Size: 1.636 TB [0xd1840000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  4096
Firmware state: Rebuild

查看硬盘正则rebuild,等待变成Online即可。

四、查看rebuild进度

megacli -PDRbld -ShowProg -PhysDrv[32:0] -aAll
                                     
Rebuild Progress on Device at Enclosure 32, Slot 0 Completed 28% in 34 Minutes.

Exit Code: 0x00

五、检查磁盘rebuild后是否在线的状态

megacli -PDList -aAll -NoLog | grep 'Firmware state'
Firmware state: Rebuild
Firmware state: Online, Spun Up

当Firmware state 变成Online, Spun Up 就已经rebuild结束。

 

也许世上本没有幸运二字,只有那些给自己提出严格的要求,并且以高度自律逼自己完成的人,才能得到别人眼里的心想事成。
原文地址:https://www.cnblogs.com/shigozsr/p/13475712.html