LP #886223: pt-summary megacli not showing logical drives

Description

**Reported in Launchpad by Jay Janssen last update 09-06-2012 21:45:40

I have a server with a LSI MegaRaid Perc 6/i card. pt-summary outputs the following:

  1. RAID Controller ############################################
    Controller | LSI Logic MegaRAID SAS
    Model | PERC 6/i Integrated, PCIE interface, 8 ports
    Cache | 256MB Memory, BBU
    BBU | 87% Charged, Temperature 22C, isSOHGood=Yes

VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache

========== ========= ========== ===== ======= ====== ======= =========

PhysiclDev Type State Errors Vendor Model Size
========== ==== ======= ====== ======= ============ ===========
Hard Disk SAS Online, 0/0/0 SEAGATE ST3146356SS 136.732
Hard Disk SAS Online, 0/0/0 SEAGATE ST3146356SS 136.732
Hard Disk SAS Online, 0/0/0 SEAGATE ST3146356SS 136.732
Hard Disk SAS Online, 0/0/0 SEAGATE ST3146356SS 136.732

If I run megacli manually, I can see the logical drive information clearly:

$ sudo /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aAll

Adapter 0 – Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :RAID 10
RAID Level : Primary-1, Secondary-3, RAID Level Qualifier-0
Size : 272.25 GB
Mirror Data : 272.25 GB
State : Optimal
Strip Size : 64 KB
Number Of Drives per span:2
Span Depth : 2
Default Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disk's Default
Encryption Type : None
Is VD Cached: No

Exit Code: 0x00

pt-summary should output the logical drive correctly with this controller/megacli.

Environment

None

Smart Checklist

Activity

lpjirasync January 24, 2018 at 6:05 PM

**Comment from Launchpad by: Brian Fraser on: 09-06-2012 21:45:05

This was fixed on the 2.1 release, when most of pt-summary was rewritten, but was never actually tagged. Also, a belated thanks to Devananda for the patch!

lpjirasync January 24, 2018 at 6:04 PM

**Comment from Launchpad by: Jay Janssen on: 28-11-2011 17:18:49

  1. /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL


Adapter #0

Number of Virtual Disks: 1
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-1, Secondary-3, RAID Level Qualifier-0
Size : 135.5 GB
Mirror Data : 135.5 GB
State : Optimal
Strip Size : 64 KB
Number Of Drives per span:2
Span Depth : 2
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disk's Default
Encryption Type : None
Is VD Cached: No
Number of Spans: 2
Span: 0 - Number of PDs: 2

PD: 0 Information
Enclosure Device ID: 32
Slot Number: 0
Drive's postion: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 0
Device Id: 0
WWN: 5000C5001365F9E0
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 68.366 GB [0x88bb93a Sectors]
Non Coerced Size: 67.866 GB [0x87bb93a Sectors]
Coerced Size: 67.75 GB [0x8780000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: SM04
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c5001365f9e1
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: SEAGATE ST973451SS SM043PD2JH68
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :35C (95.00 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Drive's write cache : Disabled
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No

PD: 1 Information
Enclosure Device ID: 32
Slot Number: 1
Drive's postion: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: 0
Device Id: 1
WWN: 5000C5001365F458
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 68.366 GB [0x88bb93a Sectors]
Non Coerced Size: 67.866 GB [0x87bb93a Sectors]
Coerced Size: 67.75 GB [0x8780000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: SM04
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c5001365f459
SAS Address(1): 0x0
Connected Port Number: 1(path0)
Inquiry Data: SEAGATE ST973451SS SM043PD2JH34
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :34C (93.20 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Drive's write cache : Disabled
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No

Span: 1 - Number of PDs: 2

PD: 0 Information
Enclosure Device ID: 32
Slot Number: 2
Drive's postion: DiskGroup: 0, Span: 1, Arm: 0
Enclosure position: 0
Device Id: 2
WWN: 5000C500136605E0
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 68.366 GB [0x88bb93a Sectors]
Non Coerced Size: 67.866 GB [0x87bb93a Sectors]
Coerced Size: 67.75 GB [0x8780000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: SM04
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c500136605e1
SAS Address(1): 0x0
Connected Port Number: 2(path0)
Inquiry Data: SEAGATE ST973451SS SM043PD2JKD3
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :34C (93.20 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Drive's write cache : Disabled
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No

PD: 1 Information
Enclosure Device ID: 32
Slot Number: 3
Drive's postion: DiskGroup: 0, Span: 1, Arm: 1
Enclosure position: 0
Device Id: 3
WWN: 5000C5001365C7F4
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 68.366 GB [0x88bb93a Sectors]
Non Coerced Size: 67.866 GB [0x87bb93a Sectors]
Coerced Size: 67.75 GB [0x8780000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: SM04
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c5001365c7f5
SAS Address(1): 0x0
Connected Port Number: 3(path0)
Inquiry Data: SEAGATE ST973451SS SM043PD2GJKA
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :32C (89.60 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Drive's write cache : Disabled
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No

lpjirasync January 24, 2018 at 6:04 PM

**Comment from Launchpad by: Jay Janssen on: 28-11-2011 17:17:42

  1. /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aAll

Adapter 0 – Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-1, Secondary-3, RAID Level Qualifier-0
Size : 135.5 GB
Mirror Data : 135.5 GB
State : Optimal
Strip Size : 64 KB
Number Of Drives per span:2
Span Depth : 2
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disk's Default
Encryption Type : None
Is VD Cached: No

lpjirasync January 24, 2018 at 6:04 PM

**Comment from Launchpad by: Baron Schwartz on: 24-11-2011 23:35:04

Can you attach the output of MegaCli so we can create a test case?

lpjirasync January 24, 2018 at 6:04 PM

**Comment from Launchpad by: Devananda van der Veen on: 23-11-2011 23:54:44

I just ran into this as well. The problem is the awk script parsing MegaCli output is looking for "Virtual Disk" but some versions of MegaCli print "Virtual Drive" instead, therefore no device is found.

The fix for this is trivial:

$ diff -c pt-summary pt-summary-new
***************

  •  

    •  

      • 714,720 ****
        echo " VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache"
        echo " ========== ========= ========== ===== ======= ====== ======= ========="
        awk '
        ! /^Virtual Disk:/ {
        device = $3;
        devicenames[device] = device;
        }

      • 714,720 ----
        echo " VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache"
        echo " ========== ========= ========== ===== ======= ====== ======= ========="
        awk '
        ! /^Virtual (Drive|Disk):/ {
        device = $3;
        devicenames[device] = device;
        }

Now, the output I get is not perfect, but it is better than nothing:

VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache
========== ========= ========== ===== ======= ====== ======= =========
0 0 (:-1-0) 2 Depth-3 WB, RA

With a few more changes, I can get all columns populated

VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache
========== ========= ========== ===== ======= ====== ======= =========
0 1.633 TB 0 (:-1-0) 2 Depth-3 64 KB Optimal WB, RA

$ diff -c pt-summary pt-summary-new
***************

  •  

    •  

      • 714,720 ****
        echo " VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache"
        echo " ========== ========= ========== ===== ======= ====== ======= ========="
        awk '
        ! /^Virtual Disk:/ {
        device = $3;
        devicenames[device] = device;
        }

      • 714,720 ----
        echo " VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache"
        echo " ========== ========= ========== ===== ======= ====== ======= ========="
        awk '
        ! /^Virtual (Drive|Disk)/ {
        device = $3;
        devicenames[device] = device;
        }
        ***************

      • 735,748 ****
        /Number of Spans/ {
        devices[device ",numspans"] = $4;
        }
        ! /^Size:/ {
        devices[device ",size"] = substr($0, index($0, ":") + 1);
        }
        ! /^State:/ {
        ! devices[device ",state"] = $2;
        }
        ! /^Stripe Size:/ {
        ! devices[device ",stripe"] = $3;
        }
        /^Current Cache Policy/ {
        devices[device ",wpolicy"] = $4 ~ /WriteBack/ ? "WB" : "WT";

      • 735,748 ----
        /Number of Spans/ {
        devices[device ",numspans"] = $4;
        }
        ! /^Size/ {
        devices[device ",size"] = substr($0, index($0, ":") + 1);
        }
        ! /^State/ {
        ! devices[device ",state"] = substr($0, index($0, ":") + 1);
        }
        ! /^Strip(e|) Size/ {
        ! devices[device ",stripe"] = substr($0, index($0, ":") + 1);
        }
        /^Current Cache Policy/ {
        devices[device ",wpolicy"] = $4 ~ /WriteBack/ ? "WB" : "WT";

Done

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 6:04 PM
Updated January 24, 2018 at 6:05 PM
Resolved January 24, 2018 at 6:04 PM