LIO (SCSI target) explained

LIO Target
Author:Nicholas Bellinger
Jerome Martin
Developer:Datera, Inc.
Programming Language:C, Python
Operating System:Linux
Genre:Block storage
License:GNU General Public License

In computing, Linux-IO (LIO) Target is an open-source implementation of the SCSI target that has become the standard one included in the Linux kernel.[1] Internally, LIO does not initiate sessions, but instead provides one or more Logical Unit Numbers (LUNs), waits for SCSI commands from a SCSI initiator, and performs required input/output data transfers. LIO supports common storage fabrics, including FCoE, Fibre Channel, IEEE 1394, iSCSI, iSCSI Extensions for RDMA (iSER), SCSI RDMA Protocol (SRP) and USB. It is included in some Linux distributions; native support for LIO in QEMU/KVM, libvirt, and OpenStack makes LIO also a storage option for cloud deployments.[2] [3]

LIO is maintained by Datera, Inc., a Silicon Valley provider of storage systems and software. On January 15, 2011, LIO SCSI target engine was merged into the Linux kernel mainline, in kernel version 2.6.38,[4] [5] which was released on March 14, 2011. Additional fabric modules have been merged into subsequent Linux releases.

A competing generic SCSI target module for Linux is SCST.[6] For the narrower purpose providing a Linux iSCSI target, the older IET ("iSCSI Enterprise Target") and STGT ("SCSI Target FrameWork") modules also enjoy industry support.[7] [8]

Background

The SCSI standard provides an extensible semantic abstraction for computer data storage devices, and as such has become a "lingua franca" for data storage systems. The SCSI T10 standards[9] define the commands[10] and protocols of the SCSI command processor (sent in SCSI CDBs), and the electrical and optical interfaces for various implementations.

A SCSI initiator is an endpoint that initiates a SCSI session. A SCSI target is the endpoint that waits for initiator commands and executes the required I/O data transfers. The SCSI target usually exports one or more LUNs for initiators to operate on.

The LIO Linux SCSI Target implements a generic SCSI target that provides remote access to most data storage device types over all prevalent storage fabrics and protocols. LIO neither directly accesses data nor does it directly communicate with applications. LIO provides a highly efficient, fabric-independent and fabric-transparent abstraction for the semantics of numerous data storage device types.

Architecture

LIO implements a modular and extensible architecture around a versatile and highly efficient, parallelized SCSI command processing engine. The SCSI target engine implements the semantics of a SCSI target.[11]

The LIO SCSI target engine is independent of specific fabric modules or backstore types. Thus, LIO supports mixing and matching any number of fabrics and backstores at the same time. The LIO SCSI target engine implements a comprehensive SPC-3/SPC-4[12] feature set with support for high-end features, including SCSI-3/SCSI-4 Persistent Reservations (PRs), SCSI-4 Asymmetric Logical Unit Assignment (ALUA), VMware vSphere APIs for Array Integration (VAAI),[13] T10 DIF, etc.

LIO is configurable via a configfs-based[14] kernel API, and can be managed via a command-line interface and API (targetcli).

SCSI target

The concept of a SCSI target isn't narrowly restricted to physical devices on a SCSI bus, but instead provides a generalized model for all receivers on a logical SCSI fabric. This includes SCSI sessions across interconnects with no physical SCSI bus at all. Conceptually, the SCSI target provides a generic block storage service or server in this scenario.

Backstores

Backstores provide the SCSI target with generalized access to data storage devices by importing them via corresponding device drivers. Backstores don't need to be physical SCSI devices.

The most important backstore media types are:

As a result, LIO provides a generalized model to export block storage.

Fabric modules

Fabric modules implement the frontend of the SCSI target by encapsulating and abstracting the properties of the various supported interconnect. The following fabric modules are available.

FCoE

The Fibre Channel over Ethernet (FCoE) fabric module allows the transport of Fibre Channel protocol (FCP) traffic across lossless Ethernet networks. The specification, supported by a large number of network and storage vendors, is part of the Technical Committee T11 FC-BB-5 standard.[15]

LIO supports all standard Ethernet NICs.

The FCoE fabric module was contributed by Cisco and Intel, and released with Linux 3.0 on July 21, 2011.[16]

Fibre Channel

Fibre Channel is a high-speed network technology primarily used for storage networking. It is standardized in the Technical Committee T11[17] of the InterNational Committee for Information Technology Standards (INCITS).

The QLogic Fibre Channel fabric module supports 4- and 8-gigabit speeds with the following HBAs:

The Fibre Channel fabric module[18] and low-level driver[19] (LLD) were released with Linux 3.5 on July 21, 2012.[20]

With Linux 3.9, the following QLogic HBAs and CNAs are also supported:

This makes LIO the first open source target to support 16-gigabit Fibre Channel.

IEEE 1394

The FireWire SBP-2 fabric module enables Linux to export local storage devices via IEEE 1394, so that other systems can mount them as an ordinary IEEE 1394 storage device.

IEEE 1394 is a serial-bus interface standard for high-speed communications and isochronous real-time data transfer. It was developed by Apple as "FireWire" in the late 1980s and early 1990s, and Macintosh computers have supported "FireWire target disk mode" since 1999.[21]

The FireWire SBP-2 fabric module was released with Linux 3.5 on July 21, 2012.[20] [22]

iSCSI

The Internet Small Computer System Interface (iSCSI) fabric module allows the transport of SCSI traffic across standard IP networks.

By carrying SCSI sessions across IP networks, iSCSI is used to facilitate data transfers over intranets and to manage storage over long distances. iSCSI can be used to transmit data over local area networks (LANs), wide area networks (WANs), or the Internet, and can enable location-independent and location-transparent data storage and retrieval.

The LIO iSCSI fabric module also implements a number of advanced iSCSI features that increase performance and resiliency, such as Multiple Connections per Session (MC/S) and Error Recovery Levels 0-2 (ERL=0,1,2).

LIO supports all standard Ethernet NICs.

The iSCSI fabric module was released with Linux 3.1 on October 24, 2011.[23]

iSER

Networks supporting remote direct memory access (RDMA) can use the iSCSI Extensions for RDMA (iSER) fabric module to transport iSCSI traffic.iSER permits data to be transferred directly into and out of remote SCSI computer memory buffers without intermediate data copies (direct data placement or DDP) by using RDMA. RDMA is supported on InfiniBand networks, on Ethernet with data center bridging (DCB) networks via RDMA over Converged Ethernet (RoCE), and on standard Ethernet networks with iWARP enhanced TCP offload engine controllers.

The iSER fabric module was developed together by Datera and Mellanox Technologies, and first released with Linux 3.10 on June 30, 2013.[24]

SRP

The SCSI RDMA Protocol (SRP) fabric module allows the transport of SCSI traffic across RDMA (see above) networks. As of 2013, SRP was more widely used than iSER, although it is more limited, as SCSI is only a peer-to-peer protocol, whereas iSCSI is fully routable.The SRP fabric module supports the following Mellanox host channel adapters (HCAs):

The SRP fabric module was released with Linux 3.3 on March 18, 2012.[25]

In 2012, c't magazine measured almost 5000 MB/s throughput with LIO SRP Target over one Mellanox ConnectX-3 port in 56 Gbit/s FDR mode on a Sandy Bridge PCI Express 3.0 system with four Fusion-IO ioDrive PCI Express flash memory cards.

USB

The USB Gadget fabric module enables Linux to export local storage devices via the Universal Serial Bus (USB), so that other systems can mount them as an ordinary storage device.

USB was designed in the mid-1990s to standardize the connection of computer peripherals, and has also become common for data storage devices.

The USB Gadget fabric module was released with Linux 3.5 on July 21, 2012.[26]

targetcli

targetcli is a user space single-node management command line interface (CLI) for LIO.[27] It supports all fabric modules and is based on a modular, extensible architecture, with plug-in modules for additional fabric modules or functionality.

targetcli provides a CLI that uses an underlying generic target library through a well-defined API. Thus the CLI can easily be replaced or complemented by a UI with other metaphors, such as a GUI.

targetcli is implemented in Python and consists of three main modules:

Detailed instructions on how to set up LIO targets can be found on the LIO wiki.[27]

Linux distributions

targetcli and LIO are included in most Linux distributions per default. Here is an overview over the most popular ones, together with the initial inclusion dates:

DistributionVersionReleaseArchiveInstallationSource gitDocumentation
Alpine Linux2.52011-11-07Alpine Linux mirrorapk add targetcli-fbtargetcli-fb.gitHow-to
CentOS6.22011-12-20CentOS mirrorsu -c 'yum install fcoe-target-utils'targetcli-fb.gitTech Notes
Debian7.0 ("wheezy")2013-05-04Debian poolsu -c 'apt-get install targetcli'targetcli.gitLIO Wiki
Fedora162011-11-08Fedora Rawhidesu -c 'yum install targetcli'targetcli-fb.gitTarget Wiki
openSUSE12.12011-11-08Requires manual installation from Datera targetcli.git repos.
RHEL6.22011-11-16 Fedora Rawhidesu -c 'yum install fcoe-target-utils'targetcli-fb.gitTech Notes
Scientific Linux6.22012-02-16SL Mirrorsu -c 'yum install fcoe-target-utils'targetcli-fb.gitTech Notes
SLES11 SP3 MR2013-12-su -c 'zypper in targetcli'targetcli.gitLIO Wiki
Ubuntu12.04 LTS (precise)2012-04-26Ubuntu universesudo apt-get install targetclitargetcli.gitLIO Wiki

See also

References

External links

ReleaseDetails2011201220132014
width=1%1width=1%2width=1%3width=1%4width=1%5width=1%6width=1%7width=1%8width=1%9width=1%10width=1%11width=1%12width=1%1width=1%2width=1%3width=1%4width=1%5width=1%6width=1%7width=1%8width=1%9width=1%10width=1%11width=1%12width=1%1width=1%2width=1%3width=1%4width=1%5width=1%6width=1%7width=1%8width=1%9width=1%10width=1%11width=1%12width=1%1width=1%2width=1%3width=1%4width=1%5width=1%6width=1%7width=1%8width=1%9width=1%10width=1%11width=1%12
4.x<-- 4.x Version -->Version<-- Leading blanks -->4.1<-- 4.x Trailing blanks -->
FeatureTarget CoreLoopbackFCoEiSCSIPerfSRP
CM WQFC
USB
1393
vHostPerfMisc16 GFCiSERMiscVAAIMiscDIF
Ref's
NPIV
iSER DIF
Linux2.6.382.6.393.03.13.23.33.43.53.63.73.83.93.103.113.123.133.143.15

Notes and References

  1. Book: Target. 323328-001. 2012-10-23. 2012-12-25. linux-iscsi.org.
  2. Web site: Support LIO as an iSCSI backend. Eric Harney . launchpad.net. 2012-12-17. 2013-01-14.
  3. Web site: KVM Virtualized I/O Performance . IBM, Red Hat . February 2013.
  4. Web site: Trivial merge. Linus Torvalds. Kernel.org. 2011-01-14. 2019-09-28.
  5. Web site: Kernel Log: Coming in 2.6.38 (Part 4) - Storage. Thorsten Leemhuis. Heise Online. 2011-03-02.
  6. Web site: A tale of two SCSI targets . Lwn.net . 2014-01-20.
  7. Web site: Replicate Everything! Highly Available iSCSI Storage with DRBD and Pacemaker. Florian. Haas. May 2012. Linux Journal. https://archive.today/20140120093312/http://porky.linuxjournal.com:8080/LJ/217/11275.html. 2014-01-20. dead. 2019-09-28.
  8. Web site: SCST vs STGT. Vladislav. Bolkhovitin. 2018-04-11. Generic SCSI Target Subsystem for Linux. 2019-04-01.
  9. Web site: SCSI Storage Interfaces. Technical Committee T10. t10.org. 2012-12-24.
  10. Book: SCSI Commands Reference Manual. Seagate Technology. Scotts Valley. 100293068, Rev. C. April 2010. 2012-12-25.
  11. Nicholas . Bellinger . Current Status and Future of iSCSI on the Linux platform. Linux Plumbers Conference . 2009 .
  12. Web site: SCSI Primary Commands - 4 (SPC-4). Ralph Weber. t10.org. 2011-01-17. 2011-03-07.
  13. Web site: VAAI. LIO Linux SCSI Target. 2012-12-23. 2012-12-25. linux-iscsi.org.
  14. Web site: Configfs - an introduction. Jonathan Corbet. lwn.net. 2005-08-24. 2011-03-07.
  15. Web site: Fibre Channel: Backbone - 5 revision 2.00 . June 4, 2009 . American National Standard for Information Technology International Committee for Information Technology Standards Technical Group T11 . 2011-05-05.
  16. Web site: [SCSI] tcm_fc: Adding FC_FC4 provider (tcm_fc) for FCoE target (TCM - target core) support. Linus Torvalds. 2011-04-18. Kernel.org . 2019-09-28.
  17. Web site: T11 Home Page. 2012-12-25. t11.org.
  18. Web site: [SCSI] tcm_qla2xxx: Add >= 24xx series fabric module for target-core. Linus Torvalds. 2012-05-15. Kernel.org. 2019-09-28.
  19. Web site: [SCSI] qla2xxx: Add LLD target-mode infrastructure for >= 24xx series. Linus Torvalds. 2012-05-15. Kernel.org. 2019-09-28.
  20. Web site: Kernel Log: Coming in 3.5 (Part 2) - Filesystems and storage. Thorsten Leemhuis. Heise Online. 2012-07-03. 2013-01-14.
  21. Web site: How to use and troubleshoot FireWire target disk mode. 2012-12-24. apple.com.
  22. Web site: sbp-target: Initial merge of firewire/ieee-1394 target mode support. Linus Torvalds. 2012-04-15. Kernel.org. 2019-09-28.
  23. Web site: iSCSI merge. Linus Torvalds. 2011-07-27. Kernel.org. 2019-09-28.
  24. Web site: Merge branch 'for-next-merge'. Linus Torvalds. 2013-04-30. Kernel.org. 2019-09-28.
  25. Web site: InfiniBand/SRP merge. Linus Torvalds. 2012-01-18. Kernel.org. 2019-09-28.
  26. Web site: Merge branch 'usb-target-merge'. Kernel.org. 2019-09-28.
  27. Web site: Targetcli. LIO Linux SCSI Target. 2012-12-09. 2012-12-25. linux-iscsi.org.
  28. Web site: Package rtslib. Jerome Martin. 2011-08-03. 2012-12-25. daterainc.com.