What's tgt?

Linux SCSI target framework (tgt) aims to simplify various SCSI target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance. Our key goals are the clean integration into the scsi-mid layer and implementing a great portion of tgt in user space.

Tgt consists of kernel-space and user-space code. The kernel-space component is included in upstream as of 2.6.20. Note that if you are interested in only iSCSI (probably you are), you need only the user-space code (any kernel version is fine).

Getting Started

Linux kernel 2.6.22 or newer are recommended because tgt can get better performance with signalfd.

Tgt is known as scsi-target-utils package on RHEL (or CentOS) or Fedora, all you need to do is: # yum install scsi-target-utils

SUSE supports tgt nicely too.

Debian and Ubuntu also support tgt.

Gentoo has tgt package too.

Do you know Oracle has their own distribution? Seems that they supports tgt too.

After the installation, Quickstart Guide would help you.


Tgt supports various target drivers

  • iSCSI target driver for Ethernet NICs
  • iSER target driver for Infiniband and RDMA NICs
  • Virtual SCSI target driver for IBM pSeries
  • FCoE target driver for Ethernet NICs (in progress)
  • Qlogic qla2xxx FC target driver (in progress)
  • LSI logic FC target driver (not yet)
  • Qlogic qla4xxx iSCSI target driver (not yet)

Tgt can emulate various device types

  • SBC: a virtual disk drive that can use a file to store the content.
  • SMC: a virtual media jukebox that can be controlled by the "mtx" tool.
  • MMC: a virtual DVD drive that can read DVD-ROM iso files and create burnable DVD+R. It can be combined with SMC to provide a fully operational DVD jukebox.
  • SSC: a virtual tape device (aka VTL) that can use a file to store the content.
  • OSD: a virtual object-based storage device that can use a file to store the content.


Feel free to send anything about tgt, questions, comments, suggestions, etc to the mailing list. You can browse the list archive.

Source code

The latest version of the user-space component is available on github. The latest development code is available on the git tree.