My self-hosting journey started with a succession of Synology enclosures. And why wouldn't it? Back then, the platform was more open, and they offered excellent value compared to the competition. There was one problem, however: expandability. The first NAS had only four 3.5-inch drive bays, which soon filled up, and I needed to expand. Each successive NAS enclosure added a couple more drive bays as I upgraded, but I quickly hit a price ceiling and a limit on what the next upgrade could add.

That wasn't the only reason I built my own NAS, but it was the biggestprice-wise. Building a NAS meant I chose the chassis, so I could stuff it full of HDDs and still have space to expand. To do that, I needed more ports than my motherboard provided, and that's where the cheap SAS HBA (Host Bus Adapter) card comes in. This PCIe add-in card provided a bunch of 12G SAS ports, which I then split into SATA ports for the hard drives I already owned.

The only snag is that to get one for under $20, you'll have to head to the second-hand market. And cables will cost extra, but you can't expect everything in life to be easy.

The problem with NAS enclosures

Or should I say, problems, because there are many

It's all too easy to pick up a budget NAS for your first device. After all, you may think it covers your data needs, and the price is right. It's also a trap, designed to get you used to a company's way of doing storage, so you don't think about taking your data elsewhere.

Even more expensive NAS devices have underpowered hardware, terrible airflow for keeping your drives cool, and often cut-down versions of the operating system, so you're forced to upgrade for features you want. But the most egregious is the reason that I kept upgrading — the limited number of hard drive bays, which forces you to upgrade when your data needs expand.

An old PC and a SAS HBA card give you more expandability

I need lots and lots of storage capacity, and most prebuilt NAS enclosures get expensive once you get to six drive bays, let alone if you need more. But if you've got old PC components from a previous build, you've probably got enough power to build your own NAS, once you add a case with enough drive mounting points.

Even if your motherboard has only a few SATA ports, you only need one PCIe slot to add more ports via an HBA SAS card, and then you can put as many drives in as you can fit. Plus, you won't have the drive restrictions of bespoke NAS operating systems, and you'll be able to use ZFS and other file system types that enable you to make the most of the drive sizes you already have.

What to look for in your HBA SAS card

eBay and other auction sites are your friend for a bargain buy

Before we get into HBA SAS or SATA cards, I want to mention SATA add-in cards and port multiplexers. At least long enough to say they're best avoided, as they will cause issues with ZFS running permanent scrubs and other annoyances when the OS treats the multiplexer as a newly attached HDD each time it switches.

While choosing an HBA card, you'll want to pay attention to a few things. There are many ex-enterprise cards on eBay with attractive pricing. Just know that SAS breakout cables can often cost more than the HBA card, so it's worth buying them together if you see a bundle, which also ensures compatibility.

  • IT Mode: You want the HBA flashed in Initiator Target (IT) mode, so the drives are directly controlled by the OS, not the HBA
  • Internal ports: The number of internal lanes used for drives, indicated by "8i" or similar, which is not the same as the number of physical ports (usually, physical ports can be split into four SATA drives)
  • External ports: Marked as "8e" or similar, these are for connecting to external storage enclosures, which is nice to have, but you don't need them
  • Protocol: You generally want SAS, which will support 6 Gb/s or 12 Gb/s, and is backward compatible with SATA, so you can use the drives you already have with the right breakout cables
  • PCIe gen and lanes: HBAs typically use x4 or x8 lanes. PCIe 3.0 is fine for HDDs, you might want PCIe 4.0 or higher if you're using SSDs on the card.
  • Cooling: Higher-end HBAs get toasty, so look for ones with ample heatsinks, and add enough fans into your case

I know I said to avoid multiplexers, but that's if they're SATA only. SAS expanders, like those in server backplanes, act like network switches for your hard drives, and increase the number of drives you can connect to a single HBA port. Places like the TrueNAS forums are great sources for lists of HBA cards that are known to be good to use and those to avoid.

Broadcom 9305-16i
Weight
0.45 Kilograms
Interface
SAS 12Gb/s

Just be careful that you can still flash the firmware

While most HBA SAS cards will work in RAID mode, you'll want them flashed to IT Mode if you plan on using TrueNAS or any other NAS OS that uses ZFS for the file system. This gives the OS direct access to the drives attached to the HBA, and is the best option for NAS use.

👁 LSI 9305-24i-HBA-3
HBA cards are the most underrated home server upgrade

More storage for your server can come with headaches, but a SAS HBA could make things easier.

An HBA SAS card is the cheapest way to build a large storage server or NAS

I've used plenty of bespoke NAS enclosures and built my own a few times, and the DIY route is the best one for expandability and choice. Depending on the HBA card, you could add up to 24 SATA HDDs or SSDs to your storage pool, and you're now limited only by how many PCIe slots you have and how many SATA power connectors your PSU has.