WWN numbers on linux
From Initq
cat /sys/class/scsi_host/hostn/device/fchost\:hostn/port_name
where n is the host adapter number for your card.
Then you can cat out the messages file and look for your card info to see which scsi host they got loaded on.
[root@aoarnbnfu01 ~]# cat /sys/class/scsi_host/host host0/ host1/ host2/ host3/ host4/ host5/ [root@aoarnbnfu01 ~]# cat /sys/class/scsi_host/host0/device/fc_host\:host0/port_name 0x500110a00017a298 [root@aoarnbnfu01 ~]# cat /sys/class/scsi_host/host1/device/fc_host\:host1/port_name 0x500110a00017a29a [root@aoarnbnfu01 ~]# cat /sys/class/scsi_host/host2/device/fc_host\:host2/port_name 0x10000000c9b3cf04 [root@aoarnbnfu01 ~]# cat /sys/class/scsi_host/host3/device/fc_host\:host3/port_name 0x10000000c9b3cf05 Sep 30 08:21:32 aoarnbnfu01 kernel: scsi0 : qla2xxx Sep 30 08:21:32 aoarnbnfu01 kernel: qla2xxx 0000:10:00.0: Sep 30 08:21:32 aoarnbnfu01 kernel: QLogic Fibre Channel HBA Driver: 8.03.01.05.05.06-k Sep 30 08:21:32 aoarnbnfu01 kernel: QLogic HPAE312A - PCI-Express Dual Port 4Gb Fibre Channel HBA Sep 30 08:21:33 aoarnbnfu01 kernel: Emulex LightPulse Fibre Channel SCSI driver 8.2.0.87.1p Sep 30 08:21:33 aoarnbnfu01 kernel: Copyright(c) 2004-2009 Emulex. All rights reserved. Sep 30 08:21:33 aoarnbnfu01 kernel: ACPI: PCI Interrupt 0000:13:00.0[A] -> GSI 16 (level, low) -> IRQ 50 Sep 30 08:21:33 aoarnbnfu01 kernel: scsi2 : on PCI bus 13 device 00 irq 50
Method 2: /proc/scsi/{adapter-type}/{n} File
bash-3.00# cat /proc/scsi/qla2xxx/1 QLogic PCI to Fibre Channel Host Adapter for QLA2340-SUN: Firmware version 3.03.19 IPX, Driver version 8.01.04 ISP: ISP2312, Serial# E71054 Request Queue = 0x37dc0000, Response Queue = 0x37c50000 Request Queue count = 2048, Response Queue count = 512 Total number of active commands = 1 Total number of interrupts = 5034411 Device queue depth = 0x20 Number of free request entries = 1264 Number of mailbox timeouts = 0 Number of ISP aborts = 0 Number of loop resyncs = 0 Number of retries for empty slots = 0 Number of reqs in pending_q= 0, retry_q= 0, done_q= 0, scsi_retry_q= 0 Host adapter:loop state = <READY>, flags = 0x1a03 Dpc flags = 0x4000000 MBX flags = 0x0 Link down Timeout = 030 Port down retry = 030 Login retry count = 030 Commands retried with dropped frame(s) = 0 Product ID = 4953 5020 2020 0002 SCSI Device Information: scsi-qla0-adapter-node=200000e08b870e30; scsi-qla0-adapter-port=210000e08b870e30; scsi-qla0-target-0=50060e8004295542; scsi-qla0-target-1=50060e8005bd3604; FC Port Information: scsi-qla0-port-0=50060e8004295509:50060e8004295509:3a000a:81; scsi-qla0-port-1=50060e8005bd3604:50060e8005bd3604:3a0036:82; SCSI LUN Information: (Id:Lun) * - indicates lun is not registered with the OS. ( 1: 0): Total reqs 2, Pending reqs 0, flags 0x0*, 0:0:82 00 ( 1: 3): Total reqs 25133, Pending reqs 0, flags 0x0, 0:0:82 00 ( 1: 4): Total reqs 5065249, Pending reqs 1, flags 0x0, 0:0:82 00