Fibre Channel over Ethernet

The Linux SCSI Target Wiki

Revision as of 00:34, 20 March 2010 by Admin (Talk | contribs)
Jump to: navigation, search

As of March 19th, the TCM based target fabric module in lio-core-2.6.git/tcm_fc has been committed into lio-core-2.6.git/master as LIO v3.4.0-rc1..!

100% of logic for v3.x Target_Core_Mod/ConfigFS Persistent_Reservations and ALUA is now running in multi-fabric mode between and across LIO-Target TCM_Loop and OpenFCoE SCSI Ports..!

This would not have been possible without the tremendous contributions of tcm_fc by Joe Eykholt and his ongoing work of making libfc target capable. Thanks Joe!

The tcm_fc fabric module is based on the target code and has been modified to run using a modified upstream Linux libfc module.

This includes a patch series to reenable Point to Point module for libfc (which have been merged upstream), and a set of hooks into libfc to be able to hand off incoming FLOGI requests to FC based target modules.

The tcm_fc fabric module is using the configfs interface in /sys/kernel/config/target/fc. Note that there is NO strict open-fcoe userspace code requirement in order to get up and running.;a=tree;f=drivers/target/tcm_fc;hb=HEAD

 # Create the '20:00:' prefixed FCoE Lport from network inteface eth0
 mkdir -p /sys/kernel/config/target/fc/20:00:00:e0:81:c0:90:b3/tpgt_1/lun/lun_0
 # Chdir and create tcm_fc_port from TCM FILEIO object
 cd /sys/kernel/config/target/fc/20\:00\:00\:e0\:81\:c0\:90\:b3/tpgt_1/lun/lun_0/
 ln -s /sys/kernel/config/target/core/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 /sys/kernel/config/target/fc/20\:00\:00\:e0\:81\:c0\:90\:b3/tpgt_1/lun/lun_0/ lun_0

Here is what a running configuration looks like from /sys/kernel/config/target/fc/

target# tree /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

Next, load the fcoe module and create an association to the matching LPORT interface configured with tcm_fc:

 modprobe fcoe ; echo eth0 > /sys/module/fcoe/parameters/create
Personal tools
Google AdSense