From f27273d83fdcaca9cb68c7ecd0cd024d2a1d08d9 Mon Sep 17 00:00:00 2001
From: Ronnie Sahlberg
Date: Sun, 4 Apr 2010 07:39:12 +1000
Subject: [PATCH] Use tgtimg to create the mediafiles for DVD in the examples
in both README.mmc and the tgtadm manpage
Signed-off-by: Ronnie Sahlberg
---
doc/README.mmc | 8 ++++----
doc/htmlpages/tgtadm.8.html | 12 ++++++------
doc/manpages/tgtadm.8 | 10 +++++-----
doc/tgtadm.8.xml | 6 +++---
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/doc/README.mmc b/doc/README.mmc
index 7d77ddb..808c0d6 100644
--- a/doc/README.mmc
+++ b/doc/README.mmc
@@ -63,7 +63,7 @@ tgtadm --lld iscsi --mode target --op new --tid 1 -T iqn.2007-03:virtual-dvd:`ho
# Create an empty file that will represent a writeable DVD+R disk
rm -rf /tmp/empty-disk.iso
-touch /tmp/empty-disk.iso
+tgtimg --op new --device-type cd --type dvd+r --file /tmp/empty-disk.iso
# Create LUN - CD/ROM
tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b /tmp/empty-disk.iso --device-type=cd
@@ -93,7 +93,7 @@ tgtadm --tid 1 --lun 1 --op update --mode logicalunit --name online --value No
# In this example we just swap it to another blank DVD+R disk.
#
rm -rf /tmp/empty-disk2.iso
-touch /tmp/empty-disk2.iso
+tgtimg --op new --device-type cd --type dvd+r --file /tmp/empty-disk2.iso
tgtadm --tid 1 --lun 1 --op update --mode logicalunit --name path --value /tmp/empty-disk2.iso
# note: when we updated the device to a new bakend storage file the device
@@ -148,11 +148,11 @@ tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 2 --params eleme
# Add 'media' to slots 1 and 2 and leave the other 6 slots empty
# slot 1
-touch ${VTL}/DISK_001
+tgtimg --op new --device-type cd --type dvd+r --file ${VTL}/DISK_001
tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 2 --params element_type=2,address=1024,barcode=DISK_001,sides=1
# slot 2
-touch ${VTL}/DISK_002
+tgtimg --op new --device-type cd --type dvd+r --file ${VTL}/DISK_002
tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 2 --params element_type=2,address=1025,barcode=DISK_002,sides=1
# Allow ALL initiators to connect to this target
diff --git a/doc/htmlpages/tgtadm.8.html b/doc/htmlpages/tgtadm.8.html
index 86c11bf..287942a 100644
--- a/doc/htmlpages/tgtadm.8.html
+++ b/doc/htmlpages/tgtadm.8.html
@@ -152,12 +152,12 @@ tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 2 --params eleme
# Add 'media' to slots 1 and 2 and leave the other 6 slots empty
# slot 1
-# Create/"touch" empty writeable virtual DVD-R media
-touch ${VTL}/DISK_001
+# Create empty writeable virtual DVD-R media
+tgtimg --op new --device-type cd --type dvd+r --file ${VTL}/DISK_001
tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 2 --params element_type=2,address=1024,barcode=DISK_001,sides=1
# slot 2
-touch ${VTL}/DISK_002
+tgtimg --op new --device-type cd --type dvd+r --file ${VTL}/DISK_002
tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 2 --params element_type=2,address=1025,barcode=DISK_002,sides=1
# Allow ALL initiators to connect to this target
@@ -193,7 +193,7 @@ Slot types:
To assign a media image file to a storage element slot,
you assign "barcode" to be the name of the image file in
the "media_home" directory.
-
iSNS PARAMETERS
iSNS configuration for a target is by using the tgtadm command.
Example:
@@ -220,9 +220,9 @@ tgtadm --op update --mode sys --name iSNSAccessControl -v Off
This setting specifies the port to use for iSNS.
iSNSAccessControl
Enable/disable access control for iSNS.
-
REPORTING BUGS
Report bugs to <stgt@vger.kernel.org>