smart array pass-through with hba mode

proliant-hbamode | proliant-hbamode-kernel | proliant-hbamode-slackware | proliant-ssacli

the easy way (ssacli)

see proliant-ssacli

but that doesn’t always work

the hard way (hpsa hba)

load the modules

assuming HPSA patched kernel, make sure you’re enabling the actual feature either at boot-time kernel argument –or– here as module

find /lib/modules/ | grep hpsa
vi /etc/modprobe.d/hpsa.conf

options hpsa hpsa_use_nvram_hba_flag=1

finally load the modules

modprobe hpsa
modprobe sg

and check

lsmod | grep hpsa
modprobe --showconfig | grep hpsa

the 520 one won’t necessarily appear yet

build the tools

slackpkg install git
slackpkg install cyrus-sasl
slackpkg install make
slackpkg install guile
slackpkg install gc
slackpkg install gcc-11

slackpkg install kernel-headers
git clone https://github.com/im-0/hpsahba.git
cd hpsahba/

avoid building the manual (and pandoc dependency hell)

make hpsahba

enable hba mode

switch any visible disk to hba mode,

./hpsahba -i /dev/sde
./hpsahba -E /dev/sde

and so the hidden one will also appear

[  442.632174] sd 4:0:4:0: [sdf] Unsupported sector size 520.
[  442.646334] sd 4:0:4:0: [sdf] 0 512-byte logical blocks: (0 B/0 B)
[  442.646370] sd 4:0:4:0: [sdf] 4160-byte physical blocks
[  442.668735] sd 4:0:4:0: [sdf] Write Protect is off
[  442.668744] sd 4:0:4:0: [sdf] Mode Sense: 0b 00 00 08
[  442.669034] sd 4:0:4:0: [sdf] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  442.670377] sd 4:0:4:0: [sdf] Unsupported sector size 520.
[  442.709711] sd 4:0:4:0: [sdf] Attached SCSI disk
[  526.920676] sd 4:0:4:0: [sdf] Unsupported sector size 520.

ready to go

you can finally proceed to the low-format while re-affecting the right sector size of 512 bytes instead of 520 bytes

slackpkg install lsscsi
slackpkg install sg3_utils

lsscsi -g
sg_scan -i

#dmesg | grep scsi | grep host
#scsi_host=host4
#echo - - - > /sys/class/scsi_host/$scsi_host/scan

fdisk -l
lsblk

sg_readcap /dev/sdf
sg_format --format --size=512 /dev/sdf

clean-up

switch back to normal and raid mode

./hpsahba -d /dev/sde

resources

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

https://internet-lab.ru/sector_size_520_to_512

guides

fw http://homelab.casaursus.net/hp-smart-array-410i-make-hba/

HOME | GUIDES | PLAYBOOKS | LECTURES | LAB | CONTACT | HTML | CSS
Licensed as MIT