侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

一次服务器Raid在线重构

2023-11-30 星期四 / 0 评论 / 0 点赞 / 49 阅读 / 6726 字

一天收到ngios报警,有一台服务器raid状态为Degraded安装MegaCli下载登上服务器发现查看raid卡和磁盘信息如下:[root@masterB1 MegaCli]# MegaCli64

一天收到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: 0Product Name: PERC H310 MiniMemory: 0MBBBU: AbsentSerial No: 36Q020Z==============================================================================Number of DISK GROUPS: 1DISK GROUP: 0Number of Spans: 1SPAN: 0Span Reference: 0x00Number of PDs: 2Number of VDs: 1Number of dedicated Hotspares: 0Virtual Drive Information:Virtual Drive: 0 (Target Id: 0)Name                :RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0Size                : 1.090 TBMirror Data         : 1.090 TBState               : DegradedStrip Size          : 64 KBNumber Of Drives    : 2Span Depth          : 1Default Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBUCurrent Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBUDefault Access Policy: Read/WriteCurrent Access Policy: Read/WriteDisk Cache Policy   : Disk's DefaultEncryption Type     : NoneDefault Power Savings Policy: Controller DefinedCurrent Power Savings Policy: NoneCan spin up in 1 minute: YesLD has drives that support T10 power conditions: YesLD's IO profile supports MAX power savings with cached writes: NoBad Blocks Exist: NoIs VD Cached: NoPhysical Disk Information:Physical Disk: 0Physical Disk: 1Enclosure Device ID: 32Slot Number: 1Drive's postion: DiskGroup: 0, Span: 0, Arm: 1Enclosure position: 0Device Id: 1WWN: 5000CCA01D194FBBSequence Number: 2Media Error Count: 0Other Error Count: 0Predictive Failure Count: 0Last Predictive Failure Event Seq Number: 0PD Type: SASRaw 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 UpDevice Firmware Level: U440Shield Counter: 0Successful diagnostics completion on :  N/ASAS Address(0): 0x5000cca01d194fb9SAS Address(1): 0x0Connected Port Number: 1(path0) Inquiry Data: HGST    HUC101212CSS600 U440KZGEXJHD            FDE Enable: DisableSecured: UnsecuredLocked: UnlockedNeeds EKM Attention: NoForeign State: None Device Speed: 6.0Gb/s Link Speed: 6.0Gb/s Media Type: Hard Disk DeviceDrive Temperature :29C (84.20 F)PI Eligibility:  No Drive is formatted for PI information:  NoPI: No PIDrive's write cache : DisabledPort-0 :Port status: ActivePort's Linkspeed: 6.0Gb/s Port-1 :Port status: ActivePort's Linkspeed: Unknown Drive has flagged a S.M.A.R.T alert : NoExit Code: 0x00[root@masterB1 MegaCli]#

所有物理磁盘信息如下:

[root@masterB1 MegaCli]# MegaCli64 -PDListEnclosure Device ID: 32Slot Number: 0Drive's postion: DiskGroup: 0, Span: 0, Arm: 0Enclosure position: 0Device Id: 0WWN: 5000CCA01D156CFFSequence Number: 1**Media Error Count: 0****Other Error Count: 0**Predictive Failure Count: 0Last Predictive Failure Event Seq Number: 0PD Type: SASRaw 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 UpDevice Firmware Level: U440Shield Counter: 0Successful diagnostics completion on :  N/ASAS Address(0): 0x5000cca01d156cfdSAS Address(1): 0x0Connected Port Number: 0(path0) Inquiry Data: HGST    HUC101212CSS600 U440KZGBT8VD            FDE Enable: DisableSecured: UnsecuredLocked: UnlockedNeeds EKM Attention: NoForeign State: ForeignForeign Secure: Drive is not secured by a foreign lock keyDevice Speed: 6.0Gb/s Link Speed: 6.0Gb/s Media Type: Hard Disk DeviceDrive Temperature :27C (80.60 F)PI Eligibility:  No Drive is formatted for PI information:  NoPI: No PIDrive's write cache : DisabledPort-0 :Port status: ActivePort's Linkspeed: 6.0Gb/s Port-1 :Port status: ActivePort's Linkspeed: Unknown Drive has flagged a S.M.A.R.T alert : NoEnclosure Device ID: 32Slot Number: 1Drive's postion: DiskGroup: 0, Span: 0, Arm: 1Enclosure position: 0Device Id: 1WWN: 5000CCA01D194FBBSequence Number: 2Media Error Count: 0Other Error Count: 0Predictive Failure Count: 0Last Predictive Failure Event Seq Number: 0PD Type: SASRaw 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 UpDevice Firmware Level: U440Shield Counter: 0Successful diagnostics completion on :  N/ASAS Address(0): 0x5000cca01d194fb9SAS Address(1): 0x0Connected Port Number: 1(path0) Inquiry Data: HGST    HUC101212CSS600 U440KZGEXJHD            FDE Enable: DisableSecured: UnsecuredLocked: UnlockedNeeds EKM Attention: NoForeign State: None Device Speed: 6.0Gb/s Link Speed: 6.0Gb/s Media Type: Hard Disk DeviceDrive Temperature :29C (84.20 F)PI Eligibility:  No Drive is formatted for PI information:  NoPI: No PIDrive's write cache : DisabledPort-0 :Port status: ActivePort's Linkspeed: 6.0Gb/s Port-1 :Port status: ActivePort's Linkspeed: Unknown Drive has flagged a S.M.A.R.T alert : NoExit Code: 0x00[root@masterB1 MegaCli]#

从中可以明显的看出

slotnumber为0的硬盘为Foreign状态

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

接口处于活动 Port status: Active

磁盘介质没有损坏

Media Error Count: 0Other Error Count: 0

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

解决方法:

  1. 清除Raid信息
  2. 进行重构

操作命令:

清除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

接下来就是等待----

永久的等待-----

广告 广告

评论区