MIR or not to MIR (TCM or "LIO") tools

Rafael David Tinoco rafaeldtinoco at ubuntu.com
Tue Feb 18 02:22:24 UTC 2020

Hello all,

I have always used TGT project, despite its bad performance, as iSCSI
target in Linux, offering iSCSI luns for HA clusters. It was known to me
that TGT was *not* the best iSCSI target supported in Linux, being LIO
the chosen project for that (now called TCM:

In a recent need, I needed SCSI 3 reservations in those SCSI volumes, to
test and enable fence_scsi agent, and was getting unclear errors when
trying to reserve the LUNs.

The following commands - that would register a reservation key, reserve
a lun, release the reservation and unregister the key - don't work when
using TGT iSCSI luns with open-scsi and iscsid tool/service.

$ sg_persist -r /dev/sda
$ sg_persist --out --register --param-sark=123abc /dev/sda
$ sg_persist --out --reserve --param-rk=123abc --prout-type=5 /dev/sda

prout-type = 5 -> executes SCSI PERSISTENT RESERVE OUT (5Fh) command
                  with the PREEMPT AND ABORT (05h) service


$ sg_persist --out --release --param-rk=123abc --prout-type=5 /dev/sda
$ sg_persist --out --register --param-rk=123abc /dev/sda

With that, its impossible to fence iSCSI luns using corosync/pacemaker

TCM (or LIO) project fully supports fencing and several other iSCSI
features. It also supports userland backends that can extend backing
devices so it supports: qcow2, ceph, etc...

Despite being HA only or not, this use case is actually being used in
this email to show the need to have a tool that configures kernel TCM
(or LIO) capability as a supported tool (at least IMO).

I have found a recent previous MIR attempt of 1/3 of what is needed:


But, afaict, we would need MIRs for:

- python3-configshell-fb
- python3-rtslib-fb
- targetcli-fb

To have the "targetcli" tool in [main]. Upstream projects are hosted
together with open-iscsi repository, suggesting that they are actively
maintained and in good shape.

Has this ever been discussed ? It looks to me something we could/should
have in 20.04. Thoughts ?



More information about the ubuntu-server mailing list