On 10/28/10 7:55 AM, Jansen, Frank wrote:
> Greetings,
> 
> My understanding is that OpenFCoE is integrating with TCM/LIO.  
> I have been looking for details on how I would configure an FCoE SW
> target with TCM/LIO, but am stymied.  Can anyone provide a pointer?

I'm copying the linux-iscsi-target-dev group.

If you grab the TCM/LIO 4.0 branch from their git tree, it does have
libfc with target patches and the tcm_fc module that connects libfc to TCM.

The config option is TCM_FC.

Here's a shell script I used long ago to start the target, which might give you 
some
guidance, but it isn't really adequate.  It might be a bit out of date with
respect to TCM changes, so it may no longer work, but hopefully is useful.
A README should be developed.

#! /bin/sh

T=/sys/kernel/config/target
FC=$T/fc

LPORT_eth0=20:00:00:1b:21:6b:48:ee    # target ports WWPN
LPORT=$LPORT_eth0
INIT_PORT=20:00:00:1b:21:6b:4d:32     # initiator's WWPN

RAMDISK=rd_dr_2/jre2                 # file containing ram disk image
RD=$T/core/$RAMDISK
LP=$FC/$LPORT
TPG=$LP/tpgt_1
LUN=$TPG/lun/lun_0
ACL=$TPG/acls/$INIT_PORT
LACL=$ACL/lun_0

dmesg -n 8
modprobe tcm_fc
if [ ! -d $T ]
then
        mount -t configfs /dev/null /sys/kernel/config
fi
if [ ! -d $T ]
then
        echo "configfs not present" >&2
        exit 1
fi
echo 0 > /sys/module/tcm_fc/parameters/debug_logging

mkdir -p $LUN

if [ ! -d $RD ]
then
        tcm_node --ramdisk $RAMDISK 1024

        while [ ! -d "$RD" ]
        do
                echo "waiting for tcm to setup ramdisk"
                sleep 1
        done
fi

set -x
ln -s $RD $LUN
mkdir -p $ACL
mkdir -p $LACL
ln -s $LUN $LACL


--- end ---
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to