Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and iSCSI Target Stack on v2.6.27-rc7

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nicholas A. Bellinger
Date: Thursday, October 2, 2008 - 2:29 pm

On Thu, 2008-10-02 at 21:00 +0400, Vladislav Bolkhovitin wrote:

The the Initiator Port ACLs need to go
under /sys/kernel/config/target/$FABRIC because the struct fabric_acl *
will always contain fabric dependent config items.  For example, Since
these struct fabric_acl_t do *NOT* symlink directly back to
target_core_mod under /sys/kernel/config/target/core/$HBA/$DEV, but to
fabric_lun_t (iscsi_lun_t in my case) to Symlink to
a /sys/kernel/config/target/core/$HBA/$DEV that has been registered with
the generic target configfs infrastructure.

Here is what I am thinking wrt /sys/kernel/config/target/iscsi and iSCSI
Initiator Node ACLs to iSCSI Portal Groups and iSCSI LUNs attached to
those Portal Groups.  There are two cases:

*) The production case with with user creating those ACLs under $FABRIC
(which is what I will focus on now).

* And "Demo Mode" case where any Initiator logging into
$FABRIC/$ENDPOINT/$PORTAL can have access to all
$FABRIC/$ENDPOINT/lun/lun_*/*my_ports*

The production ACL case would look like:

export CONFIGFS=/sys/kernel/config/
export TARGET=/sys/kernel/config/target/core/
export FABRIC=/sys/kernel/config/target/iscsi/

TARGET_IQN=iqn.2003-01.org.linux-iscsi.ps3-cell.ppc64:sn.f8f651bd5fec
INITIATOR_IQN=iqn.1993-08.org.debian:01.f82074ca555f

<Setup $STORAGE_OBJECTs under $TARGET>

# Create the LIO-target endpoint
mkdir -p "$FABRIC/$TARGET_IQN/tpgt_1/np/172.16.201.137:3260"
mkdir -p "$FABRIC/$TARGET_IQN/tpgt_1/lun/lun_0"

<Setup Port Symlinks from $TARGET to $TARGET_IQN/tpgt_1/lun/lun_0>

# Create the Initiator ACL under $TARGET_IQN/tpgt_1
mkdir -p $"FABRIC/$TARGET_IQN/tpgt_1/initiators/$INITIATOR_IQN"
# Allow $INITIATOR_IQN access to tpgt_1/lun/lun_0/
ln -s "$FABRIC/$TARGET_IQN/tpgt_1/lun/lun_0" \
	"$FABRIC/$TARGET_IQN/tpgt_1/initiators/$INITIATOR_IQN/lun_0"

can simply use use:

cat $FABRIC/iqn*/tpgt*/initiators/*/session

to see which acl'ed iSCSI Initiators are logged in on all iSCSI Target
Ports.

Also I should add that I am currently using /proc/scsi_target/mib
and /proc/iscsi_target_mib for READ-ONLY data with target_core_mod.ko
and iscsi_target_mod.ko respectively.  For the other "Demo Mode" case
mentioned above, I am currently using /proc/iscsi_target/mib/sess_attr
to see the active sessions for LIO-Target.

I will be implementing this model over the next days..  I will post the
commit once its up and you can have a look..

--nab


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[ANNOUNCE]: ConfigFS enabled Generic Target Mode and iSCSI ..., Nicholas A. Bellinger, (Mon Sep 29, 12:21 pm)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Vladislav Bolkhovitin, (Wed Oct 1, 10:36 am)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Nicholas A. Bellinger, (Wed Oct 1, 5:18 pm)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Nicholas A. Bellinger, (Wed Oct 1, 5:24 pm)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Nicholas A. Bellinger, (Wed Oct 1, 5:32 pm)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Vladislav Bolkhovitin, (Thu Oct 2, 10:00 am)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Nicholas A. Bellinger, (Thu Oct 2, 2:29 pm)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Nicholas A. Bellinger, (Fri Oct 3, 4:14 pm)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Vladislav Bolkhovitin, (Tue Oct 7, 2:56 am)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Nicholas A. Bellinger, (Tue Oct 7, 1:50 pm)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Nicholas A. Bellinger, (Wed Oct 8, 12:22 am)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Vladislav Bolkhovitin, (Fri Oct 10, 10:48 am)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Vladislav Bolkhovitin, (Fri Oct 10, 10:49 am)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Nicholas A. Bellinger, (Fri Oct 10, 1:41 pm)
Re: [ANNOUNCE]: ConfigFS enabled Generic Target Mode and i ..., Vladislav Bolkhovitin, (Tue Oct 21, 11:11 am)