Downloads
The Linux SCSI Target Wiki
The Downloads page contains the instructions for all free download repositories.
Contents |
Linux inclusion
Versions of LIO and targetcli are included in most Linux distributions per default. Here is an overview over the most popular distributions:
Distribution | Version[Linux 1] | Release | Archive | Install | Source git[Linux 2] | Documentation |
---|---|---|---|---|---|---|
CentOS | 6.2 | 2011-12-20 | CentOS mirror | su -c 'yum install fcoe-target-utils' | targetcli-fb.git | Tech Notes |
Debian | 7.0 ("wheezy") | TBA | Debian pool | su -c 'apt-get install targetcli' | targetcli | |
Fedora | 16, 17/18 | 2011-11-08 | Fedora Rawhide | su -c 'yum install targetcli' | targetcli-fb.git | Target Wiki |
openSUSE | 12.1 | 2011-11-08 | Requires manual installation from targetcli. | |||
RHEL | 6.2 | 2011-11-16 | Fedora Rawhide | su -c 'yum install fcoe-target-utils' | targetcli-fb.git | Tech Notes |
Scientific Linux | 6.2 | 2012-02-16 | SL Mirror | su -c 'yum install fcoe-target-utils' | targetcli-fb.git | Tech Notes |
SLES | SP2 | 2012-02-15 | Requires manual installation from targetcli. | |||
Ubuntu | PrecisePangolin v12 | 2012-04-26 | Ubuntu universe | su -c 'apt-get install targetcli' | targetcli |
- ↑ The distribution release where LIO was included first.
- ↑ Technical support, and qualified backports to other kernels and distributions are available from Datera.
targetcli
Overview
targetcli is the general management platform for LIO. It comprises a shell that uses the LinuxIO library through a well-defined API, and is available under the Apache License, version 2.0 (Apache License). Everyone is welcome to contribute.
targetcli was released on October 14, 2009FCoE, Fibre Channel, IBM vSCSI, iSCSI, iSER, SRP, tcm_loop, and vHost. It is is based on a modular, extensible architecture, with plug-in modules for additional functionality.
, and supports all fabric modules, includingtargetcli consists of three Python modules (download and build instructions):
- the targetcli user shell itself (targetcli)
- the underlying rtslib (RTSlib) and API [HTML][PDF]
- the configshell that provides extensibility (configshell)
Installation
If your Linux distribution doesn't already contain an adequate targetcli version, or targetcli can't be installed as described above, you can manually install it from the Datera repositories as follows.
Clone GIT repositories
The source code of the three targetcli components (configshell, RTSlib, targetcli) is available for downloaded from their GIT repositories, respectively:
$ git clone https://github.com/Datera/configshell.git $ git clone https://github.com/Datera/rtslib.git $ git clone https://github.com/Datera/targetcli.git
Install and Build
Please follow the distribution-specific instructions:
Run
Run targetcli as 'root' as follows:
# PYTHONPATH=. ./scripts/targetcli
LinuxIO
Overview
target-pending.git (v4.1.0-rcX) is for kernel developers and users who want to use the latest LIO code before it becomes available in the mainline Linux Kernel. This tree tracks Linus' mainline and follows the quarterly kernel release schedule. It is intended for kernel developers who are interested in contributing to the upstream LIO code, and are comfortable running and debugging bleeding edge kernel code. It involves building a complete running Linux kernel and associated modules, and expects the user to have experience with configuring, building and installing kernels.
![]() |
lio-core.git is deprecated. The lio-core.git development tree has been deprecated as of June 2012. |
Starting with 3.5-rc code in June 2012, the target-pending.git tree is now setup using a work-flow similar to Kvm-Git-Workflow using the following branch structure:
- master: contains latest target rc-fixes for the current release
- for-next: contains developmental patches for next merge window
- for-next-merge: contains new fabric drivers for next merge window
- queue: contains untested patches (usually) headed into for-next*
- auto-next: combination of current master + for-next* (rebased often)
If you're a developer, usually developing against 'for-next' is okay. If 'for-next' is unstable for you or you need a new upstream API, work against 'auto-next', but let the maintainers know that when posting your patch.
If you're working on a fix for the current cycle, work against upstream or 'master' (they should be equivalent most of the time).
If you're a sub-maintainer, post git pull requests against 'for-next' or 'master', according to your merge target.
![]() |
Backports Datera offers stable qual'd backport trees for sale for most older Linux kernels and for most Linux distributions. |
![]() |
SCSI test suite scsi-testuite provides a complementary open-source SCSI test suite. |
Installation
Clone GIT repositories
The source code of the LinuxIO (target_core.ko) engine is available for download from its kernel.org GIT repository. First, close the full git tree:
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git target-pending.git
Show the available remote branches:
$ cd target-pending.git/ $ git branch -vr
Resolve dependencies
Install the necessary kernel development packages, including gcc, make, libncurses-dev.
Debian
On a Debian based system these packages (gcc, make, libncurses5-dev) can be installed as follows:
$ su -c 'apt-get install gcc make libncurses5-dev kernel-devel'
RHEL/CentOS/Fedora
$ su -c 'yum install gcc make ncurses-devel kernel-devel'
SLES/openSUSE
$ su -c 'zypper install gcc make ncurses-devel kernel-devel'
Ubuntu
$ su -c 'apt-get install gcc make ncurses-devel kernel-devel'
Select modules
To configure the kernel build (hardware dependent), run:
$ make menuconfig
LinuxIO
Enable the LIO (target_core.ko) module and the desired backend driver modules.
Also, enable the desired fabric drivers for iSCSI (iscsi.ko), FCoE (tcm_fc.ko), tcm_loop (loopback.ko), and Firewire SBP-2:
Device Drivers ---> <M> Generic Target Core Mod (TCM) and ConfigFS Infrastructure ---> --- Generic Target Core Mod (TCM) and ConfigFS Infrastructure <M> TCM/IBLOCK Subsystem Plugin for Linux/BLOCK <M> TCM/FILEIO Subsystem Plugin for Linux/VFS <M> TCM/pSCSI Subsystem Plugin for Linux/SCSI <M> TCM Virtual SAS target and Linux/SCSI LDD fabric loopback module <M> TCM_FC fabric Plugin <M> Linux-iSCSI.org iSCSI Target Mode Stack <M> FireWire SBP-2 fabric module
Mellanox InfiniBand
Optionally, enable the InfiniBand target module (srpt.ko), plus the umad and verbs modules:
Device Drivers ---> <M> InfiniBand support ---> --- InfiniBand support <M> InfiniBand userspace MAD support <M> InfiniBand userspace access (verbs and CM) <M> InfiniBand SCSI RDMA Protocol target support
QLogic Fibre Channel
Optionally, enable the QLogic Fibre Channel target module (qla2xxx.ko), including its SCSI LLD:
Device Drivers ---> SCSI device support ---> [*] SCSI low-level drivers ---> --- SCSI low-level drivers <M> QLogic QLA2XXX Fibre Channel Support <M> TCM_QLA2XXX fabric module for Qlogic 2xxx series target mode HBAs
USB Gadget
Optionally, enable the USB Gadget module:
Device Drivers ---> [*] USB support ---> <M> USB Gadget Support ---> --- USB Gadget Support <M> USB Gadget Target Fabric Module
Build
Build the Linux kernel with the selected modules:
$ make bzImage ; make modules
Install
Install the Linux kernel with the selected modules:
$ su -c 'make modules_install ; make install'
Rebuild initrd
If necessary, back up and rebuild the initial RAM disk initrd depending on the distribution.
Debian
Rebuild initrd by running the following command:
$ su -c 'update-initrd -c -k $(uname -r)'
RHEL/CentOS/Fedora
Rebuild initrd by running the following command:
$ su -c 'mkinitrd -f /boot/initramfs-$(uname -r).img $(uname -r)'
SLES/OpenSUSE
Rebuild initrd by running the following command:
$ su -c 'mkinitrd'
Ubuntu
Rebuild initrd by running the following command:
$ su -c 'update-initramfs -c -k $(uname -r)'
Contact
Please post your comments, questions or bug reports here:
- For LIO or targetcli: the target-devel mailing list (post, subscribe, list info, gmane archive)
- For the Initiator: the Core-iSCSI mailing list
- For general SCSI: the linux-scsi mailing list
- For the Linux kernel: the Linux Kernel mailing list (archive)
Please see Support for more information.