dmdecode 与 megacli 命令用法参考

本文详细介绍了在Linux系统中使用dmdecode和megacli命令进行磁盘管理、RAID配置和监控的方法,包括检测硬件信息、电源管理、RAID卡信息、磁盘状态检查、RAID级别创建和管理,以及故障处理策略等关键操作。
摘要由CSDN通过智能技术生成

测试机器

# dmidecode -t system

Scanning /dev/mem for entry point.
SMBIOS 2.7 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Huawei Technologies Co., Ltd.
        Product Name: RH2288A V2
        Version: V100R002

dmdecode 常用命令

机器型号

[root@test_raid ~]# dmidecode | grep "Product"
        Product Name: PowerEdge R720xd
        Product Name: 068CDY

检测厂商

[root@test_raid ~]# dmidecode| grep  "Manufacturer"
        Manufacturer: Dell Inc.

检测序号信息

[root@test_raid ~]# dmidecode | grep -B 4 "Serial Number"  | more
System Information
        Manufacturer: Dell Inc.
        Product Name: PowerEdge R720xd
        Version: Not Specified
        Serial Number: 8V3Q342
--
Base Board Information
        Manufacturer: Dell Inc.
        Product Name: 068CDY
        Version: A01
        Serial Number: ..CN779214AR02CC.

检测 CPU 信息

[root@test_raid ~]# dmidecode | grep  "CPU"
        Socket Designation: CPU1
        Version:       Intel(R) Xeon(R) CPU E5-2695 v2 @ 2.40GHz
        Socket Designation: CPU2
        Version:       Intel(R) Xeon(R) CPU E5-2695 v2 @ 2.40GHz

检测物理 CPU 个数

[root@test_raid ~]# dmidecode | grep  "Socket Designation: CPU" |wc -l
2

检测生产日期

[root@test_raid ~]# dmidecode | grep "Date"
        Release Date: 07/09/2014

megacli 常用命令

电源管理

###充电状态

[root@test_raid ~]# megacli -AdpBbuCmd -GetBbuStatus -aALL |grep "Charger Status"
Charger Status: Complete

充电百分比

[root@test_raid ~]# megacli -AdpBbuCmd -GetBbuStatus -aALL |grep "Relative State of Charge"
Relative State of Charge: 100 %

信息检测

RAID 卡信息

[root@test_raid ~]# megacli -cfgdsply –aALL  | more

==============================================================================
Adapter: 0
Product Name: PERC H710P Mini
Memory: 1024MB
BBU: Present
Serial No: 49F033N
==============================================================================
Number of DISK GROUPS: 1

DISK GROUP: 0
Number of Spans: 1
SPAN: 0
Span Reference: 0x00
Number of PDs: 2
Number of VDs: 1
Number of dedicated Hotspares: 0
Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :system_vd
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 3.637 TB
Mirror Data         : 3.637 TB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 2
Span Depth          : 1
Default Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Ongoing Progresses:
  Background Initialization: Completed 13%, Taken 63 min.
Encryption Type     : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: Yes
LD has drives that support T10 power conditions: Yes
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: Yes
Cache Cade Type : Read Only
Physical Disk Information:
Physical Disk: 0
Enclosure Device ID: 32
Slot Number: 0
Drive's postion: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 1
Device Id: 0
WWN: 5000C50062A960D0
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS

Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: GS0F
Shield Counter: 0
Successful diagnostics completion on :  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Terry_Tsang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值