MegaCli监控raid状态命令使用

#/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL 查raid级别

  1. #/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL 查raid卡信息

  2. #/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL 查看硬盘信息

  3. #/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -aAll 查看电池信息

  4. #/opt/MegaRAID/MegaCli/MegaCli64 -FwTermLog -Dsply -aALL 查看raid卡日志

  5. #/opt/MegaRAID/MegaCli/MegaCli64 -adpCount 【显示适配器个数】

  6. #/opt/MegaRAID/MegaCli/MegaCli64 -AdpGetTime �CaALL 【显示适配器时间】

  7. #/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aAll 【显示所有适配器信息】

  8. #/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -LALL -aAll 【显示所有逻辑磁盘组信息】

  9. #/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll 【显示所有的物理信息】

  10. #/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL |grep ‘Charger Status’ 【查看充电状态】

  11. #/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL【显示BBU状态信息】

  12. #/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuCapacityInfo -aALL【显示BBU容量信息】

  13. #/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuDesignInfo -aALL 【显示BBU设计参数】

  14. #/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuProperties -aALL 【显示当前BBU属性】

  15. #/opt/MegaRAID/MegaCli/MegaCli64 -cfgdsply -aALL 【显示Raid卡型号,Raid设置,Disk相关信息】

  16. 3.磁带状态的变化,从拔盘,到插盘的过程中。

  17. Device |Normal|Damage|Rebuild|Normal

  18. Virtual Drive |Optimal|Degraded|Degraded|Optimal

  19. Physical Drive |Online|Failed �C> Unconfigured|Rebuild|Online

  20. 4.查看磁盘缓存策略

  21. #/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -L0 -a0

  22. or

  23. #/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -L1 -a0

  24. or

  25. #/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -LALL -a0

  26. ro

  27. #/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -LALL -aALL

  28. ro

  29. #/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -DskCache -LALL -aALL

  30. 5.设置磁盘缓存策略

  31. 缓存策略解释:


  32. WT (Write through

  33. WB (Write back)

  34. NORA (No read ahead)

  35. RA (Read ahead)

  36. ADRA (Adaptive read ahead)

  37. Cached

  38. Direct

  39. 例子:

  40. #/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp WT|WB|NORA|RA|ADRA -L0 -a0

  41. or

  42. #/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -Cached|-Direct -L0 -a0

  43. or

  44. enable / disable disk cache

  45. #/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -EnDskCache|-DisDskCache -L0 -a0

  46. 6.创建一个 raid5 阵列,由物理盘 2,3,4 构成,该阵列的热备盘是物理盘 5

  47. #/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -Hsp[1:5] -a0

  48. 7.创建阵列,不指定热备

  49. #/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -a0

  50. 8.删除阵列

  51. #/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L1 -a0

  52. 9.在线添加磁盘

  53. #/opt/MegaRAID/MegaCli/MegaCli64 -LDRecon -Start -r5 -Add -PhysDrv[1:4] -L1 -a0

  54. 10.阵列创建完后,会有一个初始化同步块的过程,可以看看其进度。

  55. #/opt/MegaRAID/MegaCli/MegaCli64 -LDInit -ShowProg -LALL -aALL

  56. 或者以动态可视化文字界面显示

  57. #/opt/MegaRAID/MegaCli/MegaCli64 -LDInit -ProgDsply -LALL -aALL

  58. 11.查看阵列后台初始化进度

  59. #/opt/MegaRAID/MegaCli/MegaCli64 -LDBI -ShowProg -LALL -aALL

  60. 或者以动态可视化文字界面显示

  61. #/opt/MegaRAID/MegaCli/MegaCli64 -LDBI -ProgDsply -LALL -aALL

  62. 12.指定第 5 块盘作为全局热备

  63. #/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0

  64. 13.指定为某个阵列的专用热备

  65. #/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set [-Dedicated [-Array1]] [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0

  66. 14.删除全局热备

  67. #/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Rmv -PhysDrv[1:5] -a0

  68. 15.将某块物理盘下线/上线

  69. #/opt/MegaRAID/MegaCli/MegaCli64 -PDOffline -PhysDrv [1:4] -a0

  70. #/opt/MegaRAID/MegaCli/MegaCli64 -PDOnline -PhysDrv [1:4] -a0

  71. 16.查看物理磁盘重建进度

  72. #/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg -PhysDrv [1:5] -a0

  73. 或者以动态可视化文字界面显示

  74. #/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ProgDsply -PhysDrv [1:5] -a0


  75. 磁带状态的变化,从拔盘,到插盘的过程中:

  76. Device |Normal|Damage|Rebuild|Normal

  77. Virtual Drive |Optimal|Degraded|Degraded|Optimal

  78. Physical Drive |Online|Failed �C> Unconfigured|Rebuild|Online


你可能感兴趣的:(raid,megacli)