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:
installl the key:
create apt sources file for HP/Proliant repo
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
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
#!/bin/sh
PRG='hpacucli'
SLOTLIST=$($PRG ctrl all show | \
grep Slot | sed -e 's/^.*Slot //g' -e 's/ .*$//g')
for i in $SLOTLIST
do
echo
echo CONTROLLER INFO:
echo =====================================================================
$PRG ctrl slot=$i show | grep -v "^$"
echo
echo
echo CONTROLLER STATUS:
echo =====================================================================
$PRG ctrl slot=$i show status | grep -v "^$"
echo
echo
echo LOGICAL DRIVE INFO:
echo =====================================================================
$PRG ctrl slot=$i ld all show | grep -v "^$"
echo
echo
echo PHYSICAL DRIVE INFO:
echo =====================================================================
$PRG ctrl slot=$i pd all show | grep -v "^$"
echo
echo
echo PHYSICAL DRIVE STATUS:
echo =====================================================================
$PRG ctrl slot=$i pd all show detail | grep -i -P '.*(physicaldrive|Firmware|Status|Temperature|Interface|Size|Serial|Speed|Transfer|Model).*'
echo
done
Alles anzeigen
- save it named: hpraidinfo
- now we have to make the script executable
- if you have no access then
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
// Register a node in the navigation tree.
//
// id:
// Set the ID of the node.
// path:
// Parent path in the navigation view.
// Text:
// Service name/title. This is displayed in the navigation.
// icon16:
// 16x16 pixel icon that is displayed in the navigation tree.
// iconSvg:
// SVG icon that is displayed in the navigation view.
OMV.WorkspaceManager.registerNode({
id: "raidinfo",
path: "/service",
text: _("HP Raid Info"),
icon16: "images/raid.png",
iconSvg: "images/raid.svg"
});
Alles anzeigen
- 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
/**
* This file is part of OpenMediaVault.
*
* @license http://www.gnu.org/licenses/gpl.html GPL Version 3
* @author Volker Theile <volker.theile@openmediavault.org>
* @copyright Copyright (c) 2009-2014 Volker Theile
*
* OpenMediaVault is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* OpenMediaVault is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.
*/
// require("js/omv/WorkspaceManager.js")
// require("js/omv/workspace/panel/Textarea.js")
/**
* @class OMV.module.admin.service.raidinfo.HpraidInfo
* @derived OMV.workspace.panel.Textarea
*/
Ext.define("OMV.module.admin.service.raidinfo.Hpraidinfo", {
extend: "OMV.workspace.panel.Textarea",
hideDownloadButton: false,
rpcService: "raidinfo",
rpcMethod: "getRaidInfo"
});
OMV.WorkspaceManager.registerPanel({
id: "hpraidinfo",
path: "/service/raidinfo",
text: _("HP Raid Info"),
position: 10,
className: "OMV.module.admin.service.raidinfo.Hpraidinfo"
});
Alles anzeigen
- 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
require_once("openmediavault/object.inc");
require_once("openmediavault/error.inc");
require_once("openmediavault/functions.inc");
require_once("openmediavault/util.inc");
require_once("openmediavault/system.inc");
require_once("openmediavault/product.inc");
require_once("openmediavault/rpcservice.inc");
require_once("openmediavault/notify.inc");
class OMVRpcServiceRaidinfo extends OMVRpcServiceAbstract
{
/**
* Get the name of the RPC service.
*
* @return string
*/
public function getName()
{
return "raidinfo";
}
/**
* Initialize the RPC service.
*/
public function initialize()
{
$this->registerMethod("getRaidInfo");
}
/**
* Get the 'hpsacucli' Raid Info report.
* @param params The method parameters.
* The method does not have any paramaters.
* @param context The context of the caller.
* @return A quotation from the Dune novel, which is a string.
*/
public function getRaidInfo($params, $context) {
// Validate the RPC caller context.
$this->validateMethodContext($context, array(
"role" => OMV_ROLE_ADMINISTRATOR
));
OMVUtil::exec("hpraidinfo", $result);
return implode("\n", $result);
}
}
// Register the RPC service.
$rpcServiceMgr = &OMVRpcServiceMgr::getInstance();
$rpcServiceMgr->registerService(new OMVRpcServiceRaidinfo());
?>
Alles anzeigen
- 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??