Let's then put it that way:
The port_id info below is valid for
Brocade6510 (core) / Brocade5100 (edge) switches running Fabric OS v7.0.x
I'll take a look in Qlogic SDK to see what it offers in terms of polling SAN at some point, I'm good to go with I've got so far.
Vladimir
On Mon, May 5, 2014 at 4:37 PM, Borzenkov, Andrey andrey.borzenkov@ts.fujitsu.com wrote:
# cat /sys/class/fc_host/host1/port_id 0x680400
0x68 - Switch ID, must be unique in a fabric 0x04 - port number on the "0x68" switch
No. It is *often* port number but not always. It depends on switch model and settings. Director class switches from Brocade support more than 256 ports so they "borrow" bits from ALPA part (last byte). Also Brocade switches in the past used different encoding of physical port numbers into area ID (second byte).
You can query physical port numbers using FC management services. I am not aware of any ready-to-use utility that does it. If I had task to write one I probably based it on HBAAPI which exports interfaces to do it (of course, vendors at the end are free to not implement them ...)