[TUTORIAL] Guide: Setup ZFS-over-iSCSI with PVE 5x and FreeNAS 11+

Oddly though, the error says Undefined 'freenas_user" and/or "freenas_password"
but, in the storage.cfg, the variables are labeled as 'freenas_user' and 'truenas_secret'
should that 'truenas_secret' be labeled as 'freenas_password'?
Thats a good guess and easy to try. You can examine the plugin source to see what values are actually used.
Did you install the plugin from official source or one of the clones? If its the former, you should file a bug with developer.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Thats a good guess and easy to try. You can examine the plugin source to see what values are actually used.
Did you install the plugin from official source or one of the clones? If its the former, you should file a bug with developer.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Official source, but now I receive the error I updated above.
If I view line 389 I see this.
freenas_api_log_error($freenas_server_list->{$apihost});
die "Unable to connect to the FreeNAS API service at '" . $apihost . vvv.
I'm not sure where to find the freenas_server_list to manually modify it though.
I believe that because I am connecting to the target with an initiator with a /30 network, I need to somehow tell this too look for that targets ip?
 
Last edited:
Hi, I just wanted to share the error I encountered and the solution that worked for me.

Code:
update VM 183: -scsi1 iscsi-pve2-truenas:32,iothread=on
Use of uninitialized value $extent_id in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 651.
TASK ERROR: Unable to create lun /dev/zvol/*****************/recursos-iscsi/pve-dataset/disk-images-pve2/vm-183-disk-0 at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 270

This error occurred because the name of the pool exceeded 64 characters.

Solution:I shortened the pool name to meet the 64-character limit, and the issue was resolved.

Best regards!
 
It worked on mine PVE 8.2.7.

"You dont need to create any extents as the FreeNAS-API plugin will do this automatically when the drive is created on the VM."

But I made my extent myself.

Thanks!

P.S I'm playing Proxmox in my lab (under free EXSi) and I really like PVE & PBS!
 
Last edited:
I got this error when I try to use the ISCSI...

1732163227886.png

My storage config:

1732163270190.png

1732163301369.png

On truenas (tail -f /var/log/auth.log), appears only:

1732163393873.png

I don't know more what to do :/

Somebody could help me, please? Thanks! :)
 
Try to run that command manually (up to "zfs list" the rest you can drop). You may get a more verbose error. If it works, the SSH is working, keep adding portions of the command until you hit an error. Troubleshoot from there.
If the ssh fails, then examine your password, ssh key etc. If you cant ssh - nothing will work.

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: eduardoroedel
Try to run that command manually (up to "zfs list" the rest you can drop). You may get a more verbose error. If it works, the SSH is working, keep adding portions of the command until you hit an error. Troubleshoot from there.
If the ssh fails, then examine your password, ssh key etc. If you cant ssh - nothing will work.

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
@bbgeek17, thank you for supporting. I solved the mistake and ssh was the problem... The official doc followed didn't solved and in this case, the winner was chatgpt hehehe.

In just one node from proxmox cluster, run:

--Generate ssh
ssh-keygen -t rsa -b 4096 -f /etc/pve/priv/zfs/<ip truenas>_id_rsa -N ''

--Copy to TrueNAS
ssh-copy-id -i /etc/pve/priv/zfs/<ip truenas>_id_rsa.pub root@<ip truenas>

--Test
ssh -i /etc/pve/priv/zfs/<ip truenas>_id_rsa root@<ip truenas>
 
@bbgeek17, thank you for supporting. I solved the mistake and ssh was the problem... The official doc followed didn't solved and in this case, the winner was chatgpt hehehe.

In just one node from proxmox cluster, run:

--Generate ssh
ssh-keygen -t rsa -b 4096 -f /etc/pve/priv/zfs/<ip truenas>_id_rsa -N ''

--Copy to TrueNAS
ssh-copy-id -i /etc/pve/priv/zfs/<ip truenas>_id_rsa.pub root@<ip truenas>

--Test
ssh -i /etc/pve/priv/zfs/<ip truenas>_id_rsa root@<ip truenas>
the test part is important to do in all nodes to prevent fingertip issue on ssh connection :)
 
Warning to all who got here. TrueNAS 25.04 has deprecated the REST API that this plugin relies upon. ZFS over iSCSI using this plugin (TheGrandWazoo's repo version) WILL NOT FUNCTION on TrueNAS 25.04. I have rolled back to 24.10 for the time being until the plugin is adapted to whatever TrueNAS is favoring or I migrate to a different storage plugin.

See this GitHub issue for details and tracking. With no repo activity since 2023 and no activity whatsoever from TheGrandWazoo on GitHub since early 2024, I'm afraid it's going to take a fork to continue this work.


https://github.com/TheGrandWazoo/freenas-proxmox/issues/205
 
  • Like
Reactions: mir and linkstat
Warning to all who got here. TrueNAS 25.04 has deprecated the REST API that this plugin relies upon. ZFS over iSCSI using this plugin (TheGrandWazoo's repo version) WILL NOT FUNCTION on TrueNAS 25.04. I have rolled back to 24.10 for the time being until the plugin is adapted to whatever TrueNAS is favoring or I migrate to a different storage plugin.

See this GitHub issue for details and tracking. With no repo activity since 2023 and no activity whatsoever from TheGrandWazoo on GitHub since early 2024, I'm afraid it's going to take a fork to continue this work.


https://github.com/TheGrandWazoo/freenas-proxmox/issues/205
I am now very happy I never upgrade before the first point release is available ;)
I hope for native support in Truenas Scale so we can skip the plugin entirely and avoid the patching of Proxmox.
 
Warning to all who got here. TrueNAS 25.04 has deprecated the REST API that this plugin relies upon. ZFS over iSCSI using this plugin (TheGrandWazoo's repo version) WILL NOT FUNCTION on TrueNAS 25.04. I have rolled back to 24.10 for the time being until the plugin is adapted to whatever TrueNAS is favoring or I migrate to a different storage plugin.

See this GitHub issue for details and tracking. With no repo activity since 2023 and no activity whatsoever from TheGrandWazoo on GitHub since early 2024, I'm afraid it's going to take a fork to continue this work.


https://github.com/TheGrandWazoo/freenas-proxmox/issues/205
@TheGrandWazoo has woken up and is aware of the issue. We have a working patch that based on my limited testing has restored the REST API functionality in 25.04.0.

I've started an effort to convert the code to use Websocket API. There appears to be a bug in the iscsi query methods in TrueNAS 25.04.0 preventing me from testing all of the converted code.

It would be nice to see this functionality baked into proxmox nativity.

I never thought I'd ever learn to write perl... But here we are.