StorCLI 更换硬盘命令与状态检查

常用命令

查看硬盘状态

storcli64 /c0/eall/sall show all

查看某个硬盘状态

/opt/MegaRAID/storcli/storcli64 /c0/e22/s8 show all

打开定位灯

storcli64 /c0/e252/s2 start locate

关闭定位灯

storcli64 /c0/e252/s2 stop locate

硬盘设置成unconfig good

storcli64 /c0/e252/s2 set good force

硬盘设置成热备盘

storcli64 /c0/e65/s5 add hotsparedrive

预故障硬盘更换步骤

1. 使用命令确认磁盘的Predictive Failure Count 值是 11或更高

storcli /c0/e62/s29 show

2. 确认硬盘后,使用下面2条命令将硬盘设为脱机和失去

storcli /c0/e62/s29 set offline
storcli /c0/e62/s29 set missing

3. 打开硬盘定位灯

storcli /c0/e62/s29 start locate

4. 等待物理更换硬盘

5. 更换硬盘后,关闭硬盘定位灯

storcli /c0/e62/s29 stop locate

6. 查看新硬盘状态

storcli /c0/e62/s29 show

7. 如果硬盘不是Ugood状态,需要使用下面命令将硬盘设置成Unconfig Good状态

storcli /c0/e62/s29 set good force

8. 将硬盘设置成热备盘

storcli /c0/e62/s29 add hotsparedrive

脱机硬盘步骤参考

1. 等待rebulid完成

2. 检查rebuild状态、VD(Raid组状态)、硬盘Media Error数量。

storcli64 /c0/eall/sall show rebuild
storcli64 /c0/vall show all
storcli64 /c0/eall/sall show all

3. 使用下面2条命令将第一块硬盘(错误数量多的盘e252/s2)设为脱机。

storcli64 /c0/e252/s2 set offline

4. 打开硬盘定位灯。

storcli64 /c0/e252/s2 start locate

5. 等待工程师物理更换第一块硬盘,得到反馈更换后再操作下面步骤。

6. 关闭硬盘定位灯。

storcli64 /c0/e252/s2 stop locate

7. 查看新硬盘状态和rebuild状态。

storcli64 /c0/e252/s2 show
storcli64 /c0/eall/sall show rebuild

8. 如果新硬盘未自动Rebuild,将新硬盘设置为Ugood。(如果已开始rebuild请忽略此步)

storcli64 /c0/e252/s2 set good force
storcli64 /c0/eall/sall show rebuild

9. 如果新硬盘依然未Rebuild,将硬盘设置成热备盘。(如果已开始rebuild请忽略此步)

storcli64 /c0/e252/s2 add hotsparedrive
storcli64 /c0/eall/sall show rebuild

10. 等待Rebuild完成,然后确认rebuild完成、VD(raid组)状态正常,和新硬盘无Media Error。

storcli64 /c0/eall/sall show rebuild
storcli64 /c0/vall show all
storcli64 /c0/eall/sall show all

11. 确认上一步后,使用下面2条命令将第二块硬盘(e23/s0)设为脱机。

storcli64 /c0/e23/s0 set offline

12. 打开硬盘定位灯。

storcli64 /c0/e23/s0 start locate

13. 等待工程师物理更换第二块硬盘,得到反馈更换完后再操作下面步骤。

14. 关闭硬盘定位灯。

storcli64 /c0/e23/s0 start locate

15. 查看新硬盘状态和rebuild状态。

storcli64 /c0/e23/s0 show
storcli64 /c0/eall/sall show rebuild

16. 如果新硬盘未自动Rebuild,将新硬盘设置为Ugood。(如果已开始rebuild请忽略此步)

storcli64 /c0/e23/s0 set good force
storcli64 /c0/eall/sall show rebuild

17. 如果新硬盘依然未Rebuild,将硬盘设置成热备盘。(如果已开始rebuild请忽略此步)

storcli64 /c0/e23/s0 add hotsparedrive
storcli64 /c0/eall/sall show rebuild

18. 等待Rebuild完成,然后确认rebuild状态、VD(raid组)状态正常,和新硬盘无Media Error。

storcli64 /c0/eall/sall show rebuild
storcli64 /c0/vall show all
storcli64 /c0/eall/sall show all
2 次浏览 更新于 2026-11-04

同组文章阵列卡命令行工具

查看本组全部 11 篇

没有找到想要的答案?

上传日志让 AI 帮你诊断,或者在控制台里直接向 AI 提问。