Skip to content

Instantly share code, notes, and snippets.

@TheBoroer
Last active November 17, 2024 16:31
Show Gist options
  • Save TheBoroer/33a92faa026a36ddb44c7bd8e6e295f6 to your computer and use it in GitHub Desktop.
Save TheBoroer/33a92faa026a36ddb44c7bd8e6e295f6 to your computer and use it in GitHub Desktop.
FusionIO / Fusion-IO devices on TrueNAS SCALE 22.02.1

FusionIO / Fusion-IO devices on TrueNAS SCALE 22.02.1

There's a bug with v22.02.2 where it doesnt show fusionio disks at all under Storage > Disks. So I had to downgrade to 22.02.1 and it works fine.

This gist is basically a note-to-self so future me can remember what I did to get this working on my truenas server haha, but I hope it helps someone else out too :)

I wanted to use my iodrive duo (2 fusion devices on 1 card) as a mirrored SLOG on an existing raid2z pool.

Links to repos used:

Step 1) Install drivers

To download & install the VSL3 driver via dkms all in one go, run this command in the shell (ssh or web gui):

git clone https://github.com/RemixVSL/iomemory-vsl.git && cd iomemory-vsl/ && make dkms

For VSL4:

git clone https://github.com/RemixVSL/iomemory-vsl4.git && cd iomemory-vsl/ && make dkms

Step 2) Install fio utilities/tools

git clone https://github.com/RemixVSL/vsl_downloads.git && cd vsl_downloads

Then look inside the vsl3 (or vsl4) directory for the .deb file. On ubuntu/debian linux version of truenas, install it by running: dpkg -i fio-util_3.2.16.1731-1.0_amd64.deb

^^ Note: you might need to unlock dpkg in order to use it: chmod +x /bin/dpkg*

Step 3) Reboot

After rebooting, you should now see the fusion cards present when running fio-status -a in the shell. If you need to upgrade firmware on your devices, find the instructions on how to generate the firmware over at vsl_downloads and use the fio-update-iodrive /dev/fctX path/to/firmware/file.fff command.

Step 4) Adding it to the zpool

If you don't see the drives, you need to wipe them with something like sgdisk --zap-all /dev/fioa (CAREFUL, you can easily wipe the wrong drive like this). Sometimes this also works for fio drives and old raid drives: wipefs -af /dev/fio{a,b} (again, be careful).

I can now see the drives in the GUI but when trying to add fioa and fiob drives as log devices to the pool, it would error out after trying to format the drives saying partition of type (zfs) couldn't be found. Weird thing is....the partitions are there (lsblk shows them). After this, the GUI would hang when trying to go to Storage > Disks to see the list of disks. Even after a reboot, nothing worked.

BUT after trying to manually add it to the zpool via the cli: zpool add [pool name] log mirror /dev/fioa /dev/fiob

AND then rebooting the server, it works and nothing hangs anymore! I can see the log drives in the GUI now + Storage > Disks doesn't hang anymore.

What happens after an update?

I haven't updated yet, but from all the reading I've done, I think the driver will stay installed but the fio-util deb package might need to be re-installed?

After upgrading 22.02.4 to 22.12.4.2, I had to repeat steps 1-3 (without needing to git clone the repos again). Then had to import the storage pool via the truenas GUI (for some reason running zpool import doesn't make the pool show up in the gui)

@wattCash
Copy link

Thanks

@TechnoidAlpha
Copy link

TechnoidAlpha commented Jul 21, 2024

Hi! Thanks so much for your guide!
Just wanted to provide some info on how I jumped through some hoops to get "dkms" to work. For reference, this is on TrueNAS Scale 23.10.2

Most of what I did wasn't advised but it worked for me.

I used these commands to enable apt via ssh on the root account:
su -
sudo chmod +x /bin/apt*
sudo chmod +x /usr/bin/dpkg
sudo apt-get update

I was then able to install dkms as this was not working for me (command not found error)

After that, I was able to follow your guide to install the driver via dkms and also the utils. My drive has been identified with "fio-status -a" however the driver won't load until I reboot as per your guide (currently running a large replication task so I'll have to wait a few days before I can reboot and add my fusion drive as a fast 730gb cache drive for my main pool.

@TechnoidAlpha
Copy link

I recently updated to TrueNAS SCALE 24.04.2 (the latest version at the time of writing this)
this wiped the driver and utils software but your guide still works fine!

I had to run install-dev-tools to get apt working to install dkms (this is new for scale 24 with how they manage system files)

but after that, I followed the above instructions:
su - (so I could do everything as root)
chmod +x /bin/dpkg*
git clone https://github.com/RemixVSL/iomemory-vsl.git && cd iomemory-vsl/ && make dkms
cd
git clone https://github.com/RemixVSL/vsl_downloads.git && cd vsl_downloads
cd vsl3
dpkg -i fio-util_3.2.16.1731-1.0_amd64.deb
I then rebooted and the drive remains in my pool as cache (I added it prior on Scale 23.10.2 using zpool add [pool name] cache /dev/fioa)

I confirmed using lsblk and fio-status -a that the drive was working all okay and it is! I did a few reboots and it all still works fine as expected.
I hope this helps anyone who may be using similar versions of TrueNAS Scale!

@TheBoroer
Copy link
Author

Hey @TechnoidAlpha thanks for the update and I'm glad my guide still works for the newer versions! 🥳

@bpopovych
Copy link

Hi! Not working for me for TrueNAS SCALE 24.10-RC.2 unfortunately. I can not compile the driver module itself and don't have a glue where to dig further:

1729615002.547 KFIOC_X_DISK_HAS_OPEN_MUTEX=0
Finished
1729615002.564 Exiting
Preserving configdir due to '-p' option: /var/lib/dkms/iomemory-vsl/6.6.44-79fe888/build/kfio_config
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
make
-j24
-C /lib/modules/6.6.44-production+truenas/build
FIO_DRIVER_NAME=iomemory-vsl
FUSION_DRIVER_DIR=/var/lib/dkms/iomemory-vsl/6.6.44-79fe888/build
M=/var/lib/dkms/iomemory-vsl/6.6.44-79fe888/build
EXTRA_CFLAGS+="-I/var/lib/dkms/iomemory-vsl/6.6.44-79fe888/build/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall -Werror"
INSTALL_MOD_DIR=extra/fio
INSTALL_MOD_PATH=
KFIO_LIB=kfio/x86_64_cc122_libkfio.o_shipped
modules
make[1]: Entering directory '/usr/src/linux-headers-6.6.44-production+truenas'
printf '#include "linux/module.h"\nMODULE_LICENSE("GPL");\n' >/var/lib/dkms/iomemory-vsl/6.6.44-79fe888/build/license.c
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/iomemory-vsl/6.6.44-79fe888/build/main.o] Killed
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/iomemory-vsl/6.6.44-79fe888/build/license.o] Killed
make[2]: *** [/usr/src/linux-headers-6.6.44-production+truenas/Makefile:1924: /var/lib/dkms/iomemory-vsl/6.6.44-79fe888/build] Error 2
make[1]: *** [Makefile:237: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.6.44-production+truenas'
make: *** [Makefile:145: modules] Error 2

Can anyone suggest what else I've to try?

@cgg507
Copy link

cgg507 commented Nov 4, 2024

I just ran into the same issue as @bpopovych . Had to reboot SCALE into version 24.04.2 for a successful compile.

@zinkscott
Copy link

Same issues with 24.10 as @bpopovych. I haven’t found a solution yet.

@TechnoidAlpha
Copy link

Same issues with 24.10 as @bpopovych. I haven’t found a solution yet.

Ditto here, my old "guide" doesn't seem to work on Electric Eel. Not sure what the solution is and im not planning to downgrade back to 24.04.2 or older as I need docker on Truenas 24.10 Electric Eel.

@TheBoroer
Copy link
Author

Hey guys, I'm away on travels atm so can't try to see if I can get 24.10 to work on my setup.
Once I'm back I'll take a stab at getting it to work and will report back 🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment