FreeBSD CTL support for ZFS-over-iSCSI to replace deprecated ISTGT?

Dec 4, 2023
42
12
13
Hello,

Of the several various backends PVE supports for ZFS-over-iSCSI, on FreeBSD there is only istgt, which has been largely superseded by ctld since FreeBSD 10.1 (and we're now on version 15.1) and the end is therefore in sight for istgt.

A patchset was sent to the pve-devel mailing list in April to add support for CTL to Proxmox, but there seems to have been little movement since then.

FreeBSD's stability and renowned support for ZFS makes it the ideal candidate for a storage server (at least until Proxmox Storage Server is released! ;)) and thus I humbly suggest that someone take a look at said patchset with a view to integrating it with Proxmox VE.

This is made much more important by the fact that there was apparently some regression breaking istgt somewhat recently. In addition, as of FreeBSD 15 it supports NVMe-oF.

Does anyone have any input on this topic?

Thanks in advance!
 
Last edited:
I don't know of any plans for a storage server, the referenced post doesn't mention anything to it. Do you know more than me?
 
Just the thought of using `ctld` gives me a headache, so I don't think it's a good idea to use it at all. It probably won't be of any use.

Why? You'll find out if you look into it.
 
It’s completely out of the question to quote something without even reading the content.


Every time you create a volume or take a snapshot, the `lun_id` increases, and it does not decrease during normal operations. This is a specification of `ctld`, and using ZFS over iSCSI with a target that has this specification would likely cause the service to stop immediately.

Code:
requested LUN ID is higher than ctl_max_luns

That's how it's designed.

Code:
ctl_frontend_iscsi.c

struct ctl_lun *lun;
if (lun_id >= CTL_MAX_LUNS) {
CFISCSI_WARN("requested lun number %ld is higher "

Such a target is useless, and there’s no point in adding support for it.
 
  • Like
Reactions: Johannes S