Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
en:services:storage_services:backup:tsm:admin:fc_stuff [2023/02/03 08:39] – [Rescaning the SCSI bus] bnachtwen:services:storage_services:backup:tsm:admin:fc_stuff [2023/02/03 08:46] – [SLES] bnachtw
Line 2: Line 2:
 ===== WWN & Co ===== ===== WWN & Co =====
 ==== get the wwn from the adapers ==== ==== get the wwn from the adapers ====
-=== SLES === +
-<code> +
-# for i in $(ls -d /sys/class/scsi_host/host*/device/fc_host/host*/port_name); do echo $i $(cat $i);done +
-</code> +
-e.g. +
-<code> +
-# for i in $(ls -d /sys/class/scsi_host/host*/device/fc_host/host*/port_name); do echo $i $(cat $i);done +
-/sys/class/scsi_host/host15/device/fc_host/host15/port_name 0x2100f4e9d455702c +
-/sys/class/scsi_host/host16/device/fc_host/host16/port_name 0x2100f4e9d455702d +
-/sys/class/scsi_host/host17/device/fc_host/host17/port_name 0x2100f4e9d45573c8 +
-/sys/class/scsi_host/host18/device/fc_host/host18/port_name 0x2100f4e9d45573c9 +
-</code>+
 === using systool === === using systool ===
 according to [[https://www.thegeekdiary.com/how-to-identify-the-hba-cardsports-and-wwn-in-rheloel/| The Geek Diary]] according to [[https://www.thegeekdiary.com/how-to-identify-the-hba-cardsports-and-wwn-in-rheloel/| The Geek Diary]]
Line 62: Line 51:
 thanks to [[https://www.veritas.com/support/en_US/article.100050716|Veritas]] thanks to [[https://www.veritas.com/support/en_US/article.100050716|Veritas]]
  
 +* To list available HBA ports, type:
 +<code>
 +# ls -l /sys/class/fc_host
 +total 0
 +lrwxrwxrwx. 1 root root 0 Jun 24 13:52 host28 -> ../../devices/pci0000:80/0000:80:02.0/0000:81:00.0/host28/fc_host/host28
 +lrwxrwxrwx. 1 root root 0 Jun 24 14:15 host29 -> ../../devices/pci0000:80/0000:80:02.0/0000:81:00.1/host29/fc_host/host29
 +</code>
 + 
 +The ''lspci'' command can be used to display the available Fibre Channel  (FC) Adapters:
  
 +<code>
 +# lspci | grep Fibre
 +81:00.0 Fibre Channel: QLogic Corp. ISP8324-based 16Gb Fibre Channel to PCI Express Adapter (rev 02)
 +81:00.1 Fibre Channel: QLogic Corp. ISP8324-based 16Gb Fibre Channel to PCI Express Adapter (rev 02)
 +</code>
 +
 +The Fibre Channel (FC) HBA port access on RedHat can be temporarily disabled using the unbind string against the pci-device-id bus address.
 + 
 +Syntax:
 +
 +<code>
 +# echo "PCI-DEVICE-ID" > /sys/bus/pci/drivers/qla2xxx/unbind
 +</code> 
 +
 +To disconnect access for a specific PCI device (81:00:0), the sample syntax would be as follows:
 +
 +<code>
 +# echo "0000:81:00.0" > /sys/bus/pci/drivers/qla2xxx/unbind
 +</code>
 +
 +To display the filename & associated WWN details for all FC HBA controllers:
 +<code>
 +# awk '{print substr(FILENAME, $0)" \"" $0"\" "}'   /sys/class/fc_host/host*/port_name
 +/sys/class/fc_host/host28/port_name "0x2001000e1ec2f9ca"
 +/sys/class/fc_host/host29/port_name "0x2001000e1ec2f9cb"
 +</code>
 +
 +To display the filename & HBA port status:
 +<code>
 +# awk '{print substr(FILENAME, $0)" \"" $0"\" "}'   /sys/class/fc_host/host*/port_state
 +/sys/class/fc_host/host28/port_state "Online"
 +/sys/class/fc_host/host29/port_state "Online"
 +</code>