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).
Linux kernel 2.6.22 or newer are recommended because tgt can get better performance with signalfd.
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.