[stgt] RFC [patch] v2 README.passthrough

Mark Harvey markh794 at gmail.com
Fri Aug 6 11:37:28 CEST 2010


As I'm not good with documentation, this is one version that may be 
suitable.

This one is based on README.fcoe. The other patch is based on README.iscsi.

I'm happy to accept any comments on either version as to which one is 
more suitable
and what sort of modifications / edits are required to get it to a 
suitable format.

>From 4d9e24c9c63af89c39ef6b95c4ff90fc209dc1e2 Mon Sep 17 00:00:00 2001
From: Mark Harvey <markh794 at gmail.com>
Date: Fri, 6 Aug 2010 17:22:37 +1000
Subject: Initial documentation for setting up passghrough mode

Format based on README.fcoe

Signed-off-by: Mark Harvey <markh794 at gmail.com>
---
 doc/README.passthrough |   53 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/doc/README.passthrough b/doc/README.passthrough
new file mode 100644
index 0000000..4884046
--- /dev/null
+++ b/doc/README.passthrough
@@ -0,0 +1,53 @@
+Configure target's logical units as 'passthrough' to real devices.
+
+1. Preparation
+Compile tgtd & tgtadm as per instructions for SCSI transport of choice.
+
+e.g. for iSCSI
+fujita at host:~/git/tgt/usr$ make ISCSI=1
+
+
+2. Starting the daemon
+
+host:~/tgt# ./usr/tgtd
+
+
+
+3. Configuration
+
+You need to setup a target and luns as you do with other target
+drivers. There is no special hack for the passthrough module.
+
+To setup a logical unit for passthrough operation, three options are required:
+ - Specify device type as passthruough
+                      "--device-type=pt"
+ - Backing store type is the '/dev/sg' paths
+                      "--bstype=sg"
+ - Backing store path to use
+                     "-b /dev/sg4"
+
+
+Here's a simple example:
+
+Setup an iSCSI target:
+host:~/tgt# ./usr/tgtadm --lld iscsi --op new --mode target \
+	--tid 1 -T iqn.2001-04.com.example:storage.vtl.amiens.sys1.xyz
+
+Define LUN 1 connected through to /dev/sg4
+host:~/tgt# ./usr/tgtadm --lld iscsi --op new --mode logicalunit \
+	--tid 1 --lun 1 --device-type=pt --bstype=sg -b /dev/sg4
+
+Now allow all initiators to connect
+host:~/tgt# ./usr/tgtadm --lld iscsi --op bind --mode target \
+	--tid 1 -I ALL
+
+
+4. Shutting down the daemon
+host:~/tgt# tgtadm --op unbind --mode target --tid 1 -I ALL
+host:~/tgt# tgtadm --op delete --mode conn --tid 1
+host:~/tgt# tgtadm --op delete --mode target --tid 1
+host:~/tgt# tgtadm --op delete --mode system
+
+
+Enjoy!
+
-- 
1.6.3.3



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



More information about the stgt mailing list