FreeNAS LSI Host Bus Adapter setup

This post is short and to the point – annoyingly, the LSI drivers for FreeBSD seem to have issues using MSIX interrupts, which causes the adapter to either not work at all, or to stop working.  The fix is simple, once you know how to do it 🙂

Lets start by assuming you’ve got your Freenas setup installed and it boots to the point where you can see the admin console via a web browser.

 If you’re doing this under Xen, I highly recommend setting it up to use the PVHVM drivers for the xen block devices – they give much greater performance with lower cpu overhead than using the emulated network and disk drivers.  See my post here on how to set up a Freenas 9.2 PVHVM instance.
 
Once its booted, you need to adjust the “tunables” – which are essentially loader.conf entries.
Go to “System > Tunables > Add Tunable” and add these two entries:
hw.pci.enable_msi = "1"
hw.pci.enable_msix = "0"
You can add these manually to the loader.conf if you want to (or if you’re not using freeNAS).  However, I preferred to have them included in my backed-up freeNAS config, so that if I have to restore the freeNSD config from backup, it’ll include these tunables.
Then shut down, and if running under Xen, add the pci=[‘xx:xx:xx.x’] line to your config file and boot the VM.  It should all just magically work!
Once you restart the VM, it’ll boot cleanly and you’ll be able to see the disks attached via the LSI Host Bus Adapter.  This also works with earlier versions of FreeNAS 9 including 9.1.  I haven’t tried using the LSI card with freeBSD 10 yet, so don’t know whether the issue with interrupts is fixed among the myriad of other changes in 10.

One thought on “FreeNAS LSI Host Bus Adapter setup

  1. Pingback: Building FreeNAS with Xen PVHVM support | My Wired House

Leave a Reply

Your email address will not be published. Required fields are marked *