TrueNAS CORE Version DocumentationThis content follows the TrueNAS CORE 13.0 releases. Use the Product and Version selectors above to view content specific to different TrueNAS software or major version.
Fibre Channel
7 minute read.
Fibre Channel is a TrueNAS Enterprise feature. Only TrueNAS systems licensed for Fibre Channel have the Fibre Channel Ports added to Sharing > Block Shares (iSCSI) screens.
This procedure uses an example to illustrate each step.
Add a zvol to use for the share.
a. Go to Storage > Pools.
b. Find an existing pool, click and Add zvol to create a new zvol.
Configure these iSCSI tabs in Sharing > Block Shares (iSCSI):
Initiators and Authorized Access screens only apply to iSCSI and can be ignored when configuring Fibre Channel.a. Portals. Check for the 0.0.0.0:3260 IP and port number. If it doesn’t exist, click Add and add this portal.
b. Targets. Click Add to set up a new target. Enter the values for your uses case in the Target Name, Target Alias, and Portal Group.
Select the Target Mode option from iSCSI, Fibre Channel or Both.
The Initiator Group ID selects which existing initiator group has access to the target.
Options for the Authentication Method are None, CHAP, or Mutual CHAP.
Set Authentication Group Number to either none or an integer. This value represents the number of existing authorized accesses.
The Target Reporting tab provides Fibre Channel port bandwidth graphs.
c. Extents. Click Add to create a new extent.
d. Associated Targets. Click Add to add a new associated target.
Select values for Target and Extent.
The LUN ID is a value between 0 and 1023. Some initiators expect a value below 256. Leave this field blank to automatically assign the next available ID.
Set Fibre Channel Ports.
a. Click chevron_right to expand the option for the port you want to select.
b. Select the Mode as either Initiators or Targets. The Targets dropdown field displays on the right side of the screen.
c. Select the target from the list. A list of **Connected Initiators displays below the Targets dropdown list field.
d. Select the initiator you want to use and then click Save.
Start the iSCSI service. Go to Services and click the iSCSI toggle until the Running status message displays.
N_Port ID Virtualization (NPIV) is a Fibre Channel (FC) feature that allows multiple virtual N_Port IDs to share a single physical N_Port. An N_Port is a port that connects a Fibre Channel device, such as a server or storage array, to a Fibre Channel switch. It is responsible for establishing communication within the Fibre Channel fabric.
NPIV allows creating multiple virtual N_Ports on a single physical N_Port. This means a single physical Fibre Channel port can present multiple unique identities to the fabric, enabling different devices to share the same physical connection while maintaining separate communication channels. With NPIV, each virtual N_Port can have its own World Wide Port Name (WWPN) and can independently participate in the Fibre Channel network. This enhances resource utilization, improves management flexibility, and allows for better support of virtualization technologies. This is particularly useful in virtualized environments where you want to assign unique World Wide Names (WWNs) to each virtual machine, allowing for independent management of them on a storage area network (SAN) or on TrueNAS.
NPIV allows an administrator to use switch zoning to configure each virtual port as if it was a physical port in order to provide access control. This is important in an environment with a mix of Windows systems and virtual machines to prevent automatic or accidental reformatting of targets containing unrecognized file systems. It can also be used to segregate data; for example, to prevent the engineering department from accessing data from the human resources department. Refer to your switch documentation for details on how to configure zoning of virtual ports.
To create virtual ports on the TrueNAS system, go to System > Tunables and click ADD. Enter these options:
- Variable - Enter
input hint.isp.X.vports
, where X is the number of the physical interface. - Value - Enter the number of virtual ports to create. The maximum number of target ports is 125 SCSI target ports, including all physical Fibre Channel ports, all virtual ports, and all configured combinations of iSCSI portals and targets.
- Type - Select loader. Reboot each node in HA.
In the example shown:
- Two physical interfaces are each assigned 4 virtual ports.
- Two tunables are required, one for each physical interface.
After creating the tunables and rebooting, the configured number of virtual ports shows on Sharing > Block Shares (iSCSI) > Fibre Channel Ports screen so they can be associated with targets, and they are also advertised to the switch so zoning can be configured on the switch.
After associating a virtual port with a target, add it to the Target tab of Reporting so you can view its bandwidth usage.
The following is a general guide on setting up NPIV with Fibre Channel in a Fibre Channel switch and a host system.
- Hardware Support - Ensure the Fibre Channel Host Bus Adapters (HBAs) and switches support NPIV. Most modern FC equipment supports this feature, but it is always good to verify.
- Firmware and Drivers - Make sure your HBA firmware and drivers are up to date. NPIV functionality might require specific versions.
- Virtualization Platform - If using a virtualization platform (like VMware vSphere, Microsoft Hyper-V, etc.), ensure it supports NPIV and is properly configured.
- Enable NPIV. Access the switch management interface (CLI or GUI).
a. Locate the NPIV settings, which are often found under port or global settings.
b. Enable NPIV on the switch. This might be a global setting or per-port setting depending on the switch model. - Configure zoning on the switch to include the WWNs of the virtual N_Ports. This is similar to how you would configure zoning for physical ports. Ensure that the zones include both the physical HBA port and the virtual WWNs.
- Access the HBA management utility (often provided by the HBA manufacturer) and enable NPIV on the HBA. This might involve setting the HBA to allow multiple WWNs.
- Assign virtual WWNs to each virtual machine using the management interface for the virtualization platform. Ensure that the virtual WWNs are unique and properly configured in the SAN zoning
- Configure the operating system within the virtual machines to recognize the virtual FC adapters. Install any necessary drivers or software to support FC connectivity.
Verify that each virtual machine can see the storage devices it is zoned to access. Use monitoring tools to ensure that the NPIV setup is performing as expected and that there are no bottlenecks or connectivity issues.
- Check logs - Review logs on the switch, HBA, and host for any error messages related to NPIV.
- Verify zoning - Double-check the zoning configurations to make sure they are correct and include all necessary WWNs.
Refer to the documentation for your specific hardware and software for any additional configuration steps or troubleshooting tips. By following these steps, you should be able to set up NPIV with Fibre Channel successfully. If you encounter any specific issues, consult the documentation for your hardware and software or reach out to your vendor support for help.