R710

作者: 运维开发_西瓜甜 | 来源:发表于2019-08-08 10:23 被阅读0次
    image.png
    image.png image.png image.png image.png
    image.png image.png

    MegaCli 简单介绍

    MegaCli是LSI公司官方提供的SCSI卡管理工具。由于被收购变成了现在的Broadcom,所以现在想下载MegaCli,需要去Broadcom官网查找Legacy产品支持,搜索MegaRAID。

    它一款用于管理维护硬件RAID软件,可以查看当前raid卡的所有信息:raid卡的型号,raid的阵列类型,raid 的磁盘状态;
    可以对raid进行管理:在线添加磁盘,创建磁盘阵列、删除阵列等。

    磁盘状态

    Unconfigured Good :未配置好。 RAID控制器可访问的驱动器,但未配置为虚拟驱动器或热备分
    Online:在线
    Rebuild :重建。写入数据的驱动器,以恢复虚拟驱动器的完全冗余
    Failed :失败
    Unconfigured Bad:未配置的坏-驱动器上的固件检测不可恢复的错误;驱动器无法初始化Unconfigured Good或驱动器
    Missing:失踪。在线驱动,但已从其位置移除
    Offline:脱机-驱动器是虚拟驱动器的一部分,但在RAID中具有无效数据或未配置。
    Hot Spare:热备份
    None:具有不支持标志集的驱动器。具有未配置的良好或离线驱动器,完成了搬迁作业的准备工作。

    RAID 级别对应关系

    RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 RAID 1

    RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0 RAID 0

    RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3 RAID 5

    RAID Level : Primary-1, Secondary-3, RAID Level Qualifier-0 RAID 10

    安装 MegaRAID

    【1】下载安装包

    wget ftp://download2.boulder.ibm.com/ecc/sar/CMA/XSA/ibm_utl_sraidmr_megacli-8.00.48_linux_32-64.zip
    

    【2】 安装

     unzip ibm_utl_sraidmr_megacli-8.00.48_linux_32-64.zip
    
     cd linux
    
    yum localinstall Lib_Utils-1.00-09.noarch.rpm  MegaCli-8.00.48-1.i386.rpm
    

    常见参数

    一般通过 MegaCli 的Media Error Count 、Other Error Count、Predictive Failure Count来确定阵列中磁盘是否有问题

    Slot Number:slot号,应该跟机器外观上的标识一致。(磁盘位置)

    Inquiry Data: 磁盘的序列号,跟磁盘标签上一致。(磁盘标签需要拔盘才能看到)

    Firmware state: 这磁盘的状态,Online是最好的状态,除此之外还有 Unconfigured Offline Failed

    Medai Error Count 不为0,表示磁盘可能错误,可能是磁盘有坏道,数值越大,危险系数越高

    Other Error Count 不为0,表示磁盘可能存在松动,可能需要重新再插入

    Predictive Failure Count:表示监控硬盘的预报错误数量,不为0要更换

    Last Predictive Failure Event Seq Number:最后一条预警的时间序列号

    Raw Size:磁盘大小

    Firmware state:磁盘目前的状态。

    MegaCli常用命令
    【1】查raid级别
    /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL

    
    
    Adapter 0 -- Virtual Drive Information:
    Virtual Drive: 0 (Target Id: 0)
    Name                :Virtual Disk 00
    RAID Level          : Primary-5, Secondary-0, RAID Level Qualifier-3
    Size                : 1.818 TB
    State               : Optimal
    Strip Size          : 64 KB
    Number Of Drives    : 3
    Span Depth          : 1
    Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
    Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
    Access Policy       : Read/Write
    Disk Cache Policy   : Enabled
    Encryption Type     : None
    
    
    Number of Dedicated Hot Spares: 1
        0 : EnclId - 32 SlotId - 3
    
    Exit Code: 0x00
    

    MegaCli64 -LdPdInfo -aALL 级别和磁盘
    MegaCli64 -PDList -aALL

    
    Adapter #0
    
    Number of Virtual Disks: 1
    Virtual Drive: 0 (Target Id: 0)
    Name                :Virtual Disk 00
    RAID Level          : Primary-5, Secondary-0, RAID Level Qualifier-3
    Size                : 1.818 TB
    State               : Optimal
    Strip Size          : 64 KB
    Number Of Drives    : 3
    Span Depth          : 1
    Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
    Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
    Access Policy       : Read/Write
    Disk Cache Policy   : Enabled
    Encryption Type     : None
    Number of Spans: 1
    Span: 0 - Number of PDs: 3
    
    PD: 0 Information
    Enclosure Device ID: 32
    Slot Number: 0
    Enclosure position: 0
    Device Id: 0
    Sequence Number: 2
    Media Error Count: 0
    Other Error Count: 13
    Predictive Failure Count: 0
    Last Predictive Failure Event Seq Number: 0
    PD Type: SATA
    Raw Size: 931.512 GB [0x74706db0 Sectors]
    Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
    Coerced Size: 931.0 GB [0x74600000 Sectors]
    Firmware state: Online, Spun Up
    SAS Address(0): 0x1221000000000000
    Connected Port Number: 0(path0)
    Inquiry Data:             Z9AE3WLXST1000DM010-2EP102                      CC43
    FDE Capable: Not Capable
    FDE Enable: Disable
    Secured: Unsecured
    Locked: Unlocked
    Needs EKM Attention: No
    Foreign State: None
    Device Speed: Unknown
    Link Speed: Unknown
    Media Type: Hard Disk Device
    Drive Temperature : N/A
    
    
    
    
    PD: 1 Information
    Enclosure Device ID: 32
    Slot Number: 1
    Enclosure position: 0
    Device Id: 1
    Sequence Number: 2
    Media Error Count: 0
    Other Error Count: 13
    Predictive Failure Count: 0
    Last Predictive Failure Event Seq Number: 0
    PD Type: SATA
    Raw Size: 931.512 GB [0x74706db0 Sectors]
    Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
    Coerced Size: 931.0 GB [0x74600000 Sectors]
    Firmware state: Online, Spun Up
    SAS Address(0): 0x1221000001000000
    Connected Port Number: 1(path0)
    Inquiry Data:             Z9AE3WRXST1000DM010-2EP102                      CC43
    FDE Capable: Not Capable
    FDE Enable: Disable
    Secured: Unsecured
    Locked: Unlocked
    Needs EKM Attention: No
    Foreign State: None
    Device Speed: Unknown
    Link Speed: Unknown
    Media Type: Hard Disk Device
    Drive Temperature : N/A
    
    
    
    
    PD: 2 Information
    Enclosure Device ID: 32
    Slot Number: 2
    Enclosure position: 0
    Device Id: 2
    Sequence Number: 2
    Media Error Count: 0
    Other Error Count: 13
    Predictive Failure Count: 0
    Last Predictive Failure Event Seq Number: 0
    PD Type: SATA
    Raw Size: 931.512 GB [0x74706db0 Sectors]
    Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
    Coerced Size: 931.0 GB [0x74600000 Sectors]
    Firmware state: Online, Spun Up
    SAS Address(0): 0x1221000002000000
    Connected Port Number: 2(path0)
    Inquiry Data:             Z9AE1RN0ST1000DM010-2EP102                      CC43
    FDE Capable: Not Capable
    FDE Enable: Disable
    Secured: Unsecured
    Locked: Unlocked
    Needs EKM Attention: No
    Foreign State: None
    Device Speed: Unknown
    Link Speed: Unknown
    Media Type: Hard Disk Device
    Drive Temperature : N/A
    
    
    
    
    Exit Code: 0x00
    

    相关参数

    Enclosure Device过滤出raid卡的ID;
    Slot Number过滤出磁盘的槽号;
    Raw Size过滤出磁盘的大小;
    Inquiry Data 过滤出磁盘的序列号、型号固件版本;
    Firmware state过滤出磁盘的状态
    
    
    
    Adapter 0-- Virtual Drive Information:
    
    VirtualDrive: 0 (Target Id: 0)   ----设备VD号
    
    Name                :
    
    RAIDLevel          : Primary-5, Secondary-0,RAID Level Qualifier-3  ----raid级别
    
    Size                : 7.276 TB   -----逻辑磁盘大小
    
    State               : Optimal   -----状态:最佳
    
    StripSize          : 256 KB   -----簇的大小
    
    Number OfDrives    : 3  
    
    SpanDepth          : 1
    
    DefaultCache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU   ----默认缓存策略
    
    CurrentCache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU  -----当前缓存策略
    
    AccessPolicy       : Read/Write    -----存取策略
    
    DiskCache Policy   : Disk's Default    -----磁盘缓存策略
    
    EncryptionType     : None
    
    BadBlocks Exist: No
    
     
    
    RAID Level对应关系:RAID级别一般通过 Primary 字段值来判断
    
    还需要结合Span Depth的值来判断值为1表示为 RAID-1,不为1表示 RAID-10; 还有一种情况:Primary-1, Secondary-3, RAID LevelQualifier-0 也是表示 RAID-10;
    
    RAIDLevel : Primary-0, Secondary-0, RAID Level Qualifier-0    对应RAID 0
    
    RAIDLevel : Primary-1, Secondary-0, RAID Level Qualifier-0    对应RAID 1
    
    RAIDLevel : Primary-5, Secondary-0, RAID Level Qualifier-3    对应RAID 5
    
    RAIDLevel : Primary-1, Secondary-3, RAID Level Qualifier-0    对应RAID 10
    
    

    【2】查raid卡信息
    /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL

    【3】查看硬盘信息
    /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL
    MegaCli64 -PDList -aALL

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

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

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

    1.查看RAID控制器的数量:-----raid卡管理要用到

    MegaCli64 -adpCount

    图中看出RAID控制器的数量为1

    相关文章

      网友评论

          本文标题:R710

          本文链接:https://www.haomeiwen.com/subject/pnkgdctx.html