Bootstrap

Linux系统下Emulex FC HBA驱动安装及固件升级

一、下载FC HBA卡驱动

下载地址:

https://www.broadcom.cn/support/download-search?pg=Legacy+Products&pf=Legacy+FC+Host+Bus+Adapters&pn=LPe16002B+FC+Host+Bus+Adapter&pa=Driver&po=&dk=&pl=&l=false

1

二、下载FC HBA卡固件

下载地址:

https://www.broadcom.cn/support/download-search?pg=Legacy+Products&pf=Legacy+FC+Host+Bus+Adapters&pn=LPe16002B+FC+Host+Bus+Adapter&pa=Firmware&po=&dk=&pl=&l=false

2

三、下载FC HBA卡固件刷写工具

下载地址:

https://www.broadcom.cn/support/download-search?pg=Legacy+Products&pf=Legacy+FC+Host+Bus+Adapters&pn=LPe16002B+FC+Host+Bus+Adapter&pa=Management+Software+and+Tools&po=&dk=&pl=&l=false

3

四、安装CentOS 7.9及配置本地yum源

1、采用U盘安装系统,选择Minimal Install,安装过程略。

2、创建本地系统文件目录

# mkdir /media/CentOS

3、将系统安装文件全部复制到“/media/CentOS”目录

注释:不是复制系统的ISO镜像文件,可以将安装系统U盘中的全部文件复制到“/media/CentOS”目录。

4、备份、移除其他repo

# cd /etc/yum.repos.d/

# tar zcvf repo-bak.tgz CentOS-*

# rm -f CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Sources.repo CentOS-Vault.repo CentOS-x86_64-kernel.repo

5、配置本地yum源

# vi CentOS-Media.repo

[c7-media]

name=CentOS-$releasever - Media

baseurl=file:///media/CentOS/

        file:///media/cdrom/

        file:///media/cdrecorder/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

将以上的内容修改如下并保存

[c7-media]

name=CentOS-$releasever - Media

baseurl=file:///media/CentOS/

gpgcheck=1

enabled=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

6、制作cache

# yum clean all

# yum makecache

7、刷写固件必须的软件包

# cd /media/CentOS/Packages

# yum install libnl -y

五、安装FC HBA卡驱动

1、安装驱动

# tar -zxvf elx-lpfc-dd-rhel7-12.8.614.22-ds-2.tar.gz

# cd elx-lpfc-dd-rhel7-12.8.614.22-ds-2

[root@localhost elx-lpfc-dd-rhel7-12.8.614.22-ds]# ./elx_lpfc_install.sh

Unpacking lpfc installation files...

Installing lpfc package,  lpfc-rhel7-12.8.614.22-ds/kmod-elx-lpfc-12.8.614.22-1.rhel7u9.x86_64.rpm  ...

warning: lpfc-rhel7-12.8.614.22-ds/kmod-elx-lpfc-12.8.614.22-1.rhel7u9.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 9fefeb11: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:kmod-elx-lpfc-12.8.614.22-1.rhel7################################# [100%]

Installing elx-lpfc-extras package, elx-lpfc-extras-12.8.614.23-1.rhel7.noarch.rpm ...

warning: elx-lpfc-extras-12.8.614.23-1.rhel7.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 9fefeb11: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:elx-lpfc-extras-12.8.614.23-1.rhe################################# [100%]

Unloaded driver lpfc

Loaded driver lpfc

lpfc installation complete

2、重启服务器

# reboot

3、查看驱动信息

# modinfo lpfc

[root@localhost ~]# modinfo lpfc

filename:       /lib/modules/3.10.0-1160.el7.x86_64/extra/elx-lpfc/lpfc.ko

supported:      external

retpoline:      Y

version:        0:12.8.614.22

author:         Broadcom

description:    Emulex LightPulse Fibre Channel SCSI driver 12.8.614.22

license:        GPL v2

retpoline:      Y

rhelversion:    7.9

srcversion:     EDA94E79A0308788062C406

alias:          pci:v000010DFd0000F400sv*sd*bc*sc*i*

alias:          pci:v000010DFd0000E300sv*sd*bc*sc*i*

alias:          pci:v000010DFd0000E268sv*sd*bc*sc*i*

alias:          pci:v000010DFd0000E208sv*sd*bc*sc*i*

alias:          pci:v000010DFd0000E260sv*sd*bc*sc*i*

alias:          pci:v000010DFd0000E200sv*sd*bc*sc*i*

alias:          pci:v000010DFd0000FC40sv*sd*bc*sc*i*

alias:          pci:v000010DFd0000F111sv*sd*bc*sc*i*

alias:          pci:v000010DFd0000F112sv*sd*bc*sc*i*

alias:          pci:v000010DFd0000F011sv*sd*bc*sc*i*

alias:          pci:v000010DFd0000F015sv*sd*bc*sc*i*

alias:          pci:v000010DFd0000F100sv*sd*bc*sc*i*

depends:        nvme-fc,scsi_transport_fc,nvmet-fc,crc-t10dif

vermagic:       3.10.0-1160.el7.x86_64 SMP mod_unload modversions

signer:         Broadcom Inc.: Emulex Connectivity Division

sig_key:        D1:7E:CA:BC:92:CD:49:09:89:95:9B:37:F0:5F:0E:DA:48:C5:38:95

sig_hashalgo:   sha256

parm:           lpfc_debugfs_enable:Enable debugfs services (int)

parm:           lpfc_debugfs_max_disc_trc:Set debugfs discovery trace depth (int)

parm:           lpfc_debugfs_max_slow_ring_trc:Set debugfs slow ring trace depth (int)

parm:           lpfc_debugfs_max_nvmeio_trc:Set debugfs NVME IO trace depth (int)

parm:           lpfc_debugfs_mask_disc_trc:Set debugfs discovery trace mask (int)

parm:           lpfc_enable_nvmet:Enable HBA port(s) WWPN as a NVME Target (array of ulong)

parm:           lpfc_poll:FCP ring polling mode control: 0 - none, 1 - poll with interrupts enabled 3 - poll and disable FCP ring interrupts (int)

parm:           lpfc_no_hba_reset:WWPN of HBAs that should not be reset (array of ulong)

parm:           lpfc_sli_mode:SLI mode selector: 0 - auto (SLI-3 if supported), 2 - select SLI-2 even on SLI-3 capable HBAs, 3 - select SLI-3 (uint)

parm:           lpfc_enable_npiv:Enable NPIV functionality (uint)

parm:           lpfc_fcf_failover_policy:FCF Fast failover=1 Priority failover=2 (uint)

parm:           lpfc_enable_fcp_priority:Enable/disable, (1,0) FCP Priority (uint)

parm:           lpfc_enable_rrq:Enable RRQ functionality (uint)

parm:           lpfc_suppress_link_up:Suppress Link Up at initialization (uint)

parm:           lpfc_nodev_tmo:Seconds driver will hold I/O waiting for a device to come back (int)

parm:           lpfc_devloss_tmo:Seconds driver will hold I/O waiting for a device to come back (int)

parm:           lpfc_suppress_rsp:Enable suppress rsp feature is firmware supports it (uint)

parm:           lpfc_nvmet_mrq:Specify number of RQ pairs for processing NVMET cmds (uint)

parm:           lpfc_nvmet_mrq_post:Specify number of RQ buffers to initially post (uint)

parm:           lpfc_enable_fc4_type:Enable FC4 Protocol support - FCP / NVME (uint)

parm:           lpfc_log_verbose:Verbose logging bit-mask (uint)

parm:           lpfc_enable_da_id:Deregister nameserver objects before LOGO (uint)

parm:           lpfc_lun_queue_depth:Max number of FCP commands we can queue to a specific LUN (ushort)

parm:           lpfc_tgt_queue_depth:Set max Target queue depth (uint)

parm:           lpfc_hba_queue_depth:Max number of FCP commands we can queue to a lpfc HBA (uint)

parm:           lpfc_peer_port_login:Allow peer ports on the same physical port to login to each other. (uint)

parm:           lpfc_restrict_login:Restrict virtual ports login to remote initiators. (int)

parm:           lpfc_scan_down:Start scanning for devices from highest ALPA to lowest (uint)

parm:           lpfc_topology:Select Fibre Channel topology (uint)

parm:           lpfc_link_speed:Select link speed (int)

parm:           lpfc_aer_support:Enable PCIe device AER support (uint)

parm:           lpfc_sriov_nr_virtfn:Enable PCIe device SR-IOV virtual fn (uint)

parm:           lpfc_req_fw_upgrade:Enable Linux generic firmware upgrade (int)

parm:           lpfc_force_rscn:Force an RSCN to be sent to all remote NPorts (int)

parm:           lpfc_fcp_imax:Set the maximum number of FCP interrupts per second per HBA (int)

parm:           lpfc_cq_poll_threshold:CQE Processing Threshold to enable Polling (uint)

parm:           lpfc_cq_max_proc_limit:Set the maximum number CQEs processed in an iteration of CQ processing (int)

parm:           lpfc_fcp_cpu_map:Defines how to map CPUs to IRQ vectors per HBA (int)

parm:           lpfc_fcp_class:Select Fibre Channel class of service for FCP sequences (uint)

parm:           lpfc_use_adisc:Use ADISC on rediscovery to authenticate FCP devices (uint)

parm:           lpfc_first_burst_size:First burst size for Targets that support first burst (uint)

parm:           lpfc_nvmet_fb_size:NVME Target mode first burst size in 512B increments. (uint)

parm:           lpfc_nvme_enable_fb:Enable First Burst feature for NVME Initiator. (uint)

parm:           lpfc_max_scsicmpl_time:Use command completion time to control queue depth (uint)

parm:           lpfc_ack0:Enable ACK0 support (uint)

parm:           lpfc_xri_rebalancing:Enable/Disable XRI rebalancing (uint)

parm:           lpfc_fcp_io_sched:Determine scheduling algorithm for issuing commands [0] - Hardware Queue, [1] - Current CPU (uint)

parm:           lpfc_ns_query:Determine algorithm NameServer queries after RSCN [0] - GID_FT, [1] - GID_PT (uint)

parm:           lpfc_fcp2_no_tgt_reset:Determine bus reset behavior for FCP2 devices [0] - issue tgt reset, [1] - no tgt reset (uint)

parm:           lpfc_cr_delay:A count of milliseconds after which an interrupt response is generated (uint)

parm:           lpfc_cr_count:A count of I/O completions after which an interrupt response is generated (uint)

parm:           lpfc_multi_ring_support:Determines number of primary SLI rings to spread IOCB entries across (uint)

parm:           lpfc_multi_ring_rctl:Identifies RCTL for additional ring configuration (uint)

parm:           lpfc_multi_ring_type:Identifies TYPE for additional ring configuration (uint)

parm:           lpfc_enable_SmartSAN:Enable SmartSAN functionality (uint)

parm:           lpfc_fdmi_on:Enable FDMI support (uint)

parm:           lpfc_enable_e2e:E2E: 1=enable 0=disable. Change only under direction of Emulex Tech. Support (uint)

parm:           lpfc_discovery_threads:Maximum number of ELS commands during discovery (uint)

parm:           lpfc_max_luns:Maximum allowed LUN ID (uint)

parm:           lpfc_poll_tmo:Milliseconds driver will wait between polling FCP ring (uint)

parm:           lpfc_task_mgmt_tmo:Maximum time to wait for task management commands to complete (uint)

parm:           lpfc_use_msi:Use Message Signaled Interrupts (1) or MSI-X (2), if possible (uint)

parm:           lpfc_nvme_oas:Use OAS bit on NVME IOs (uint)

parm:           lpfc_nvme_embed_cmd:Embed NVME Command in WQE (uint)

parm:           lpfc_fcp_mq_threshold:Set the number of SCSI Queues advertised (uint)

parm:           lpfc_hdw_queue:Set the number of I/O Hardware Queues (uint)

parm:           lpfc_irq_chann:Set number of interrupt vectors to allocate (uint)

parm:           lpfc_enable_hba_reset:Enable HBA resets from the driver. (uint)

parm:           lpfc_enable_hba_heartbeat:Enable HBA Heartbeat. (uint)

parm:           lpfc_EnableXLane:Enable Express Lane Feature. (uint)

parm:           lpfc_XLanePriority:CS_CTL for Express Lane Feature. (uint)

parm:           lpfc_enable_bg:Enable BlockGuard Support (uint)

parm:           lpfc_external_dif:External T10-DIF Support, on select HBAs (uint)

parm:           lpfc_prot_mask:T10-DIF host protection capabilities mask (uint)

parm:           lpfc_prot_guard:T10-DIF host protection guard type (uint)

parm:           lpfc_delay_discovery:Delay NPort discovery when Clean Address bit is cleared. (uint)

parm:           lpfc_sg_seg_cnt:Max Scatter Gather Segment Count (uint)

parm:           lpfc_throttle_log_cnt:Do not exceed this number of messages logged within throttle_log_time (uint)

parm:           lpfc_throttle_log_time:Do not exceed throttle_log_cnt within this limit (seconds) (uint)

parm:           lpfc_enable_mds_diags:Enable MDS Diagnostics (uint)

parm:           lpfc_ras_fwlog_buffsize:Host memory for FW logging (uint)

parm:           lpfc_ras_fwlog_level:Firmware Logging Level (uint)

parm:           lpfc_ras_fwlog_func:Firmware Logging Enabled on Function (uint)

parm:           lpfc_enable_bbcr:Enable BBC Recovery (uint)

parm:           lpfc_fabric_cgn_frequency:Congestion signaling primitive freq (int)

parm:           lpfc_acqe_cgn_frequency:Congestion signaling ACQE freq (int)

parm:           lpfc_use_cgn_signal:Use Congestion signaling if available (int)

parm:           lpfc_enable_dpp:Enable Direct Packet Push (uint)

parm:           lpfc_enable_scsi_mq:Enable SCSI MQ support in LPFC (uint)

parm:           lpfc_enable_auth:Enable DH-CHAP Authentication (uint)

六、刷写FC HBA卡固件

1、解压固件刷写工具

# unzipelxflashStandalone-linux-12.8.351.51-1.zip

2、将下载的固件复制到elxflashStandalone-linux-12.8.351.51-1/firmware目录下

# cp lancer_A12.8.614.27.grp elxflashStandalone-linux-12.8.351.51-1/firmware

3、查看FC HBA卡固件信息

# cd elxflashStandalone-linux-12.8.351.51-1/lx

# ./elxflash.sh /q

[root@localhost lx]# ./elxflash.sh /q

HBA=LPe16002, Port Type=FC, WWN=10:00:00:10:9B:61:2B:3C, PCI ID=E200, VID=10DF, SSID=E280, SVID=10DF, Firmware=12.0.261.9, Boot Code=12.0.261.9, Boot Enabled=1

HBA=LPe16002, Port Type=FC, WWN=10:00:00:10:9B:61:2B:3D, PCI ID=E200, VID=10DF, SSID=E280, SVID=10DF, Firmware=12.0.261.9, Boot Code=12.0.261.9, Boot Enabled=1

elxflash: All required queries succeeded - Return Code=0

4、刷写FC HBA卡固件

# ./elxflash.sh /auto /update

[root@localhost lx]# ./elxflash.sh /auto /update

Wed May 24 00:26:37 2023

HBA=LPe16002, Port Type=FC, WWN=10:00:00:10:9B:61:2B:3C,

Update=Firmware, Image=lancer_A12.8.614.27.grp, New=12.8.614.27, Old=12.0.261.9, Status=Success, Firmware Status="Reboot the system to activate new firmware."

Wed May 24 00:26:37 2023

HBA=LPe16002, Port Type=FC, WWN=10:00:00:10:9B:61:2B:3D,

Update=Firmware, Image=lancer_A12.8.614.27.grp, New=12.8.614.27, Old=12.0.261.9, Status=Success, Firmware Status="Reboot the system to activate new firmware."

elxflash: All required updates succeeded - Return Code=0

Please reboot system to activate new firmware.

5、重启服务器

# reboot

6、查看FC HBA卡固件信息

# ./elxflash.sh /q

[root@localhost lx]# ./elxflash.sh /q

HBA=LPe16002, Port Type=FC, WWN=10:00:00:10:9B:61:2B:3C, PCI ID=E200, VID=10DF, SSID=E280, SVID=10DF, Firmware=12.8.614.27, Boot Code=12.8.614.27, Boot Enabled=1

HBA=LPe16002, Port Type=FC, WWN=10:00:00:10:9B:61:2B:3D, PCI ID=E200, VID=10DF, SSID=E280, SVID=10DF, Firmware=12.8.614.27, Boot Code=12.8.614.27, Boot Enabled=1

elxflash: All required queries succeeded - Return Code=0

;