0% found this document useful (0 votes)
18 views

Tool to enable_disable HBA mode on some HP Smart Array controllers

The hpsahba tool enables or disables HBA mode on certain HP Smart Array controllers, but caution is advised as it may destroy data and damage hardware. It operates on modern Linux systems and requires specific kernel patches for disk visibility in HBA mode. Supported hardware includes HP Smart Array P410i, P812, and G6 controllers, with the tool available under the GPL-2.0 license on GitHub.

Uploaded by

freeedjoe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Tool to enable_disable HBA mode on some HP Smart Array controllers

The hpsahba tool enables or disables HBA mode on certain HP Smart Array controllers, but caution is advised as it may destroy data and damage hardware. It operates on modern Linux systems and requires specific kernel patches for disk visibility in HBA mode. Supported hardware includes HP Smart Array P410i, P812, and G6 controllers, with the tool available under the GPL-2.0 license on GitHub.

Uploaded by

freeedjoe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

29/01/2023 14:45 GitHub - im-0/hpsahba: Tool to enable/disable HBA mode on some HP Smart Array controllers

im-0 / hpsahba Public

Tool to enable/disable HBA mode on some HP Smart Array controllers

GPL-2.0 license

105 stars 37 forks

Star Notifications

Code Issues 13 Pull requests 3 Actions Security Insights

master Go to file

im-0 … on Jun 2, 2022

View code

README.md

NAME
hpsahba - tool to enable/disable HBA mode on some HP Smart Array controllers.

SYNOPSIS
hpsahba -h
hpsahba -v
hpsahba -i /dev/sgN
hpsahba -E /dev/sgN
hpsahba -d /dev/sgN

DESCRIPTION
CAUTION: This tool will destroy your data and may damage your hardware!

hpsahba is able to enable or disable HBA mode on some HP Smart Array controllers on
which regular tools, like 'ssacli', reports HBA mode as not supported.

https://github.com/im-0/hpsahba 1/4
29/01/2023 14:45 GitHub - im-0/hpsahba: Tool to enable/disable HBA mode on some HP Smart Array controllers

When enabling or disabling HBA mode, RAID controller changes its internal configuration
immediately, without requiring reboot. Any existing data may be lost after changing the
HBA mode, so be extremely careful.

Some servers may not be able to boot from disks attached to controller in HBA mode. Move
the /boot partition and the bootloader out of disks attached to controller onto USB flash
driver or SD card to circumvent this limitation.

When HBA mode is enabled, controller usually prints some diagnostic message during boot,
like "Hardware RAID support is disabled via controller NVRAM configuration settings"
(example from P410i). Attempts to configure RAID arrays in this mode are expected to fail.

Options
hpsahba -h

Show help message and exit.

hpsahba -v

Show version and exit.

hpsahba -i DEVICE_PATH

Show some information about device. This Includes HBA mode support bit
(supported/not supported) and current state of HBA mode (enabled/disabled). It is
recommended to run this before trying to enable or disable HBA mode.

hpsahba -E DEVICE_PATH

Enable HBA mode.

hpsahba -d DEVICE_PATH

Disable HBA mode.

Kernel driver support


hpsahba itself is able to work on any modern Linux system.

However, to get system actually see and use disks in HBA mode, few kernel patches
required: https://github.com/im-0/hpsahba/tree/master/kernel.

This functionality is disabled by default. To enable, load module hpsa with parameter
hpsa_use_nvram_hba_flag set to "1". Or set it in the kernel command line:
"hpsa.hpsa_use_nvram_hba_flag=1".

https://github.com/im-0/hpsahba 2/4
29/01/2023 14:45 GitHub - im-0/hpsahba: Tool to enable/disable HBA mode on some HP Smart Array controllers

Patchset changelog:

V1 -> V2:
Device visibility change properly detected if device is both updated and
masked/unmasked in the same time.

This will never be upstreamed and officially supported (for P410), see the email from Don
Brace: https://lkml.org/lkml/2018/12/17/618. So use at your own risk.

You can use DKMS package in https://github.com/im-0/hpsahba/tree/master/contrib/dkms


to patch hpsa driver in a compiled kernel.

Supported hardware
Tested on following hardware so far:

HP Smart Array P410i (PCI ID: 103c:3245, board ID: 0x3245103c, firmware: 6.64)
HP Smart Array P812 (PCI ID: 103c:3249, board ID: 0x3249103c, firmware: 6.64)
Hewlett-Packard Company Smart Array G6 controllers / P410 (PCI ID: 103c:323a, board
ID: 0x3243103c, firmware: 6.64)
Hewlett-Packard Company Smart Array G6 controllers / P212 (PCI ID: 103c:323a, board
ID: 0x3241103c, firmware: 6.64)

(open an issue or a pull request if you successfully used this tool on other controllers)

Additional links
https://support.hpe.com/hpsc/swd/public/detail?
swItemId=MTX_0b76aec489764aea9802a6d27b

Archive containing saupdate.efi - EFI binary for ia64 architecture which implements the
same functionality for P410i. Seems not usable anywhere except of old HP Integrity
servers.

BUGS
See issues on GitHub: https://github.com/im-0/hpsahba/issues.

AUTHOR
hpsahba was written by Ivan Mironov <[email protected]>

https://github.com/im-0/hpsahba 3/4
29/01/2023 14:45 GitHub - im-0/hpsahba: Tool to enable/disable HBA mode on some HP Smart Array controllers

Releases

No releases published

Packages

No packages published

Contributors 2

im-0 Ivan Mironov

artizirk Arti Zirk

Languages

C 93.1% Makefile 3.8% Shell 3.1%

https://github.com/im-0/hpsahba 4/4

You might also like