Skip to content
Go back

HBA Cards for ZFS

By SumGuy 9 min read
HBA Cards for ZFS

Your disk controller is lying to you (and it’s working as intended)

Here’s a question that trips up a lot of people building their first ZFS home lab: “What disk controller should I buy?” And here’s the answer that makes them immediately regret asking: “Not a RAID controller. Definitely not.”

See, every fancy LSI RAID card in the wild comes pre-programmed with firmware that actively manages your disks—RAID mode. It intercepts I/O, handles parity, hides disk failures behind a “virtual disk” abstraction. It’s like hiring a financial advisor who makes all your investment decisions without asking you first. Great if you trust them. Catastrophic if you don’t.

ZFS? ZFS doesn’t play well with that. ZFS wants direct access to your disks. It wants to see disk errors, bit flips, and latency in real time. It wants to make the redundancy decisions itself. It wants a dumb pipe with some credentials.

Enter the HBA card in IT mode.

IT mode: turning a RAID controller into a dumb pipe

An HBA (Host Bus Adapter) in IT mode is a RAID card that’s been neutered—not in a sad way, but in a “thank you for getting out of my way” way. The firmware stops managing RAID. It stops caching writes. It stops lying about disk state. It just connects your disks to your system with as little interference as possible.

The catch? Most LSI cards ship in RAID mode. You have to flash the firmware yourself.

This is where 90% of people panic and close the tab.

Don’t. It’s easier than you think.

Which cards to buy (and which to avoid)

The good ones

LSI SAS 9211-8i (~$30-50 used)

LSI SAS 9300-8i / 9300-16i (~$100-150 used, 9300-16i can stretch to $200)

LSI SAS 9400-8i / 9400-16i (~$200-400 used)

The ones to sidestep

Adaptec/3ware: Proprietary firmware, flaking in IT mode, low community adoption. Skip unless you love pain.

Megaraid (12G/16G): These are built for RAID, not ZFS. IT mode is newer and less stable. If someone’s giving you one, sure. Don’t buy one.

Dell H730/H830: Dell’s rebrand of LSI/Broadcom. Can be flashed to IT mode, but PERC firmware is locked. Possible? Yes. Worth it? Only if it was free.

Any “enterprise RAID” card with battery-backed cache: That battery is dead, and you don’t want it anyway. ZFS doesn’t trust external caches. Lithium bomb in your rack. Pass.

The IT-mode flashing gauntlet

This is the part where people think they’ll brick their card. They won’t. You’ll be fine.

What you need

The steps

1. Boot a Linux live environment

Ubuntu live USB works. Proxmox, TrueNAS live environment, whatever. Goal: get to a shell with your HBA card present.

Terminal window
lspci | grep -i megaraid
# or
lspci | grep -i lsi

You should see your card listed. If you don’t, you might need to reseat it or check your BIOS settings (some boards hide them behind PCIe settings).

2. Check the current firmware

Terminal window
sudo ./sas2flash -listall

This shows you every card and the current firmware version. If it says “RAID mode” or “IT mode”, you’ll see it here.

3. Erase and flash

This is the scary part. It’s not scary.

Terminal window
sudo ./sas2flash -c 0 -e 6
# Erases the controller (c 0 is the first card, e 6 is a full erase)
sudo ./sas2flash -c 0 -f 2118it.bin
# Flashes the new firmware (substitute the actual .bin filename)

That’s it. The card will reboot. You’ll see lights blinking. In 30 seconds, it’s done.

4. Verify

Terminal window
sudo ./sas2flash -listall

Should say “IT mode” now. Plug in your drives. You’re golden.

A note on pre-flashed cards

If you’re buying from someone who says “already flashed to IT mode,” verify it yourself. Not because they’re lying, but because firmware versions matter, and knowing your starting point saves you headaches later. Hit it with sas2flash -listall on your target system before you deploy.

The PCIe lane math (why your motherboard matters)

Here’s where it gets architectural. Your card slot speed doesn’t matter if you’re not feeding it enough lanes.

An LSI 9300-16i plugged into a x4 slot is like putting a V8 engine in a car and only connecting 4 cylinders. You can do it, but why?

Lane speeds:

Real-world: Most home lab SAS drives max out around 200-300 MB/s. A PCIe 2.0 x8 slot can handle 6+ drives before you hit the ceiling. PCIe 3.0 x8 handles 20+ drives. x16 is overkill for all but the most absurd setups.

Check your motherboard manual. Seriously. Some boards disable PCIe lanes when you populate certain M.2 slots. Some BIOS settings lock lanes to SATA. It’s annoying and it’s real.

Common gotcha: “I have a x16 slot, so I’m good.” Maybe. Check if it’s electrical x16 or just physical x16. Many boards have a second x16 slot that’s actually x4. Your manual will say.

SAS expanders: cheap scaling, surprising limits

Twelve drives on one card isn’t enough? Here comes the expander.

An expander is a SAS switch that sits between your HBA and a bunch of drives. Plug one SAS port into the expander, suddenly you have 36 drives hanging off it (via backplane or SAS cables). Sounds amazing. Mostly it is.

Reality check:

When expanders make sense: You want 24+ drives, your motherboard has one x8 slot, and you’re not running performance-critical workloads. Backup pools. Archive pools. Cold storage.

When they’re a pain: High-performance home labs, systems with lots of disk churn, or environments where a single expander failure would tank your operations.

Pro tip: SAS expanders can be daisy-chained (plug expander into expander), but latency stacks, and failures cascade. Don’t do more than two deep unless you really know what you’re doing.

Why RAID controllers are a trap (the theological argument)

Here’s the thing about a RAID controller: it’s a black box with a hard-coded idea of how redundancy should work. It rebuilds in a specific way, recovers from errors in a specific way, and if its idea conflicts with your vision, too bad.

ZFS is the opposite. It’s paranoid. It checksums everything. It tracks which disk failed and why. It knows about UREs (unrecoverable read errors) and bit rot and latency patterns. It rebuilds smart—checking data before writing it back. It can handle multiple disk failures if you’re running RAIDZ2 or RAIDZ3. It can mirror some vdevs and stripe others. It’s an autopilot you actually trust.

RAID controllers want to manage. ZFS wants you to manage.

Forcing them to coexist is like hiring two co-pilots who hate each other and handing them the same yoke. Someone’s flying blind.

Decision tree

I have one drive. Just kidding, this isn’t ZFS territory. Get a USB enclosure.

I have 4-8 drives and one PCIe slot. LSI 9211-8i, IT mode. Cheap, reliable, done in a weekend.

I have 16-32 drives and one PCIe slot, or 8-12 drives and two slots. LSI 9300-16i, IT mode. Sweet spot. You’ll use it for years.

I have 32+ drives and multiple slots. Two 9300-16i cards, or one 9300-16i plus an expander if you’re into that. Or drop the cash on a 9400-16i if you want to feel modern.

I inherited a Megaraid and I’m cheap. Flip it, grab a 9300. Flashing is a one-time pain; RAID-mode incompatibility is forever.

I live in a world where IT-mode flashing is illegal because corporations are paranoid. Fair. Your options: find an ISO/IMG file from a trusted source, flash in advance, test thoroughly. Or buy pre-flashed cards if you can find them. Or build in VMs using disk images (slow, but it works).

The card you pick today will probably outlive three motherboards. Pick the right one.


Share this post on:

Send a Webmention

Written about this post on your own site? Send a webmention and it'll show up above once verified.


Next Post
Jellyseerr Tagging Workflows for Real Libraries

Discussion

Powered by Garrul . Sign in with GitHub or Google, or post anonymously.

Related Posts