linux 查看raid信息

1,显示机器上的raid卡信息

#命令
sudo lspci -v -s $(lspci | grep -i raid |awk ‘{print $1}’)
#输出
03:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS-3 3108 [Invader] (rev 02)
Subsystem: Dell Device 1f43
Flags: bus master, fast devsel, latency 0, IRQ 26
I/O ports at 2000 [size=256]
Memory at 91e00000 (64-bit, non-prefetchable) [size=64K]
Memory at 91d00000 (64-bit, non-prefetchable) [size=1M]
Expansion ROM at 92000000 [disabled] [size=1M]
Capabilities: [50] Power Management version 3
Capabilities: [68] Express Endpoint, MSI 00
Capabilities: [d0] Vital Product Data
Capabilities: [a8] MSI: Enable- Count=1/1 Maskable+ 64bit+
Capabilities: [c0] MSI-X: Enable+ Count=97 Masked-
Capabilities: [100] Advanced Error Reporting
Capabilities: [1e0] #19
Capabilities: [1c0] Power Budgeting
Capabilities: [190] #16
Capabilities: [148] Alternative Routing-ID Interpretation (ARI)
Kernel driver in use: megaraid_sas
Kernel modules: megaraid_sas

2,作为硬件的raid卡的长相

linux 查看raid信息_第1张图片

3,raid管理工具(MegaCli)

3.1 下载
wget http://mirror.cogentco.com/pub/misc/MegaCli-8.07.14-1.noarch.rpm
3.2 安装
rpm -ivh MegaCli-8.07.14-1.noarch.rpm
(默认位置在/opt/MegaRAID/MegaCli)
3.3 常见用法(需要管理员权限)
MegaCli64 -LDInfo -Lall -aALL 查raid级别
MegaCli64 -AdpAllInfo -aALL 查raid卡信息
MegaCli64 -PDList -aALL 查看硬盘信息
MegaCli64 -AdpBbuCmd -aAll 查看电池信息
MegaCli64 -FwTermLog -Dsply -aALL 查看raid卡日志
MegaCli64 -adpCount 【显示适配器个数】
MegaCli64 -AdpGetTime –aALL 【显示适配器时间】
MegaCli64 -AdpAllInfo -aAll 【显示所有适配器信息】
MegaCli64 -LDInfo -LALL -aAll 【显示所有逻辑磁盘组信息】
MegaCli64 -PDList -aAll 【显示所有的物理信息】
MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL |grep ‘Charger Status’ 【查看充电状态】
MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL【显示BBU状态信息】
MegaCli64 -AdpBbuCmd -GetBbuCapacityInfo -aALL【显示BBU容量信息】
MegaCli64 -AdpBbuCmd -GetBbuDesignInfo -aALL 【显示BBU设计参数】
MegaCli64 -AdpBbuCmd -GetBbuProperties -aALL 【显示当前BBU属性】
MegaCli64 -cfgdsply -aALL 【显示Raid卡型号,Raid设置,Disk相关信息】

4,机器自带的raid软件

dmraid: Device-Mapper Software RAID tool

* = [-d|–debug]… [-v|–verbose]… [-i|–ignorelocking]

dmraid {-a|–activate} {y|n|yes|no} *
[-f|–format FORMAT[,FORMAT…]]
[-P|–partchar CHAR]
[-p|–no_partitions]
[–separator SEPARATOR]
[-t|–test]
[-Z|–rm_partitions] [RAID-set…]

dmraid {-b|–block_devices} *
[-c|–display_columns][FIELD[,FIELD…]]…
[device-path…]

dmraid {-h|–help}

dmraid {-l|–list_formats} *

dmraid {-n|–native_log} *
[-f|–format FORMAT[,FORMAT…]]
[–separator SEPARATOR]
[device-path…]

dmraid {-r|–raid_devices} *
[-c|–display_columns][FIELD[,FIELD…]]…
[-D|–dump_metadata]
[-f|–format FORMAT[,FORMAT…]]
[–separator SEPARATOR]
[device-path…]

dmraid {-r|–raid_devices} *
{-E|–erase_metadata}
[-f|–format FORMAT[,FORMAT…]]
[–separator SEPARATOR]
[device-path…]

dmraid {-s|–sets}…[a|i|active|inactive] *
[-c|–display_columns][FIELD[,FIELD…]]…
[-f|–format FORMAT[,FORMAT…]]
[-g|–display_group]
[–separator SEPARATOR]
[RAID-set…]

dmraid {-f|–format FORMAT}
{-C|–create RAID-set}
{–type RAID-level}
[–size [0-9]…[kKgG][bB]]
[–str[i[de]] [0-9]…[kK][bB]]
{–disk[s] “device-path[, device-path…”}

dmraid {-x|–remove RAID-set}

dmraid {-R|–rebuild} RAID-set [drive_name]

dmraid [{-f|–format FORMAT}]
{-S|–spare [RAID-set]}
{-M|–media “device-path”}

Reference

https://www.jianshu.com/p/0b4e0f5ffe93

你可能感兴趣的:(linux)