[PATCH 1/1] Convert tgt-admin manpage to XML format

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

 



Please find attached a patch that covnerts the tgt-admin manpage to
XML format which will make it easier to keep it uptodate.

regards
ronnie sahlberg

Attachment: 0001-Convert-the-tgt-admin-manpage-to-XML-and-update-the.patch.gz
Description: GNU Zip compressed data

From 1fb4fa84f5671fee29ad43a627e4ee5bda628c92 Mon Sep 17 00:00:00 2001
From: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Wed, 31 Mar 2010 16:23:07 +1100
Subject: [PATCH] Convert the tgt-admin manpage to XML and update the Makefile to compile it
 to both manpange and HTML

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
---
 doc/Makefile                   |   11 +-
 doc/htmlpages/tgt-admin.8.html |   82 ++++++++++
 doc/manpages/tgt-admin.8       |  334 +++++++++++++++++++++++----------------
 doc/tgt-admin.8.xml            |  336 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 623 insertions(+), 140 deletions(-)
 create mode 100644 doc/htmlpages/tgt-admin.8.html
 create mode 100644 doc/tgt-admin.8.xml

diff --git a/doc/Makefile b/doc/Makefile
index 518caaf..19d943a 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -8,9 +8,10 @@ DOCS = README.fcoe README.ibmvstgt README.iscsi README.iser \
 	    README.lu_configuration README.mmc tmf.txt
 
 XSLTPROC = /usr/bin/xsltproc
-XMLMAN = manpages/tgtd.8 manpages/tgtadm.8 manpages/tgtimg.8
+XMLMAN = manpages/tgtd.8 manpages/tgtadm.8 manpages/tgtimg.8 \
+		manpages/tgt-admin.8
 XMLHTML = htmlpages/tgtd.8.html htmlpages/tgtadm.8.html \
-		htmlpages/tgtimg.8.html
+		htmlpages/tgtimg.8.html htmlpages/tgt-admin.8.html
 
 .PHONY:all
 all:
@@ -37,6 +38,12 @@ manpages/tgtadm.8: tgtadm.8.xml
 htmlpages/tgtadm.8.html: tgtadm.8.xml
 	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
 
+manpages/tgt-admin.8: tgt-admin.8.xml
+	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+htmlpages/tgt-admin.8.html: tgt-admin.8.xml
+	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
+
 manpages/tgtimg.8: tgtimg.8.xml
 	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
 
diff --git a/doc/htmlpages/tgt-admin.8.html b/doc/htmlpages/tgt-admin.8.html
new file mode 100644
index 0000000..d954750
--- /dev/null
+++ b/doc/htmlpages/tgt-admin.8.html
@@ -0,0 +1,82 @@
+<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>
+       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></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.
+
+	      </p><pre class="screen">
+Example usage:
+    --delete ALL            - delete all targets
+    --delete tid=4          - delete target 4
+                              (target with tid 4)
+    --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
+	      </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">
+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>
+          </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">
+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>
+          </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.
+          </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>
+	    Force some operations even if the target is in use.
+          </p></dd><dt><span class="term"><code class="option">-p, --pretend</code></span></dt><dd><p>
+	    Only print tgtadm options which would be used; don't execute any
+            actions.
+            Assumes -v.
+          </p></dd><dt><span class="term"><code class="option">--dump</code></span></dt><dd><p>
+	    Dump current tgtd configuration. Note: does not include detailed
+            parameters, like write caching.
+          </p></dd><dt><span class="term"><code class="option">-v, --verbose</code></span></dt><dd><p>
+	    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>
+      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>
+      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 e5ac42b..2356d20 100644
--- a/doc/manpages/tgt-admin.8
+++ b/doc/manpages/tgt-admin.8
@@ -1,168 +1,226 @@
-.IX Title "TGT-ADMIN 1"
-.TH TGT-ADMIN 8 "2009-01-30" "TGT Configuration Tool" "TGT Configuration Tool"
+.\"     Title: tgt-admin
+.\"    Author: 
+.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
+.\"      Date: 03/31/2010
+.\"    Manual: 
+.\"    Source: 
+.\"
+.TH "TGT\-ADMIN" "8" "03/31/2010" "" ""
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
 .SH "NAME"
-tgt-admin \- Linux SCSI Target Configuration Tool.
+tgt-admin - Linux SCSI Target Configuration Tool
 .SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-\&\fBtgt-admin -[OPTION]...\fR
+.HP 7
+\fBtgtadm\fR [\-e\ \-\-execute] [\-\-delete\ <value>] [\-\-offline\ <value>] [\-\-ready\ <value>] [\-s\ \-\-show] [\-c\ \-\-conf\ <file>] [\-\-ignore\-errors] [\-f\ \-\-force] [\-p\ \-\-pretend] [\-\-dump] [\-v\ \-\-verbose] [\-h\ \-\-help]
 .SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-tgt-admin is a utility which allows a persistent configuration of targets and luns.
-.br
-It uses tgtadm commands to create, delete and show targets.
-
+.PP
+tgt\-admin is a utility which allows a persistent configuration of targets and luns\. It uses tgtadm commands to create, delete and show targets\.
 .SH "OPTIONS"
-.IX Header "OPTIONS"
-.IP "\fB-e, --execute\fP"
-Read /etc/tgt/targets.conf and execute tgtadm commands.
-.br
-If the target already exists, it won't be processed. See --update.
-.IP "\fB--delete <value>\fP"
-Delete all or selected targets.
-.br
-The target will be deleted only if it's not used (no initiator is connected to it).
-.IP
-If you want to delete targets which are in use, you have to add "--force" flag.
-.IP
+.PP
+\fB\-e, \-\-execute\fR
+.RS 4
+Read /etc/tgt/targets\.conf and execute tgtadm commands\. If the target already exists, it won\'t be processed\. See \-\-update\.
+.RE
+.PP
+\fB\-d, \-\-delete <value>\fR
+.RS 4
+Delete all or selected targets\. The target will be deleted only if it\'s not used (no initiator is connected to it)\.
+.sp
+If you want to delete targets which are in use, you have to add the "\-\-force" flag\.
+.sp
+.RS 4
+.nf
 Example usage:
-      --delete ALL            - delete all targets
-      --delete tid=4          - delete target 4 (target with tid 4)
-      --delete iqn.2008-08.com.example:some.target - delete this target
-.IP
-.IP "\fB--offline <value>\fP"
-Put all or selected targets in offline state.
-.IP
+    \-\-delete ALL            \- delete all targets
+    \-\-delete tid=4          \- delete target 4
+                              (target with tid 4)
+    \-\-delete iqn\.2008\-08\.com\.example:some\.target
+                            \- delete this target
+	      
+.fi
+.RE
+.sp
+.RE
+.PP
+\fB\-\-offline\fR
+.RS 4
+Put all or selected targets in offline state\.
+.sp
+.RS 4
+.nf
 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
-.IP
-.IP "\fB--ready <value>\fP"
-Put all or selected targets in ready state.
-.IP
+    \-\-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
+	      
+.fi
+.RE
+.sp
+.RE
+.PP
+\fB\-\-ready\fR
+.RS 4
+Put all or selected targets in ready state\.
+.sp
+.RS 4
+.nf
 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
-.IP
-.IP "\fB--update <value>\fP"
-Update all or selected targets.
-.br
-The target will be updated only if it's not used (no initiator is connected to it).
-.IP
-If you want to update targets which are in use, you have to add "--force" flag.
-.IP
+    \-\-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
+	    
+.fi
+.RE
+.sp
+.RE
+.PP
+\fB\-\-update <value>\fR
+.RS 4
+Update all or selected targets\. The target will be updated only if it\'s not used (no initiator is connected to it)\.
+.sp
+If you want to update targets which are in use, you have to add "\-\-force" flag\.
+.sp
+.RS 4
+.nf
 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
-.IP
-
-.IP "\fB-s, --show\fP"
-Show all the targets.
-.IP
-.IP "\fB-c, --conf <conf file>\fP"
-Specify an alternative configuration file instead of \fB/etc/tgt/target.conf\fR, which is the default.
-.IP
-.IP "\fB--ignore-errors\fP"
-Continue even if tgtadm exits with non-zero code.
-.IP
-.IP "\fB-f, --force\fP"
-Force some operations even if the target is in use.
-.IP
-.IP "\fB-p, --pretend\fP"
-Only print tgtadm options which would be used; don't execute any actions.
-.br
-Assumes -v.
-.IP
-.IP "\fB--dump\t\fR"
-Dump current tgtd configuration. Note: does not include detailed parameters, like write caching.
-.IP
-.IP "\fB-v, --verbose\fP"
-Increase verbosity (show tgtadm commands used).
-.PP
-.IP "\fB-h, --help\fP"
-Display a list of available options and exit.
-
-.SH CONFIGURATION FILE SYNTAX
-The defualt configuration file is \fB/etc/tgt/target.conf\fR. It defines all the targets and their properties.
-.br
-The configuration file is in XML format and uses tags.
-.br
-Configuration file contains several target blocks, where each block contains target's properties such as storage devices,
-.br
-initator ACL and authorization information. You can include other config files using:
-.br
-\fBinclude /etc/tgt/xen/*.conf\fR.
+    \-\-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
+	    
+.fi
+.RE
+.sp
+.RE
 .PP
-.br
-There are 2 types of storage devices:
+\fB\-s, \-\-show\fR
+.RS 4
+Show all the targets\.
+.RE
 .PP
-\&\fBbacking-store\fR - defines a virtual device on the target.
+\fB\-c, \-\-conf <configuration file>\fR
+.RS 4
+Specify an alternative configuration file instead of /etc/tgt/target\.conf, which is the default\.
+.RE
 .PP
-\&\fBdirect-store\fR  - defines a direct mapped device with the same properties as the physical device (such as VENDOR_ID,
-SERIAL_NUM, etc.)
+\fB\-\-ignore\-errors\fR
+.RS 4
+Continue even if tgtadm exits with non\-zero code\.
+.RE
 .PP
-\&\fBinitiator-address\fR - allows connections only from the specify IP address. defaults to ALL if no
-"initiator-address" is specified
+\fB\-f, \-\-force\fR
+.RS 4
+Force some operations even if the target is in use\.
+.RE
 .PP
-\&\fBincominguser\fR - define iscsi incoming authentication setting. if no "incominguser" is specified, it is not used.
+\fB\-p, \-\-pretend\fR
+.RS 4
+Only print tgtadm options which would be used; don\'t execute any actions\. Assumes \-v\.
+.RE
 .PP
-\&\fBoutgoinguser\fR - define iscsi outgoing authentication setting. if no "outgoinguser" is specified, it is not used.
+\fB\-\-dump\fR
+.RS 4
+Dump current tgtd configuration\. Note: does not include detailed parameters, like write caching\.
+.RE
 .PP
-
+\fB\-v, \-\-verbose\fR
+.RS 4
+Increase verbosity (show tgtadm commands used)\.
+.RE
+.PP
+\fB\-h, \-\-help\fR
+.RS 4
+Display a list of available options and exit\.
+.RE
+.SH "CONFIGURATION FILE SYNTAX"
+.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
+.RS 4
+Defines a virtual device on the target\.
+.RE
+.PP
+\fBdirect\-store\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
+.RS 4
+Allows connections only from the specified IP address\. Defaults to ALL if no "initiator\-address" is specified\.
+.RE
+.PP
+\fBincominguser\fR
+.RS 4
+Define iscsi incoming authentication setting\. If no "incominguser" is specified, it is not used\.
+.RE
+.PP
+\fBoutgoinguser\fR
+.RS 4
+Define iscsi outgoing authentication setting\. If no "outgoinguser" is specified, it is not used\.
+.sp
+.RS 4
+.nf
 Example configuration file:
 
-.br
-<target iqn.2007-04.com.example:san.monitoring>
-   backing-store /dev/san/monitoring
+<target iqn\.2007\-04\.com\.example:san\.monitoring>
+backing\-store /dev/san/monitoring
 
-   # if no "incominguser" is specified, it is not used
-   incominguser backup secretpass12
+# 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
-.br
+# defaults to ALL if no "initiator\-address" is specified
+initiator\-address 192\.168\.1\.2
 </target>
 
-<target iqn.2007-02.com.example:san.xen1>
-   backing-store /dev/san/xen1-disk1 # LUN1
-   direct-store /dev/san/xen1-disk2  # LUN2
+<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\.168\.1\.2     # Allowed IP
+initiator\-address 192\.168\.5\.6     # Allowed IP
 
-   incominguser user1 secretpass12
-   incominguser user2 secretpass23
+incominguser user1 secretpass12
+incominguser user2 secretpass23
 
-   outgoinguser userA secretpassA
-.br
+outgoinguser userA secretpassA
 </target>
 
-<target iqn.2007-02.com.example:san.xen2>
-   backing-store /dev/san/xen2
-.br
+<target iqn\.2007\-02\.com\.example:san\.xen2>
+backing\-store /dev/san/xen2
 </target>
 
-<target iqn.2007-06.com.example:san.vmware1>
-   backing-store /dev/san/vmware1
-.br
+<target iqn\.2007\-06\.com\.example:san\.vmware1>
+backing\-store /dev/san/vmware1
 </target>
-
-.SH FILES
-.PD 0
-.TP
-.I /etc/tgt/targets.conf
-Configuration file for tgt-admin.
-.br
-.TP
-.I /usr/share/doc/tgt/targets.conf.example
-Example configuration file for tgt-admin.
-.br
-
-.SH SEE ALSO
-.BR tgtadm (8)
-
+	
+.fi
+.RE
+.RE
+.SH "FILES"
+.PP
+\fB/etc/tgt/targets\.conf\fR
+.RS 4
+Configuration file for tgt\-admin\.
+.RE
+.PP
+\fB/usr/share/doc/tgt/targets\.conf\.example\fR
+.RS 4
+Example configuration file for tgt\-admin\.
+.RE
+.SH "SEE ALSO"
+.PP
+tgtd(8), tgtadm(8), tgtimg(8), tgt\-setup\-lun(8)\.
+\fI\%http://stgt.sourceforge.net/\fR
 .SH "REPORTING BUGS"
-.IX Header "REPORTING BUGS"
-Report bugs to <stgt@xxxxxxxxxxxxxxx>
+.PP
+Report bugs to <stgt@vger\.kernel\.org>
diff --git a/doc/tgt-admin.8.xml b/doc/tgt-admin.8.xml
new file mode 100644
index 0000000..c8b6f62
--- /dev/null
+++ b/doc/tgt-admin.8.xml
@@ -0,0 +1,336 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<refentry id="tgt-admin.8">
+
+<refmeta>
+	<refentrytitle>tgt-admin</refentrytitle>
+	<manvolnum>8</manvolnum>
+</refmeta>
+
+
+<refnamediv>
+	<refname>tgt-admin</refname>
+	<refpurpose>Linux SCSI Target Configuration Tool</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+	<cmdsynopsis>
+		<command>tgtadm</command>
+		<arg choice="opt">-e --execute</arg>
+		<arg choice="opt">--delete &lt;value&gt;</arg>
+		<arg choice="opt">--offline &lt;value&gt;</arg>
+		<arg choice="opt">--ready &lt;value&gt;</arg>
+		<arg choice="opt">-s --show</arg>
+		<arg choice="opt">-c --conf &lt;file&gt;</arg>
+		<arg choice="opt">--ignore-errors</arg>
+		<arg choice="opt">-f --force</arg>
+		<arg choice="opt">-p --pretend</arg>
+		<arg choice="opt">--dump</arg>
+		<arg choice="opt">-v --verbose</arg>
+		<arg choice="opt">-h --help</arg>
+	</cmdsynopsis>
+	
+</refsynopsisdiv>
+
+  <refsect1><title>DESCRIPTION</title>
+    <para>
+       tgt-admin  is a utility which allows a persistent configuration of targets and luns.
+       It uses tgtadm commands to create, delete and show targets.
+    </para>
+  </refsect1>
+
+
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <variablelist>
+
+      <varlistentry><term><option>-e, --execute</option></term>
+        <listitem>
+          <para>
+            Read /etc/tgt/targets.conf and execute tgtadm commands.
+            If the  target  already  exists,  it  won't  be  processed.
+	    See --update.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>-d, --delete &lt;value&gt;</option></term>
+        <listitem>
+          <para>
+            Delete all or selected targets.
+            The  target  will be deleted only if it's not used (no initiator
+            is connected to it).
+          </para>
+          <para>
+	    If you want to delete targets which are in use, you have to add
+            the "--force" flag.
+	      <screen format="linespecific">
+Example usage:
+    --delete ALL            - delete all targets
+    --delete tid=4          - delete target 4
+                              (target with tid 4)
+    --delete iqn.2008-08.com.example:some.target
+                            - delete this target
+	      </screen>
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>--offline</option></term>
+        <listitem>
+          <para>
+              Put all or selected targets in offline state.
+	      <screen format="linespecific">
+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
+	      </screen>
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>--ready</option></term>
+        <listitem>
+          <para>
+            Put all or selected targets in ready state.
+	    <screen format="linespecific">
+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
+	    </screen>
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>--update &lt;value&gt;</option></term>
+        <listitem>
+          <para>
+            Update all or selected targets.
+            The  target  will be updated only if it's not used (no initiator
+            is connected to it).
+          </para>
+          <para>
+            If you want to update targets which are in use, you have to  add
+            "--force" flag.
+	    <screen format="linespecific">
+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
+	    </screen>
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>-s, --show</option></term>
+        <listitem>
+          <para>
+	    Show all the targets.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>-c, --conf &lt;configuration file&gt;</option></term>
+        <listitem>
+          <para>
+            Specify an alternative configuration file instead of
+            /etc/tgt/target.conf, which is the default.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>--ignore-errors</option></term>
+        <listitem>
+          <para>
+	    Continue even if tgtadm exits with non-zero code.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>-f, --force</option></term>
+        <listitem>
+          <para>
+	    Force some operations even if the target is in use.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>-p, --pretend</option></term>
+        <listitem>
+          <para>
+	    Only print tgtadm options which would be used; don't execute any
+            actions.
+            Assumes -v.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>--dump</option></term>
+        <listitem>
+          <para>
+	    Dump current tgtd configuration. Note: does not include detailed
+            parameters, like write caching.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>-v, --verbose</option></term>
+        <listitem>
+          <para>
+	    Increase verbosity (show tgtadm commands used).
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>-h, --help</option></term>
+        <listitem>
+          <para>
+	    Display a list of available options and exit.
+          </para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+  <refsect1><title>CONFIGURATION FILE SYNTAX</title>
+    <para>
+       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.
+    </para>
+
+    <variablelist>
+
+      <varlistentry><term><option>backing-store</option></term>
+        <listitem>
+          <para>
+	    Defines a virtual device on the target.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>direct-store</option></term>
+        <listitem>
+          <para>
+	    Defines a direct mapped device with the same properties
+	    as the physical device (such as VENDOR_ID, SERIAL_NUM, etc.)
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>initiator-address</option></term>
+        <listitem>
+          <para>
+	    Allows connections only from the specified IP
+	    address. Defaults to ALL if no "initiator-address" is specified.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>incominguser</option></term>
+        <listitem>
+          <para>
+	    Define iscsi incoming authentication setting. If no
+	    "incominguser" is specified, it is not used.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>outgoinguser</option></term>
+        <listitem>
+          <para>
+	    Define iscsi outgoing authentication setting. If no
+	    "outgoinguser" is specified, it is not used.
+          </para>
+        </listitem>
+	<screen format="linespecific">
+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;
+	</screen>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+
+  <refsect1><title>FILES</title>
+    <variablelist>
+
+      <varlistentry><term><option>/etc/tgt/targets.conf</option></term>
+        <listitem>
+          <para>
+	    Configuration file for tgt-admin.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term><option>/usr/share/doc/tgt/targets.conf.example</option></term>
+        <listitem>
+          <para>
+	    Example configuration file for tgt-admin.
+          </para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+
+  <refsect1><title>SEE ALSO</title>
+    <para>
+      tgtd(8), tgtadm(8), tgtimg(8), tgt-setup-lun(8).
+      <ulink url="http://stgt.sourceforge.net/"/>
+    </para>
+  </refsect1>
+
+  <refsect1><title>REPORTING BUGS</title>
+    <para>
+      Report bugs to &lt;stgt@xxxxxxxxxxxxxxx&gt;
+    </para>
+  </refsect1>
+
+</refentry>
-- 
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