zoukankan      html  css  js  c++  java
  • MegaClii获取主机的raid及硬盘信息

    #安装
    unzip ibm_utl_sraidmr_megacli-8.00.48_linux_32-64.zip
    cd linux
    rpm -ivh Lib_Utils-1.00-09.noarch.rpm  MegaCli-8.00.48-1.i386.rpm
    #MegaCli 使用命令介绍
    /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL 查raid级别
    /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL 查raid卡信息
    /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL 查看硬盘信息
    /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -aAll 查看电池信息
    /opt/MegaRAID/MegaCli/MegaCli64 -FwTermLog -Dsply -aALL 查看raid卡日志
    /opt/MegaRAID/MegaCli/MegaCli64 -adpCount 【显示适配器个数】
    /opt/MegaRAID/MegaCli/MegaCli64 -AdpGetTime –aALL 【显示适配器时间】
    /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aAll 【显示所有适配器信息】
    /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -LALL -aAll 【显示所有逻辑磁盘组信息】
    /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll 【显示所有的物理信息】
    /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL |grep ‘Charger Status’ 【查看充电状态】
    /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL【显示BBU状态信息】
    /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuCapacityInfo -aALL【显示BBU容量信息】
    /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuDesignInfo -aALL 【显示BBU设计参数】
    /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuProperties -aALL 【显示当前BBU属性】
    /opt/MegaRAID/MegaCli/MegaCli64 -cfgdsply -aALL 【显示Raid卡型号,Raid设置,Disk相关信息】
    磁带状态的变化,从拔盘,到插盘的过程中。
    Device |Normal|Damage|Rebuild|Normal
    Virtual Drive |Optimal|Degraded|Degraded|Optimal
    Physical Drive |Online|Failed –> Unconfigured|Rebuild|Online
    查看磁盘缓存策略
    /opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -L0 -a0
    or
    /opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -L1 -a0
    or
    /opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -LALL -a0
    ro
    /opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -LALL -aALL
    ro
    /opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -DskCache -LALL -aALL
    设置磁盘缓存策略
    缓存策略解释: 
    WT (Write through
    WB (Write back)
    NORA (No read ahead)
    RA (Read ahead)
    ADRA (Adaptive read ahead)
    Cached
    Direct
    例子:
    /opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp WT|WB|NORA|RA|ADRA -L0 -a0
    or
    /opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -Cached|-Direct -L0 -a0
    or
    enable / disable disk cache
    /opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -EnDskCache|-DisDskCache -L0 -a0
    创建一个 raid5 阵列,由物理盘 2,3,4 构成,该阵列的热备盘是物理盘 5
    /opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -Hsp[1:5] -a0
    创建阵列,不指定热备
    /opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -a0
    删除阵列
    /opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L1 -a0
    在线添加磁盘
    /opt/MegaRAID/MegaCli/MegaCli64 -LDRecon -Start -r5 -Add -PhysDrv[1:4] -L1 -a0
    阵列创建完后,会有一个初始化同步块的过程,可以看看其进度。
    /opt/MegaRAID/MegaCli/MegaCli64 -LDInit -ShowProg -LALL -aALL
    或者以动态可视化文字界面显示
    /opt/MegaRAID/MegaCli/MegaCli64 -LDInit -ProgDsply -LALL -aALL
    查看阵列后台初始化进度
    /opt/MegaRAID/MegaCli/MegaCli64 -LDBI -ShowProg -LALL -aALL
    或者以动态可视化文字界面显示
    /opt/MegaRAID/MegaCli/MegaCli64 -LDBI -ProgDsply -LALL -aALL
    指定第 5 块盘作为全局热备
    /opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0
    指定为某个阵列的专用热备
    /opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set [-Dedicated [-Array1]] [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0
    删除全局热备
    /opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Rmv -PhysDrv[1:5] -a0
    将某块物理盘下线/上线
    /opt/MegaRAID/MegaCli/MegaCli64 -PDOffline -PhysDrv [1:4] -a0
    /opt/MegaRAID/MegaCli/MegaCli64 -PDOnline -PhysDrv [1:4] -a0
    查看物理磁盘重建进度
    /opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg -PhysDrv [1:5] -a0
    或者以动态可视化文字界面显示
    /opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ProgDsply -PhysDrv [1:5] -a0
     
    磁带状态的变化,从拔盘,到插盘的过程中:
    Device |Normal|Damage|Rebuild|Normal
    Virtual Drive |Optimal|Degraded|Degraded|Optimal
    Physical Drive |Online|Failed –> Unconfigured|Rebuild|Online
    
    #参考
    https://www.bbsmax.com/A/q4zVNby9zK/
    
  • 相关阅读:
    互联网 | 逻辑上的黑话才是真正的花里胡哨
    OLAP引擎:基于Druid组件进行数据统计分析
    数据调度组件:基于Azkaban协调时序任务执行
    职场 | 工作五年之后,对技术和业务的思考
    数据搬运组件:基于Sqoop管理数据导入和导出
    valgrind 内存泄漏分析
    Solon Cloud 分布式服务开发套件清单,感觉受与 Spring Cloud 的不同
    Solon 的想法与架构笔记
    对标 Spring Boot & Cloud ,轻量框架 Solon 1.5.8 发布
    对标 Spring Boot & Cloud ,轻量框架 Solon 1.5.2 重要发布
  • 原文地址:https://www.cnblogs.com/kylingx/p/12765300.html
Copyright © 2011-2022 走看看