tgtd -> LIO kernel target in RHEL 7

RHEL 7 will be using the LIO kernel target subsystem for iSCSI and other protocols, instead of the tgtd daemon, aka scsi-target-utils. This is a change from RHEL 6, where we use tgtd for iSCSI target support, and LIO only for FCoE targets, via the fcoe-target-utils package.

Users of tgtd can prepare for RHEL 7 by trying Fedora 17 or 18, which have current LIO/targetcli code. LIO has many features tgtd doesn’t, but LIO also won’t cover 100% of tgtd’s features at first, either. File bugs for these regressions and we’ll work to address them.

Other software that currently uses tgtd may wish to look at the rtslib Python library, and targetcli’s JSON config format — LIO has a nice API so if you find yourself wanting to parse targetcli output, please hold off and email me instead, ok? 🙂

scsi-target-utils will still be available via EPEL for RHEL 7, and supported in RHEL 6 for its lifetime.

28 thoughts on “tgtd -> LIO kernel target in RHEL 7

  1. Any clue what support for “other protocols” is being considered? According to their wiki, the framework should support fibre channel targets on Qlogic and Emulex HBAs in current kernel versions. I’m still fighting through 3.6.x kernel and targetcli git builds to verify this on Top of RHEL 6, but it would be nice to know if the packages will support our needs out of the box with RHEL 7.

    Like

    1. First I’d recommend using Fedora 17 instead of RHEL 6 to evaluate LIO. It should require a lot less fighting 🙂

      AFAIK LIO in the upstream kernel supports Qlogic HBAs. I don’t recall seeing Emulex support yet. The plan for RHEL 7 is to support all fabrics LIO supports except usb-gadget.

      Like

  2. Great, thanks! I have Qlogic HBAs and LSI HBAs today so the lack of Emulex support isn’t an issue right now anyway (not sure why I thought they were supported though).

    I started using Fedora 18 Beta last night for some evaluation. I’m having problems with creating qla2xxx targets through targetcli though (and I did set the qla2xxx module to run in target mode, correct modules loaded, etc.). Problem with running on a Fedora Beta is I’m not sure what is broken and what I’m just doing incorrectly. I’ll try Fedora 17 with the newer 3.6.x kernel over the weekend and see if targetcli will work with the qla2xxx support there…

    Like

  3. Could someone set QLOGIC HBA in RHEL7 ?.
    Qla2xxx in target mode is configured correctly.
    But the fabric QLA2XXX not listen in targetcli.
    Can’t find the kernel module tcm_qla2xxx
    The kernel version is 3.10.0-123.8.1.el7.x86_64.
    Thank

    Like

  4. Thank for the reply.
    Finally i have set QLOGIC HBA in RHEL7(Centos 7) .
    From the elrepo repository, i install the kernel 3.16.3-1.el7 .
    After that, I have been able to enable TCM_QLA2XXX module .
    I also had to update the Rtslib scripts to last version to correct some bugs when creating Luns . (The Qla2xxxfabricmodule is disable also in default package)
    After that, everything is working properly .
    Thank and best regards.
    Toni

    Like

  5. Ive tried configuring iscsi targets in centos 6, but it appears the kernel doesn’t have support.
    Im at a loss as to how to add iscsi target support to the centos 6 kernel. Can you point me somewhere?

    Like

  6. I am using kernel 3.10.0-123.el7.ppc64 and targetcli is not listing qla2xxx fabric because tcm_qla2xxx is missing. How I can correct this ??

    Like

  7. Can anyone please share a link from where you installed kernel 3.16.3-1.el7 for RHEL 7 and from where you updated rtslib to the latest version ?? It’s really important that I set QLogic HBA in target mode in RHEL 7.

    Like

    1. Target support for QLogic HBAs in RHEL 7 is absent because our customers haven’t told us it’s something they want, to justify the support effort. This is enabled in Fedora, and other distros, of course.

      Like

  8. @agrover If RHEL7 can’t support QLogic FC Target mode then Does CentOS7 also can’t support QLogic FC Target mode and QLogic HBA?

    Like

  9. No problem, thanks 🙂

    Could you kindly guide me on what would be a good way to find that out?

    What OS would you recommend that you know does have support for the 16Gb 2600 QLogic HBA?

    Thanks!

    Like

  10. Btw, is there any way to manually enable RHEL 7 to enable target support for 16Gb QLogic HBAs?

    Like manually recompile tcm_qla2xxx?

    Thanks.

    Like

  11. One more thing:

    Is there any way to manually enable RHEL 7 to enable target support for 16Gb QLogic HBAs?

    Like manually recompile tcm_qla2xxx?

    Thanks.

    Like

    1. RHEL 7 specifically disables this because everything enabled but also be supported (provide documentation, receive support calls, etc), but building the kernel module and using targetcli&rtslib from Fedora it is technically possible to use qla2xxx target fabric.

      Like

  12. Hi Andy,

    I recompiled with stable kernel 3.18.18 to enable tcm_qla2xxx module (via make makeconfig). But still targetcli doesn’t see the driver:
    http://i.imgur.com/Ea9hR6i.png (screenshot)

    Can you please help figure out what’s wrong here? Would greatly appreciate it!

    I’ve disabled initiator mode:
    [root@rhel1 ~]# cat /sys/module/qla2xxx/parameters/qlini_mode
    disabled

    Also, the modules seem to be loaded correctly:
    [root@rhel1 ~]# lsmod | grep tcm_qla2xxx
    tcm_qla2xxx 36270 0
    target_core_mod 367387 3 tcm_qla2xxx,iscsi_target_mod
    qla2xxx 639362 1 tcm_qla2xxx
    scsi_transport_fc 64056 2 qla2xxx,tcm_qla2xxx

    [root@rhel1 ~]# lsmod | grep iscsi_target_mod
    iscsi_target_mod 295162 1
    target_core_mod 367387 3 tcm_qla2xxx,iscsi_target_mod

    Like

  13. @wkan,

    It’s really kernel dependent and having the latest-and-greatest userland Linux-IO tools installed to get this working, as the primary functionality lies in kernel land.

    So if you’ve compiled your kernel already, loaded ‘tcm_qla2xxx’, then I’d remove the ‘targetcli’ and all associated packages, and rebuild them.

    Here’s a link to my blog to do that: http://doschman.blogspot.com/2016/01/getting-q-logic-2562-qla2xxx-linux-io.html

    Like

  14. I am using RHEL 7.4 and I need to be able to iSCSI export mhvtl tape deivces to multiple other virtual hosts. In RHEL 6 I did this with tgtd. It seems that LIO, even in RHEL 7.4 does not support character devices (aka tapes). Is there a solution for this. I have followed several email stream on this issue and none have come up with a working solution. [See https://www.spinics.net/lists/target-devel/msg03940.html in particular]

    Like

Leave a comment