幾種常用raid卡監控方式

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狀態:

顯示所有虛擬磁盤組信息

MegaCli -LDInfo -LALL -aAll

顯示所有的物理信息
MegaCli -PDList -aAll

MegaCli64 -PdList -a0 | grep -E 'Device|Firm|Inq|Coer|Slot'

MegaCli -PDInfo -PhysDrv [E:S] -aALL

適配器參數(Adapter parameter) -aN
The parameter -aN (where N is a number starting with zero or the string ALL) specifies the PERC5/i adapter ID. If you have only one controller it’s safe to use ALL instead of a specific ID, but you’re encouraged to use the ID for everything that makes changes to your RAID configuration.

 

物理硬盤參數 -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
The parameter -Lx is used for specifying the virtual drive (where x is a number starting with zero or the string all).

 

其他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 –aALL      #時間

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 –aALL

 

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/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章