6
# ############################################################################
7
cat <<EOF > $TMPDIR/expected
8
BBU | 100% Charged, Temperature 18C, isSOHGood=Yes
11
cat <<EOF > $TMPDIR/in
12
BBU status for Adapter: 0
18
Firmware Status: 00000000
27
Remaining Time Alarm : No
28
Remaining Capacity Alarm: No
29
Discharge Terminated : No
31
Charging Terminated : No
34
Relative State of Charge: 100 %
35
Charger Status: Complete
36
Remaining Capacity: 867 mAh
37
Full Charge Capacity: 867 mAh
42
parse_lsi_megaraid_bbu_status $TMPDIR/in > $TMPDIR/got
43
no_diff $TMPDIR/got $TMPDIR/expected
45
# ############################################################################
46
cat <<EOF > $TMPDIR/expected
48
PhysiclDev Type State Errors Vendor Model Size
49
========== ==== ======= ====== ======= ============ ===========
50
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
51
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
52
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
53
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
56
cat <<EOF > $TMPDIR/in
60
Enclosure Device ID: 32
66
Predictive Failure Count: 0
67
Last Predictive Failure Event Seq Number: 0
69
Raw Size: 70007MB [0x88bb93a Sectors]
70
Non Coerced Size: 69495MB [0x87bb93a Sectors]
71
Coerced Size: 69376MB [0x8780000 Sectors]
72
Firmware state: Online
73
SAS Address(0): 0x5000c500079f8cf9
75
Connected Port Number: 0(path0)
76
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
78
Media Type: Hard Disk Device
80
Enclosure Device ID: 32
86
Predictive Failure Count: 0
87
Last Predictive Failure Event Seq Number: 0
89
Raw Size: 70007MB [0x88bb93a Sectors]
90
Non Coerced Size: 69495MB [0x87bb93a Sectors]
91
Coerced Size: 69376MB [0x8780000 Sectors]
92
Firmware state: Online
93
SAS Address(0): 0x5000c500079f5c35
95
Connected Port Number: 1(path0)
96
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
98
Media Type: Hard Disk Device
100
Enclosure Device ID: 32
106
Predictive Failure Count: 0
107
Last Predictive Failure Event Seq Number: 0
109
Raw Size: 70007MB [0x88bb93a Sectors]
110
Non Coerced Size: 69495MB [0x87bb93a Sectors]
111
Coerced Size: 69376MB [0x8780000 Sectors]
112
Firmware state: Online
113
SAS Address(0): 0x5000c500079fc0c9
115
Connected Port Number: 2(path0)
116
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
118
Media Type: Hard Disk Device
120
Enclosure Device ID: 32
126
Predictive Failure Count: 0
127
Last Predictive Failure Event Seq Number: 0
129
Raw Size: 70007MB [0x88bb93a Sectors]
130
Non Coerced Size: 69495MB [0x87bb93a Sectors]
131
Coerced Size: 69376MB [0x8780000 Sectors]
132
Firmware state: Online
133
SAS Address(0): 0x5000c500079dc339
135
Connected Port Number: 3(path0)
136
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
138
Media Type: Hard Disk Device
143
parse_lsi_megaraid_devices $TMPDIR/in > $TMPDIR/got
144
no_diff $TMPDIR/got $TMPDIR/expected
147
# ############################################################################
148
cat <<EOF > $TMPDIR/expected
150
PhysiclDev Type State Errors Vendor Model Size
151
========== ==== ======= ====== ======= ============ ===========
152
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
153
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
154
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
155
Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB
158
cat <<EOF > $TMPDIR/in
159
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL
163
Number of Virtual Disks: 2
164
Virtual Disk: 0 (Target Id: 0)
166
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
172
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
173
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
174
Access Policy: Read/Write
175
Disk Cache Policy: Disk's Default
177
Span: 0 - Number of PDs: 2
179
Enclosure Device ID: 32
185
Predictive Failure Count: 0
186
Last Predictive Failure Event Seq Number: 0
188
Raw Size: 70007MB [0x88bb93a Sectors]
189
Non Coerced Size: 69495MB [0x87bb93a Sectors]
190
Coerced Size: 69376MB [0x8780000 Sectors]
191
Firmware state: Online
192
SAS Address(0): 0x5000c500079f8cf9
194
Connected Port Number: 0(path0)
195
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
197
Media Type: Hard Disk Device
200
Enclosure Device ID: 32
206
Predictive Failure Count: 0
207
Last Predictive Failure Event Seq Number: 0
209
Raw Size: 70007MB [0x88bb93a Sectors]
210
Non Coerced Size: 69495MB [0x87bb93a Sectors]
211
Coerced Size: 69376MB [0x8780000 Sectors]
212
Firmware state: Online
213
SAS Address(0): 0x5000c500079f5c35
215
Connected Port Number: 1(path0)
216
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
218
Media Type: Hard Disk Device
220
Virtual Disk: 1 (Target Id: 1)
222
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
228
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
229
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
230
Access Policy: Read/Write
231
Disk Cache Policy: Disk's Default
233
Span: 0 - Number of PDs: 2
235
Enclosure Device ID: 32
241
Predictive Failure Count: 0
242
Last Predictive Failure Event Seq Number: 0
244
Raw Size: 70007MB [0x88bb93a Sectors]
245
Non Coerced Size: 69495MB [0x87bb93a Sectors]
246
Coerced Size: 69376MB [0x8780000 Sectors]
247
Firmware state: Online
248
SAS Address(0): 0x5000c500079fc0c9
250
Connected Port Number: 2(path0)
251
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
253
Media Type: Hard Disk Device
256
Enclosure Device ID: 32
262
Predictive Failure Count: 0
263
Last Predictive Failure Event Seq Number: 0
265
Raw Size: 70007MB [0x88bb93a Sectors]
266
Non Coerced Size: 69495MB [0x87bb93a Sectors]
267
Coerced Size: 69376MB [0x8780000 Sectors]
268
Firmware state: Online
269
SAS Address(0): 0x5000c500079dc339
271
Connected Port Number: 3(path0)
272
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
274
Media Type: Hard Disk Device
279
parse_lsi_megaraid_devices $TMPDIR/in > $TMPDIR/got
280
no_diff $TMPDIR/got $TMPDIR/expected
282
# ############################################################################
283
cat <<EOF > $TMPDIR/expected
285
VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache
286
========== ========= ========== ===== ======= ====== ======= =========
287
0(no name) 69376MB 1 (1-0-0) 2 1-1 64kB Optimal WB, no RA
288
1(no name) 69376MB 1 (1-0-0) 2 1-1 64kB Optimal WB, no RA
291
cat <<EOF > $TMPDIR/in
292
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL
296
Number of Virtual Disks: 2
297
Virtual Disk: 0 (Target Id: 0)
299
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
305
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
306
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
307
Access Policy: Read/Write
308
Disk Cache Policy: Disk's Default
310
Span: 0 - Number of PDs: 2
312
Enclosure Device ID: 32
318
Predictive Failure Count: 0
319
Last Predictive Failure Event Seq Number: 0
321
Raw Size: 70007MB [0x88bb93a Sectors]
322
Non Coerced Size: 69495MB [0x87bb93a Sectors]
323
Coerced Size: 69376MB [0x8780000 Sectors]
324
Firmware state: Online
325
SAS Address(0): 0x5000c500079f8cf9
327
Connected Port Number: 0(path0)
328
Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33
330
Media Type: Hard Disk Device
333
Enclosure Device ID: 32
339
Predictive Failure Count: 0
340
Last Predictive Failure Event Seq Number: 0
342
Raw Size: 70007MB [0x88bb93a Sectors]
343
Non Coerced Size: 69495MB [0x87bb93a Sectors]
344
Coerced Size: 69376MB [0x8780000 Sectors]
345
Firmware state: Online
346
SAS Address(0): 0x5000c500079f5c35
348
Connected Port Number: 1(path0)
349
Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH
351
Media Type: Hard Disk Device
353
Virtual Disk: 1 (Target Id: 1)
355
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
361
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
362
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
363
Access Policy: Read/Write
364
Disk Cache Policy: Disk's Default
366
Span: 0 - Number of PDs: 2
368
Enclosure Device ID: 32
374
Predictive Failure Count: 0
375
Last Predictive Failure Event Seq Number: 0
377
Raw Size: 70007MB [0x88bb93a Sectors]
378
Non Coerced Size: 69495MB [0x87bb93a Sectors]
379
Coerced Size: 69376MB [0x8780000 Sectors]
380
Firmware state: Online
381
SAS Address(0): 0x5000c500079fc0c9
383
Connected Port Number: 2(path0)
384
Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST
386
Media Type: Hard Disk Device
389
Enclosure Device ID: 32
395
Predictive Failure Count: 0
396
Last Predictive Failure Event Seq Number: 0
398
Raw Size: 70007MB [0x88bb93a Sectors]
399
Non Coerced Size: 69495MB [0x87bb93a Sectors]
400
Coerced Size: 69376MB [0x8780000 Sectors]
401
Firmware state: Online
402
SAS Address(0): 0x5000c500079dc339
404
Connected Port Number: 3(path0)
405
Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5
407
Media Type: Hard Disk Device
412
parse_lsi_megaraid_virtual_devices $TMPDIR/in > $TMPDIR/got
413
no_diff $TMPDIR/got $TMPDIR/expected
415
# ############################################################################
416
cat <<EOF > $TMPDIR/expected
418
VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache
419
========== ========= ========== ===== ======= ====== ======= =========
420
0(no name) 69376MB 1 (1-0-0) 2 1- 64kB Optimal WB, no RA
421
1(no name) 69376MB 1 (1-0-0) 2 1- 64kB Optimal WB, no RA
424
cat <<EOF > $TMPDIR/in
425
[root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aAll
428
Adapter 0 -- Virtual Drive Information:
429
Virtual Disk: 0 (Target Id: 0)
431
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
437
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
438
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
439
Access Policy: Read/Write
440
Disk Cache Policy: Disk's Default
441
Virtual Disk: 1 (Target Id: 1)
443
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
449
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
450
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
451
Access Policy: Read/Write
452
Disk Cache Policy: Disk's Default
456
parse_lsi_megaraid_virtual_devices $TMPDIR/in > $TMPDIR/got
457
no_diff $TMPDIR/got $TMPDIR/expected
460
# ############################################################################
461
cat <<EOF > $TMPDIR/expected
462
Model | PERC 6/i Integrated, PCIE interface, 8 ports
463
Cache | 256MB Memory, BBU Present
466
cat <<EOF > $TMPDIR/in
467
[root@pc-db1]# /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL
471
==============================================================================
474
Product Name : PERC 6/i Integrated
475
Serial No : 1122334455667788
476
FW Package Build: 6.0.1-0080
481
Rework Date : 06/08/07
485
Image Versions In Flash:
487
FW Version : 1.11.52-0349
488
BIOS Version : NT13-2
489
WebBIOS Version : 1.1-32-e_11-Rel
490
Ctrl-R Version : 1.01-010B
491
Boot Block Version : 1.00.00.01-0008
493
Pending Images In Flash
504
Host Interface : PCIE
506
Number of Frontend Port: 0
507
Device Interface : PCIE
509
Number of Backend Port: 8
522
SAS Address : 5001e4f021048f00
526
Serial Debugger : Present
533
Current Time : 20:31:29 5/13, 2010
534
Predictive Fail Poll Interval : 300sec
535
Interrupt Throttle Active Count : 16
536
Interrupt Throttle Completion : 50us
540
Check Consistency Rate : 30%
541
Reconstruction Rate : 30%
542
Cache Flush Interval : 4s
543
Max Drives to Spinup at One Time : 2
544
Delay Among Spinup Groups : 12s
545
Physical Drive Coercion Mode : 128MB
546
Cluster Mode : Disabled
548
Auto Rebuild : Enabled
549
Battery Warning : Enabled
551
Ecc Bucket Leak Rate : 1440 Minutes
552
Restore HotSpare on Insertion : Disabled
553
Expose Enclosure Devices : Disabled
554
Maintain PD Fail History : Disabled
555
Host Request Reordering : Enabled
556
Auto Detect BackPlane Enabled : SGPIO/i2c SEP
557
Load Balance Mode : Auto
558
Any Offline VD Cache Preserved : No
562
RAID Level Supported : RAID0, RAID1, RAID5, RAID6, RAID10, RAID50, RAID60
563
Supported Drives : SAS, SATA
567
Mix In Enclosure Allowed
578
Max Number of VDs : 64
579
Max Parallel Commands : 1008
581
Max Data Transfer Size : 8192 sectors
582
Max Strips PerIO : 42
583
Min Stripe Size : 8kB
584
Max Stripe Size : 1024kB
596
Supported Adapter Operations
601
Reconstruct Rate : Yes
602
Patrol Read Rate : Yes
607
Dedicated Hot Spare : Yes
608
Revertible Hot Spares : No
609
Foreign Config Import : Yes
610
Self Diagnostic : Yes
611
Allow Mixed Redundancy on Array : No
612
Global Hot Spares : Yes
613
Deny SCSI Passthrough : No
614
Deny SMP Passthrough : No
615
Deny STP Passthrough : No
617
Supported VD Operations
623
Disk Cache Policy : Yes
628
Supported PD Operations
633
Deny Force Failed : No
634
Deny Force Good/Bad : No
635
Deny Missing Replace : No
638
Disable Copyback : No
639
Enable Copyback on SMART : No
640
Enable Copyback to SSD on SMART error : No
644
Memory Correctable Errors : 0
645
Memory Uncorrectable Errors : 0
649
Cluster Permitted : No
655
Phy PolaritySplit : 0
658
Flush Time : 4 seconds
661
Cache When BBU Bad : Disabled
665
Coercion Mode : 128MB
667
Dirty LED Shows Drive Activity : No
668
BIOS Continue on Error : No
669
Spin Down Mode : None
670
Allowed Device Type : SAS/SATA Mix
671
Allow Mix In Enclosure : Yes
672
Allow HDD SAS/SATA Mix In VD : No
673
Allow SSD SAS/SATA Mix In VD : No
674
Allow HDD/SAS Mix In VD : No
675
Allow SATA In Cluster : No
676
Max Chained Enclosures : 1
679
Direct PD Mapping : Yes
680
BIOS Enumerate VDs : Yes
681
Restore Hot Spare on Insertion : No
682
Expose Enclosure Devices : No
683
Maintain PD Fail History : No
684
Disable Puncturing : No
685
Zero Based Enclosure Enumeration : Yes
686
PreBoot CLI Enabled : No
687
LED Show Drive Activity : No
688
Cluster Disable : Yes
690
Auto Detect BackPlane Enable : SGPIO/i2c SEP
691
Delay during POST : 0
695
parse_lsi_megaraid_adapter_info $TMPDIR/in > $TMPDIR/got
696
no_diff $TMPDIR/got $TMPDIR/expected