hp smart array

Linux HP Smart Array Raid Controller

A client has a machine in a DC that has a raid controller and 4 hdd’s set to raid 10, that’s all I was told. I wanted to keep an eye on the hdds, so I needed to install a utility that can monitor and interact with the raid controller.  In my case I have the hp smart array raid controller as you will see in just a bit, you may have a different controller from this one by a different manufacturer, or it may require a different version of the software tool from HP, please check on the HP site linked below before continuing on. There is a chance of serious data loss if you don’t follow common sense practices and MAKE BACKUPS. I needed to do a few things, find out which controller is it, find latest of control utility for it, install said utility and then check on the drives. that isnt always easy, sadly.

First we check who makes this system.
dmidecode | grep -A3 ‘^System Information’
Sample result:

System Information
Manufacturer: HP
Product Name: ProLiant DL160 G6
Version:

Second we check lspci to see what controller we have installed.
lspci -k|grep -i -A2 raid
Sample Result :

04:00.0 RAID bus controller: Hewlett-Packard Company Smart Array G6 controllers (rev 01)
Subsystem: Hewlett-Packard Company Smart Array P410
Kernel driver in use: hpsa

Now we know we have a HP machine, DL160 G6 to be exact in this case, and the exact rev of the card itself. We need to install the HP provided software for it.  The official HP software page for the information below is here.  However as its laid out, best of luck getting up and running quickly if you follow that page.

Get and install HP Keys. (Keys are in the following order: software release pre 2014, during 2014, and post 2014)

curl http://downloads.linux.hpe.com/SDR/hpPublicKey1024.pub | apt-key add -
curl http://downloads.linux.hpe.com/SDR/hpPublicKey2048.pub | apt-key add -
curl http://downloads.linux.hpe.com/SDR/hpPublicKey2048_key1.pub | apt-key add -

Add the HP repo (be sure to change the jessie to whatever your release is):

echo -e "deb http://downloads.linux.hpe.com/SDR/repo/mcp/ jessie/current non-free" > /etc/apt/sources.list.d/hpe.list

Then update sources and install package :

apt-get update && apt-get install hpssacli

Now you have the tools needed for the job! so run the utility

hpssacli

sample result:

HP Smart Storage Administrator CLI 2.10.14.0
Detecting Controllers…Done.
Type “help” for a list of supported commands.
Type “exit” to close the console.

=>

There are a few commands you can use on this CLI:

Show all config :

=> ctrl all show config

Smart Array P410 in Slot 4 (sn: PACCRID12290K57)
Internal Drive Cage at Port 1I, Box 1, OK
array A (SATA, Unused Space: 0 MB)
logicaldrive 1 (1.8 TB, RAID 1+0, OK)

physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SATA, 1 TB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SATA, 1 TB, OK)
physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SATA, 1 TB, OK)
physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SATA, 1 TB, OK)

SEP (Vendor ID PMCSIERA, Model SRC 8x6G) 250 (WWID: 5001438021BEED2F)

Show Status:

=> ctrl all show status

Smart Array P410 in Slot 4
Controller Status: OK
Cache Status: OK

View drive status (change slot # to thew one from show status command above):

=> ctrl slot=4 pd all show status

physicaldrive 1I:1:1 (port 1I:box 1:bay 1, 1 TB): OK
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, 1 TB): OK
physicaldrive 1I:1:3 (port 1I:box 1:bay 3, 1 TB): OK
physicaldrive 1I:1:4 (port 1I:box 1:bay 4, 1 TB): OK

If you get an error like the following you are using the wrong slot number, just run ctrl all show status and use the proper slot number:

ctrl slot=0 pd all show status

Error: The controller identified by “slot=0” was not detected.

View each individual drive and its info :

ctrl slot=4 pd 1I:1:4 show detail

Smart Array P410 in Slot 4

array A

physicaldrive 1I:1:4
Port: 1I
Box: 1
Bay: 4
Status: OK
Drive Type: Data Drive
Interface Type: SATA
Size: 1 TB
Native Block Size: 512
Rotational Speed: 7200
Firmware Revision: HPG2
Serial Number: Z1N3S3ZS
Model: ATA MB1000CBZQE
SATA NCQ Capable: True
SATA NCQ Enabled: True
Current Temperature (C): 28
Maximum Temperature (C): 51
PHY Count: 1
PHY Transfer Rate: 1.5Gbps

Show all logical drives:

ctrl slot=4 ld all show

Smart Array P410 in Slot 4

array A

logicaldrive 1 (1.8 TB, RAID 1+0, OK)

Hope this helps some of you out as it took me a little bit to get all the information together for my setup, so I’m storing it here for future usage 🙂

 

 

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

5 Comments

  1. For Ubuntu 18.0.4 LTS make the following changes:

    use correct version:

    echo -e “deb http://downloads.linux.hpe.com/SDR/repo/mcp/ buster/current non-free” > /etc/apt/sources.list.d/hpe.list

    add an additional key to the list:

    curl http://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub | sudo apt-key add –

    HP renamed the utility so:

    apt-get install ssacli

    Otherwise everything still works – many thanks!

    Note the location by SumGuy is wrong as HP reorganized their website.

    1. Thank you Edward, appreciate the updated info, I will update the article ASAP.

  2. Dick Timmerman says:

    Hi Sumguy,

    Also trying to install this package on my UBUNTU 16.04 system, it produces following errors:
    W: The repository ‘http://downloads.linux.hpe.com/SDR/repo/mcp dist/project_ver Release’ does not have a Release file.
    N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    E: Failed to fetch http://downloads.linux.hpe.com/SDR/repo/mcp/dists/dist/project_ver/non-free/binary-amd64/Packages 404 Not Found
    E: Some index files failed to download. They have been ignored, or old ones used instead.

    Any idea?

    1. Dick Timmerman says:

      Think I solved it myself. Changes “dist/project_ver Release” into “xenial/current” then the apt-get did what it had to do.