1. IBM X System MegaRaid
[root@IBM3630 ~]# /sbin/lspci | grep RAID
15:00.0 RAID bus controller: LSI Logic / Symbios Logic LSI MegaSAS 9260 (rev 05)
软件:MegaCli-8.04.07-1.noarch.rpm,Lib_Utils-1.00-09.noarch.rpm。可以在ibm网站上下载,http://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=MIGR-5082326
也可以在lsi的网站上找http://www.lsi.com/products/storagecomponents/Pages/6GBSATA_SASRAIDCards.aspx
查看raid状态:
适配器参数(Adapter parameter) -aN显示所有虚拟磁盘组信息
MegaCli -LDInfo -LALL -aAll
显示所有的物理信息
MegaCli -PDList -aAllMegaCli64 -PdList -a0 | grep -E 'Device|Firm|Inq|Coer|Slot'
MegaCli -PDInfo -PhysDrv [E:S] -aALL
物理硬盘参数 -PhysDrv [E:S],ArrayN[E:S]和phyDrv[E:S]含义相同,E is the enclosure device ID in which the drive resides and S the slot number (starting with zero). You can get the enclosure device ID using “MegaCli -EncInfo -aALL”. The E:S syntax is also used for specifying the physical drives when creating a new RAID virtual drive.
虚拟磁盘参数(Virtual drive parameter) -Lx
其他megacli的常用命令:
创建raid10
[root@IBM3630 ~]#/opt/MegaRAID/MegaCli/MegaCli64 -CfgSpanAdd r10 Array10[22:2,22:3] Array11[22:4,22:5] Array12[22:6,22:7] Array13[22:8,22:9] Array14[22:10,22:11] -a0
注意上面的命令中Array组编号不能重复,否则会覆盖掉前面建的array组,造成数据丢失。但我不是很清楚如何查看已经用过了Array组编号。
创建raid1
[root@IBM3630 ~]#/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd r1[22:10,22:11] -a0
创建raid6
[root@IBM3630 ~]#/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd r6 [22:2,22:3,22:4,22:5,22:6,22:7,22:8,22:9,22:10,22:11] HSP[22:12,22:13] -a0
删除第二个Virtual Disk
[root@IBM3630 ~]#/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel L2 -a0
设置热备盘
[root@IBM3630 ~]#/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP set PhysDrv[22:13] -a0
删除热备盘
[root@IBM3630 ~]#/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP rmv PhysDrv[22:12] -a0
查看适配器信息
MegaCli -adpCount #个数
MegaCli -AdpGetTime �CaALL #时间
MegaCli -AdpAllInfo -aAll
MegaCli64 -cfgdsply -a0
MegaCli -AdpEventLog -GetEvents -f events.log -aALL && cat events.log
Enclosure信息
MegaCli -EncInfo -aALL
查看充电状态
MegaCli -AdpBbuCmd -GetBbuStatus -aALL |grep ‘Charger Status’
显示BBU状态信息
MegaCli -AdpBbuCmd -GetBbuStatus -aALL
显示BBU容量信息
MegaCli -AdpBbuCmd -GetBbuCapacityInfo -aALL
显示BBU设计参数
MegaCli -AdpBbuCmd -GetBbuDesignInfo -aALL
显示当前BBU属性
MegaCli -AdpBbuCmd -GetBbuProperties �CaALL
2. IBM SAS2004(LSI)
[root@ops ~]# lspci -m | grep SCSI
1f:00.0 "Serial Attached SCSI controller" "LSI Logic / Symbios Logic" "SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire]" -r03 "IBM" "Unknown device 040e"
for redhat or centos
软件:daemonize-1.5.6-1.el5.x86_64.rpm,mpt-status-1.2.0-3.el5.centos.x86_64.rpm
可以在ibm网站上下载。
安装:安装这两个rpm包
# lsmod | grep mptctl
# modprobe mptctl
# lsmod | grep mptctl
mptctl 64713 0
mptbase 121349 3 mptctl,mptsas,mptscsih
scsi_mod 196953 8 mptctl,scsi_dh,sg,usb_storage,mptsas,mptscsih,scsi_transport_sas,sd_mod
#echo "/sbin/modprobe mptctl" >> /etc/rc.local
#cat /etc/rc.local
检查raid状态:
# /usr/sbin/mpt-status -i 5
ioc0 vol_id 5 type IME, 4 phy, 1862 GB, state OPTIMAL, flags ENABLED
ioc0 phy 3 scsi_id 9 IBM-ESXS ST91000640SS BD2C, 931 GB, state ONLINE, flags NONE
ioc0 phy 2 scsi_id 6 IBM-ESXS ST91000640SS BD2C, 931 GB, state ONLINE, flags NONE
ioc0 phy 1 scsi_id 7 IBM-ESXS ST91000640SS BD2C, 931 GB, state ONLINE, flags NONE
ioc0 phy 0 scsi_id 8 IBM-ESXS ST91000640SS BD2C, 931 GB, state ONLINE, flags NONE
# /usr/sbin/mpt-status -i 5 -s
log_id 5 OPTIMAL
phys_id 3 ONLINE
phys_id 2 ONLINE
phys_id 1 ONLINE
phys_id 0 ONLINE
for windows
软件:cfggen.exe
检查raid状态:
c:\>cfggen.exe 0 display
LSI Integrated RAID Configuration Utility v1.16.00.04
Read configuration has been initiated for controller 0
------------------------------------------------------------------------
Controller information
------------------------------------------------------------------------
Controller type : SAS1064E
Option ROM version : 6.30.00.00
Firmware version : 1.30.10.00
Channel description : 1 Serial Attached SCSI
Initiator ID : 112
Maximum physical devices : 127
Concurrent commands supported : 277
Slot : 1
Bus : 31
Device : 0
Function : 0
RAID Support : Yes
------------------------------------------------------------------------
IR Volume information
------------------------------------------------------------------------
IR volume 1
Volume ID : 5
Status of volume : Okay (OKY)
RAID level : 1E
Size (in MB) : 1907348
Physical hard disks (Target ID) : 9 6 7 8
------------------------------------------------------------------------
Physical device information
------------------------------------------------------------------------
Initiator at ID #112
Target on ID #6
Device is a Hard disk
Enclosure # : 1
Slot # : 1
Connector ID : 1
Target ID : 6
State : Online (ONL)
Size (in MB)/(in sectors) : 953869/1953525167
Manufacturer : IBM-ESXS
Model Number : ST91000640SS
Firmware Revision : BD2C
Serial No : 9XG2PMSL0806BD2C
Drive Type : SAS
Protocol : SAS
Target on ID #7
Device is a Hard disk
Enclosure # : 1
Slot # : 2
Connector ID : 2
Target ID : 7
State : Online (ONL)
Size (in MB)/(in sectors) : 953869/1953525167
Manufacturer : IBM-ESXS
Model Number : ST91000640SS
Firmware Revision : BD2C
Serial No : 9XG2PMMW0806BD2C
Drive Type : SAS
Protocol : SAS
Target on ID #8
Device is a Hard disk
Enclosure # : 1
Slot # : 3
Connector ID : 3
Target ID : 8
State : Online (ONL)
Size (in MB)/(in sectors) : 953869/1953525167
Manufacturer : IBM-ESXS
Model Number : ST91000640SS
Firmware Revision : BD2C
Serial No : 9XG2PZLD0806BD2C
Drive Type : SAS
Protocol : SAS
Target on ID #9
Device is a Hard disk
Enclosure # : 1
Slot # : 0
Connector ID : 0
Target ID : 9
State : Online (ONL)
Size (in MB)/(in sectors) : 953869/1953525167
Manufacturer : IBM-ESXS
Model Number : ST91000640SS
Firmware Revision : BD2C
Serial No : 9XG2Q3V50806BD2C
Drive Type : SAS
Protocol : SAS
------------------------------------------------------------------------
Enclosure information
------------------------------------------------------------------------
Enclosure# : 1
Logical ID : 50050760:54413f34
Numslots : 4
StartSlot : 0
Start TargetID : 0
Start Bus : 0
------------------------------------------------------------------------
c:\>cfggen.exe 0 status
LSI Integrated RAID Configuration Utility v1.16.00.04
Background command progress status for controller 0...
IR Volume 1
Volume ID : 5
Current operation : None
Volume status : Enabled
Volume state : Optimal
Physical disk I/Os : Not quiesced
c:\>
3. HP Smart Array
软件:hpacucli http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=US&swItem=MTX-4d7c7820b1b948a0a79ec44be4
检查raid状态:
/usr/sbin/hpacucli ctrl all show config detail | grep -A "Logical Drive:"
/usr/sbin/hpacucli ctrl all show config detail | egrep -v "port 1I:box|port 2I:box" | grep -A 5 physicaldrive
其他常用命令:
List all controllers:
# hpacucli controller all show
List arrays on controller in slot 0:
# hpacucli ctrl slot=0 logicaldrive all show status
List physical drives on controller in slot 0:
# hpacucli ctrl slot=0 pd all show status
Summarized status:
# hpacucli ctrl slot=0 show config
原文:http://www.itianjing.com/2013/03/%E5%87%A0%E7%A7%8D%E5%B8%B8%E7%94%A8raid%E5%8D%A1%E7%9B%91%E6%8E%A7%E6%96%B9%E5%BC%8F/