What's tgt?
Linux 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), then you need only the user-space code.
Getting Started
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 also supports tgt nicely.
Debian (and Ubuntu) has tgt package however it's quite old. It's better to compile the latest source code.
Do you know Oracle has their own distribution? Seems that they supports tgt too.
After the installation, Quickstart Guide would help you.
Features
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 (partially functional).
- 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 (in progress).
- OSD: a virtual object-based storage device that can use a file to store the content.
Support
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 0.9.10. The latest development code is available on the git tree. The kernel-space component is included in upstream as of 2.6.20. The linux-2.6-target git tree could include some new stuff.