wordpress y2014 m11 d23 h08 single s-y2010 s-m06 s-d02 s-h09 s-category-linux s-category-tipstrickshowto s-author-irwan">
Skip to content

Linux: Using MegaCLI To Query Hardware RAID Info

Objective:
To query hardware RAID info in a Linux system without going into BIOS by using MegaCLI

I’m using IBM x3650 M2. Below is the detail of RAID card (taken from 'lspci -v'),
---------- 8< ---------
01:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 1078 (rev 04)
Subsystem: IBM SystemX MegaRAID SAS 8808E
Flags: bus master, fast devsel, latency 0, IRQ 217
Memory at 9b900000 (64-bit, non-prefetchable) [size=256K]
I/O ports at 1000 [size=256]
Memory at 9b940000 (64-bit, non-prefetchable) [size=256K]
Expansion ROM at 9bb00000 [disabled] [size=64K]
Capabilities: [b0] Express Endpoint IRQ 0
Capabilities: [c4] Message Signalled Interrupts: 64bit+ Queue=0/2 Enable-
Capabilities: [d4] MSI-X: Enable- Mask- TabSize=4
Capabilities: [e0] Power Management version 2
Capabilities: [ec] Vital Product Data
Capabilities: [100] Power Budgeting
---------- >8 ----------

Modus Operandi:
1) Download and install “MegaRAID CLI – Linux” from http://www.lsi.com/DistributionSystem/AssetDocument/4.00.11_Linux_MegaCLI.zip

[root@sgbbmgcore04 jmirwan]# rpm -ivh MegaCli-4.00.11-1.i386.rpm
Preparing...                ########################################### [100%]
   1:MegaCli                ########################################### [100%]
[root@sgbbmgcore04 jmirwan]# rpm -qil MegaCli
Name        : MegaCli                      Relocations: (not relocatable)
Version     : 4.00.11                           Vendor: LSI Logic Corporation
Release     : 1                             Build Date: Fri 06 Feb 2009 02:17:34 PM MYT
Install Date: Wed 02 Jun 2010 12:30:51 PM MYT      Build Host: localhost.localdomain
Group       : RAID                          Source RPM: MegaCli-4.00.11-1.src.rpm
Size        : 4561132                          License: LSI Logic Corporation
Signature   : (none)
Packager    : Bhavna Patel
URL         : http://www.lsil.com
Summary     : MegaCli SAS RAID Management Utility.
Description :
MegaCli is used to manage SAS RAID controllers.
/opt/MegaRAID/MegaCli/MegaCli
/opt/MegaRAID/MegaCli/MegaCli64
[root@sgbbmgcore04 jmirwan]# /opt/MegaRAID/MegaCli/MegaCli64
Fatal error - Command Tool invoked with wrong parameters
Exit Code: 0x01

2) Run MegaCLI/MegaCLI64

  1. [root@sgbbmgcore04 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -CfgDsply -aALL
  2.  
  3. ==============================================================================
  4. Adapter: 0
  5. Product Name: IBM ServeRAID-MR10i SAS/SATA Controller
  6. Memory: 256MB
  7. BBU: Present
  8. Serial No: P095973909
  9. ==============================================================================
  10. Number of DISK GROUPS: 1
  11.  
  12. DISK GROUPS: 0
  13. Number of Spans: 1
  14. SPAN: 0
  15. Span Reference: 0x00
  16. Number of PDs: 2
  17. Number of VDs: 1
  18. Number of dedicated Hotspares: 0
  19. Virtual Disk Information:
  20. Virtual Disk: 0 (Target Id: 0)
  21. Name:
  22. RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
  23. Size:135.972 GB
  24. State: Optimal
  25. Stripe Size: 128 KB
  26. Number Of Drives:2
  27. Span Depth:1
  28. Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
  29. Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
  30. Access Policy: Read/Write
  31. Disk Cache Policy: Disabled
  32. Encryption Type: None
  33. Physical Disk Information:
  34. Physical Disk: 0
  35. Enclosure Device ID: 252
  36. Slot Number: 0
  37. Device Id: 1
  38. Sequence Number: 2
  39. Media Error Count: 0
  40. Other Error Count: 0
  41. Predictive Failure Count: 0
  42. Last Predictive Failure Event Seq Number: 0
  43. PD Type: SAS
  44. Raw Size: 136.731 GB [0x11176d60 Sectors]
  45. Non Coerced Size: 136.231 GB [0x11076d60 Sectors]
  46. Coerced Size: 135.972 GB [0x10ff2000 Sectors]
  47. Firmware state: Online
  48. SAS Address(0): 0x5000c50017101055
  49. SAS Address(1): 0x0
  50. Connected Port Number: 0(path0)
  51. Inquiry Data: IBM-ESXSST9146852SS     B6243TB0M3330518B624
  52. FDE Capable: Not Capable
  53. FDE Enable: Disable
  54. Secured: Unsecured
  55. Locked: Unlocked
  56. Foreign State: None
  57. Device Speed: Unknown
  58. Link Speed: 3.0Gb/s
  59. Media Type: Hard Disk Device
  60.  
  61. Physical Disk: 1
  62. Enclosure Device ID: 252
  63. Slot Number: 1
  64. Device Id: 2
  65. Sequence Number: 2
  66. Media Error Count: 0
  67. Other Error Count: 0
  68. Predictive Failure Count: 0
  69. Last Predictive Failure Event Seq Number: 0
  70. PD Type: SAS
  71. Raw Size: 136.731 GB [0x11176d60 Sectors]
  72. Non Coerced Size: 136.231 GB [0x11076d60 Sectors]
  73. Coerced Size: 135.972 GB [0x10ff2000 Sectors]
  74. Firmware state: Online
  75. SAS Address(0): 0x5000c5001710caf1
  76. SAS Address(1): 0x0
  77. Connected Port Number: 1(path0)
  78. Inquiry Data: IBM-ESXSST9146852SS     B6243TB0LCYQ0518B624
  79. FDE Capable: Not Capable
  80. FDE Enable: Disable
  81. Secured: Unsecured
  82. Locked: Unlocked
  83. Foreign State: None
  84. Device Speed: Unknown
  85. Link Speed: 3.0Gb/s
  86. Media Type: Hard Disk Device
  87.  
  88.  
  89. Exit Code: 0x00

From the output, I can gather necessary info such as RAID level used, no of diskgroup/span, detail of physical disks etc. For further options, User’s Guide is the best place to refer.

Comment(s) via Facebook

{ 1 } Comments

  1. rexis | June 3, 2010 at 2:59 pm | Permalink
    Using Google Chrome Google Chrome 6.0.421.0 on Linux Linux

    You might be interested in using Einarc, a common frontend for all such utitlities as LSI’s Megacli (including other adapters) – see at http://www.inquisitor.ru/doc/einarc/

    Using Google Chrome Google Chrome 6.0.421.0 on Linux Linux

{ 1 } Trackback

  1. Using WordPress WordPress 2.9.2

    […] SysAdmin’s Diary : Linux: Using MegaCLI To Query Hardware RAID Info […]

Post a Comment

Your email is never published nor shared. Required fields are marked *