How to upgrade the firmware of HP SAS expander card without Smart Array controller or Proliant Server?

17,894

Upgrading the HP SAS expander is possible using Linux and a SAS HBA.
Note: Flashing firmware to a SAS expander will likely not work when the expander is connected to a SAS RAID controller because that controller might hide all devices behind it from the OS. An example of a SAS HBA is Supermicro SAS2LP-MV8.

In case you haven't got Linux, you can use a Linux Live CD. You could try the most recent Ubuntu Live CD. A 32-bit download will do. 64-Bit will also work.

1. Prerequisites

  1. Start a Linux terminal
    That is Ctrl+Alt+T using the Ubuntu LiveCD.

  2. Make sure your internet connection is working
    To download and install additional components

  3. Make sure your SAS expander card is detected in Linux
    # lsscsi -g | grep HP
    Should return something like:
    [6:0:0:0] enclosu HP HP SAS EXP Card 2.08 - /dev/sg1
    [6:0:1:0] enclosu HP HP SAS EXP Card 2.10 - /dev/sg2

2. Setup utility

You use sg_write_buffer version ≥ 1.15 to download microcode when the expander is connected to a host bus adapter (HBA). To download and install this utility in 32-bit Ubuntu or Debian, use:

# curl -O http://sg.danny.cz/sg/p/libsgutils2-2_1.39-0.1_i386.deb && 
curl -O http://sg.danny.cz/sg/p/sg3-utils_1.39-0.1_i386.deb && 
dpkg -i *_1.39-0.1_i386.deb

The sg_write_buffer utility version ≥ 1.15 — distributed in sg3_utils version ≥ 1.39 — added a --bpw option to download in small chunks. An expander might require a small chunk size like 4096 bytes.

3. Get and unpack HP firmware image

  1. Get the expander firmware image file, for example version 2.10 (C) — dated 9 Sep 2014:
    # curl -O http://downloads.hpe.com/pub/softlib2/software1/sc-linux-fw-array/p6670438/v96061/CP022989.scexe
    Although they sound like Windows/DOS executables, .scexe files from HP are really Linux executable scripts that you can view in a text editor (at least the first part).

  2. Running a 64-bit Linux and having issues with the next command? Then make sure you can run 32-bit executables. The commands in Ubuntu are:
    # dpkg --add-architecture i386 && apt-get update && apt-get install libstdc++6:i386

  3. To extract the firmware image from this .scexe file:
    # mkdir tmp && chmod +x CP022989.scexe && ./CP022989.scexe --unpack=tmp && mv tmp/PUF21000.bin . && rm -r tmp/

4. Flash SAS expander

When the expander to be upgraded/flashed is named sg1 (check with lsscsi -g | grep HP), use:

# sg_write_buffer --mode=dmc_offs_defer --bpw=4096 --in=PUF21000.bin /dev/sg1
# sg_write_buffer --mode=activate_mc /dev/sg1

Older devices might only support --mode=0x7. Mode 0x7 is also known as dmc_offs_save, which does download microcode with offsets, save and activate.

5. Remove temporary files

# rm PUF21000.bin

You might need to unload (for instance modprobe -r mvsas) and load (f.e. modprobe mvsas) your HBA module again or reboot to reflect the firmware version changes in lsscsi -g output.

Share:
17,894

Related videos on Youtube

Saeed Rahmatolahi
Author by

Saeed Rahmatolahi

Updated on September 18, 2022

Comments

  • Saeed Rahmatolahi
    Saeed Rahmatolahi almost 2 years

    How can I update/upgrade/flash the firmware of an HP SAS expander card [468406-B21 a.k.a. 487738-001]?

    I used to do this using Windows and a HP P410 Smart Array controller, however that controller is no longer available.

    The online ROM flash component is not an option because I don't own HP Smart Array controller. Neither is the HP Service Pack for ProLiant + USB key/stick an option because that requires a ProLiant server.

  • ewwhite
    ewwhite almost 10 years
    +1 for creativity, but this sounds a bit risky. I would just update the firmware before deploying the SAS expander by using an HP server or Smart Array controller. This product is end-of-life, so the incidence of new firmware releases is low.
  • ewwhite
    ewwhite almost 10 years
    It's EOL because the expander is not compatible with Gen8 or Gen9 servers.
  • Saeed Rahmatolahi
    Saeed Rahmatolahi over 9 years
    re: This 6G HP SAS expander might be made EOL because of the release of newer (and more expensive) 12G HP SAS expander cards 727250-B21 [DL380 Gen9] and 769635-B21 [ML350 Gen9]. As long as there are PCI express x8 slots in the (ProLiant) server, the older 6G HP SAS expander cards will operate.
  • Christian Isaksson
    Christian Isaksson almost 9 years
    I followed this guide today and thought that it did not work because "lsscsi -g" did not reflect any changes to version string for the HP Expander Card despite successful commands, modprobe reset, restart and full shutdowns. It was only after giving up that I noticed that link negotiation now worked properly for full speed. So, even if you don't see any change to version string. It might have worked anyway!
  • Brian Hasden
    Brian Hasden over 7 years
    The updated location to the firmware mentioned is at downloads.hpe.com/pub/softlib2/software1/sc-linux-fw-array/…‌​.