17. Setting up LSI HBA passthrough ready for TrueNAS scale.

17. Setting up LSI HBA passthrough ready for TrueNAS scale.

Up until now everything that has been done is for preparation for TrueNAS Scale. This software is the main purpose of having a NAS, it controls the storage allowing all my data to be stored and retrieved whenever required.

First stage is setting up the passthrough do the LBI HBA controlled can be accessed by TrueNAS Scale, in ohter word be able to see the hard drives on the controller board.

Confirm HBA is bound to vfio-pci

Run this in the Proxmox shell (pve-n355):

lspci -nnk | grep -A3 1000:0087

What I want to see is Kernel driver in use: vfio-pci but I don’t because it is not setup and I got Kernel driver in use: mpt3sas and Kernel modules: mpt3sas instead so I need to run this nano next.

nano /etc/modprobe.d/vfio.conf

And then paste this in and Save and Close (ctrl O, Enter, ctrl x).

Preventing mpt3sas from grabbing the HBA

Open another nano.

nano /etc/modprobe.d/blacklist-mpt3sas.conf

And then paste this in and then Save and Close.

blacklist mpt3sas

Ensure that the vfio loads early now

Double check that nano /etc/modules still shows this.

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

If for some reason it does not then make sure it is updated, Saved and Closed.

Rebuild initramfs and reboot

This is a critical step so make sure you dont skip it.

Run these two commands and wait until the entire system reboots.

update-initramfs -u -k all
reboot

Now the system has rebooted run this to check.

lspci -nnk | grep -A3 1000:0087

My output shows:

06:00.0 Serial Attached SCSI controller [0107]: Broadcom / LSI SAS2308 PCI-Express Fusion-MPT SAS-2 [1000:0087] (rev 05)
        Subsystem: Broadcom / LSI 9207-8i SAS2.1 HBA [1000:3020]
        Kernel driver in use: vfio-pci
        Kernel modules: mpt3sas

Now the driver has changed from mpt3sas to vfio-pci.

At times depending on the NAS builds the expected outcome is to see no mpt3sas at all and only vfio-pci for the Kernel driver and Kernel modules. If configuration is difficult then this may need to be changed later.

Ok now the big part we have been waiting for the actual TrueNAS Scale installation.

Scroll to Top