Files
scst/fcst
Yan Burman 20a36529b9 Merged revisions 5906-5909,5911,5915-5927,5930 via svnmerge from
svn+ssh://yanb123@svn.code.sf.net/p/scst/svn/branches/3.0.x

........
  r5906 | bvassche | 2014-12-03 19:12:20 +0200 (Wed, 03 Dec 2014) | 1 line
  
  Update for kernel 3.17 (merge r5882 from trunk)
........
  r5907 | bvassche | 2014-12-03 19:13:06 +0200 (Wed, 03 Dec 2014) | 1 line
  
  Add kernel 3.17 build infrastructure (merge r5883 from trunk)
........
  r5908 | bvassche | 2014-12-03 19:14:42 +0200 (Wed, 03 Dec 2014) | 1 line
  
  scripts: Merge 5827:5907 from trunk
........
  r5909 | bvassche | 2014-12-03 19:41:09 +0200 (Wed, 03 Dec 2014) | 1 line
  
  Build fixes for RHEL 6.6 kernel 2.6.32-504 (merge r5908 from trunk)
........
  r5911 | bvassche | 2014-12-04 14:14:44 +0200 (Thu, 04 Dec 2014) | 1 line
  
  scripts/generate-kernel-patch: Swap two filters (merge r5910 from trunk)
........
  r5915 | bvassche | 2014-12-05 12:01:49 +0200 (Fri, 05 Dec 2014) | 1 line
  
  iscsi-scst/kernel/patches/rhel/put_page_callback-2.6.32-504.patch: Add (merge r5904 from trunk)
........
  r5916 | bvassche | 2014-12-05 12:22:05 +0200 (Fri, 05 Dec 2014) | 1 line
  
  nightly: Merge r5720:5915 from trunk
........
  r5917 | bvassche | 2014-12-05 12:30:54 +0200 (Fri, 05 Dec 2014) | 1 line
  
  scst_lib: Fix READ POSITION parsing (merge r5740 from trunk)
........
  r5918 | bvassche | 2014-12-05 12:33:22 +0200 (Fri, 05 Dec 2014) | 1 line
  
  scst: Clean up __scst_resume_activity() (merge r5589 from trunk)
........
  r5919 | bvassche | 2014-12-05 12:49:20 +0200 (Fri, 05 Dec 2014) | 1 line
  
  scstadmin regression tests: Merge r5475:5915 from trunk
........
  r5920 | bvassche | 2014-12-05 12:50:41 +0200 (Fri, 05 Dec 2014) | 1 line
  
  scstadmin: Sync saved configuration files (merge r5793 from trunk)
........
  r5921 | bvassche | 2014-12-05 12:57:03 +0200 (Fri, 05 Dec 2014) | 1 line
  
  ib_srpt: Speed up kernel driver unloading after a cable pull (merge r5727 from trunk)
........
  r5922 | bvassche | 2014-12-05 14:24:23 +0200 (Fri, 05 Dec 2014) | 1 line
  
  scst_local: Avoid that session deletion triggers a kernel warning (merge r5601 and 5631 from trunk)
........
  r5923 | bvassche | 2014-12-05 14:25:46 +0200 (Fri, 05 Dec 2014) | 1 line
  
  scst_local: Set max_id to 1 (merge r5786 from trunk)
........
  r5924 | bvassche | 2014-12-05 14:55:32 +0200 (Fri, 05 Dec 2014) | 1 line
  
  scst: Add 64-bit LUN support (kernel 3.17 - merge r5587 from trunk)
........
  r5925 | bvassche | 2014-12-05 14:56:59 +0200 (Fri, 05 Dec 2014) | 1 line
  
  scst_local: Add 64-bit LUN support (kernel 3.17 - merge r5588 from trunk)
........
  r5926 | bvassche | 2014-12-05 14:59:32 +0200 (Fri, 05 Dec 2014) | 1 line
  
  scst: Remove unused variables (merge r5585 from trunk)
........
  r5927 | bvassche | 2014-12-05 15:01:57 +0200 (Fri, 05 Dec 2014) | 1 line
  
  scst: Avoid complaints about unused variables (merge r5600 from trunk)
........
  r5930 | bvassche | 2014-12-09 14:34:50 +0200 (Tue, 09 Dec 2014) | 1 line
  
  rpm build: Add support for qla2x00t driver in QLogic git repository (merge r5929 from trunk)
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x-iser@5992 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 09:11:06 +00:00
..
2011-07-10 11:04:49 +00:00

About fcst
==========

The fcst kernel module implements an SCST target driver for the FCoE protocol.
FCoE or Fibre Channel over Ethernet is a protocol that allows to communicate
fibre channel frames over an Ethernet network. Since the FCoE protocol
requires a lossless Ethernet network, special network adapters and switches
are required.  Ethernet network adapters that support FCoE are called
Converged Network Adapters (CNA). The standard that makes lossless Ethernet
communication possible is called DCB or Data Center Bridging.

Since FCoE frames are a kind of Ethernet frames, communication between FCoE
clients and servers is limited to a single Ethernet broadcast domain.


Building and Installing
=======================

FCST is a kernel module that depends on libfc and SCST to provide FC target
support.

To build for linux-2.6.34, do:

1. Get the kernel source:

	KERNEL=linux-2.6.34

	cd /usr/src/kernels
	URL_DIR=http://www.kernel.org/pub/linux/kernel/v2.6
	TARFILE=$KERNEL.tar.bz2
	wget -o $TARFILE $URL_DIR/$TARFILE
	tar xfj $TARFILE
	cd $KERNEL

2. Apply patches needed for libfc target hooks and point-to-point fixes:

	KDIR=/usr/src/kernels/$KERNEL
	PDIR=/usr/src/scst/trunk/fcst/linux-patches	# use your dir here

	cd $PDIR
	for patch in `grep -v '^#' series-2.6.34`
	do
		(cd $KDIR; patch -p1) < $patch
	done

3.  Apply SCST patches to the kernel
	See trunk/scst/README
	The readahead patches are not needed in 2.6.33 or later.

4.  Configure, make, and install your kernel

5.  Install SCST
	See trunk/scst/README. Make sure you are building sysfs SCST build,
	because FCST supports only it.  You need to do

		cd trunk/scst
		make
		make install

6.  Make FCST
	In the directory containing this README, just do
		make
		make install

7.  Install the FCoE admin tools, including dcbd and fcoeadm.
	Some distros may have these.
	You should be able to use the source at
	http://www.open-fcoe.org/openfc/downloads/2.6.34/open-fcoe-2.6.34.tar.gz

8.  Bring up SCST and configure the devices.

9.  Bring up an FCoE initiator (we'll enable target mode on it later):
	modprobe fcoe
	fcoeadm -c eth3

    The other end can be an initiator as well, in point-to-point mode
    over a full-duplex loss-less link (enable pause on both sides).
    Alternatively, the other end can be an FCoE switch.

10. Use fcc (part of the open-fcoe contrib tools in step 7) to see the
    initiator setup.  To get the FCoE port name for eth3

	# fcc
	FC HBAs:
	HBA       Port Name                Port ID   State     Device
	host4     20:00:00:1b:21:06:58:21  01:01:02  Online    eth3

	host4 Remote Ports:
	Path      Port Name                Port ID   State     Roles
	4:0-0     10:00:50:41:4c:4f:3b:00  01:01:01  Online    FCP Initiator

    In the above example, there's one local host on eth3, and it's in
    a point-to-point connection with the remote initiator with Port_id 010101.

11.  Load fcst

	modprobe fcst

12.  Add any disks (configured in step 8) you want to export
     Note that you must have a LUN 0.

	LPORT=20:00:00:1b:21:06:58:21		# the local Port_Name

	cd /sys/kernel/scst_tgt/targets/fcst/$LPORT
	echo add disk-name 0 > luns/mgmt
	echo add disk-name 1 > luns/mgmt

13.  Enable the initiator:

	echo 1 > $LPORT/enabled

14.  As a temporary workaround, you may need to reset the interface
     on the initiator side so it sees the SCST device as a target and
     discovers LUNs.  You can avoid this by bringing up the initiator last.