Convert HP Smart Array Controller to HBA Mode


Recommended Posts

Good Evening Unraiders,

 

 

I am an owner of an HP ProLiant DL380 Gen 7

 

Original configuration:

 

2 x Intel Xeon CPU X5660 6 Core

 

32 GB ECC Ram

 

P410i Smart Array RAID controller

 

1x 4 TB Mechanical Parity HDD

 

6 x 1 TB SSD (Various Makes and Models) - Yes I know it is not currently supported by Unraid. As of yet, I have had minimal problems with my setup

 

4x Onboard 1 GB NIC

 

1x Integrated ILO NIC (Doesn’t matter for this documentation)

 

Upgraded components

 

P410i has been disabled and upgraded to P420 Smart Array RAID controller

 

Added a 4-port intel Gigabit NIC controller card because why not, I was in there, and I had it laying around. Can use it for VM's or something.

 

Consider this:

 

Out of the box, The HP Smart Array controllers offer no IT or HBA mode through their firmware. (At least in the 7th Gen)

 

In order to see any attached disks. RAID 0 virtual disks need created out of each disk and those are mapped in turn to Unraid to create your array.

 

Each time a new drive was added, or if ever needed, replaced, the system would need rebooted so that a new drive can be placed and built in the RAID controller as a RAID 0 virtual disk.

 

I have seen documentation indicating that users were having trouble getting their devices in HBA mode So I thought I would share my experience in hopes it might help someone.

 

My System is a seasoned Unraid setup and had a buildup of Data. I am writing this with that perspective. If you are building new, simply do not create any virtual disks and skip the backup portion of this documentation.

 

***I assume no responsibility for the steps outlined in this documentation. It worked for me and took a bit of research. Please be sure you do the same and are confident you have a solid understanding before proceeding if you have data you are concerned with losing. I assume no responsibility for damaged hardware or lost data if you choose to follow these steps.***

 

Prep Steps:

 

1. Download HP Service Pack for ProLiant. I used Production Version G7.0 for my setup. This worked just fine. (Google the MD5 for your Service Pack for ProLiant if you do not have a contract or warranty with HP. Mine was: 064177d26c939f8dc60c6aefa0799bcf I was able to find a download. You can also search the SHA256.)

 

2. Download HP USB Key Utility

 

3. For the P420 Smart Array, be sure your firmware is 6.6.8 or above. Mine was 8.5 and worked just fine. I have not tried this for the P410i.

 

4. Using an expendable thumb drive, Run the HP USB Key Utility and select the downloaded ISO for the HP Service Pack for ProLiant

 

 

Steps Taken:

 

1. Screenshots of shares and dockers for posterity sake

 

2. Backup all data from shares to a drive on my PC

 

3. Install "CA Appdata Backup/Restore v2" plugin on my Unraid server

 

4. Run a backup of the AppData folder and copy the share created from this backup onto drive on my PC

 

5. Confirm all data has been backed up. There is no turning back from this step if you have a preconfigured Unraid server.

 

6. In the Unraid server under Tools>New Config Select all disks and clear configuration **THIS WILL ERASE ALL OF YOUR DATA**

 

7. Reboot the Unraid server and pull your USB drive out so not to boot to the OS again.

 

8. Insert the created HP Service Pack for ProLiant thumb drive

 

9. Hit F8 on bootup to enter the HP Smart Array Firmware for your controller. Please note the Slot Number for your Controller it will be needed.

 

10. Delete all Virtual Disks from the firmware. Exit RAID controller BIOS and continue bootup to HP Service Pack for ProLiant.

 

11. Select "Interactive Firmware Update Version XXX"

 

12. Accept the EULA and click "Next"

 

13. On your Keyboard press Ctrl - Alt - D - B - X (This will bring up a Linux Bash shell)

 

14. Type command: hpssacli controller slot=2 modify hbamode=on forced (Replace Slot number with the slot number noted in step 9)

 

15. Reboot and replace your Unraid USB removing your HP Service Pack for ProLiant USB

 

16. If you received no error entering the command, you configure no virtual drives, and Unraid sees disks listed with Manufacturer information, You know these steps worked. Configure your array in Unraid.

 

17. Replicate all shares.

 

18. Copy back data to the original file locations

 

19. Restore AppData folder.

 

 

Currently as I write this documentation, I am in the data restoration phase. My disks were detected without issue, My Parity is rebuilding, and I am restoring all data. I am confident I should be able to get away with restoring all settings. I will update any successes or failures once the data is all restored.

 

That's it! I hope this helps someone moving forward. Happy Raiding! 

 

Additional Resources:

 

 

How to turn HP Smart array raid controller to HBA Mode

 

https://www.youtube.com/watch?v=JuaezJd4C3I

 

 

Configure the controller for HBA mode (Pass-through)

 

https://systemausfall.org/wikis/howto/Disable%20HP%20Proliant%20Hardware-RAID

 

"delete any existing configured array in the Smart RAID controller setup

 

obviously, you should rescue the data before, if you need it

enter the setup via F8 during bootup as soon as you see the greeting message of the P420i controller

 

upgrade the RAID controller firmware (3.x is not sufficient; 6.6.8 works; see the end of this page)

Acquire the ssacli package for configuring the RAID controller manually:

 

Option A: use the HP Service Pack

download the HP Service Pack for your server

 

astonishingly this requires a running support contract with HP

alternatively search for the MD5 checksum given in the download descriptions of HP

e.g. teimouri.net blogs about and shares the Service Packs from HP regularly

 

mount the ISO and copy the appropriate file for your system: hp/swpackages/ssacli-*.rpm (either i386 or x86_64)

 

Option B: download the packages from the HP repositories

see the Debian Wiki or the direct link from HP

 

boot the server with a minimal or a real system

install the ssacli package from one of the sources above:

 

using the Service Pack ISO package: rpm -i --nodeps ssacli-*.rpm

 

otherwise: use your regular package manager

enable the HBA mode (pass-through) for the controller:

For Smart-array controller starting with P, e.g. P420i: ssacli controller slot=0 modify hbamode=on

 

For HBAs starting with H, e.g. H240: ssacli controller slot=0 modify raidmode=off

 

verify the result (if required): ssacli controller slot=0 show

 

you may safely remove the ssacli package again

 

The above configuration change is permanent, until you reconfigure the controller again (e.g. with hbamode=off)."

 

 

Service Pack for ProLiant (SPP Gent 8.1)

 

https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_ff582daf008c4f529c4d6c28f6#tab3

 

 

USB Key Utility for Windows:

https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_360731071b404454b454390208

 

Backup and Restore Dockers:

 

https://forums.unraid.net/topic/81233-unraid-671-easy-way-to-backup-and-restore-specific-dockers/

Link to comment
  • 4 months later...

Posting this here, as it's one of the first threads that comes up talking about a P410 controller, and it could be useful to other people in the future.

 

Setup:

HP P420 (possibly P402 and any P-series as well) controller, in JBOD/IT mode.  Attaching multiple copies of the same model hard drive (in my case Samsung 256GB SATA SSD drives.)

 

Problem:

Only one, possibly none, if the drives, become visible to unRAID.

syslog contains entries such as:

Oct 29 13:27:12 Cube emhttpd: device /dev/sdh problem getting id
Oct 29 13:27:12 Cube emhttpd: device /dev/sdi problem getting id

 

discovered:

in folder: /dev/disk/by-id

the following is found:

lrwxrwxrwx 1 root root  9 Oct 29 13:27 wwn-0x5002538500000000 -> ../../sdh
lrwxrwxrwx 1 root root  9 Oct 29 13:27 wwn-0x5002538500000000 -> ../../sdi

 

Because of some interaction between the P-series controller and certain drives , while running in JBOD/IT mode it sometimes will not allow unRAID to generate a unique device ID, and can create the same ID to multiple disks.

 

I am unaware of any "fix" for the controller that will correct this.  My solution, swap out the P420 for an H240 controller and put it in JBOD/IT mode.

Edited by sota
Link to comment
  • 4 months later...
On 9/29/2020 at 5:21 PM, sota said:

...

Problem:

Only one, possibly none, if the drives, become visible to unRAID.

syslog contains entries such as:

Oct 29 13:27:12 Cube emhttpd: device /dev/sdh problem getting id
Oct 29 13:27:12 Cube emhttpd: device /dev/sdi problem getting id

 

discovered:

in folder: /dev/disk/by-id

the following is found:

lrwxrwxrwx 1 root root  9 Oct 29 13:27 wwn-0x5002538500000000 -> ../../sdh
lrwxrwxrwx 1 root root  9 Oct 29 13:27 wwn-0x5002538500000000 -> ../../sdi

 

Because of some interaction between the P-series controller and certain drives , while running in JBOD/IT mode it sometimes will not allow unRAID to generate a unique device ID, and can create the same ID to multiple disks.

 

I am unaware of any "fix" for the controller that will correct this.  My solution, swap out the P420 for an H240 controller and put it in JBOD/IT mode.

...

 

Did you remove the remove the raid configuration from the physical drives? If the drives were part of a previous raid configuration the controller will detect this state and prevent the OS from accessing the drive. This is a safety measure. The "ssacli" utility can be used to remove the raid config block from physical drives.  Here is the associated documentation from the "ssacli" utility:

 

<target> modify [clearconfigdata]
   In HBA mode, physical drives with RAID configuration data are masked from
   the operating system. The "clearconfigdata" command clears RAID
   configuration data and allows the drive to be exposed to the operating
   system. If a controller is specified as the target, all physical drives on
   the controller with RAID configuration data will be cleared. Individual
   physical drives can also be specified.
   
   The target can be any valid controller or physical drive which supports this
   feature.

 

Link to comment

The original post states that an HP Service Pack, and thus a license, is
required to put the controller into HBA mode. Here is a legal way to do
it without requiring the service pack disk.

 

I recently purchased a DL360e GEN8 with a P420 controller from EBAY.
Here is the method I used:

 

1) Install the latest system BIOS. Not strictly necessary for this
procedure, but I always prefer to have the latest BIOS on a system
before upgrading RAID firmware.

 

HP DL360e G8 BIOS Link:
https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_1ac4f36c578b45598a7a6e7098#tab2

 

 

2) The P420 firmware can be updated to the latest version without an HP
Service Pack disk using the windows online flash method. This requires
the host to be running a Windows OS for the flash procedure. Since my
hypervisor is Linux I installed a small Windows 10 installation for this
purpose. You don't need to activate Windows for this purpose. I deleted
the Windows partition after upgrading the controller firmware. I
couldn't find a method to upgrade the P420 firmware directly from Linux.
I'd be interested to hear if that's possible.

 

Link to the P420 firmware install image:
https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_71b2939cd1d84aada5afece82b

 

2.1) I have since located a Linux version of the P420 firmware update tool. So no Windows required

for updating. :)

 

Link to the latest firmware: 8.32

https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_42b6aa58956a438aa85bd73d0f

 

3) The ssacli command referenced in the original post can be downloaded
separately from HP. Download any Linux live USB image of your choosing.
Place the ssacli command on the USB disk. Boot the USB disk and issue
the ssacli hbamode= command as stated above.

 

HP ssacli downlink link:
https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_521fc533ba8f468f9ad9db20e4

 

I hope someone finds these steps useful.

Wayne

Edited by KrazyCooter
Link to comment

I actually don't run unRAID.

 

However if it runs a relatively recent version of the Linux kernel I don't see why it wouldn't work.

 

I've found that I need to load the Linux sg module for it work correctly:

    # modprobe sg

 

It doesn't have very many dependencies. Here is the list of libraries it's linked with:

        linux-vdso.so.1 (0x00007ffc8d98b000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f5043b5b000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5043b3a000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f5043b30000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f504395b000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f504380f000)
        libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f50437f5000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f5043617000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f5043b8d000)

 

 

Edited by KrazyCooter
  • Like 1
Link to comment
  • 8 months later...

I haven't tested the no service pack route, but I can confirm that this worked on a HPE DL320e Gen 8 v2 with a HP P222 Smart Array. I converted it to HBA mode and now all drives are available in Unraid. Also worth noting that after changing to HBA mode the HP Smart Array Administrator tool now gives the option to do "mixed" or set "all new drives" to HBA mode automatically.

Link to comment
  • 6 months later...
  • 1 year later...

Greetings.

 

I cant get ssacli to recognise my P222 raid card.

 

I installed a Debian VM and installed the latest version of ssacli (echo "deb http://downloads.linux.hpe.com/SDR/repo/mcp bookworm/current non-free" > /etc/apt/sources.list.d/hp-mcp.list) but ssacli is not recognising the HP P222 card.

 

The error suggests no driver installed, I tried googling and tried starting the driver as follows but no success. 

 

modprobe sg

 

I see that the HP driver installed is actually hpsa

 

On the basis of other internet guidance I tried this.

 

modprobe hpsa hpsa_allow_any=1

 

No joy.

 

Anyone?

 

Guidance from the web I have relied upon

https://gist.github.com/mrpeardotnet/a9ce41da99936c0175600f484fa20d03

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.