服务器新盘无法识别(JBOD)

在运维过程中,服务器硬盘故障与更换可能是比较频繁的一个工作。或自己动手更换、或指导更换、或提供更换方案。不同的服务器厂商有着各自不同的硬件管理标准,可能导致更换的新硬盘无法被操作系统识别。而厂商或许给的建议是,重启机器在开机的Raid卡管理界面配置一下就好了...就好了..就好了....。业务在运行,不能因为一块磁盘故障就关机停业务啊。

在系统中是可以对硬盘管理的。但这需要运维人员有一定的技术积累,和能否找到这篇文章(嘿嘿。。俏皮一下)

首先在各大厂商中,HP的服务器还是不错的,有自己的管理工具。本文主要介绍的是除HP外,其他使用 LSI 的厂商。

新更换的硬盘不能被识别,常见的有两种情况,一种是需要做JBOD、另一种是需要做单盘Raid0。做单盘Raid0的方法请参考另一篇文章【服务器新盘无法识别(Raid0)

查看硬盘信息

查看硬盘列表信息,主要观察Firmware state的值是否为JBOD。

Firmware state: JBOD

以下截取部分信息参考阅读

/opt/MegaRAID/MegaCli/MegaCli64  -pdlist -aAll

Adapter #0

Enclosure Device ID: 32
Slot Number: 8
Enclosure position: 1
Device Id: 0
WWN: 55cd2e404c3d4f8e
Sequence Number: 2
Media Error Count: 0
Other Error Count: 6888
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA

Raw Size: 447.130 GB [0x37e436b0 Sectors]
Non Coerced Size: 446.630 GB [0x37d436b0 Sectors]
Coerced Size: 446.625 GB [0x37d40000 Sectors]
Emulated Drive: Yes
Firmware state: JBOD
Device Firmware Level: DL2B
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3e18079c0
Connected Port Number: 0(path0) 
Inquiry Data:   BTWA6414071X480FGNINTEL SSDSC2BB480G6R                    G201DL2B
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: Solid State Device
Drive Temperature :22C (71.60 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Drive has flagged a S.M.A.R.T alert : No

命令参数解释:

  • -pdlist :查看物理磁盘的列表
  • -aAll : 指明Adapter Raid卡

查看是否有逻辑盘

这里一般是没有逻辑盘的,明显区别于单盘Raid0

#/opt/MegaRAID/MegaCli/MegaCli64   -ldpdinfo-aAll

Adapter #0

Number of Virtual Disks: 0

Exit Code: 0x00

命令参数解释:

  • -ldpdinfo:查看物理磁盘和逻辑盘的信息
  • -aAll : 指明Adapter Raid卡

判断JBOD开启状态

如果系统使用了JBOD的模式,这里JBOD的值应该是Enabled的。

# /opt/MegaRAID/MegaCli/MegaCli64 -AdpGetProp -enablejbod -aALL

Adapter 0: JBOD: Disabled

Exit Code: 0x00

命令参数解释:

  • -AdpGetProp :获取Raid的配置信息
  • -enablejbod :指定需要操作的配置,这里默认是查看jbod的配置
  • -aAll : 指明Adapter Raid卡

如果新服务器需要启用JBOD模式,可以配置

 /opt/MegaRAID/MegaCli/MegaCli64 -AdpSetProp -EnableJBOD -1 -aALL

Adapter 0: Set JBOD to Enable success.

Exit Code: 0x00

命令参数解释:

  • -AdpSetProp :配置Raid的配置信息
  • -enablejbod :指定需要操作的配置
  • -1 :1是开启,0是关闭
  • -aAll : 指明Adapter Raid卡

    配置硬盘模式

    配置新盘为JBOD的模式状态

    /opt/MegaRAID/MegaCli/MegaCli64 -PDMakeJBOD -PhysDrv[32:8] -a0

    命令参数解释:

  • -PDMakeJBOD :物理磁盘制作JBOD模式的指令
  • --PhysDrv[32:8]:指定物理硬盘的槽位。就是这两个值Enclosure Device ID: 32 ,Slot Number: 8
  • -a0 :指定需要操作的raid卡

    验证判断

    原来用以下命令无法看到盘,现在可以看到了。能看到就可以分区、格式化、挂载、使用啦。

    fdisk -l
    lsblk

    安啦~

Copyright © 温玉 2021 | 浙ICP备2020032454号 all right reserved,powered by Gitbook该文件修订时间: 2021-05-09 08:53:25

results matching ""

    No results matching ""