zoukankan      html  css  js  c++  java
  • 在线替换磁盘

    1、由于磁盘信息较多,所有可以根据自己的需要来过滤得到自己想要的信息
    /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll| grep -Ei "(Enclosure Device|Slot Number|Raw Size|Firmware state)"  ---粗过滤
    grep是过滤的意思
    -E参数是使用扩展正则表达式来过滤
    -i参数是不区分大小写来过滤

    Enclosure Device过滤出raid卡的ID;Slot Number过滤出磁盘的槽号;RawSize过滤出磁盘的大小;Firmware state过滤出磁盘的状态。

     2、创建raid0

    /opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[75:6] WB Direct -a0

    使用 /opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[252:5] WB Direct -a0 尝试为其组raid0,报以下错误
          The specified physical disk does not have the appropriate attributes to complete the requested command.
          Exit Code: 0x26

    a、扫描外来配置的个数:
         # /opt/MegaRAID/MegaCli/MegaCli64 -cfgforeign -scan -a0       
                   There are 1 foreign configuration(s) on controller 0.
                   Exit Code: 0x00
     b、清除外来配置:
                # /opt/MegaRAID/MegaCli/MegaCli64 -cfgforeign -clear -a0
                   Foreign configuration 0 is cleared on controller 0.
                   Exit Code: 0x00
     c、再次扫描外来配置的个数,可以发现外来配置已清除,磁盘此时可正常组raid
                # /opt/MegaRAID/MegaCli/MegaCli64 -cfgforeign -scan -a0 
                    There is no foreign configuration on controller 0.
                    Exit Code: 0x00

  • 相关阅读:
    Java服务,内存OOM了,如何快速定位?
    Java内存分析工具MAT(Memory Analyzer Tool)安装使用实例
    jmap使用方法及原理
    可能发生Full gc 的情况
    java--jvm GC-常用参数配置
    JVM. GC 性能调优方法与思路
    《嫌疑人X的献身》——两个天才之间的思想火花
    爱的纯粹与代价
    18年下半年计划表
    阿里校招准备-总纲
  • 原文地址:https://www.cnblogs.com/ipanel/p/11176396.html
Copyright © 2011-2022 走看看