The following is based on RedHat Enterprise Linux.

Finding HBA info

  • File /sys/class/fc_host/hostn/port_name gives the WWN
  • lspci -vv gives information about the card

To find out the HBA model and firmware version:

 1. lspci | grep -i fibre
 
     15:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
 2.  lspci -v -s 15:00.0
 
     15:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
     Subsystem: QLogic Corp. Device 015d
            Kernel driver in use: lpfc or qla2xxx
            Kernel modules: lpfc
 3. modinfo qla2xxx | grep version or modinfo lpfc | grep version   # This command will give us the HBA Driver version
Using vendor utilities - Emulex

Emulex have a utility called ocmanager (used to be HBAnyware for years but I guess ocmanager is much more meaningful!?). The CLI version of this can be used as follows:

List HBAs

 #/usr/sbin/ocmanager/hbacmd ListHBAs
 Manageable HBA List
 Port WWN       : 50:06:0b:00:00:c2:e6:08
 Node WWN       : 50:06:0b:00:00:c2:e6:09
 Fabric Name    : 10:00:00:05:33:cc:96:0b
 Flags          : 80000714
 Host Name      : myfabserver01
 Mfg            : Emulex Corporation
 Serial No.     : H35433604S
 Port Number    : 1
 Mode           : Initiator  
 PCI Bus Number : 4
 PCI Function   : 2  
 Port Type      : FCoE
 Model          : 554FLB
 etc, etc

Find HBA attributes

#/usr/sbin/ocmanager/hbacmd hbaatt 50:06:0b:00:00:c2:e6:08
HBA Attributes for 50:06:0b:00:00:c2:e6:08
Host Name                     : gb01ucomapp01p
Manufacturer                  : Emulex Corporation
Serial Number                 : H35433604S
Model                         : 554FLB
Model Desc                    : HP FlexFabric 10Gb 2-port 554FLB Adapter
Node WWN                      : 50 06 0b 00 00 c2 e6 09
Node Symname                  : Emulex 554FLB FV10.2.477.10 DV10.2.8020.1
HW Version                    : E3 A1
FW Version                    : 10.2.477.10
Vendor Spec ID                : 19A2
Number of Ports               : 1
Driver Name                   : lpfc
Driver Version                : 10.2.8020.1; HBAAPI(I) v2.3.d, 07-12-10
Device ID                     : 0714
HBA Type                      : 554FLB
Operational FW                : 10.2.477.10
IEEE Address                  : 00 17 a4 77 84 0c
Boot Code                     : Enabled
Boot Version                  : 10.2.477.10
Board Temperature             : Normal
Function Type                 : FCoE
Sub Device ID                 : 337B
Port Number                   : 1
PCI Bus Number                : 4
PCI Func Number               : 2
Sub Vendor ID                 : 103C
Firmware Status               : Working
IPL Filename                  : L32IHPB3
Service Processor FW Name     : 10.2.477.10 
ULP FW Name                   : 10.2.477.10 
NCSI Version                  : N/A
Start-up Boot Code Version    : 2.0.281.768
FCoE Universal Version        : 7.07a12
FCoE x86 BIOS Version         : 4.10a2
FCoE EFI Version              : 5.21a14
FCoE FCODE Version            : 4.01a3
UEFI NIC Version              : 10.2.477.10
NIC FCODE Version             : 10.2.477.10
UEFI iSCSI Version            : 10.2.477.10
PCI Express Link Speed        : 5GT/s
PCI Express Bus Width         : x8
Flash Firmware Version        : 10.2.477.10

Adding new SAN disks

To scan for new disk devices

If there are no SAN disk already, reloading the HBA module will cause a rescan, e.g.

  1. rmmod lpfc
  2. modprobe lpfc

If there are already SAN disk devices present, run:

  • echo “- - -” > /sys/class/scsi_host/hostn/scan

where n is the HBA number.

Setting up Multipathing

  1. Update /etc/multipath.conf using the parameters supplied by the storage vendor
  2. Run the following commands:
    1. modprobe dm-multipath
    2. service multipathd start
    3. multipath -v2 (this checks the configuration)
  3. chkconfig multipathd on - to ensure multipathing starts on a reboot
  4. multipath -l - to show multipath devices and status

Deleting Linux disk devices

  1. Gather device information by running multipath -l
  2. Delete the multipath device: multipath -f mpath_device
  3. echo 1 > /sys/block/device-name/device/delete

Listing disks

  • lsblk - list block devices or if that doesn't work for you try fdisk -l | grep Disk
  • blkid /dev/sda - get the UUID of device /dev/sda

Recent Changes

Contribute to this wiki

Why not help others by sharing your knowledge? Contribute something to this wiki and join out hall of fame!
Contact us for a user name and password