Comportamento, ciência, tecnologia, direito, política, religião, cinema e televisão, alguma controvérsia, algum bom senso, e um pouquinho de besteira, para dar um gostinho...

31 de mai. de 2024

Tech Tip 1 - HP SmartArray P410i HBA mode

Its funny how things evolve fast in the I.T. world. Less than 15 years ago, if you wanted a fast, reliable and consistent storage, your best bet would be a server with a RAID Sata/SAS card. They were expensive and often came with expensive licenses too.


HP has its SmartArray line up, and its consistent, to this day. A few years later, software like ZFS came along and those old, specialized pieces of hardware are now only for newer generation of storage on big servers, and the industry shifted to software solutions while the craze about homelabs and local servers expands. And I'm stuck with old servers that need repurpose.

So someone donated me a HP Proliant DL380 G6, that came with a P410i SmartArray controller and 8 2.5 bays. Nifty piece of hardware, Intel Xeon (older) with some ECC memory, great networking, dual PSUs, useless iLO 2 management interface and 4 USB ports that don't boot anything bigger than 8 gigs.

So, in order to take advantage of various features, I needed access to the raw drives connected to the controller. This old controller doesn't support HBA mode officialy, but there are hacks that can turn it on. Basically you compile a program to set a nifty bit in the controller NVRAM. In order to do that, you first need to upgrade the controller driver, not an easy task, but far from "technical". I used the instructions HERE.

After upgrading and setting the HBA bit mode, you need the right kernel patch do be able to access the drives. What usually happens is: your controller is in HBA mode, but the driver that comes with the kernel (HPSA) doesn't see the drives (better yet, it sees them and explicitly hides them from the OS). Here comes the web for the rescue: https://github.com/99dimitris/hpsahba has the patch needed for direct access. You just need to symlink the right kernel version and run a script, this downloads and patches the DKMS module, and you'll get access to the drives. This wasn't easy to find, and here comes Google to the rescue again: THIS post from Proxmox foruns saved me. And now ZFS works out of the box, and this nifty server can once again "serve", either with a Proxmox, or TrueNAS install.