This is an old revision of the document!


some useful commands around fibre channel

WWN & Co

get the wwn from the adapers

SLES

# for i in $(ls -d /sys/class/scsi_host/host*/device/fc_host/host*/port_name); do echo $i $(cat $i);done

e.g.

# 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

using systool

according to The Geek Diary

  • To check the available HBA ports :
# systool -c fc_host
Class = "fc_host"

  Class Device = "host2"
    Device = "host2"

  Class Device = "host3"
    Device = "host3"
  • To find the WWNs for the HBA ports :
# systool -c fc_host -v | grep port_name
    port_name           = "0x500143802426baf4"
    port_name           = "0x500143802426baf6"
  • To check the state of the HBA ports (online/offline) :
# systool -c fc_host -v | grep port_state
    port_state          = "Online"
    port_state          = "Online"

multipathing

paths & devices

multipathd commands

multipathd is not only the the multipath daemon itself, but also a useful command for analysing the SAN:

# multipathd --help

FIXME

Rescaning the SCSI bus

ordinarily you just use the rescan-scsi.sh command. thus, this only reads the configuration again, but does not reinitialize the HBA.

this can be done by:

# echo "1" > /sys/class/fc_host/host<X>/issue_lip

replacing '<X'> with the number of the HBA.

manual switch off/on of HBA

thanks to Veritas

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies