Technical

ZFS over iSCSI TrueNAS Scale Proxmox: targetcli setup that actually works

ZFS over iSCSI TrueNAS Scale Proxmox: targetcli setup that actually works

ZFS over iSCSI from Proxmox to TrueNAS SCALE is a pain because SCALE dropped istgt for LIO. The old guides tell you to edit istgt.conf, which doesn’t exist anymore. You need targetcli.

From below of long thin identical blue cables connected to small round electrical connectors

Why the old guides are dead ends

TrueNAS CORE used istgt, so every walkthrough says to edit /usr/local/etc/istgt/istgt.conf. SCALE switched to the Linux kernel’s LIO target with targetcli. That file isn’t there. If you follow a CORE guide, you’ll be staring at a missing config and a storage plugin that won’t connect.

Set up the iSCSI target on SCALE

On TrueNAS SCALE, the iSCSI target is managed through the UI or targetcli. The UI is fine for basic setups, but Proxmox’s ZFS over iSCSI plugin needs specific settings. I’d use targetcli directly to see what’s actually happening.

targetcli
cd /backstores/block
create name=zvol dev=/dev/zvol/pool/iscsi
cd /iscsi
create iqn.2005-10.org.freenas.ctl:proxmox
cd iqn.2005-10.org.freenas.ctl:proxmox/tpg1/luns
create /backstores/block/zvol
cd ../acls
create iqn.1993-08.org.debian:01:proxmox
cd iqn.1993-08.org.debian:01:proxmox
create mapped_lun=0 tpg_lun_or_backstore=/backstores/block/zvol write_protect=0
cd /
saveconfig

That creates a block backstore from a ZFS zvol, sets up a target, and maps the LUN to an initiator IQN. The Proxmox host’s IQN is iqn.1993-08.org.debian:01:<hostname> — check /etc/iscsi/initiatorname.iscsi on Proxmox.

Detailed close-up of ethernet cables and network connections on a router, showcasing modern technology.

Add the storage in Proxmox

In Proxmox, go to Datacenter → Storage → Add → iSCSI. Enter the SCALE IP, use the same initiator IQN, and scan. Then add a ZFS over iSCSI storage: Datacenter → Storage → Add → ZFS over iSCSI. Pick the iSCSI target, set the pool name, and it should create a ZFS pool on the LUN.

If it fails with a permission error, the ACL is wrong. The initiator IQN must match exactly. That’s the most common screw-up.

My take

Honestly, ZFS over iSCSI to SCALE is more trouble than it’s worth for a homelab. NFS is simpler and works fine for most VMs. But if you need block storage for something like a database, this is the way. Just don’t expect it to be plug-and-play.

If you’d rather pay for this

TrueNAS Enterprise appliances come with support that’ll set this up for you, but they start around $10k. For a homelab, that’s overkill. A used Dell R720 with SCALE is a few hundred bucks and does the same thing, just with more swearing.

Related: Proxmox LVM-thin over iSCSI without a native storage plugin

Leave a comment

Comments are reviewed before they appear. Your email is never published.