HP Raid Status "Plugin"

    • HP Raid Status "Plugin"

      At first my english is not like it should be, so I apologize for that.

      This Guide is for peoples who have one of the following HP Raid Array controller:

      Smart Array 5312 Controller
      Smart Array 5302 Controller
      Smart Array 5304 Controller
      Smart Array 532 Controller
      Smart Array 5i Controller
      Smart Array 641 Controller
      Smart Array 642 Controller
      Smart Array 6400 Controller
      Smart Array 6400 EM Controller
      Smart Array 6i Controller
      Smart Array P600 Controller
      Smart Array P400 Controller
      Smart Array P400i Controller
      Smart Array E200 Controller
      Smart Array E200i Controller
      Smart Array P800 Controller
      Smart Array E500 Controller
      Smart Array P700m Controller
      Smart Array P410i Controller
      Smart Array P411 Controller
      Smart Array P212 Controller
      Smart Array P712m Controller
      Smart Array B110i SATA RAID
      Smart Array P812 Controller
      Smart Array P220i Controller
      Smart Array P222 Controller
      Smart Array P420 Controller



      The following Guide is a compilation of individual contributions that I found in the internet but it brought me to the target. Anyway I am not responsible for this tutorial. Perhaps by copy & paste errors contained.

      For all next steps be sure you are logged in as root

      1. Download & Install hpacucli
      At first we have to install the tool 'hpacucli' and therefor we have to download and install the GPG key of the repository
      download the key:

      Source Code

      1. ​wget http://downloads.linux.hp.com/SDR/repo/mcp/GPG-KEY-mcp -O /tmp/proliant.gpg

      installl the key:

      Source Code

      1. ​apt-key add /tmp/proliant.gpg

      create apt sources file for HP/Proliant repo

      Source Code

      1. ​echo -e "deb http://downloads.linux.hp.com/SDR/repo/mcp/wheezy/current non-free" > /etc/apt/sources.list.d/proliant.sources.list

      update apt & install hpacucli package

      Source Code

      1. apt-get update && apt-get install hpacucli


      2. Create a nice script to show all information of your controller and drives
      • Change your dir to /usr/sbin
      • open nano
      • put in the following code

      Source Code

      1. ​#!/bin/sh
      2. PRG='hpacucli'
      3. SLOTLIST=$($PRG ctrl all show | \
      4. grep Slot | sed -e 's/^.*Slot //g' -e 's/ .*$//g')
      5. for i in $SLOTLIST
      6. do
      7. echo
      8. echo CONTROLLER INFO:
      9. echo =====================================================================
      10. $PRG ctrl slot=$i show | grep -v "^$"
      11. echo
      12. echo
      13. echo CONTROLLER STATUS:
      14. echo =====================================================================
      15. $PRG ctrl slot=$i show status | grep -v "^$"
      16. echo
      17. echo
      18. echo LOGICAL DRIVE INFO:
      19. echo =====================================================================
      20. $PRG ctrl slot=$i ld all show | grep -v "^$"
      21. echo
      22. echo
      23. echo PHYSICAL DRIVE INFO:
      24. echo =====================================================================
      25. $PRG ctrl slot=$i pd all show | grep -v "^$"
      26. echo
      27. echo
      28. echo PHYSICAL DRIVE STATUS:
      29. echo =====================================================================
      30. $PRG ctrl slot=$i pd all show detail | grep -i -P '.*(physicaldrive|Firmware|Status|Temperature|Interface|Size|Serial|Speed|Transfer|Model).*'
      31. echo
      32. done
      Display All

      • save it named: hpraidinfo
      • now we have to make the script executable

      Source Code

      1. ​chmod -x /usr/sbin/hpraidinfo

      • if you have no access then

      Source Code

      1. ​chmod 755 /usr/sbin/hpraidinfo


      Time to try.
      root@OMV:~# hpraidinfo

      3. Make a "plugin"
      3.1 make js file
      • makedir /var/www/openmediavault/js/omv/module/admin/service/raidinfo
      • change dir to /var/www/openmediavault/js/omv/module/admin/service/raidinfo
      • open nano
      • put in the following code

      Source Code

      1. ​// Register a node in the navigation tree.
      2. //
      3. // id:
      4. // Set the ID of the node.
      5. // path:
      6. // Parent path in the navigation view.
      7. // Text:
      8. // Service name/title. This is displayed in the navigation.
      9. // icon16:
      10. // 16x16 pixel icon that is displayed in the navigation tree.
      11. // iconSvg:
      12. // SVG icon that is displayed in the navigation view.
      13. OMV.WorkspaceManager.registerNode({
      14. id: "raidinfo",
      15. path: "/service",
      16. text: _("HP Raid Info"),
      17. icon16: "images/raid.png",
      18. iconSvg: "images/raid.svg"
      19. });
      Display All
      • save it named: raidinfo.js

      • makedir /var/www/openmediavault/js/omv/module/admin/service/raidinfo/hpraidinfo
      • change dir to /var/www/openmediavault/js/omv/module/admin/service/raidinfo/hpraidinfo
      • open nano
      • put in the following code

      Source Code

      1. ​/**
      2. * This file is part of OpenMediaVault.
      3. *
      4. * @license http://www.gnu.org/licenses/gpl.html GPL Version 3
      5. * @author Volker Theile <volker.theile@openmediavault.org>
      6. * @copyright Copyright (c) 2009-2014 Volker Theile
      7. *
      8. * OpenMediaVault is free software: you can redistribute it and/or modify
      9. * it under the terms of the GNU General Public License as published by
      10. * the Free Software Foundation, either version 3 of the License, or
      11. * any later version.
      12. *
      13. * OpenMediaVault is distributed in the hope that it will be useful,
      14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
      15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      16. * GNU General Public License for more details.
      17. *
      18. * You should have received a copy of the GNU General Public License
      19. * along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.
      20. */
      21. // require("js/omv/WorkspaceManager.js")
      22. // require("js/omv/workspace/panel/Textarea.js")
      23. /**
      24. * @class OMV.module.admin.service.raidinfo.HpraidInfo
      25. * @derived OMV.workspace.panel.Textarea
      26. */
      27. Ext.define("OMV.module.admin.service.raidinfo.Hpraidinfo", {
      28. extend: "OMV.workspace.panel.Textarea",
      29. hideDownloadButton: false,
      30. rpcService: "raidinfo",
      31. rpcMethod: "getRaidInfo"
      32. });
      33. OMV.WorkspaceManager.registerPanel({
      34. id: "hpraidinfo",
      35. path: "/service/raidinfo",
      36. text: _("HP Raid Info"),
      37. position: 10,
      38. className: "OMV.module.admin.service.raidinfo.Hpraidinfo"
      39. });
      Display All

      • save file for example as: hpraidinfo.js
      3.2 Make inc file
      • change your dir to /usr/share/openmediavault/engined/rpc
      • open nano
      • put in the following code

      PHP Source Code

      1. <?php
      2. require_once("openmediavault/object.inc");
      3. require_once("openmediavault/error.inc");
      4. require_once("openmediavault/functions.inc");
      5. require_once("openmediavault/util.inc");
      6. require_once("openmediavault/system.inc");
      7. require_once("openmediavault/product.inc");
      8. require_once("openmediavault/rpcservice.inc");
      9. require_once("openmediavault/notify.inc");
      10. class OMVRpcServiceRaidinfo extends OMVRpcServiceAbstract
      11. {
      12. /**
      13. * Get the name of the RPC service.
      14. *
      15. * @return string
      16. */
      17. public function getName()
      18. {
      19. return "raidinfo";
      20. }
      21. /**
      22. * Initialize the RPC service.
      23. */
      24. public function initialize()
      25. {
      26. $this->registerMethod("getRaidInfo");
      27. }
      28. /**
      29. * Get the 'hpsacucli' Raid Info report.
      30. * @param params The method parameters.
      31. * The method does not have any paramaters.
      32. * @param context The context of the caller.
      33. * @return A quotation from the Dune novel, which is a string.
      34. */
      35. public function getRaidInfo($params, $context) {
      36. // Validate the RPC caller context.
      37. $this->validateMethodContext($context, array(
      38. "role" => OMV_ROLE_ADMINISTRATOR
      39. ));
      40. OMVUtil::exec("hpraidinfo", $result);
      41. return implode("\n", $result);
      42. }
      43. }
      44. // Register the RPC service.
      45. $rpcServiceMgr = &OMVRpcServiceMgr::getInstance();
      46. $rpcServiceMgr->registerService(new OMVRpcServiceRaidinfo());
      47. ?>
      Display All
      • save file for example as: raidinfo.inc
      Finally we have to restart the rpc service

      root@OMV:~# service openmediavault-engined restart


      Perhaps a admin or moderator can make a review of this guide??
      N40L / 8TB / RAID 1+0 on HP P212/256 / OMV 1.1
    • With all that code, it won't be hard to turn it into a plugin. Give me a couple of days.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • I will polish the script a little bit and adapt it to omv-sysinfo if you don't mind.

      was in Hungary without internet the last days ;)
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work
    • @ oxidizer:
      can you please test the attached file if it is working?
      Put it in /usr/share/openmediavault/sysinfo/modules.d and run
      omv-sysinfo 31-hpraid

      Please post the output, because I don't have a HP RAID controller and can't test it

      Edit: updated script v0.3
      - added info "No controllers detected" if no HP RAID controller is available
      Files
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work

      The post was edited 2 times, last by Solo0815 ().

    • sorry for the delay. Please try v0.3 of the script: forums.openmediavault.org/inde…/1413-31-hpraid-v0-3-zip/

      BTW: the link doesn't work: downloads.linux.hp.com/SDR/repo/mcp/wheezy/current

      here is a repo with more raid-tools:
      hwraid.le-vert.net/wiki/DebianPackages

      Source Code

      1. deb http://hwraid.le-vert.net/debian wheezy main

      GPG-Keys

      Source Code

      1. wget -O - http://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add -

      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work

      The post was edited 4 times, last by Solo0815 ().

    • Sorry for long waiting. Now your Version 0.3 works great. The output from omv-sysinfo 31-hpraid is as it should be:

      root@OMV:~# omv-sysinfo 31-hpraid
      ================================================================================
      = HP Hardware RAID
      ================================================================================

      CONTROLLER INFO:
      --------------------------------------------------------------------------------
      Smart Array P212 in Slot 1
      Bus Interface: PCI
      Slot: 1
      Serial Number: PACCPID12310L3J
      Cache Serial Number: PACCQ9SXVGJ8
      RAID 6 (ADG) Status: Disabled
      Controller Status: OK
      Hardware Revision: C
      Firmware Version: 6.40
      Rebuild Priority: Medium
      Expand Priority: Medium
      Surface Scan Delay: 15 secs
      Surface Scan Mode: Idle
      Queue Depth: Automatic
      Monitor and Performance Delay: 60 min
      Elevator Sort: Enabled
      Degraded Performance Optimization: Disabled
      Inconsistency Repair Policy: Disabled
      Wait for Cache Room: Disabled
      Surface Analysis Inconsistency Notification: Disabled
      Post Prompt Timeout: 0 secs
      Cache Board Present: True
      Cache Status: OK
      Cache Ratio: 10% Read / 90% Write
      Drive Write Cache: Enabled
      Total Cache Size: 256 MB
      Total Cache Memory Available: 144 MB
      No-Battery Write Cache: Enabled
      Cache Backup Power Source: Batteries
      Battery/Capacitor Count: 1
      Battery/Capacitor Status: OK
      SATA NCQ Supported: True

      CONTROLLER STATUS:
      --------------------------------------------------------------------------------
      Smart Array P212 in Slot 1
      Controller Status: OK
      Cache Status: OK
      Battery/Capacitor Status: OK

      LOGICAL DRIVE INFO:
      --------------------------------------------------------------------------------
      Smart Array P212 in Slot 1
      array A
      logicaldrive 1 (7.3 TB, RAID 1+0, OK)
      array B
      logicaldrive 2 (1.8 TB, RAID 1, OK)

      PHYSICAL DRIVE INFO:
      --------------------------------------------------------------------------------
      Smart Array P212 in Slot 1
      array A
      physicaldrive 1I:0:1 (port 1I:box 0:bay 1, SATA, 4000.7 GB, OK)
      physicaldrive 1I:0:2 (port 1I:box 0:bay 2, SATA, 4000.7 GB, OK)
      physicaldrive 1I:0:3 (port 1I:box 0:bay 3, SATA, 4000.7 GB, OK)
      physicaldrive 1I:0:4 (port 1I:box 0:bay 4, SATA, 4000.7 GB, OK)
      array B
      physicaldrive 2E:0:7 (port 2E:box 0:bay 7, SATA, 2 TB, OK)
      physicaldrive 2E:0:8 (port 2E:box 0:bay 8, SATA, 2 TB, OK)

      PHYSICAL DRIVE STATUS:
      --------------------------------------------------------------------------------
      physicaldrive 1I:0:1
      Status: OK
      Interface Type: SATA
      Size: 4000.7 GB
      Rotational Speed: 5400
      Firmware Revision: 80.00A80
      Serial Number: WD-WCC4E0233388
      Model: ATA WDC WD40EZRX-00S
      Current Temperature (C): 32
      Maximum Temperature (C): 39
      PHY Transfer Rate: 3.0Gbps
      physicaldrive 1I:0:2
      Status: OK
      Interface Type: SATA
      Size: 4000.7 GB
      Rotational Speed: 5400
      Firmware Revision: 80.00A80
      Serial Number: WD-WCC4E0230908
      Model: ATA WDC WD40EZRX-00S
      Current Temperature (C): 32
      Maximum Temperature (C): 37
      PHY Transfer Rate: 3.0Gbps
      physicaldrive 1I:0:3
      Status: OK
      Interface Type: SATA
      Size: 4000.7 GB
      Rotational Speed: 5400
      Firmware Revision: 82.00A82
      Serial Number: WD-WCC4EPA9UCR5
      Model: ATA WDC WD40EFRX-68W
      Current Temperature (C): 33
      Maximum Temperature (C): 38
      PHY Transfer Rate: 3.0Gbps
      physicaldrive 1I:0:4
      Status: OK
      Interface Type: SATA
      Size: 4000.7 GB
      Rotational Speed: 5400
      Firmware Revision: 80.00A80
      Serial Number: WD-WCC4E3A7ZU73
      Model: ATA WDC WD40EFRX-68W
      Current Temperature (C): 33
      Maximum Temperature (C): 37
      PHY Transfer Rate: 3.0Gbps
      physicaldrive 2E:0:7
      Status: OK
      Interface Type: SATA
      Size: 2 TB
      Rotational Speed: 5400
      Firmware Revision: 1AQ10001
      Serial Number: S2H7J90C508627
      Model: ATA ST2000DL004 HD20
      Current Temperature (C): 30
      Maximum Temperature (C): 58
      PHY Transfer Rate: 3.0Gbps
      physicaldrive 2E:0:8
      Status: OK
      Interface Type: SATA
      Size: 2 TB
      Rotational Speed: 5400
      Firmware Revision: 1AQ10001
      Serial Number: S2H7J90C508628
      Model: ATA ST2000DL004 HD20
      Current Temperature (C): 29
      Maximum Temperature (C): 58
      PHY Transfer Rate: 3.0Gbps
      N40L / 8TB / RAID 1+0 on HP P212/256 / OMV 1.1
    • oxidizer wrote:

      Sorry for long waiting. Now your Version 0.3 works great. The output from omv-sysinfo 31-hpraid is as it should be:

      Now we have to wait for Aaron to make a plugin out of it.
      @ Aaron: please make sure, you are using this repos. Call info-output with:
      omv-sysinfo 31-hpraid
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work
    • Do you really want this module showing up in the Report tab? If you put it in the modules folder, it will. Wouldn't you rather have this be a separate plugin?
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • I think, if someone has a HP-Raid controller it should show up in the report folder.
      And: Of course the output of "omv-sysinfo 31-hpraid" should also be displayed in a own "HP RAID" tab or submenu.

      I ported the code to "omv-sysinfo" because we can easily call it and it shows up in the report tab later. Wasn't it intended by Volker that "omv-sysinfo" can be extended by adding own modules?
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work
    • Yes, that was the goal. Just making sure that is what was wanted.

      I will add a raid repo to support the hardware raid controller plugins that it looks like we can make from the utility in the repo you linked to.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Update to omv-extras 1.0.20.
      Enable the hwraid repo on the Seconday tab.
      openmediavault-hpraid should show up in the plugin list.

      The openmediavault-hpraid plugin should make a good skeleton plugin for other hwraid controllers as well.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Here is a script for LSI Controllers: calomel.org/megacli_lsi_commands.html
      MegaCLI is the command line interface (CLI) binary used to communicate with the full LSI family of raid controllers found in Supermicro, DELL (PERC), ESXi and Intel servers. The program is a text based command line interface (CLI) and is comprised of a single static binary file. We are not a fan of graphical interfaces (GUI) and appreciate the control a command line program gives over a GUI solution. Using some simple shell scripting we can find out the health of the RAID, email ourselves about problems and work with failed drives.

      I don't have any RAID Controller and I won't port the script, but I thought posting it here is a good place. Maybe someone else will port/use it later.

      Edit:
      some more:
      olafrv.com/?p=588
      many more can be monitored withe smartctl: smartmontools.sourceforge.net/man/smartctl.8.html
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work

      The post was edited 1 time, last by Solo0815 ().

    • Hi guys, I'm new in OMV (using it since few weeks) so allow me first to thank you all for your excellent work, OMV is a great product and the community plug-ins makes it even greater.

      My home server is an HP Microserver N54L with a HP P410 Smart Array raid card holding my storage volume (Raid 5).
      The "HP Raid" plugin was a very nice surprise for me as it took care of installing HP's monitoring and management tools, but what would make it really useful is to integrate it with the OMV Notifications feature (as "Software Raid" is).
      I've found some scripts to do just that (just google: 'email notification hp hpacucli') and I'm working in a script cron job to take care of that. But it would be really nice to have that integrated into Notifications, do you think it's possible to do?

      Thanks!!
    • We have to ask Volker to do that.
      Feel free to aks for a implementation of 3rd-party mail notifications on our bugtracker Mantis
      Thx
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work
    • HI,

      First of all thanks for the fabulous work. I've tested the HPRaid plugin from omg-extras. Unfortunately, it doesn't works for me as my P420 firmware is too young. I have to use hpssacli instead of hpacucli.

      Below it's the diffs to enable hpssacli instead of hpacucli.

      Difference-File

      1. --- 31-hpraid.old 2015-05-06 10:15:42.592267150 +0200
      2. +++ 31-hpraid 2015-05-06 10:14:12.500271507 +0200
      3. @@ -21,7 +21,7 @@
      4. . /usr/share/openmediavault/sysinfo/functions
      5. -HWRAID_BIN="/usr/sbin/hpacucli"
      6. +HWRAID_BIN="/usr/sbin/hpssacli"
      7. if [ ! -f "${HWRAID_BIN}" ]; then
      8. exit 0
      Display All


      Binary for hpssacli can be found here :

      downloads.linux.hp.com/SDR/repo/mcp/pool/non-free/
      downloads.linux.hp.com/SDR/rep…ssacli-2.0-16.0_amd64.deb

      to install it dpkg -i hpssacli-2.0-16.0_amd64.deb

      and that's all !!!

      I think updating the hpraid plugin should be a good idea as hpssacli is compatible with old firmwares too.
    • I see there is no i386 version? I guess I could make a new version and only put it in the amd64 repo.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!