[PATCH 1/2] Convert tgt-setup-lun manpage to docbook

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

 



Docbook is the authoritative source for tgt docs, and manpages (and html)
are generated from Docbook xml.

Signed-off-by: Andy Grover <agrover@xxxxxxxxxx>
---
 doc/Makefile            |   11 ++++-
 doc/tgt-setup-lun.8.xml |  114 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 123 insertions(+), 2 deletions(-)
 create mode 100644 doc/tgt-setup-lun.8.xml

diff --git a/doc/Makefile b/doc/Makefile
index 0a822a6..791f887 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -9,10 +9,11 @@ DOCS = README.iscsi README.iser \
 
 XSLTPROC = /usr/bin/xsltproc
 XMLMAN = manpages/tgtd.8 manpages/tgtadm.8 manpages/tgtimg.8 \
-		manpages/tgt-admin.8 manpages/targets.conf.5
+		manpages/tgt-admin.8 manpages/targets.conf.5 \
+		manpages/tgt-setup-lun.8
 XMLHTML = htmlpages/tgtd.8.html htmlpages/tgtadm.8.html \
 		htmlpages/tgtimg.8.html htmlpages/tgt-admin.8.html \
-		htmlpages/targets.conf.5.html
+		htmlpages/targets.conf.5.html htmlpages/tgt-setup-lun.8.html
 
 .PHONY:all
 all: xmlman xmlhtml
@@ -59,6 +60,12 @@ manpages/targets.conf.5: targets.conf.5.xml
 htmlpages/targets.conf.5.html: targets.conf.5.xml
 	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
 
+manpages/tgt-setup-lun.8: tgt-setup-lun.8.xml
+	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+htmlpages/tgt-setup-lun.8.html: tgt-setup-lun.8.xml
+	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
+
 xmlman: $(XMLMAN)
 
 xmlhtml: $(XMLHTML)
diff --git a/doc/tgt-setup-lun.8.xml b/doc/tgt-setup-lun.8.xml
new file mode 100644
index 0000000..2d97334
--- /dev/null
+++ b/doc/tgt-setup-lun.8.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<refentry id="tgt-setup-lun.8">
+
+<refmeta>
+	<refentrytitle>tgt-setup-lun</refentrytitle>
+	<manvolnum>8</manvolnum>
+</refmeta>
+
+<refnamediv>
+  <refname>tgt-setup-lun</refname>
+  <refpurpose>
+    Helper script that creates a target, adds a device to the target, and defines
+    initiators that can connect to the target
+  </refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+  <cmdsynopsis>
+    <command>tgt-setup-lun</command>
+    <arg choice="plain">-d &lt;device&gt;</arg>
+    <arg choice="plain">-n &lt;targetname&gt;</arg>
+    <arg choice="opt">-b &lt;bsname&gt;</arg>
+    <arg choice="opt">-t &lt;transport&gt;</arg>
+    <arg choice="opt" rep="repeat">initiator_IP</arg>
+    <arg choice="opt">-h</arg>
+  </cmdsynopsis>
+</refsynopsisdiv>
+
+<refsect1><title>DESCRIPTION</title>
+  <para>
+    Creates a target according to the supplied target_name. tgtd must
+    be running. The format of the default IQN generated from the target name is:
+    "iqn.2001-04.com.&lt;hostname&gt;-&lt;target_name&gt;", or a
+    complete IQN may be given.
+    The target name must be unique.
+  </para>
+  <para>
+    The script then adds the requested device to the target. If specific IP
+    addresses are defined, it adds them to the list of allowed initiators
+    for that target. If no IP addresses is defined, it defines that the
+    target accepts any initiator.
+  </para>
+</refsect1>
+
+<refsect1>
+  <title>EXAMPLES</title>
+  
+  <informalexample>
+    <para>
+      Create a target that uses /dev/sdb1 and allows connections only from
+      192.168.10.81:
+    </para>
+    <screen>
+      tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81
+    </screen>
+  </informalexample>
+
+  <informalexample>
+    <para>
+      Create a target that uses /dev/sdb1 and allows connections only from
+      192.168.10.81 and 192.168.10.82:
+    </para>
+    <screen>
+      tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81 192.168.10.82
+    </screen>
+  </informalexample>
+
+  <informalexample>
+    <para>
+      Create a target that uses /dev/sdb1 and allows connections from any
+      initiator:
+    </para>
+    <screen>
+      tgt-setup-lun -d /dev/sdb1 -n my_target
+    </screen>
+  </informalexample>
+
+  <informalexample>
+    <para>
+      Display help:
+    </para>
+    <screen>
+      tgt-setup-lun -h
+    </screen>
+  </informalexample>
+
+</refsect1>
+
+<refsect1><title>AUTHOR</title>
+  <para>
+    Written by Erez Zilber
+  </para>
+</refsect1>
+
+<refsect1><title>SEE ALSO</title>
+  <para>
+    targets.conf(5), tgtd(8), tgtadm(8), tgtimg(8), tgt-admin(8).
+    <ulink url="http://stgt.sourceforge.net/"/>
+  </para>
+</refsect1>
+
+<refsect1><title>REPORTING BUGS</title>
+  <para>
+    Report bugs to &lt;stgt@xxxxxxxxxxxxxxx&gt;
+  </para>
+</refsect1>
+
+<refsect1><title>COPYRIGHT</title>
+  <para>
+    Copyright © Voltaire Ltd. 2008.
+  </para>
+</refsect1>
+
+</refentry>
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux