TGT iSCSI Target

From ArchWiki
Revision as of 15:18, 31 March 2012 by JonnyJD (Talk | contribs) (see also)

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements.Tango-edit-clear.png

Reason: Dutch article is the original, English is not my native language. (Discuss in Talk:TGT iSCSI Target#)
Template:Article summary start

Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

The TGT SCSI framework can be used for several storage protocols. This document describes the usage of TGT as iSCSI target.


There are several different iSCSI targets for Linux avalaible, with more or less the same performance. TGT has the following advantages:

  • active development
  • the only iSCSI target that can be used for vSphere environments


The tgtAUR software must be deployed from AUR. If you want to use the direct store, then sg3_utils must be deployed from [extra] repository. Using direct-store, the properties of the physical device will be avalaible for the initiator and target.

Please notice, if you're using a Firewall, tcp port 3260 should be open.


The configuration can be done:

  • using the tgtadm utility, afterwards you can use tgt-admin --dump to save the configuration.
    You can find this method in the Scsi-target-utils Quickstart Guide, as linked from the TGT website. Unfortunaly the bad thing about this method is that not all parameters will be stored in the configuration file.
  • editing the /etc/tgt/targets.conf file.

Example configuration

 direct-store /dev/sdb
 write-cache on
 initiator-address ALL
 incominguser user password
 scsi_id 00010001
 vendor_id XTG
 lun 12
MaxRecvDataSegmentLength 131072
MaxXmitDataSegmentLength 131072
MaxBurstLength 262144
FirstBurstLength 262144

In the first part of this example, /dev/sdb will be offered as lun 12 and chap authentication is configured. In the second part are some iSCSI advanced parameters


If the configuration is well done, TGT can be started:

sudo rc.d start tgt

If you want to start TGT during the boot process of Arch Linux, add tgt in the DAEMONS area of the rc.conf file.

DAEMONS = ( ... network tgt ... )

You can check of everything works like expected:

tgt-admin -s

See also