Esistono diversi comandi per determinare il WWN di un HBA Fibre Channel (FC) e il relativo stato (online/offline). Il post discute alcuni dei metodi più comunemente usati.
Metodo 1
Per trovare le schede HBA installate sul tuo sistema usa :
# lspci -nn | grep -i hba 07:00.0 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02) 07:00.1 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02)
Per controllare le porte HBA disponibili:
# ls -l /sys/class/fc_host total 0 drwxr-xr-x 3 root root 0 Feb 3 2015 host2 drwxr-xr-x 3 root root 0 Feb 3 2015 host3
Per trovare lo stato delle porte HBA (online/offline):
# more /sys/class/fc_host/host?/port_state :::::::::::::: /sys/class/fc_host/host2/port_state :::::::::::::: Online :::::::::::::: /sys/class/fc_host/host3/port_state :::::::::::::: Online
Per trovare i numeri WWN delle porte sopra:
# more /sys/class/fc_host/host?/port_name :::::::::::::: /sys/class/fc_host/host2/port_name :::::::::::::: 0x500143802426baf4 :::::::::::::: /sys/class/fc_host/host3/port_name :::::::::::::: 0x500143802426baf6
Metodo 2:utilizzo di systool
Un altro comando utile per trovare le informazioni sugli HBA è systool . Se non è già installato, potrebbe essere necessario installare sysfsutils pacchetto.
# yum install sysfsutils
Per controllare le porte HBA disponibili:
# systool -c fc_host Class = "fc_host" Class Device = "host2" Device = "host2" Class Device = "host3" Device = "host3"
Per trovare i WWN per le porte HBA:
# systool -c fc_host -v | grep port_name port_name = "0x500143802426baf4" port_name = "0x500143802426baf6"
Per controllare lo stato delle porte HBA (online/offline):
# systool -c fc_host -v | grep port_state port_state = "Online" port_state = "Online"Come identificare le schede/porte HBA e WWN in Solaris