Fibre Channel over Ethernet/configFS

From Linux-iSCSI

Jump to: navigation, search
LIO Target
Logo
Cisco Systems
FCoE fabric module
Original author(s) Joe Eykholt
Kiran Patil
Developer(s) Cisco Systems, Inc.
Initial release May 19, 2010 (2010-05-19)
Stable release 3.5.0 / September 19, 2010;
19 months ago
 (2010-09-19)
Preview release 4.1.0-rc1 / February 21, 2011;
14 months ago
 (2011-02-21)
Development status Production
Written in C
Operating system Linux
Type Fabric module
License GNU General Public License
Website cisco.com
See Target for a complete overview over all fabric modules.

Fibre_Channel_over_Ethernet/configFS (FCoE/configFS) describes the configFS kernel interface for the FCoE fabric module. ConfigFS is a RAM-based virtual file system provided by the 2.6 Linux kernel, originally based on sysfs code and developed as a hybrid control mechanism for OCFS2.

Contents

Introduction

To setup an FCoE Target, targetcli (from RisingTide Systems) should be used. targetcli is a comprehensive, powerful easy storage management tool that can efficiently handle complex LIO Target installations.

This page describes the resulting low-level user-space configuration of the FCoE configFS object tree. ConfigFS uses symbolic links for inter- and intra-modules configuration, and the FCoE fabric module is mapped into configFS at /sys/kernel/config/target/fc/. A $FABRIC shell variable is defined to point to the FCoE root:

export FABRIC=/sys/kernel/config/target/fc/

Setup

The basic setup procedure and script currently looks like this. The configFS setup calls are broken out into four different sections:

# Setup pointers
export CONFIGFS=/sys/kernel/config/
export TARGET=/sys/kernel/config/target/core/
export FABRIC=/sys/kernel/config/target/fc/

# Create the '20:00:' prefixed FCoE Lport from network inteface eth0
mkdir -p $FABRIC/20:00:00:e0:81:c0:90:b3/tpgt_1/lun/lun_0

# Chdir and create tcm_fc_port from TCM FILEIO object
cd $FABRIC/20\:00\:00\:e0\:81\:c0\:90\:b3/tpgt_1/lun/lun_0/
ln -s $TARGET/fileio_0/myfile/ tcm_fc_port

# Chdir and created '20:00' prefixed Initiator WWPN from it's own network interface
cd ../../
mkdir -p acl/20:00:00:e0:81:c0:90:b2/lun_0
cd acl/20\:00\:00\:e0\:81\:c0\:90\:b2/lun_0

# Create explict MappedLUN=0 for NodeACl to TPG LUN 0
ln -s $FABRIC/20\:00\:00\:e0\:81\:c0\:90\:b3/tpgt_1/lun/lun_0/ lun_0

Object tree

Here is the tree configFS output of a running FCoE target from /sys/kernel/config/target/fc/:

target# tree /sys/kernel/config/target/fc/
/sys/kernel/config/target/fc/
|-- 20:00:00:e0:81:c0:90:b3
|   `-- tpgt_1
|       |-- acl
|       |   `-- 20:00:00:e0:81:c0:90:b2
|       |       |-- auth
|       |       |   |-- node_name
|       |       |   `-- port_name
|       |       `-- lun_0
|       |           `-- lun_0 -> ../../../../../../../target/fc/20:00:00:e0:81:c0:90:b3/tpgt_1/lun/lun_0
|       `-- lun
|           `-- lun_0
|               |-- alua_tg_pt_gp
|               |-- alua_tg_pt_offline
|               |-- alua_tg_pt_status
|               |-- alua_tg_pt_write_md
|               `-- tcm_fc_port -> ../../../../../../target/core/fileio_0/myfile
`-- version
10 directories, 7 files

Kernel ring buffer

An example for the Target side kernel ring buffer output by dmesg is:

[  176.370130] <<<<<<<<<<<<<<<<<<<<<< BEGIN FABRIC API >>>>>>>>>>>>>>>>>>>>>>
[  176.371205] Initialized struct target_fabric_configfs: ffff88003787b800 for fc
[  176.372739] <<<<<<<<<<<<<<<<<<<<<< END FABRIC API >>>>>>>>>>>>>>>>>>>>>>
[  180.529964] Target_Core_ConfigFS: REGISTER -> group: ffffffffa02b9480 name: fc
[  180.531086] Target_Core_ConfigFS: REGISTER -> Located fabric: fc
[  180.531803] Target_Core_ConfigFS: REGISTER -> ffffffffa0366f70
[  180.532506] Target_Core_ConfigFS: REGISTER -> Allocated Fabric: fc
[  180.532921] Target_Core_ConfigFS: REGISTER -> Set tf->tf_fabric for fc
[  180.532921] TARGET_CORE[fc]: Allocated Normal se_portal_group_t for endpoint: 20:00:00:e0:81:c0:90:b3, Portal Tag: 1
[  188.053789] fileio/fc: Adding to default ALUA Target Port Group: alua/default_tg_pt_gp
[  188.054913] fc_TPG[1]_LUN[0] - Activated fc Logical Unit from CORE HBA: 1
[  211.862437] fc_TPG[1] - Added ACL with TCQ Depth: 32 for fc Initiator Node: 20:00:00:e0:81:c0:90:b2
[  219.960620] fc_TPG[1]_LUN[0->0] - Added RW ACL for  InitiatorNode: 20:00:00:e0:81:c0:90:b2

See also

External links

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Google AdSense