Fibre Channel testing and troubleshooting commands
General Information about HBA and SCSI
To examine some simple information about the Fibre Channel HBAs in a machine
# systool -c fc_host –v



To look at verbose information regarding the SCSI adapters present on a system
# systool -c scsi_host –v


To see what Fibre Channel devices are connected to the Fibre Channel HBA cards
# systool -c fc_remote_ports -v –d


For Fibre Channel transport information
# systool -c fc_transport –v


For information on SCSI disks connected to a system
# systool -c scsi_disk –v


To examine more disk information including which hosts are connected to which disks
# systool -b scsi –v


Use the sg_map command to view more information about the SCSI map
# sg_map –x


To obtain driver information, including version numbers and active parameters

For Qlogic HBAs
# systool -m qla2xxx –v


For Emulex HBAs
# systool -m lpfc –v

(Resource for systool commands: Red Hat Knowledgebase, Article ID: 9937 - “Why is the /proc/scsi/qla2xxx/ or /proc/scsi/lpfc/ directory missing in Red Hat Enterprise Linux 5 and what has replaced it?”)

Qlogic HBA
Rescan QLogic HBA for available LUNs:
# echo “- - -“ > /sys/class/scsi_host/host<number>/scan

(For more details see CTX120172 - How to Rescan the Qlogic Host Bus Adapter for New Logical Unit Numbers in XenServer)

Disks should appear in /dev/disk/by-id
# ll /dev/disk/by-id

Query Qlogic HBA for attached instances:
# scli –t

Query Qlogic HBA for LUNs
# scli –l <hba_instance_number_from_previous_command>


Removing HBA-based FC or iSCSI device entries
# echo "1" > /sys/class/scsi_device/<adapter>:<bus>:<target>:<lun>/device/delete

Emulex HBA
Utility for Emulex HBA:
# /usr/sbin/hbanyware/hbacmd

Display help to the command:
# /usr/sbin/hbanyware/hbacmd –h

Query Emulex HBAs:
# /usr/sbin/hbanyware/hbacmd listHBAs

List HBA attributes
# /usr/sbin/hbanyware/hbacmd hbaattrib <wwpn_from_previous_command>

For example:
# hbacmd hbaattrib 10:00:00:00:c9:20:08:cc

List HBA port attributes
# /usr/sbin/hbanyware/hbacmd portattrib <wwpn_from_previous_command>

For example:
# hbacmd portattrib 10:00:00:00:c9:20:08:cc




Share this blog post on social media:

Social Links


All advice, installation/configuration how to guides, troubleshooting and other information on this website are provided as-is with no warranty or guarantee. Whilst the information provided is correct to the best of my knowledge, I am not reponsible for any issues that may arise using this information, and you do so at your own risk. As always before performing anything; check, double check, test and always ensure you have a backup.

Copyright ©2008-2021 Andy Barnes - Please do not copy any content including images without prior consent!

Designed and Hosted by Andy Barnes