Hi,
rescan for new LUNs on a Emulex Fibre Channel Controller:
List all HBAs
1 2 3 4 5 | root@debdev # ls -l /sys/class/fc_host lrwxrwxrwx 1 root root 0 Oct 24 12:22 host10 -> ../ lrwxrwxrwx 1 root root 0 Oct 24 12:22 host11 -> ../ lrwxrwxrwx 1 root root 0 Oct 24 12:22 host7 -> ../. lrwxrwxrwx 1 root root 0 Oct 24 12:22 host9 -> ../. |
Start a rescan for new LUNs on a HBA(means real FC Ports not Adapters)
1 2 | root@debdev # echo "1" > /sys/class/fc_host/host10/issue_lip root@debdev # echo "- - -" > "/sys/class/scsi_host/host10/scan" |
Get some fibre channel information
The fabric a HBA is connected to
1 2 | root@debdev # cat /sys/class/fc_host/host10/fabric_name 0x100056eb2a367958 |
The WWNN (World wide node name)
1 2 | root@debdev # cat /sys/class/fc_host/host10/node_name 0x20000060ca3badb8 |
The WWPN (World wide port name)
1 2 | root@debdev # cat /sys/class/fc_host/host10/port_name 0x10000060ca3badb8 |
Port speed
1 2 | root@debdev # cat /sys/class/fc_host/host10/speed 8 Gbit |
Current Porttype
1 2 | root@debdev # cat /sys/class/fc_host/host10/port_type NPort (fabric via point-to-point) |
Port State
1 2 | root@debdev # cat /sys/class/fc_host/host10/port_state Online |
You can also use the systool to query the sys filesystem
1 | root@debdev # systool -c fc_host -v |
To list the discovered WWNN and WWPNs use
1 | root@debdev # systool -c fc_transport -v |
Michael