So, after the recent Dragonfish upgrade, my cheap no-name SATA port multiplier card stopped working. This problem was reported by multiple people and is being tracked as bug NAS-128478 by the TrueNAS engineers, but in the meantime I read through a lot of discussion about SATA port multipliers vs host bus adapters (HBAs), and in particular the “legendary” (according to the docs) LSI HBAs.
Although I think using junk hardware in general is a fine and wonderful thing, I found several persuasive arguments (like this one) that a used HBA was a much better value than a cheap port multiplier, and was also less likely to encounter various problems similar to the one that I was currently dealing with.
So, I decided to replace my port multiplier card with a used LSI HBA. This post is the documentation of my experience, which contains all the info that I would have liked to find in one place, rather than the various places I did find it. It’s just my experience, which was successful, but any corrections are welcome.
Summary
-
Find a used card somewhere online that seems like it isn’t fake, and order it
-
Order new cables to go from the HBA to the drives
-
Install the card, which in my case required modifying the card’s hardware slightly
-
Obtain the correct firmware and BIOS for the card from Broadcom (which LSI became part of)
-
Use the tool built into TrueNAS SCALE to upgrade the firmware and BIOS of the card, and make sure it is in “IT mode” (and not “RAID mode”)
-
Reconnect all the drives and make sure they all work
-
Celebrate with a frosty beverage
Find a used card somewhere online that seems like it isn’t fake, and order it
While many people recommend eBay as a source for used LSI HBAs, I am in Japan and the USD prices and shipping were too expensive for me, so I found a third party seller listing on Amazon Japan, for what purported to be a " 9208 8i Multiport PCI Express 3.0 SAS SATA HBA High Speed 6Gb HBA Card 8 Port Fibre Channel Adapter Interface Controller Card for Linux". Curiously, the LSI logo seems to have been photoshopped out.
I really wanted the “9207-8i” because I found a lot of positive comments about that card. But I took a chance and ordered this one, and after it arrived I found out that:
- indeed, it has the LSI logo on the board, even though it is removed from the photos on the listing, and
- although the “board name” of this product is “SAS9208-8i” the “NVDATA Product ID” of it is “SAS9207-8i”. So I presume it is roughly the same thing with different marketing/business details. (Not 100% sure about that, but it seems right.)
I bought it for JPY 4,696, which is currently USD 29.94.
Order new cables to go from the HBA to the drives
Most HBA cards like this come with one SFF-8087
connector port per 4 SATA connections, so single-SFF-8087 to quadruple-SATA cables are common. I bought 2 of these cables, since the SAS9208-8i has 2 such ports, so that I would be able to connect the 8 SATA drives that had been connected to my port multiplier card (which just had 8 regular SATA ports on it). Thus, these two new cables replace 8 regular SATA cables.
Install the card, which in my case required modifying the card’s hardware slightly
The card fits into a regular PCI slot, just like the outgoing port multiplier. However, the card is designed for a lower-profile rackmount server, while my home NAS is a trasher gaming PC from 2018. So the card could not be installed because the metal tab used to screw the card to the case to secure it was too low, and too wide to stick out through the back of the PC case. This problem is specific to my case, and would happen with some cases and not others.
So I unscrewed the metal tab and removed it from the card. This makes the card less stable, though. In my case, I superglued an old corn-cob pipe to the back of the PC case in a way that the stem of the pipe holds the edge of the card in place and prevents it from easily coming out of the motherboard PCI slot. That fits with the aesthetic of my own machine, but there are videos online about how to “convert a low-profile PCI card backplate” and various ways to do it, if you need something sturdier.
I did not connect any drives at this stage, because I wanted to upgrade the firmware and BIOS before doing so.
Obtain the correct firmware and BIOS for the card from Broadcom (which LSI became part of)
I went to the Broadcom website’s “Support Documents and Downloads” page to find the firmware. At first I did not find any matches, but then I noticed there is a checkbox to “Include Legacy Products” that isn’t initially visible, but appears after you start searching. I searched for Product Group “Storage Adapters, Controllers, and ICs” and then within that category, “Host Bus Adapters”.
Even after clicking the “Include Legacy Products” box, I didn’t find anything for “9208-8i” which is what the sticker on the actual PCI card itself read. Instead the search UI returned hundreds of hits that did not appear to be related.
So, I went to the main root of the website, www.broadcom.com, and entered “9208-8i” in the search box at the top right. This yielded 4,321 results and I didn’t see anything useful on the first page. Since I had learned that the “9207-8i” was a common card, and was probably very similar to or identical to this card, I changed the search and tried again.
Bingo! I found a link like this:
[zip] 9207-8i_Package_P20_IR_IT_Firmware_BIOS_for_MSDOS_Windows
Package_P20_Firmware_BIOS_for_MSDOS_Windows
DATE: 04/04/2016 SIZE: 1737 KB
I downloaded this file (have to agree to terms in the web UI, so I couldn’t just use wget
to download it from the CLI).
(BTW, the reason these files are on the Broadcom website is that the original LSI company was acquired by Avago in 2014, and then they also acquired Broadcom, but started using the name Broadcom for more of their stuff.)
Use the tool built into TrueNAS SCALE to upgrade the firmware and BIOS of the card, and make sure it is in “IT mode” (and not “RAID mode”)
(UPDATE: The following describes how I did this with TrueNAS SCALE’s built-in tools, but per this comment below you can instead do it from the computer’s (pre-boot) UEFI shell, sometimes still referred to as the “BIOS”, or, as described in this comment by installing the card into a Windows machine, or your TrueNAS machine booted from WindowsPE (a form of Windows that can be booted from a USB memory stick that you can make yourself), and then using LSI Storage Authority. These techniques might work with a wider variety of HBA cards than the process I used.)
I SSH’d into my TrueNAS server, as the admin
user:
➜ ~ ssh admin@truenas.local
Last login: Sat Apr 27 14:40:37 2024 from 10.0.0.5
TrueNAS (c) 2009-2024, iXsystems, Inc.
All rights reserved.
TrueNAS code is released under the modified BSD license with some
files copyrighted by (c) iXsystems, Inc.
For more information, documentation, help or support, go here:
http://truenas.com
Welcome to TrueNAS
Warning: the supported mechanisms for making configuration changes
are the TrueNAS WebUI, CLI, and API exclusively. ALL OTHERS ARE
NOT SUPPORTED AND WILL RESULT IN UNDEFINED BEHAVIOR AND MAY
RESULT IN SYSTEM FAILURE.
admin@truenas[~]$
I wanted to use the built-in sas2flash
tool to check the card. (Depending on the card, it might be sas3flash
instead, but in my case it is the former. Both tools come with TrueNAS SCALE.
However, the tool is not in the default admin
user’s $PATH
:
admin@truenas[~]$ which sas2flash
sas2flash not found
admin@truenas[~]$ sudo -i
[sudo] password for admin:
Warning: the supported mechanisms for making configuration changes
are the TrueNAS WebUI, CLI, and API exclusively. ALL OTHERS ARE
NOT SUPPORTED AND WILL RESULT IN UNDEFINED BEHAVIOR AND MAY
RESULT IN SYSTEM FAILURE.
root@truenas[~]# which sas2flash
/usr/local/sbin/sas2flash
root@truenas[~]#
So, I continued as root
. The first step was to check the card’s details, with sas2flash -list
:
root@truenas:~# sas2flash -list
LSI Corporation SAS2 Flash Utility
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved
Adapter Selected is a LSI SAS: SAS2308_2(D1)
Controller Number : 0
Controller : SAS2308_2(D1)
PCI Address : 00:04:00:00
SAS Address : 500605b-0-06af-93a0
NVDATA Version (Default) : 10.00.00.02
NVDATA Version (Persistent) : 10.00.00.02
Firmware Product ID : 0x2214 (IT)
Firmware Version : 16.00.00.00
NVDATA Vendor : LSI
NVDATA Product ID : SAS9208-8i
BIOS Version : 07.29.00.00
UEFI BSD Version : N/A
FCODE Version : N/A
Board Name : SAS9208-8i
Board Assembly : H3-25591-00A
Board Tracer Number : SV32231490
Finished Processing Commands Successfully.
Exiting SAS2Flash.
root@truenas:~#
OK cool! My board was indeed recognized, and moreover, it looks like it was already in “IT mode”. I knew from reading the internet that “IT mode” passes each disk through to the OS, which is generally what TrueNAS SCALE users want, so that ZFS controls the disks directly. (The “IR mode” is RAID mode where the card itself handles RAID.)
That didn’t matter, though, because the way you switch from IR mode to IT mode is by reflashing (overwriting/installing) the firmware. There are two variants of firmware. Since my card had an older firmware installed, and the community strongly recommends upgrading to the latest to get bug fixes, I was going to do that anyway. So doing that would have ensured the card was in “IT mode” anyhow.
However, I was lucky here in that I got what seems to be a real, LSI-branded card. There is a possibility that sas2flash
will not recognize your HBA card at this step. In that case, you have to do some more things, and it maybe gets complicated. I don’t know about it, though, since I lucked out and got a supported LSI card.
Next I upgraded the BIOS and firmware. There is a PDF manual in the archive with the firmware that explains the details. In my case, I only have one card but I used the “all” variants of the commands for simplicity.
(In the transcripts below, 9207_8i_Package_P20_IR_IT_FW_BIOS_for_MSDOS_Windows
is the name of the folder extracted from the downloaded .zip file.)
BIOS:
root@truenas:~# sas2flash -biosall 9207_8i_Package_P20_IR_IT_FW_BIOS_for_MSDOS_Windows/sasbios_rel/mptsas2.rom
LSI Corporation SAS2 Flash Utility
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved
Ignoring All other commands except for output flags
Attempting to flash Boot Service to LSI SAS SAS2308_2(D1) :
Validating BIOS Image...
BIOS Header Signature is Valid
BIOS Image has a Valid Checksum.
BIOS PCI Structure Signature Valid.
BIOS Image Compatible with the SAS Controller.
Attempting to Flash BIOS Image...
Verifying Download...
Flash BIOS Image Successful.
Updated BIOS Version in BIOS Page 3.
Finished Processing Commands Successfully.
Exiting SAS2Flash.
root@truenas:~#
Firmware:
root@truenas:~# sas2flash -fwall 9207_8i_Package_P20_IR_IT_FW_BIOS_for_MSDOS_Windows/Firmware/HBA_9207_8i_IT/9207-8.bin
LSI Corporation SAS2 Flash Utility
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved
Ignoring All other commands except for output flags
Attempting to flash firmware to LSI SAS SAS2308_2(D1) :
Executing Operation: Flash Firmware Image
Firmware Image has a Valid Checksum.
Firmware Version 20.00.07.00
Firmware Image compatible with Controller.
Valid NVDATA Image found.
NVDATA Version 14.01.00.00
Checking for a compatible NVData image...
NVDATA Device ID and Chip Revision match verified.
NVDATA Versions Compatible.
Valid Initialization Image verified.
Valid BootLoader Image verified.
Beginning Firmware Download...
Firmware Download Successful.
Verifying Download...
Firmware Flash Successful.
Resetting Adapter...
Adapter Successfully Reset.
Finished Processing Commands Successfully.
Exiting SAS2Flash.
root@truenas:~#
Confirm everything updated OK:
root@truenas:~# sas2flash -list
LSI Corporation SAS2 Flash Utility
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved
Adapter Selected is a LSI SAS: SAS2308_2(D1)
Controller Number : 0
Controller : SAS2308_2(D1)
PCI Address : 00:04:00:00
SAS Address : 500605b-0-06af-93a0
NVDATA Version (Default) : 14.01.00.06
NVDATA Version (Persistent) : 14.01.00.06
Firmware Product ID : 0x2214 (IT)
Firmware Version : 20.00.07.00
NVDATA Vendor : LSI
NVDATA Product ID : SAS9207-8i
BIOS Version : 07.39.02.00
UEFI BSD Version : N/A
FCODE Version : N/A
Board Name : SAS9208-8i
Board Assembly : H3-25591-00A
Board Tracer Number : SV32231490
Finished Processing Commands Successfully.
Exiting SAS2Flash.
root@truenas:~#
Reconnect all the drives and make sure they all work
So, as I detailed in a previous post, after upgrading to Dragonfish, four of my drives had disappeared. Although I was happy to upgrade my hardware in general, this missing-disks situation was the concrete problem I was trying to fix.
I connected the two new cables to the HBA card, connected the 8 SATA ends to the drives that had been connected to the old port multiplier card, and booted the server.
All the drives were back, and the missing zpool was automatically found and imported as normal. Everything worked again, the same as before, except now the 8 drives in question are connected to an LSI HBA instead of a “dodgy port multiplier”.
Celebrate with a frosty beverage
I considered a beer, but I wanted to stay productive, so made it an iced green tea instead.