Este contenido no está disponible en el idioma seleccionado.
Chapter 32. Configuring a Fibre-Channel Over Ethernet Interface
fcoe-utilslldpad
Procedure 32.1. Configuring an Ethernet interface to use FCoE
- 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 isethX, run:cp /etc/fcoe/cfg-eth0 /etc/fcoe/cfg-ethX
# cp /etc/fcoe/cfg-eth0 /etc/fcoe/cfg-ethXCopy to Clipboard Copied! Toggle word wrap Toggle overflow Modify the contents ofcfg-ethXas necessary. Of note,DCB_REQUIREDshould be set tonofor networking interfaces that implement a hardware DCBX client. - If you want the device to automatically load during boot time, set
ONBOOT=yesin the corresponding/etc/sysconfig/network-scripts/ifcfg-ethXfile. For example, if the FCoE device is eth2, then edit/etc/sysconfig/network-scripts/ifcfg-eth2accordingly. - Start the data center bridging daemon (
dcbd) using the following command:/etc/init.d/lldpad start
# /etc/init.d/lldpad startCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 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
# dcbtool sc ethX dcb onCopy to Clipboard Copied! Toggle word wrap Toggle overflow Then, enable FCoE on the Ethernet interface by running:dcbtool sc ethX app:fcoe e:1
# dcbtool sc ethX app:fcoe e:1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
These commands will only work if thedcbdsettings for the Ethernet interface were not changed. - Load the FCoE device now using:
ifconfig ethX up
# ifconfig ethX upCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Start FCoE using:
service fcoe start
# service fcoe startCopy to Clipboard Copied! Toggle word wrap Toggle overflow The FCoE device should appear shortly, assuming all other settings on the fabric are correct. To view configured FCoE devices, run:fcoeadm -i
# fcoeadm -iCopy to Clipboard Copied! Toggle word wrap Toggle overflow
lldpad to run at startup. To do so, use chkconfig, as in:
chkconfig lldpad on
# chkconfig lldpad on
chkconfig fcoe on
# chkconfig fcoe on
Warning
32.1. Fibre-Channel over Ethernet (FCoE) Target Set up Copiar enlaceEnlace copiado en el portapapeles!
Important
fcoeadm -i displays configured FCoE interfaces.
Procedure 32.2. Configure FCoE target
- Setting up an FCoE target requires the installation of the
fcoe-target-utilspackage, along with its dependencies.yum install fcoe-target-utils
# yum install fcoe-target-utilsCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 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
# service fcoe-target startCopy to Clipboard Copied! Toggle word wrap Toggle overflow chkconfig fcoe-target on
# chkconfig fcoe-target onCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Configuration of an FCoE target is performed using the
targetcliutility, rather than by editing a.confas may be expected. The settings are then saved so they may be restored if the system restarts.targetcli
# targetcliCopy to Clipboard Copied! Toggle word wrap Toggle overflow targetcliis a hierarchical configuration shell. Moving between nodes in the shell usescd, andlsshows the contents at or below the current configuration node. To get more options, the commandhelpis also available. - 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
/> backstores/block create example1 /dev/sda4Copy to Clipboard Copied! Toggle word wrap Toggle overflow This creates a backstore calledexample1that maps to the/dev/sda4block device.Example 32.2. Example 2 of defining a device
/> backstores/fileio create example2 /srv/example2.img 100M
/> backstores/fileio create example2 /srv/example2.img 100MCopy to Clipboard Copied! Toggle word wrap Toggle overflow This creates a backstore calledexample2which 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 globalauto_cd_after_createoption is on (the default), executing a create command will change the current configuration node to the newly created object. This can be disabled withset global auto_cd_after_create=false. Returning to the root node is possible withcd /. - Create an FCoE target instance on an FCoE interface.
/> tcm_fc/ create 00:11:22:33:44:55:66:77
/> tcm_fc/ create 00:11:22:33:44:55:66:77Copy to Clipboard Copied! Toggle word wrap Toggle overflow If FCoE interfaces are present on the system, tab-completing aftercreatewill list available interfaces. If not, ensurefcoeadm -ishows active interfaces. - 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
/> cd tcm_fc/00:11:22:33:44:55:66:77Copy to Clipboard Copied! Toggle word wrap Toggle overflow /> luns/ create /backstores/fileio/example2
/> luns/ create /backstores/fileio/example2Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Allow access to the LUN from an FCoE initiator.
/> acls/ create 00:99:88:77:66:55:44:33
/> acls/ create 00:99:88:77:66:55:44:33Copy to Clipboard Copied! Toggle word wrap Toggle overflow The LUN should now be accessible to that initiator. - Exit
targetcliby typingexitor entering ctrl+D.
targetcli will save the configuration by default. However it may be explicitly saved with the saveconfig command.
targetcli manpage for more information.