Dell Raid卡命令行控制megacli




rpm -ivh Lib_Utils-1.00-09.noarch.rpm
rpm -ivh MegaCli-8.02.21-1.noarch.rpm






ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/local/bin/megacli




[root@monitor ~]# megacli -PDList -aALL|grep Adapter
Adapter #0
[root@monitor ~]# 
因为只有一个卡,所有执行时参数加 -a0

megacli -PDList -a0|grep Firm
megacli -PDList -a0|grep -B 16 Unconfig

记录Ecclosure Device ID和Slot Number


megacli -CfgForeign -Scan -a0
megacli -CfgForeign -Clear -a0
清除坏盘的缓存,因为需要将新盘做raid0才能在fdisk可见(Dell/LSILogic PERC 6/ir可直接检测到硬盘,Dell/LSILogic PERC 6/i不能)

megacli -DiscardPreservedCache -l5 -a0 
megacli -cfgldadd -r0 [32:5] WB RA Direct -a0
注意上面第一个参数l5,其实就是系统中识别的sdf,就是清除slot number是5的那块盘的缓存。

第二行的参数32:5,就是指定Ecclosure Device ID是32,slot number是5的那块盘(sdf或者面板数字为5的盘)来做raid0



megacli -LDInfo -Lall -aALL 查raid级别

megacli -AdpAllInfo -aALL 查raid卡信息

megacli -PDList -aALL 查看硬盘信息

megacli -AdpBbuCmd -aAll 查看电池信息

megacli -FwTermLog -Dsply -aALL 查看raid卡日志

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相关信息

dell r610 cpu温度监控

Centos5.5 x86_64

[root@monitor sbin]#yum install lm_sensors
[root@monitor sbin]#cd /usr/sbin/
[root@monitor sbin]# rm -rf sensors-detect
[root@monitor sbin]# wget
--2012-04-13 18:39:48--
Connecting to||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 198603 (194K) 
Saving to: `sensors-detect'

100%[=============================================================================================================================>] 198,603     59.3K/s   in 3.3s    

2012-04-13 18:39:54 (59.3 KB/s) - `sensors-detect' saved [198603/198603]

[root@monitor sbin]# chmod 755 sensors-detect
[root@monitor ~]# rpm --import
[root@monitor ~]# rpm -Uvh
[root@monitor ~]# yum --enablerepo=elrepo-extras install kmod-coretemp
[root@monitor ~]# modprobe coretemp
[root@monitor ~]# lsmod |grep core
coretemp               42752  0 
hwmon                  36553  2 coretemp,power_meter
i2c_core               57537  1 i2c_ec
i7core_edac            46793  0 
edac_mc                60449  1 i7core_edac
[root@monitor sbin]# sensors-detect
# sensors-detect revision 6040 (2012-04-09 21:33:35 +0200)
# System: Dell Inc. PowerEdge R610 [Not Specified]
# Board: Dell Inc. 08GXHX

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): y
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 15h power sensors...                             No
Intel digital thermal sensor...                             Success!
    (driver `coretemp')
Intel AMB FB-DIMM thermal sensor...                         No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): y
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     Yes
Found `SMSC EMC2700LPC Super IO'                            
    (no information available)
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No

Some systems (mainly servers) implement IPMI, a set of common interfaces
through which system health data may be retrieved, amongst other things.
We first try to get the information from SMBIOS. If we don't find it
there, we have to read from arbitrary I/O ports to probe for such
interfaces. This is normally safe. Do you want to scan for IPMI
interfaces? (YES/no): y
Found `IPMI BMC KCS' at 0xca8...                            Success!
    (confidence 8, driver `to-be-written')

Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (YES/no): y
Probing for `National Semiconductor LM78' at 0x290...       No
Probing for `National Semiconductor LM79' at 0x290...       No
Probing for `Winbond W83781D' at 0x290...                   No
Probing for `Winbond W83782D' at 0x290...                   No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): y
Sorry, no supported PCI bus adapters found.

Now follows a summary of the probes I have just done.
Just press ENTER to continue: 

Driver `to-be-written':
  * ISA bus, address 0xca8
    Chip `IPMI BMC KCS' (confidence: 8)

Driver `coretemp':
  * Chip `Intel digital thermal sensor' (confidence: 9)

Note: there is no driver for IPMI BMC KCS yet.
Check for updates.

Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): y
Starting lm_sensors:                                       [  OK  ]

[root@monitor sbin]# sensors
Adapter: ISA adapter
Core 0:      +37°C  (high =   +95°C)                   

Adapter: ISA adapter
Core 1:      +37°C  (high =   +95°C)                   

Adapter: ISA adapter
Core 9:      +32°C  (high =   +95°C)                   

Adapter: ISA adapter
Core 10:     +31°C  (high =   +95°C)