Search

Chapter 32. Configuring a Fibre-Channel Over Ethernet Interface

download PDF
Setting up and deploying a Fibre-channel over Ethernet (FCoE) interface requires two packages:
  • fcoe-utils
  • lldpad
Once these packages are installed, perform the following procedure to enable FCoE over a virtual LAN (VLAN):

Procedure 32.1. Configuring an Ethernet interface to use FCoE

  1. Configure a new VLAN by copying an existing network script (e.g. /etc/fcoe/cfg-eth0) to the name of the Ethernet device that supports FCoE. This will provide you with a default file to configure. Given that the FCoE device is ethX, run:
    # cp /etc/fcoe/cfg-eth0  /etc/fcoe/cfg-ethX
    Modify the contents of cfg-ethX as necessary. Of note, DCB_REQUIRED should be set to no for networking interfaces that implement a hardware DCBX client.
  2. If you want the device to automatically load during boot time, set ONBOOT=yes in the corresponding /etc/sysconfig/network-scripts/ifcfg-ethX file. For example, if the FCoE device is eth2, then edit /etc/sysconfig/network-scripts/ifcfg-eth2 accordingly.
  3. Start the data center bridging daemon (dcbd) using the following command:
    # /etc/init.d/lldpad start
    
  4. For networking interfaces that implement a hardware DCBX client, skip this step and move on to the next.
    For interfaces that require a software DCBX client, enable data center bridging on the Ethernet interface using the following commands:
    # dcbtool sc ethX dcb on
    
    Then, enable FCoE on the Ethernet interface by running:
    # dcbtool sc ethX app:fcoe e:1
    

    Note

    These commands will only work if the dcbd settings for the Ethernet interface were not changed.
  5. Load the FCoE device now using:
    # ifconfig ethX up
    
  6. Start FCoE using:
    # service fcoe start
    
    The FCoE device should appear shortly, assuming all other settings on the fabric are correct. To view configured FCoE devices, run:
    # fcoeadm -i
    
After correctly configuring the Ethernet interface to use FCoE, Red Hat recommends that you set FCoE and lldpad to run at startup. To do so, use chkconfig, as in:
# chkconfig lldpad on
# chkconfig fcoe on

Warning

Do not run software-based DCB or LLDP on CNAs that implement DCB.
Some Combined Network Adapters (CNAs) implement the Data Center Bridging (DCB) protocol in firmware. The DCB protocol assumes that there is just one originator of DCB on a particular network link. This means that any higher-level software implementation of DCB, or Link Layer Discovery Protocol (LLDP), must be disabled on CNAs that implement DCB.

32.1. Fibre-Channel over Ethernet (FCoE) Target Set up

In addition to mounting LUNs over FCoE, as described in Chapter 32, Configuring a Fibre-Channel Over Ethernet Interface, exporting LUNs to other machines over FCoE is also supported.

Important

Before proceeding, refer to Chapter 32, Configuring a Fibre-Channel Over Ethernet Interface and verify that basic FCoE set up is completed, and that fcoeadm -i displays configured FCoE interfaces.

Procedure 32.2. Configure FCoE target

  1. Setting up an FCoE target requires the installation of the fcoe-target-utils package, along with its dependencies.
    # yum install fcoe-target-utils
  2. FCoE target support is based on the LIO kernel target and does not require a userspace daemon. However, it is still necessary to enable the fcoe-target service to load the needed kernel modules and maintain the configuration across reboots.
    # service fcoe-target start
    # chkconfig fcoe-target on
  3. Configuration of an FCoE target is performed using the targetcli utility, rather than by editing a .conf as may be expected. The settings are then saved so they may be restored if the system restarts.
    # targetcli
    targetcli is a hierarchical configuration shell. Moving between nodes in the shell uses cd, and ls shows the contents at or below the current configuration node. To get more options, the command help is also available.
  4. Define the file, block device, or pass-through SCSI device to export as a backstore.

    Example 32.1. Example 1 of defining a device

    /> backstores/block create example1 /dev/sda4
    This creates a backstore called example1 that maps to the /dev/sda4 block device.

    Example 32.2. Example 2 of defining a device

    /> backstores/fileio create example2 /srv/example2.img 100M
    This creates a backstore called example2 which maps to the given file. If the file does not exist, it will be created. File size may use K, M, or G abbreviations and is only needed when the backing file does not exist.

    Note

    If the global auto_cd_after_create option is on (the default), executing a create command will change the current configuration node to the newly created object. This can be disabled with set global auto_cd_after_create=false. Returning to the root node is possible with cd /.
  5. Create an FCoE target instance on an FCoE interface.
    /> tcm_fc/ create 00:11:22:33:44:55:66:77
    If FCoE interfaces are present on the system, tab-completing after create will list available interfaces. If not, ensure fcoeadm -i shows active interfaces.
  6. Map a backstore to the target instance.

    Example 32.3. Example of mapping a backstore to the target instance

    /> cd tcm_fc/00:11:22:33:44:55:66:77
    /> luns/ create /backstores/fileio/example2
  7. Allow access to the LUN from an FCoE initiator.
    /> acls/ create 00:99:88:77:66:55:44:33
    The LUN should now be accessible to that initiator.
  8. Exit targetcli by typing exit or entering ctrl+D.
Exiting targetcli will save the configuration by default. However it may be explicitly saved with the saveconfig command.
Refer to the targetcli manpage for more information.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.