您的位置:首页 > 大数据 > 人工智能

一次服务器Raid在线重构

2017-01-12 00:00 204 查看
一天收到ngios报警,有一台服务器raid状态为Degraded

安装MegaCli

下载

登上服务器发现查看raid卡和磁盘信息如下:

[root@masterB1 MegaCli]# MegaCli64 -cfgdsply -aALL

OSSpecificInitialize: Failed to load libsysfs.so.2.0.2 Please ensure that libsfs is present in the system.
The dependent library libsysfs.so.2.0.1 not available. Please contact LSI for distribution of the package
==============================================================================
Adapter: 0
Product Name: PERC H310 Mini
Memory: 0MB
BBU: Absent
Serial No: 36Q020Z
==============================================================================
Number of DISK GROUPS: 1

DISK GROUP: 0
Number of Spans: 1
SPAN: 0
Span Reference: 0x00
Number of PDs: 2
Number of VDs: 1
Number of dedicated Hotspares: 0
Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 1.090 TB
Mirror Data         : 1.090 TB
State               : Degraded
Strip Size          : 64 KB
Number Of Drives    : 2
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
Physical Disk Information:
Physical Disk: 0

Physical Disk: 1
Enclosure Device ID: 32
Slot Number: 1
Drive's postion: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: 0
Device Id: 1
WWN: 5000CCA01D194FBB
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.090 TB [0x8bba0cb0 Sectors]
Non Coerced Size: 1.090 TB [0x8baa0cb0 Sectors]
Coerced Size: 1.090 TB [0x8ba80000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: U440
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000cca01d194fb9
SAS Address(1): 0x0
Connected Port Number: 1(path0)
Inquiry Data: HGST    HUC101212CSS600 U440KZGEXJHD
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 Temperature :29C (84.20 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's write cache : Disabled
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
[root@masterB1 MegaCli]#

所有物理磁盘信息如下:

[root@masterB1 MegaCli]# MegaCli64 -PDList

Enclosure Device ID: 32
Slot Number: 0
Drive's postion: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 0
Device Id: 0
WWN: 5000CCA01D156CFF
Sequence Number: 1
**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.090 TB [0x8bba0cb0 Sectors]
Non Coerced Size: 1.090 TB [0x8baa0cb0 Sectors]
Coerced Size: 1.090 TB [0x8ba80000 Sectors]
Firmware state: Unconfigured(good), Spun Up
Device Firmware Level: U440
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000cca01d156cfd
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: HGST    HUC101212CSS600 U440KZGBT8VD
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: Foreign
Foreign Secure: Drive is not secured by a foreign lock key
Device Speed: 6.
8000
0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :27C (80.60 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's write cache : Disabled
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

Enclosure Device ID: 32
Slot Number: 1
Drive's postion: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: 0
Device Id: 1
WWN: 5000CCA01D194FBB
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.090 TB [0x8bba0cb0 Sectors]
Non Coerced Size: 1.090 TB [0x8baa0cb0 Sectors]
Coerced Size: 1.090 TB [0x8ba80000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: U440
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000cca01d194fb9
SAS Address(1): 0x0
Connected Port Number: 1(path0)
Inquiry Data: HGST    HUC101212CSS600 U440KZGEXJHD
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 Temperature :29C (84.20 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's write cache : Disabled
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
[root@masterB1 MegaCli]#

从中可以明显的看出

slotnumber为0的硬盘为Foreign状态

而固件状态是好的Firmware state: Unconfigured(good),Spun Up

接口处于活动 Port status: Active

磁盘介质没有损坏

Media Error Count: 0
Other Error Count: 0

得出如下结论:
Foreign磁盘完好,raid降级原因可能是,磁盘损坏后,售后人员换盘时没有清除磁盘信息。无法重构。
也有可能,磁盘或raid卡的固件本身问题,使用过程中跑掉线了。

解决方法:

清除Raid信息

进行重构

操作命令:

清除foreign信息

./MegaCli64  cfgforeign clear aall

将磁盘进行重构

./MegaCli64  pdrbld start physdrv[32:0] a0

发现硬盘不能直接重构

将磁盘设为热备盘

./MegaCli64  PDHSP Set EnclAffinity PhysDrv[32:0] a0

开始重构,查看进度:

./MegaCli64  pdrbld showprog physdrv[32:0] a0

接下来就是等待----

永久的等待-----
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Linux 系统