''[[targetcli]]'' from {{RTS full}} is used to configure InfiniBand targets. ''targetcli'' aggregates {{T}} service modules via a core library, and exports them through an API, to provide a unified single-node SAN configuration shell, independently of the underlying fabric(s).

''[[targetcli]]'' from {{RTS full}} is used to configure InfiniBand targets. ''targetcli'' aggregates {{T}} service modules via a core library, and exports them through an API, to provide a unified single-node SAN configuration shell, independently of the underlying fabric(s).

Overview

SRP was designed to use RDMA networks efficiently. RDMA allows lower latencies and higher throughput than TCP/IP protocols, but requires network adapters with native RDMA support, e.g., HCAs for InfiniBand, RNICs on "lossless" (DCB) Ethernet, or TOENICs with iWARP for standard Ethernet.

SRP is based on the SCSI protocol, which is a point-to-point protocol with corresponding design limitations. In contrast, iSER is based on iSCSI, and thus better accommodates modern network requirements, including complex topologies, multipathing, target discovery, etc. Hence, iSER is most likely the best choice for InfiniBand networks going forward.

SRP never became an official standard: the latest draft of the SRP protocol, revision 16a, dates from July 3, 2002.[1]

targetcli

targetcli from Datera, Inc. is used to configure InfiniBand targets. targetcli aggregates LIO service modules via a core library, and exports them through an API, to provide a unified single-node SAN configuration shell, independently of the underlying fabric(s).

LIO Admin ManualThe LIO Admin Manual provides comprehensive background and many examples on using targetcli and on programming the Datera library.

Cheat sheet

Command

Comment

/backstores/iblock create my_disk /dev/sdb

Create the LUN my_disk on the block device /dev/sdb

/ib_srpt create <WWPN>

Create an SRP target

In /ib_srpt/<WWPN>:luns/ create /backstores/iblock/my_disk

Export the LUN my_disk

In /ib_srpt/<WWPN>:acls/ create <Initiator WWPN>

Allow access for the initiator at <WWPN>

/saveconfig

Commit the configuration

Startup

targetcli is invoked by running targetcli as root from the command prompt of the underlying LIO shell.

Persist the configuration

Don't forget to use saveconfig!Without saveconfig, the LIO configuration will be lost upon rebooting or unloading the target service, as the target configuration will revert back to the last saved one.

Use saveconfig from the root context to persist the LIO configuration across LIO reboots:

Spec file

In particular, the InfiniBand spec file /var/target/fabric/ib_srpt.spec is included via RTSlib. WWN values are extracted via /sys/class/infiniband/*/ports/*/gids/0 in wwn_from_files_filter below, and are presented in the targetcliWWN context to register individual InfiniBand port GUIDs.