This file is indexed.

/usr/share/doc/tgt/html/targets.conf.5.html is in tgt 1:1.0.43-0ubuntu4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>targets.conf</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="targets.conf.5"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>targets.conf &#8212; Linux SCSI Target Configuration File</p></div><div class="refsect1"><a name="idp50158688"></a><h2>DESCRIPTION</h2><p>
       tgt-admin uses /etc/tgt/targets.conf to initialize tgtd
       configuration, by default. Its layout uses a HTML-like structure, with a
       hierarchy of nested tags to define targets and LUNs.
    </p></div><div class="refsect1"><a name="idp50159936"></a><h2>CONFIGURATION FILE SYNTAX</h2><p>
      Global directives configure options that are
      global to tgtd's configuration, as well as defining exported
      targets, via target sections.
    </p><p>
      Target sections contain directives specific to one target
      device. They define each target's exported LUNs via "backing-store" and
      "direct-store" directives, as well as other target-wide options.
    </p><p>
      LUN directives ("backing-store" and "direct-store") may contain
      options specific to a single exported logical unit.
    </p></div><div class="refsect1"><a name="idp50162336"></a><h2>GLOBAL DIRECTIVES</h2><p>
      With the exception of target directives, each of these should occur at most once.
    </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">&lt;target &lt;IQN&gt;&gt;</code></span></dt><dd><p>
	    Defines a the start of a target definition. IQN is an ISCSI Qualified
	    Name such as "iqn.2001-04.com.example:storage1". See "ISCSI" on
	    Wikipedia for more information on IQNs.
          </p><p>
	    Within this block should be target-level directives, as
	    documented below.
          </p><p>
	    The target definition ends with "&lt;/target&gt;"
	  </p></dd><dt><span class="term"><code class="option">default-driver &lt;lld&gt;</code></span></dt><dd><p>
	    Instead of specifying a driver type for each target,
	    default-driver defines a default low-level driver for all
	    exported targets. It may be overriden on a per-target
	    basis.
	    Valid lld values are "iscsi" or
	    "iser". Since iscsi is assumed if this directive
	    is not present, it is only generally needed if iser
	    is the desired default.
          </p></dd><dt><span class="term"><code class="option">include &lt;path&gt;</code></span></dt><dd><p>
	    Include the configuration from another configuration
	    file. Wildcards are allowed, so an example like "include
	    /etc/tgt/xen/*.conf" is allowed.
          </p></dd><dt><span class="term"><code class="option">ignore-errors yes</code></span></dt><dd><p>
	    Errors from tgtadm will be ignored. Default is no.
          </p></dd><dt><span class="term"><code class="option">control-port &lt;port&gt;</code></span></dt><dd><p>
	    Define a different local socket key for communicating with
	    tgtd. Defaults to 0. This is only generally useful if
	    multiple instances of tgtd are in use.
          </p></dd><dt><span class="term"><code class="option">iSNSServerIP &lt;addr&gt;</code></span></dt><dd><p>
	    Define the address of the iSNS server in IPv4 dotted-quad
	    address format.
	    Required when using iSNS, otherwise ignored.
          </p></dd><dt><span class="term"><code class="option">iSNSAccessControl &lt;value&gt;</code></span></dt><dd><p>
	    Set iSNS access control. Valid values are "On" or "Off".
	    Required when using iSNS, otherwise ignored.
          </p></dd><dt><span class="term"><code class="option">iSNSServerPort &lt;port&gt;</code></span></dt><dd><p>
	    Set a different iSNS server port. Default is 3205.
	    Optional when using iSNS, otherwise ignored.
          </p></dd><dt><span class="term"><code class="option">iSNS On</code></span></dt><dd><p>
	    Enable iSNS. Only valid value is "On". Default is off.
          </p></dd><dt><span class="term"><code class="option">incomingdiscoveryuser &lt;user&gt; &lt;userpassword&gt;</code></span></dt><dd><p>
	    Define iscsi incoming discovery authentication setting. If no
	    value is given, no authentication is performed.
          </p></dd><dt><span class="term"><code class="option">outgoingdiscoveryuser &lt;user&gt; &lt;userpassword&gt;</code></span></dt><dd><p>
	    Define iscsi outgoing discovery authentication setting. If no
	    value is given, no authentication is performed.
          </p></dd></dl></div></div><div class="refsect1"><a name="idp50184416"></a><h2>TARGET-LEVEL DIRECTIVES</h2><p>
      Each target may export multiple block devices, or logical units
      (LUNs). For the purposes of LUN numbering, backing-store
      directives are processed before direct-store directives.
    </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">backing-store &lt;path&gt;</code></span></dt><dd><p>
	    Defines a logical unit (LUN) exported by the
	    target. This may specify either a regular file, or a block
	    device.
          </p></dd><dt><span class="term"><code class="option">direct-store &lt;path&gt;</code></span></dt><dd><p>
	    Defines a direct mapped logical unit (LUN) with the same properties
	    as the physical device (such as VENDOR_ID, SERIAL_NUM, etc.)
          </p></dd><dt><span class="term"><code class="option">driver &lt;lld&gt;</code></span></dt><dd><p>
	    Define the low-level driver to use for this target, either
	    "iscsi" or "iser" (without quotes). This overrides the
	    "default-driver" global directive.
          </p></dd><dt><span class="term"><code class="option">initiator-address &lt;addr&gt;</code></span></dt><dd><p>
	    Allows connections only from the specified IP
	    address. Defaults to ALL if no initiator-address directive is specified.
          </p></dd><dt><span class="term"><code class="option">initiator-name &lt;addr&gt;</code></span></dt><dd><p>
	    Allows connections only from the specified initiator name.
          </p></dd><dt><span class="term"><code class="option">incominguser &lt;user&gt; &lt;userpassword&gt;</code></span></dt><dd><p>
	    Define iscsi incoming authentication setting. If no
	    "incominguser" is specified, it is not used. This
	    directive may be used multiple times per target.
          </p></dd><dt><span class="term"><code class="option">outgoinguser &lt;user&gt; &lt;userpassword&gt;</code></span></dt><dd><p>
	    Define iscsi outgoing authentication setting. If no
	    "outgoinguser" is specified, it is not used. This
	    directive may be used multiple times per target.
          </p></dd><dt><span class="term"><code class="option">controller_tid &lt;val&gt;</code></span></dt><dd><p>
	    Define the tid of the controller. Default is next
	    available integer.
          </p></dd></dl></div></div><div class="refsect1"><a name="idp50199936"></a><h2>LUN-LEVEL DIRECTIVES</h2><p>
      All of these may be listed at the target level (and apply to all
      LUNs) or within an individual LUN's definition, if it is defined
      using the container-style, multi-line definition, rather than
      single-line definition format:
    </p><pre class="screen">
&lt;backing-store /dev/sdb1&gt;
  # LUN directives go here
&lt;/backing-store&gt;

&lt;direct-store /dev/sdb1&gt;
  # LUN directives go here
&lt;/direct-store&gt;
    </pre><p>
      It is recommended to use either single-line or container-style
      LUN definitions within a target. Mixing styles can cause parser
      errors.
    </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">write-cache &lt;val&gt;</code></span></dt><dd><p>
	    "on" or "off", default on.
	  </p></dd><dt><span class="term"><code class="option">scsi_id &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">scsi_sn &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">vendor_id &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">product_id &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">product_rev &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">sense_format &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">removable &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">path &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">mode_page &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">readonly &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">device-type &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">bs-type &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">allow-in-use &lt;val&gt;</code></span></dt><dd></dd><dt><span class="term"><code class="option">block-size &lt;val&gt;</code></span></dt><dd><p>
	    Specify the block size for this LUN.
	  </p></dd><dt><span class="term"><code class="option">lbppbe &lt;val&gt;</code></span></dt><dd><p>
	    Specify the Logical blocks per physical block
	    exponent. By default TGTD will set the lbppbe to automatically
	    match the underlying filesystem. Use this parameter to override
	    that setting.
	  </p><p>
	    This is an internal option that should not be
	    set directly.
	  </p></dd><dt><span class="term"><code class="option">la_lba &lt;val&gt;</code></span></dt><dd><p>
	    Specify the lowest aligned logical block address.
	    This is an internal option that should not be set directly.
	  </p></dd><dt><span class="term"><code class="option">optimal_xfer_gran &lt;val&gt;</code></span></dt><dd><p>
	    Specify the optimal transfer granularity, to be reflected
	    in the Block Limits VPD.
	    This is an internal option that should not be set directly.
	  </p></dd><dt><span class="term"><code class="option">optimal_xfer_len &lt;val&gt;</code></span></dt><dd><p>
	    Specify the optimal transfer length, to be reflected
	    in the Block Limits VPD.
	    This is an internal option that should not be set directly.
	  </p></dd><dt><span class="term"><code class="option">params &lt;vals&gt;</code></span></dt><dd><p>
	    Pass additional parameters to tgtadm.
	  </p></dd></dl></div></div><div class="refsect1"><a name="idp50225664"></a><h2>CONFIGURATION FILE EXAMPLE</h2><pre class="screen">
Example configuration file:

&lt;target iqn.2007-04.com.example:san.monitoring&gt;
  backing-store /dev/san/monitoring

  # if no "incominguser" is specified, it is not used
  incominguser backup secretpass12

  # defaults to ALL if no "initiator-address" is specified
  initiator-address 192.168.1.2
&lt;/target&gt;

&lt;target iqn.2007-02.com.example:san.xen1&gt;
  backing-store /dev/san/xen1-disk1 # LUN1
  direct-store /dev/san/xen1-disk2  # LUN2

  initiator-address 192.168.1.2     # Allowed IP
  initiator-address 192.168.5.6     # Allowed IP

  incominguser user1 secretpass12
  incominguser user2 secretpass23

  outgoinguser userA secretpassA
&lt;/target&gt;

&lt;target iqn.2007-02.com.example:san.xen2&gt;
  backing-store /dev/san/xen2
&lt;/target&gt;

&lt;target iqn.2007-06.com.example:san.vmware1&gt;
  backing-store /dev/san/vmware1
&lt;/target&gt;
	</pre></div><div class="refsect1"><a name="idp50227872"></a><h2>FILES</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">/etc/tgt/targets.conf</code></span></dt><dd><p>
	    Configuration file for tgt-admin.
          </p></dd><dt><span class="term"><code class="option">/usr/share/doc/tgt/targets.conf.example</code></span></dt><dd><p>
	    Example configuration file for tgt-admin.
          </p></dd></dl></div></div><div class="refsect1"><a name="idp50232160"></a><h2>SEE ALSO</h2><p>
      tgtd(8), tgtadm(8), tgtimg(8), tgt-setup-lun(8).
      <a class="ulink" href="http://stgt.sourceforge.net/" target="_top">http://stgt.sourceforge.net/</a>
    </p></div><div class="refsect1"><a name="idp50233808"></a><h2>REPORTING BUGS</h2><p>
      Report bugs to &lt;stgt@vger.kernel.org&gt;
    </p></div></div></body></html>