megacli01 - meetbill/op_practice_book GitHub Wiki
raid0 热插拔(关机状态下拔盘,开机状态下插入)
简介
将一块硬盘做成单盘raid0,关机拔掉硬盘,将服务器重启后,将硬盘插入
操作环境
raid卡:LSIMegaRAIDSAS9271-8i
操作步骤
首先用fdisk看看能否看到硬盘,看不到,然后用MegaCli64看物理盘是否存在
通过以下命令看到物理硬盘是在的,但状态是Foreign
执行状态检测命令:
[root@meetbill ~]# /opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aall |grep 'Firmware state'
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
Firmware state: Unconfigured(good), Spun Up
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
执行导入命令
[root@meetbill ~]# /opt/MegaRAID/MegaCli/MegaCli64 -CfgForeign -Import -aall
Foreign configuration is imported on controller 0.
Exit Code: 0x00
再次执行状态检测命令:
[root@meetbill ~]# /opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aall |grep 'Firmware state'
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up