2011年11月15日火曜日

Megacli太郎 2

MegaCliのコマンド少しまとめる
RAIDカードはLSI Megaraid9260i16


#helpの表示
/opt/MegaRAID/MegaCli/MegaCli64 -help

#Virtual disk groupの表示
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -L0 -a0

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 1.818 TB
State : Degraded
Strip Size : 512 KB
Number Of Drives : 2
Span Depth : 1
Default Cache Policy: WriteBack, ReadAhead, Cached, Write Cache OK if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Cached, Write Cache OK if Bad BBU
Access Policy : Read/Write
Disk Cache Policy : Enabled
Encryption Type : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: Yes
LD has drives that support T10 power conditions: No
LD's IO profile supports MAX power savings with cached writes: No

#physical diskの表示
#長いので、結果は一部省略
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0

Adapter #0

Enclosure Device ID: 17
Slot Number: 0
Enclosure position: 0
Device Id: 39
Sequence Number: 1
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 1.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Firmware state: Unconfigured(good), Spun down
SAS Address(0): 0x500304800099b8cc
Connected Port Number: 0(path0)
Inquiry Data: MN1220F31GS06DHitachi HDS723020BLA642 MN6OA5C0
FDE Capable: Not Capable
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: Not Certified
Drive Temperature :31C (87.80 F)

#virtual、physicalまとめて表示
/opt/MegaRAID/MegaCli/MegaCli64 -LDPDinfo -a0 | less

#virtual、physicalまとめて表示(もすこし細かく)
/opt/MegaRAID/MegaCli/MegaCli64 -CfgDsply -aALL
==============================================================================
Adapter: 0
Product Name: LSI MegaRAID SAS 9260-16i
Memory: 512MB
BBU: Absent
Serial No: XXXXXXXXX
==============================================================================
Number of DISK GROUPS: 2

DISK GROUP: 0
Number of Spans: 1
SPAN: 0
Span Reference: 0x00
Number of PDs: 2
Number of VDs: 1
Number of dedicated Hotspares: 0
Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 1.818 TB
State : Degraded
Strip Size : 512 KB
Number Of Drives : 2
Span Depth : 1
Default Cache Policy: WriteBack, ReadAhead, Cached, Write Cache OK if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Cached, Write Cache OK if Bad BBU
Access Policy : Read/Write
Disk Cache Policy : Enabled
Encryption Type : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: Yes
LD has drives that support T10 power conditions: No
LD's IO profile supports MAX power savings with cached writes: No
Physical Disk Information:
Physical Disk: 0

#physdrv[17:0]の番号は、PDlListのEnclosure Device IDとSlot Number
#HDD(エンクロージャーの保守ランプ点滅させる)
/opt/MegaRAID/MegaCli/MegaCli64 -Pdlocate start physdrv[17:0] -a0

#HDD(エンクロージャーの保守ランプ点滅やめる)
/opt/MegaRAID/MegaCli/MegaCli64 -Pdlocate stop physdrv[17:0] -a0

#HDDのonline
/opt/MegaRAID/MegaCli/MegaCli64 -PDOnline -PhysDrv[17:0] -a0

#HDDのoffline
/opt/MegaRAID/MegaCli/MegaCli64 -PDOffline -PhysDrv[17:0] -a0

#HDDのステータスをunconfigure badからgoodに替える
/opt/MegaRAID/MegaCli/MegaCli64 -PDMakeGood -PhysDrv[17:0] -a0

#ディスクのrebuild 実行(うまくいかなかった)
/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -Start -PhysDrv [17:0] -a0

#ディスクのrebuild 停止(うまくいかなかった)
/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -Stop -PhysDrv [17:0] -a0

#ディスクの進行状況表示
/opt/MegaRAID/MegaCli/MegaCli64 -PDRBLD -showprog -physdrv [17:0] -a0

#enclosureの情報表示
#ながいけど
/opt/MegaRAID/MegaCli/MegaCli64 -EncInfo -a0

Number of enclosures on adapter 0 -- 4

Enclosure 0:
Device ID : 16
Number of Slots : 24
Number of Power Supplies : 2
Number of Fans : 5
Number of Temperature Sensors : 1
Number of Alarms : 1
Number of SIM Modules : 0
Number of Physical Drives : 0
Status : Normal
Position : 1
Connector Name : Ports 4-7
Connected in Multipath : Yes(connected in Multipath mode with Enclosure device id: 17. Both the ESMs represent the same enclosure)

Inquiry data :
Vendor Identification : LSI CORP
Product Identification : SAS2X36
Product Revision Level : 0417
Vendor Specific : x36-55.4.23.0

Number of Voltage Sensors :2

Voltage Sensor :0
Voltage Sensor Status :OK
Voltage Value :5020 milli volts

Voltage Sensor :1
Voltage Sensor :Crit Over
Voltage Sensor Status :Critical
Voltage Value :20440 milli volts

Enclosure 1:
Device ID : 17
Number of Slots : 24
Number of Power Supplies : 2
Number of Fans : 5
Number of Temperature Sensors : 1
Number of Alarms : 1
Number of SIM Modules : 0
Number of Physical Drives : 24
Status : Normal
Position : 1
Connector Name : Ports 0-3
Connected in Multipath : Yes(connected in Multipath mode with Enclosure device id: 16. Both the ESMs represent the same enclosure)

Inquiry data :
Vendor Identification : LSI CORP
Product Identification : SAS2X36
Product Revision Level : 0417
Vendor Specific : x36-55.4.23.0

Number of Voltage Sensors :2

Voltage Sensor :0
Voltage Sensor Status :OK
Voltage Value :5020 milli volts

Voltage Sensor :1
Voltage Sensor :Crit Over
Voltage Sensor Status :Critical
Voltage Value :20430 milli volts

Enclosure 2:
Device ID : 43
Number of Slots : 12
Number of Power Supplies : 2
Number of Fans : 3
Number of Temperature Sensors : 1
Number of Alarms : 1
Number of SIM Modules : 0
Number of Physical Drives : 12
Status : Normal
Position : 1
Connector Name : Ports 12-15
Connected in Multipath : No

Inquiry data :
Vendor Identification : LSI CORP
Product Identification : SAS2X28
Product Revision Level : 0417
Vendor Specific : x36-55.4.23.0

Number of Voltage Sensors :2

Voltage Sensor :0
Voltage Sensor Status :OK
Voltage Value :5010 milli volts

Voltage Sensor :1
Voltage Sensor Status :OK
Voltage Value :12210 milli volts

Enclosure 3:
Device ID : 245
Number of Slots : 24
Number of Power Supplies : 0
Number of Fans : 1
Number of Temperature Sensors : 3
Number of Alarms : 0
Number of SIM Modules : 0
Number of Physical Drives : 0
Status : Normal
Position : 1
Connector Name : Unavailable
Connected in Multipath : No

Inquiry data :
Vendor Identification : LSI CORP
Product Identification : Bobcat
Product Revision Level : 0504
Vendor Specific : x36-25.5.4.0


Exit Code: 0x00

bonnieで負荷かけ太郎

bonnieで書き込みまくるおー


#サーバの搭載メモリは、2G
#-x で繰り返す回数
#使用してるSSDは、Intel W300G310です
/usr/sbin/bonnie++ -d /data -u root -r 4096 -x 1500


あとで、どれくらい劣化するかまとめる

2011年11月14日月曜日

Oracle Orion太郎

IOの測定ツール探してたら、みつけたのでとりあえずやってみた
RAWデバイスもいけるお



#http://www.oracle.com/technetwork/indexes/downloads/index.htmlから、
#oracle orionをダウンロード会員登録しないと落とせないお

#orion展開 実行権限つける
gunzip orion_linux_x86-64.gz
chmod 755 orion_linux_x86-64

#orionがあるディレクトリにlunファイルをつくる
#ファイルの中にはテスト対象のデバイスをかく
vim yattarou.lun
/dev/sda1

#テスト実行
#simple 8K 単位の Random Read (Small I/O)
#1M 単位の Random Read (Large I/O)を段階的に実行
#yattarou lunファイルの.より前
#num_disks 物理ディスクの本数
./orion_linux_x86-64 -run simple -testname yattarou -num_disks 1

#実行するとこうなる
#使用したSSDは、Intel W300G310
./orion_linux_x86-64 -run simple -testname yattarou -num_disks 1
ORION: ORacle IO Numbers -- Version 11.1.0.7.0
yattarou_20111114_2047
Test will take approximately 9 minutes
Larger caches may take longer

#結果を確認 グラフにしやすいようにcsvとかができる
#なかなかのIOPSがでてるみたい
cat yattarou_20111114_2047_summary.txt
ORION VERSION 11.1.0.7.0

Commandline:
-run simple -testname yattarou -num_disks 1

This maps to this test:
Test: yattarou
Small IO size: 8 KB
Large IO size: 1024 KB
IO Types: Small Random IOs, Large Random IOs
Simulated Array Type: CONCAT
Write: 0%
Cache Size: Not Entered
Duration for each Data Point: 60 seconds
Small Columns:, 0
Large Columns:, 0, 1, 2
Total Data Points: 8

Name: /dev/sda1 Size: 300069018112
1 FILEs found.

Maximum Large MBPS=274.69 @ Small=0 and Large=2
Maximum Small IOPS=30649 @ Small=5 and Large=0
Minimum Small Latency=0.08 @ Small=1 and Large=0


こんな感じで、簡単にできるんだなー。
オプションも結構あって、いろんな測定ができるみたいなので
もすこし調べたら、またかきます太郎