linux 查看raid下物理硬件数量

物理cpu数量  cat /proc/cpuinfo  cpu信息 physical id 为个数

物理内存数量  dmidecode | grep -A16 "Memory Device$"

物理硬盘数量

cat /proc/scsi/scsi

df -h

fdisk -l

smartctl –all /dev/sda

都不能知道实际有多少块硬盘,这时需要借助外部工具

MegaCli8.07.10.tar.gz

https://download.csdn.net/download/zhangxueleishamo/10355451

解压后

-rwxrwxrwx 1 root root 1588725 5月  17 2011 Lib_Utils-1.00-09.noarch.rpm
-rwxrwxrwx 1 root root 1272097 10月 24 2011 MegaCli-8.02.21-1.noarch.rpm
-rw-r--r-- 1 root root   14058 4月  17 16:52 MegaSAS.log
-rwxrwxrwx 1 root root    2683 10月 24 2011 readme.txt

-rwxrwxrwx 1 root root    7404 4月  13 2012 Run-Linux-PERC.sh

先安装 Lib_Utils-1.00-09.noarch.rpm 然后安装 MegaCli-8.02.21-1.noarch.rpm

安装后命令  /opt/MegaRAID/MegaCli/MegaCli64

MegaCli常用参数介绍 
MegaCli -adpCount 【显示适配器个数】 
MegaCli -AdpGetTime –aALL 【显示适配器时间】 
MegaCli -AdpAllInfo -aAll 【显示所有适配器信息】 
MegaCli -LDInfo -LALL -aAll 【显示所有逻辑磁盘组信息】 
MegaCli -PDList -aAll 【显示所有的物理信息】 
MegaCli -AdpBbuCmd -GetBbuStatus -aALL |grep ‘Charger Status’ 【查看充电状态】 
MegaCli -AdpBbuCmd -GetBbuStatus -aALL【显示BBU状态信息】 
MegaCli -AdpBbuCmd -GetBbuCapacityInfo -aALL【显示BBU容量信息】 
MegaCli -AdpBbuCmd -GetBbuDesignInfo -aALL 【显示BBU设计参数】 
MegaCli -AdpBbuCmd -GetBbuProperties -aALL 【显示当前BBU属性】 

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

例如:

[root@localhost Linux]# /opt/MegaRAID/MegaCli/MegaCli64  -PDlist -aALL
                                     
Adapter #0
Enclosure Device ID: 32
Slot Number: 0
Drive's postion: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 0
Device Id: 0
WWN: 5000CCA02A34D727
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: 279.396 GB [0x22ecb25c Sectors]
Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
Coerced Size: 278.875 GB [0x22dc0000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: E516
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000cca02a34d725
SAS Address(1): 0x0
Connected Port Number: 0(path0) 
Inquiry Data: HITACHI HUS156030VLS600 E516LVVY1W0N            
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: 6.0Gb/s 
Link Speed: 6.0Gb/s 
Media Type: Hard Disk Device
Drive Temperature :38C (100.40 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Drive's write cache : Disabled
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Port-1 :
Port status: Active
Port's Linkspeed: Unknown 
Drive has flagged a S.M.A.R.T alert : No

如上图:

Device Id: 0 显示数量从0计数

WWN: 5000CCA02A34D727 防伪

Raw Size: 279.396 GB 硬盘容量

Inquiry Data: HITACHI HUS156030VLS600 E516LVVY1W0N         硬盘信息

Device Speed: 6.0Gb/s 





阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页