Fibre Channel on Oracle Linux - Quick Start Guide

Linux

Audience
Public
Product
FlashBlade
FlashArray
Technology Integrations
Linux
Source Type
Documentation
Note:

For detailed explanations, alternative configurations, and troubleshooting: See FC Best Practices

Important:

Vendor Documentation Priority: This guide is for reference only. Always consult official vendor documentation for your distribution. Test thoroughly in a lab environment before production use.

Prerequisites:

  • Oracle Linux 8.x or 9.x (UEK or RHCK kernel)

  • Fibre Channel HBA installed and cabled to the FC fabric

  • Fabric zoning and volume presentation configured by your SAN administrator

  • Root or sudo access

  1. Install Packages:
    sudo dnf install -y device-mapper-multipath sg3_utils sysfsutils
    sudo systemctl enable --now multipathd
  2. Verify HBA and Discover WWPNs:
    # Check which FC HBA drivers are loaded
    lsmod | grep -E "lpfc|qla2xxx|bnx2fc|bfa"
    
    # If no driver is listed, load the appropriate module for your HBA:
    #   Emulex/Broadcom LPe-series: lpfc
    #   QLogic QLE-series:          qla2xxx
    #   Broadcom NetXtreme FCoE:    bnx2fc
    sudo modprobe lpfc       # or qla2xxx / bnx2fc
    
    # Verify HBA ports are online
    cat /sys/class/fc_host/host*/port_state
    # Expected: Online
    
    # Check link speed (verify cable / SFP negotiated correctly)
    cat /sys/class/fc_host/host*/speed
    # Example: 16 Gbit
    
    # Discover your WWPNs - register these on the storage array
    cat /sys/class/fc_host/host*/port_name
    # Example: 0x2100001b32a1bcde
    Note:

    Register these WWPNs with FlashArray to authorize access. See Step 3.

  3. Register WWPNs and Present Volume:
    Note:

    Before continuing, confirm the following on your FC fabric and FlashArray:

    • HBA WWPNs collected from all hosts (Step 2 above)

    • Single-initiator zoning configured on the FC switch - each host WWPN zoned individually with the target array ports (not all initiators in one zone)

    • Host entry created on FlashArray with the host's WWPN(s) and OS type set to Linux

    • Host Group created (for clusters) and all host entries added

    • Volume connected to the host or host group on the FlashArray LUNs will not be visible to the host until the volume is connected and zoning is in place

    If you do not administer the FC fabric or FlashArray yourself, coordinate with your SAN and storage administrators before proceeding.

  4. Rescan for Presented LUNs:
    # Option 1: rescan-scsi-bus (preferred - discovers new devices on all host bus adapters)
    sudo rescan-scsi-bus.sh
    
    # Option 2: sysfs manual rescan (if rescan-scsi-bus is unavailable)
    for host in /sys/class/scsi_host/host*; do
        echo "- - -" | sudo tee "$host/scan"
    done
    
    # Verify devices appeared
    lsscsi | grep PURE
    # Example output:
    # [6:0:0:1]  disk  PURE     FlashArray       006.  /dev/sdb
    
    # Confirm multipath picked them up
    sudo multipath -ll
    Note:

    If no PURE devices appear: Verify zoning is complete, the volume is connected on FlashArray, and HBA port state is Online.

  5. Configure Multipath

    Create /etc/multipath.conf:

    sudo tee /etc/multipath.conf > /dev/null <<'EOF'
    defaults {
        find_multipaths      no
        polling_interval     10
        path_selector        "service-time 0"
        path_grouping_policy group_by_prio
        failback             immediate
        no_path_retry        0
    }
    
    # Blacklist local devices and NVMe to prevent dm-multipath management
    # NVMe uses native multipath (nvme_core multipath=Y), not dm-multipath
    blacklist {
        # Local boot devices (adjust patterns for your environment)
        devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
        devnode "^sd[a]$"    # Adjust if boot device differs
    
        # All NVMe devices - use native NVMe multipath instead
        devnode "^nvme"
    
        # Virtual devices
        devnode "^vd[a-z]"
    }
    
    # Add device-specific settings for your storage array
    # Default configurations for many storage arrays are included in the multipath package
    # Example for a storage array supporting ALUA:
    #devices {
    #    device {
    #        vendor           "VENDOR"
    #        product          "PRODUCT"
    #        path_selector    "service-time 0"
    #        hardware_handler "1 alua"
    #        path_grouping_policy group_by_prio
    #        prio             alua
    #        failback         immediate
    #        path_checker     tur
    #        fast_io_fail_tmo 10
    #        dev_loss_tmo     60
    #        no_path_retry    0
    #    }
    #}
    EOF
    
    # Restart multipathd to apply configuration
    sudo systemctl restart multipathd
    
    # Verify multipath devices (should only show FC/SAN devices)
    sudo multipath -ll
    Tip:
    • Why find_multipaths no? This ensures ALL paths to FC storage devices are claimed by multipath immediately, rather than waiting to detect multiple paths. For a detailed explanation or detailed multipath options, see Best Practices - Multipath Configuration.

    • Why fast_io_fail_tmo 10 and dev_loss_tmo 60? FC path failures must be detected quickly to enable failover. fast_io_fail_tmo is the number of seconds to wait before failing I/O when the fabric reports a link down; dev_loss_tmo is how long to wait before removing the device entirely. These values balance fast failover with transient link-bounce recovery.

  6. Create LVM Storage:
    # Find multipath device
    sudo multipath -ll
    # Example: mpatha -> /dev/mapper/mpatha
    # Or by WWID: /dev/mapper/3624a937...
    
    # Create LVM
    sudo pvcreate /dev/mapper/mpatha
    sudo vgcreate fc-storage /dev/mapper/mpatha
    sudo lvcreate -L 500G -n data fc-storage
    
    # Format and mount (Oracle Linux: XFS recommended)
    sudo mkfs.xfs /dev/fc-storage/data
    sudo mkdir -p /mnt/fc-storage
    sudo mount /dev/fc-storage/data /mnt/fc-storage
    
    # Add to fstab
    echo '/dev/fc-storage/data /mnt/fc-storage xfs defaults,_netdev 0 0' | sudo tee -a /etc/fstab
  7. Verify Configuration:
    # Check HBA port state (all should be Online)
    cat /sys/class/fc_host/host*/port_state
    
    # Check multipath paths and ALUA priority groups
    sudo multipath -ll
    
    # Verify storage device is visible
    lsscsi | grep PURE
    
    # Verify filesystem is mounted (if applicable)
    df -h | grep fc-storage
Note:

Quick Reference

Command Description
cat /sys/class/fc_host/host*/port_name List HBA WWPNs
cat /sys/class/fc_host/host*/port_state Check HBA port link state
cat /sys/class/fc_host/host*/speed Check negotiated link speed
sudo rescan-scsi-bus.sh Scan for newly presented LUNs
lsscsi List all SCSI/FC devices
sudo multipath -ll Show multipath devices and path status
sudo multipathd reconfigure Reload multipath configuration
sudo systemctl restart multipathd Restart multipath daemon

For production deployments, see FC Best Practices for:

  • FC architecture and fabric redundancy

  • UEK kernel and HBA driver version considerations

  • Multipath configuration details

  • SELinux considerations

  • Monitoring and security