[PATCH 1/1] doc: update tgt-admin with iSNS documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please find attached a patch that adds documentation of the iSNS
configuration options to the tgt-admin manpage.

This also changes all ip-addresses in this manpage to be rfc5737 compliant


regards
ronnie sahlberg

Attachment: 0001-Update-tgt-admin-and-document-the-iSNS-options-for-t.patch.gz
Description: GNU Zip compressed data

From 7c620f896166ae59f75ab5858fa4641df252b087 Mon Sep 17 00:00:00 2001
From: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Thu, 1 Apr 2010 09:02:12 +1100
Subject: [PATCH] Update tgt-admin and document the iSNS options for the configuration file.

Change the ip addresses in the manpage to be compliant to rfc5737
(i.e. use subnets reserved for examples in documentation).

Regenerate the manpage and html page for tgt-admin.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
---
 doc/htmlpages/tgt-admin.8.html |  149 ++++++++++++++++++++++++++++++----------
 doc/manpages/tgt-admin.8       |   50 ++++++++++---
 doc/tgt-admin.8.xml            |   63 +++++++++++++----
 3 files changed, 200 insertions(+), 62 deletions(-)

diff --git a/doc/htmlpages/tgt-admin.8.html b/doc/htmlpages/tgt-admin.8.html
index d954750..e512333 100644
--- a/doc/htmlpages/tgt-admin.8.html
+++ b/doc/htmlpages/tgt-admin.8.html
@@ -1,18 +1,17 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>tgt-admin</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="tgt-admin.8"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>tgt-admin &#8212; Linux SCSI Target Configuration Tool</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">tgtadm</code>  [-e --execute] [--delete &lt;value&gt;] [--offline &lt;value&gt;] [--ready &lt;value&gt;] [-s --show] [-c --conf &lt;file&gt;] [--ignore-errors] [-f --force] [-p --pretend] [--dump] [-v --verbose] [-h --help]</p></div></div><div class="refsect1" lang="en"><a name="id2476073"></a><h2>DESCRIPTION</h2><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>tgt-admin</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="tgt-admin.8"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>tgt-admin &#8212; Linux SCSI Target Configuration Tool</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">tgtadm</code>  [-e --execute] [--delete &lt;value&gt;] [--offline &lt;value&gt;] [--ready &lt;value&gt;] [-s --show] [-c --conf &lt;file&gt;] [--ignore-errors] [-f --force] [-p --pretend] [--dump] [-v --verbose] [-h --help]</p></div></div><div class="refsect1" lang="en"><a name="id2476134"></a><h2>DESCRIPTION</h2><p>
        tgt-admin  is a utility which allows a persistent configuration of targets and luns.
        It uses tgtadm commands to create, delete and show targets.
-    </p></div><div class="refsect1" lang="en"><a name="id2476086"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">-e, --execute</code></span></dt><dd><p>
-              Read /etc/tgt/targets.conf and execute tgtadm commands.
-              If the  target  already  exists,  it  won't  be  processed.
-	      See --update.
+    </p></div><div class="refsect1" lang="en"><a name="id2476147"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">-e, --execute</code></span></dt><dd><p>
+            Read /etc/tgt/targets.conf and execute tgtadm commands.
+            If the  target  already  exists,  it  won't  be  processed.
+	    See --update.
           </p></dd><dt><span class="term"><code class="option">-d, --delete &lt;value&gt;</code></span></dt><dd><p>
-              Delete all or selected targets.
-              The  target  will be deleted only if it's not used (no initiator
-              is connected to it).
-
-              If you want to delete targets which are in use, you have to add
-              the "--force" flag.
-
+            Delete all or selected targets.
+            The  target  will be deleted only if it's not used (no initiator
+            is connected to it).
+          </p><p>
+	    If you want to delete targets which are in use, you have to add
+            the "--force" flag.
 	      </p><pre class="screen">
 Example usage:
     --delete ALL            - delete all targets
@@ -21,44 +20,46 @@ Example usage:
     --delete iqn.2008-08.com.example:some.target
                             - delete this target
 	      </pre><p>
-
           </p></dd><dt><span class="term"><code class="option">--offline</code></span></dt><dd><p>
               Put all or selected targets in offline state.
-
 	      </p><pre class="screen">
 Example usage:
     --offline ALL           - offline all targets
-    --offline  tid=4          -  offline target 4 (target with tid 4)
-    --offline  iqn.2008-08.com.example:some.target  -  offline this target
+    --offline tid=4         - offline target 4
+                              (target with tid 4)
+    --offline iqn.2008-08.com.example:some.target
+                            - offline this target
 	      </pre><p>
-
           </p></dd><dt><span class="term"><code class="option">--ready</code></span></dt><dd><p>
-              Put all or selected targets in ready state.
-	      </p><pre class="screen">
+            Put all or selected targets in ready state.
+	    </p><pre class="screen">
 Example usage:
     --ready ALL             - ready all targets
-    --ready  tid=4           - ready target 4 (target with tid 4)
-    --ready iqn.2008-08.com.example:some.target -  ready  this target
-	      </pre><p>
+    --ready tid=4           - ready target 4
+                              (target with tid 4)
+    --ready iqn.2008-08.com.example:some.target
+                            - ready this target
+	    </pre><p>
           </p></dd><dt><span class="term"><code class="option">--update &lt;value&gt;</code></span></dt><dd><p>
-              Update all or selected targets.
-              The  target  will be updated only if it's not used (no initiator
-              is connected to it).
-
-              If you want to update targets which are in use, you have to  add
-              "--force" flag.
-
-	      </p><pre class="screen">
+            Update all or selected targets.
+            The  target  will be updated only if it's not used (no initiator
+            is connected to it).
+          </p><p>
+            If you want to update targets which are in use, you have to  add
+            "--force" flag.
+	    </p><pre class="screen">
 Example usage:
     --update ALL             - ready all targets
-    --update tid=4           - ready target 4 (target with tid 4)
-    --update iqn.2008-08.com.example:some.target - update this target
-	      </pre><p>
+    --update tid=4           - ready target 4
+                               (target with tid 4)
+    --update iqn.2008-08.com.example:some.target
+                             - update this target
+	    </pre><p>
           </p></dd><dt><span class="term"><code class="option">-s, --show</code></span></dt><dd><p>
 	    Show all the targets.
           </p></dd><dt><span class="term"><code class="option">-c, --conf &lt;configuration file&gt;</code></span></dt><dd><p>
-              Specify an alternative configuration file instead of
-              /etc/tgt/target.conf, which is the default.
+            Specify an alternative configuration file instead of
+            /etc/tgt/target.conf, which is the default.
           </p></dd><dt><span class="term"><code class="option">--ignore-errors</code></span></dt><dd><p>
 	    Continue even if tgtadm exits with non-zero code.
           </p></dd><dt><span class="term"><code class="option">-f, --force</code></span></dt><dd><p>
@@ -74,9 +75,83 @@ Example usage:
 	    Increase verbosity (show tgtadm commands used).
           </p></dd><dt><span class="term"><code class="option">-h, --help</code></span></dt><dd><p>
 	    Display a list of available options and exit.
-          </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2476335"></a><h2>SEE ALSO</h2><p>
+          </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2476406"></a><h2>CONFIGURATION FILE SYNTAX</h2><p>
+       The defualt configuration file is /etc/tgt/target.conf. It defines all
+       the targets and their properties.
+       The configuration file is in XML format and uses tags.
+       Configuration file contains several target blocks, where each block
+       contains target's properties such as storage devices,
+       initator ACL and authorization information. You can include other
+       config files using:
+       include /etc/tgt/xen/*.conf.
+    </p><div class="variablelist"><dl><dt><span class="term"><code class="option">backing-store &lt;file-name&gt;</code></span></dt><dd><p>
+	    Defines a virtual device on the target.
+          </p></dd><dt><span class="term"><code class="option">direct-store &lt;device-name&gt;</code></span></dt><dd><p>
+	    Defines a direct mapped device with the same properties
+	    as the physical device (such as VENDOR_ID, SERIAL_NUM, etc.)
+          </p></dd><dt><span class="term"><code class="option">initiator-address &lt;ip-address&gt;</code></span></dt><dd><p>
+	    Allows connections only from the specified IP
+	    address. Defaults to ALL if no "initiator-address" is specified.
+          </p></dd><dt><span class="term"><code class="option">incominguser &lt;user&gt; &lt;password&gt;</code></span></dt><dd><p>
+	    Define iscsi incoming authentication setting. If no
+	    "incominguser" is specified, it is not used.
+          </p></dd><dt><span class="term"><code class="option">outgoinguser &lt;user&gt; &lt;password&gt;</code></span></dt><dd><p>
+	    Define iscsi outgoing authentication setting. If no
+	    "outgoinguser" is specified, it is not used.
+          </p></dd><dt><span class="term"><code class="option">iSNSServerIP &lt;ip-address&gt;</code></span></dt><dd><p>
+	    Define the ip address of the iSNS server.
+          </p></dd><dt><span class="term"><code class="option">iSNSServerPort &lt;port&gt;</code></span></dt><dd><p>
+	    Define the TCP port of the iSNS server.
+          </p></dd><dt><span class="term"><code class="option">iSNSAccessControl &lt;On|Off&gt;</code></span></dt><dd><p>
+	    Enable/Disable AccessControl to iSNS.
+          </p></dd><dt><span class="term"><code class="option">iSNS &lt;On|Off&gt;</code></span></dt><dd><p>
+	    Enable/Disable iSNS.
+          </p></dd></dl></div><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.0.2.12
+&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.0.2.12     # Allowed IP
+initiator-address 192.0.2.56     # 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;
+
+# iSNS section
+iSNSServerIP 192.0.2.222
+iSNSServerPort 3205
+iSNSAccessControl On
+iSNS On
+    </pre></div><div class="refsect1" lang="en"><a name="id2476600"></a><h2>FILES</h2><div class="variablelist"><dl><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" lang="en"><a name="id2476637"></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" lang="en"><a name="id2476350"></a><h2>REPORTING BUGS</h2><p>
+    </p></div><div class="refsect1" lang="en"><a name="id2476652"></a><h2>REPORTING BUGS</h2><p>
       Report bugs to &lt;stgt@xxxxxxxxxxxxxxx&gt;
     </p></div></div></body></html>
diff --git a/doc/manpages/tgt-admin.8 b/doc/manpages/tgt-admin.8
index 2356d20..e717546 100644
--- a/doc/manpages/tgt-admin.8
+++ b/doc/manpages/tgt-admin.8
@@ -1,11 +1,11 @@
 .\"     Title: tgt-admin
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2010
+.\"      Date: 04/01/2010
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "TGT\-ADMIN" "8" "03/31/2010" "" ""
+.TH "TGT\-ADMIN" "8" "04/01/2010" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -144,29 +144,50 @@ Display a list of available options and exit\.
 .PP
 The defualt configuration file is /etc/tgt/target\.conf\. It defines all the targets and their properties\. The configuration file is in XML format and uses tags\. Configuration file contains several target blocks, where each block contains target\'s properties such as storage devices, initator ACL and authorization information\. You can include other config files using: include /etc/tgt/xen/*\.conf\.
 .PP
-\fBbacking\-store\fR
+\fBbacking\-store <file\-name>\fR
 .RS 4
 Defines a virtual device on the target\.
 .RE
 .PP
-\fBdirect\-store\fR
+\fBdirect\-store <device\-name>\fR
 .RS 4
 Defines a direct mapped device with the same properties as the physical device (such as VENDOR_ID, SERIAL_NUM, etc\.)
 .RE
 .PP
-\fBinitiator\-address\fR
+\fBinitiator\-address <ip\-address>\fR
 .RS 4
 Allows connections only from the specified IP address\. Defaults to ALL if no "initiator\-address" is specified\.
 .RE
 .PP
-\fBincominguser\fR
+\fBincominguser <user> <password>\fR
 .RS 4
 Define iscsi incoming authentication setting\. If no "incominguser" is specified, it is not used\.
 .RE
 .PP
-\fBoutgoinguser\fR
+\fBoutgoinguser <user> <password>\fR
 .RS 4
 Define iscsi outgoing authentication setting\. If no "outgoinguser" is specified, it is not used\.
+.RE
+.PP
+\fBiSNSServerIP <ip\-address>\fR
+.RS 4
+Define the ip address of the iSNS server\.
+.RE
+.PP
+\fBiSNSServerPort <port>\fR
+.RS 4
+Define the TCP port of the iSNS server\.
+.RE
+.PP
+\fBiSNSAccessControl <On|Off>\fR
+.RS 4
+Enable/Disable AccessControl to iSNS\.
+.RE
+.PP
+\fBiSNS <On|Off>\fR
+.RS 4
+Enable/Disable iSNS\.
+.RE
 .sp
 .RS 4
 .nf
@@ -179,15 +200,15 @@ backing\-store /dev/san/monitoring
 incominguser backup secretpass12
 
 # defaults to ALL if no "initiator\-address" is specified
-initiator\-address 192\.168\.1\.2
+initiator\-address 192\.0\.2\.12
 </target>
 
 <target iqn\.2007\-02\.com\.example:san\.xen1>
 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
+initiator\-address 192\.0\.2\.12     # Allowed IP
+initiator\-address 192\.0\.2\.56     # Allowed IP
 
 incominguser user1 secretpass12
 incominguser user2 secretpass23
@@ -202,10 +223,15 @@ backing\-store /dev/san/xen2
 <target iqn\.2007\-06\.com\.example:san\.vmware1>
 backing\-store /dev/san/vmware1
 </target>
-	
+
+# iSNS section
+iSNSServerIP 192\.0\.2\.222
+iSNSServerPort 3205
+iSNSAccessControl On
+iSNS On
+    
 .fi
 .RE
-.RE
 .SH "FILES"
 .PP
 \fB/etc/tgt/targets\.conf\fR
diff --git a/doc/tgt-admin.8.xml b/doc/tgt-admin.8.xml
index c8b6f62..9fdc03b 100644
--- a/doc/tgt-admin.8.xml
+++ b/doc/tgt-admin.8.xml
@@ -215,7 +215,7 @@ Example usage:
 
     <variablelist>
 
-      <varlistentry><term><option>backing-store</option></term>
+      <varlistentry><term><option>backing-store &lt;file-name&gt;</option></term>
         <listitem>
           <para>
 	    Defines a virtual device on the target.
@@ -223,7 +223,7 @@ Example usage:
         </listitem>
       </varlistentry>
 
-      <varlistentry><term><option>direct-store</option></term>
+      <varlistentry><term><option>direct-store &lt;device-name&gt;</option></term>
         <listitem>
           <para>
 	    Defines a direct mapped device with the same properties
@@ -232,7 +232,7 @@ Example usage:
         </listitem>
       </varlistentry>
 
-      <varlistentry><term><option>initiator-address</option></term>
+      <varlistentry><term><option>initiator-address &lt;ip-address&gt;</option></term>
         <listitem>
           <para>
 	    Allows connections only from the specified IP
@@ -241,7 +241,7 @@ Example usage:
         </listitem>
       </varlistentry>
 
-      <varlistentry><term><option>incominguser</option></term>
+      <varlistentry><term><option>incominguser &lt;user&gt; &lt;password&gt;</option></term>
         <listitem>
           <para>
 	    Define iscsi incoming authentication setting. If no
@@ -250,14 +250,49 @@ Example usage:
         </listitem>
       </varlistentry>
 
-      <varlistentry><term><option>outgoinguser</option></term>
+      <varlistentry><term><option>outgoinguser &lt;user&gt; &lt;password&gt;</option></term>
         <listitem>
           <para>
 	    Define iscsi outgoing authentication setting. If no
 	    "outgoinguser" is specified, it is not used.
           </para>
         </listitem>
-	<screen format="linespecific">
+      </varlistentry>
+
+      <varlistentry><term><option>iSNSServerIP &lt;ip-address&gt;</option></term>
+        <listitem>
+          <para>
+	    Define the ip address of the iSNS server.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>iSNSServerPort &lt;port&gt;</option></term>
+        <listitem>
+          <para>
+	    Define the TCP port of the iSNS server.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>iSNSAccessControl &lt;On|Off&gt;</option></term>
+        <listitem>
+          <para>
+	    Enable/Disable AccessControl to iSNS.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>iSNS &lt;On|Off&gt;</option></term>
+        <listitem>
+          <para>
+	    Enable/Disable iSNS.
+          </para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+    <screen format="linespecific">
 Example configuration file:
 
 &lt;target iqn.2007-04.com.example:san.monitoring&gt;
@@ -267,15 +302,15 @@ backing-store /dev/san/monitoring
 incominguser backup secretpass12
 
 # defaults to ALL if no "initiator-address" is specified
-initiator-address 192.168.1.2
+initiator-address 192.0.2.12
 &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
+initiator-address 192.0.2.12     # Allowed IP
+initiator-address 192.0.2.56     # Allowed IP
 
 incominguser user1 secretpass12
 incominguser user2 secretpass23
@@ -290,13 +325,15 @@ backing-store /dev/san/xen2
 &lt;target iqn.2007-06.com.example:san.vmware1&gt;
 backing-store /dev/san/vmware1
 &lt;/target&gt;
-	</screen>
-      </varlistentry>
 
-    </variablelist>
+# iSNS section
+iSNSServerIP 192.0.2.222
+iSNSServerPort 3205
+iSNSAccessControl On
+iSNS On
+    </screen>
   </refsect1>
 
-
   <refsect1><title>FILES</title>
     <variablelist>
 
-- 
1.5.4.3


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux