linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladislav Bolkhovitin <vst@vlnb.net>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: linux-iscsi-target-dev@googlegroups.com,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	Mike Christie <michaelc@cs.wisc.edu>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	iet-dev <iscsitarget-devel@lists.sourceforge.net>,
	Greg KH <greg@kroah.com>, Jerome Martin <tramjoe.merin@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	SCST-Devel <scst-devel@lists.sourceforge.net>,
	Joel Becker <joel.becker@oracle.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and	iSCSI	Target Stack on v2.6.27-rc7
Date: Fri, 10 Oct 2008 21:49:20 +0400	[thread overview]
Message-ID: <48EF95A0.5030405@vlnb.net> (raw)
In-Reply-To: <1223450521.15764.349.camel@haakon2.linux-iscsi.org>

Nicholas A. Bellinger wrote:
  > Ok, here is the commit:
> 
> http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=commit;h=d1dc1c1da8375c1b9099166d7d93f7f45477f892
> 
> In the example I am using two iSCSI Initiators (one Debian and one
> OpenSuse) that both have TPG LUN 0 and 1 mapped to their Initiator LUN 0
> and 1 under $FABRIC/$IQN/tpgt_1.
> 
> Here is what it looks like from the CLI:
> 
> export TARGET=/sys/kernel/config/target/core/
> export FABRIC=/sys/kernel/config/target/iscsi/
> 
> <Setup target_core_mod storage objects..>
> 
> DEF_IQN="iqn.2003-01.org.linux-iscsi.target.i686:sn.e475ed6fcdd0"
> 
> # The first mkdir(2) to $FABRIC will load iscsi_target_mod
> mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/np/172.16.201.137:3260"
> # Create TPG LUN 0 and symlink $STORAGE_OBJECT from target_core_mod
> mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_0"
> ln -s $TARGET/iblock_0/lvm_test0 "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_0/lio_west_port"
> # Create TPG LUN 1 and symlink $STORAGE_OBJECT from target_core_mod
> mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_1"
> ln -s $TARGET/pscsi_0/sdd "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_1/lio_east_port"
> 
> INITIATOR_DEBIAN="iqn.1993-08.org.debian:01:2dadf92d0ef"
> 
> # Create Node and two LUN ACL Symlinks for Debian Initiator
> mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/acls/$INITIATOR_DEBIAN/lun_0"
> ln -s "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_0" "$FABRIC/$DEF_IQN/tpgt_1/acls/$INITIATOR_DEBIAN/lun_0/."
> mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/acls/$INITIATOR_DEBIAN/lun_1"
> ln -s "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_1" "$FABRIC/$DEF_IQN/tpgt_1/acls/$INITIATOR_DEBIAN/lun_1/."
> 
> INITIATOR_SUSE="iqn.1996-04.de.suse:01:1661f9ee7b5"
> 
> # Create Node and two LUN ACL Symlinks for Suse Initiator
> mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/acls/$INITIATOR_SUSE/lun_0"
> ln -s "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_0" "$FABRIC/$DEF_IQN/tpgt_1/acls/$INITIATOR_SUSE/lun_0/."
> mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/acls/$INITIATOR_SUSE/lun_1"
> ln -s "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_1" "$FABRIC/$DEF_IQN/tpgt_1/acls/$INITIATOR_SUSE/lun_1/."
> 
> # Enable the $FABRIC endpoint so it can accept new iSCSI sessions.
> echo 1 > $FABRIC/$DEF_IQN/tpgt_1/enable
> 
> 
> And running....
> 
> 
> target:/sys/kernel/config# tree $FABRIC
> /sys/kernel/config/target/iscsi/
> |-- iqn.2003-01.org.linux-iscsi.target.i686:sn.e475ed6fcdd0
> |   `-- tpgt_1
> |       |-- acls
> |       |   |-- iqn.1993-08.org.debian:01:2dadf92d0ef
> |       |   |   |-- control
> |       |   |   |-- info
> |       |   |   |-- lun_0
> |       |   |   |   `-- lun_0 -> ../../../../../../../target/iscsi/iqn.2003-01.org.linux-iscsi.target.i686:sn.e475ed6fcdd0/tpgt_1/lun/lun_0
> |       |   |   `-- lun_1
> |       |   |       `-- lun_1 -> ../../../../../../../target/iscsi/iqn.2003-01.org.linux-iscsi.target.i686:sn.e475ed6fcdd0/tpgt_1/lun/lun_1
> |       |   `-- iqn.1996-04.de.suse:01:1661f9ee7b5
> |       |       |-- control
> |       |       |-- info
> |       |       |-- lun_0
> |       |       |   `-- lun_0 -> ../../../../../../../target/iscsi/iqn.2003-01.org.linux-iscsi.target.i686:sn.e475ed6fcdd0/tpgt_1/lun/lun_0
> |       |       `-- lun_1
> |       |           `-- lun_1 -> ../../../../../../../target/iscsi/iqn.2003-01.org.linux-iscsi.target.i686:sn.e475ed6fcdd0/tpgt_1/lun/lun_1
> |       |-- control
> |       |-- enable
> |       |-- lun
> |       |   |-- lun_0
> |       |   |   |-- control
> |       |   |   |-- info
> |       |   |   `-- lio_west_port -> ../../../../../../target/core/iblock_0/lvm_test0
> |       |   `-- lun_1
> |       |       |-- control
> |       |       |-- info
> |       |       `-- lio_east_port -> ../../../../../../target/core/pscsi_0/sdd
> |       `-- np
> |           `-- 172.16.201.137:3260
> |               `-- portal_info
> `-- lio_version
> 
> 20 directories, 12 files
> 
> Note that iSCSI Initiator LUN ACL Symlinks are done on a per TPGT
> context and are only allowed for TPG LUNs under the same
> $FABRIC/$IQN/$TPGT path.

I don't like that limitation. It looks completely artificial for me. And 
this approach doesn't address what to do if there is a connection from 
initiator, for which there is no corresponding ACL entry.

I again strongly suggest you to get familiar with SCST access control 
approach before making the next move. It's proved to be good and we 
should take all the best from it.

> --------------------------------------------------------------------------------
> 
> Dump information for all running iSCSI Sessons on all iSCSI Target
> endpoints..:
> 
> target:/sys/kernel/config# cat $FABRIC/iqn*/tpgt*/acls/*/info
> 
> InitiatorName: iqn.1993-08.org.debian:01:2dadf92d0ef
> InitiatorAlias: ubuntu
> LIO Session ID: 2   ISID: 0x00 02 3d 05 00 00  TSIH: 2  SessionType: Normal
> Cmds in Session Pool: 1  Session State: TARG_SESS_STATE_LOGGED_IN
> ---------------------[iSCSI Session Values]-----------------------
>   CmdSN/WR  :  CmdSN/WC  :  ExpCmdSN  :  MaxCmdSN  :     ITT    :     TTT
>  0x00000010   0x00000010   0x00000042   0x00000051   0x090a0040   0x000000e7
> ----------------------[iSCSI Connections]-------------------------
> CID: 0  Connection State: TARG_CONN_STATE_LOGGED_IN
>    Address 172.16.201.129 TCP  StatSN: 0x0000006c
> InitiatorName: iqn.1996-04.de.suse:01:1661f9ee7b5
> InitiatorAlias: opensuse
> LIO Session ID: 13   ISID: 0x00 02 3d 01 00 00  TSIH: 13  SessionType: Normal
> Cmds in Session Pool: 1  Session State: TARG_SESS_STATE_LOGGED_IN
> ---------------------[iSCSI Session Values]-----------------------
>   CmdSN/WR  :  CmdSN/WC  :  ExpCmdSN  :  MaxCmdSN  :     ITT    :     TTT
>  0x00000010   0x00000010   0x00000022   0x00000031   0x040a0000   0x00000003
> ----------------------[iSCSI Connections]-------------------------
> CID: 0  Connection State: TARG_CONN_STATE_LOGGED_IN
>    Address 172.16.201.136 TCP  StatSN: 0x00000003
> 
> 
> Anyways, you get the idea.  The primary functionality is up for getting
> ACLs iSCSI Initiator Nodes and LUNs symlinked to TPG LUNs symlinked to
> $STORAGE_OBJECTs from target_core_mod.   I will be continuing to convert
> stuff from the IOCTL, mostly things that need to be made into configfs
> attributes.  I am going to focus on the getting the remaining stuff
> under configfs up for iscsi_target_mod, and start looking at the much
> larger todo item of seeing how we can merge target_core_mod and scst
> core..  Please have a look and let me know what you think (espically the
> target_core_mod parts), and I will pull the latest SCST code and start
> looking at the FABRIC <-> TARGET you mentioned..
> 
> --nab
> 
> 


  reply	other threads:[~2008-10-10 17:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-29 19:21 [ANNOUNCE]: ConfigFS enabled Generic Target Mode and iSCSI Target Stack on v2.6.27-rc7 Nicholas A. Bellinger
2008-10-01 17:36 ` Vladislav Bolkhovitin
2008-10-02  0:24   ` Nicholas A. Bellinger
2008-10-02 17:00     ` Vladislav Bolkhovitin
2008-10-02 21:29       ` Nicholas A. Bellinger
2008-10-03 23:14         ` Nicholas A. Bellinger
2008-10-07  9:56         ` Vladislav Bolkhovitin
2008-10-07 20:50           ` Nicholas A. Bellinger
2008-10-08  7:22             ` Nicholas A. Bellinger
2008-10-10 17:49               ` Vladislav Bolkhovitin [this message]
2008-10-10 17:48             ` Vladislav Bolkhovitin
2008-10-10 20:41               ` Nicholas A. Bellinger
2008-10-21 18:11                 ` Vladislav Bolkhovitin
2008-10-02  0:18 ` Nicholas A. Bellinger
2008-10-02  0:32   ` Nicholas A. Bellinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48EF95A0.5030405@vlnb.net \
    --to=vst@vlnb.net \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=greg@kroah.com \
    --cc=hpa@zytor.com \
    --cc=iscsitarget-devel@lists.sourceforge.net \
    --cc=joel.becker@oracle.com \
    --cc=linux-iscsi-target-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=nab@linux-iscsi.org \
    --cc=scst-devel@lists.sourceforge.net \
    --cc=tramjoe.merin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).