How to relate a failing disk(lun) with its remote port (nport_id)

This is only for legacy HDW paths.
After a problem we had today with our SAN, we where loosing link(milisenconds) to only 1 path
of the four we have:
LVM: Performed a switch for Lun ID = 0 (pv = 0x00000000c0f9c000), from raw device 0x1f170600 (with priority: 0, and current flags: 0x40) to raw device 0x1f0f0600 (with priority: 1, and current flags: 0x0).
from syslog we get the raw device major/minor numer: 0x1f170700
With the minor we get to know our disk:
root:/> ls -l /dev/dsk | grep 170700
brw-r----- 1 bin sys 31 0x170700 May 4 2010 c23t0d7
From the disk the HDW path:
root:/> lssf /dev/dsk/c23t0d7
sdisk card instance 23 SCSI target 0 SCSI LUN 7 section 0 at address 0/0/4/0/ /dev/dsk/c23t0d7
From the HDW path the san(port info)
0/0/4/0/0 ---> HBA
97.11.19 ---> san(n_port id) info
24.0.7 ---> scsi target lun
Now we need to convert these numers into hex 97.11.19:
97 -> 61
11 -> 0b
19 -> 13
And finally with fcmsutil we can find the nport id using our hex conversion 610b13:
root:/> fcmsutil /dev/td0 get remote all | grep -e 610b13 -e Port
Target N_Port_id is = 0x610b13
Port Type = N_PORT
Target Port World Wide Name = 0x50050763030846e2
So Now you can tell your SAN admins which is the wwn of the failing port.
Check Failed stats:
root:/> fcmsutil /dev/td0 devstat all | grep -E '(Nport|Failed)'
Device Statistics for Nport_id 0x610b13
Failed Open of previously opened device 6
Device Statistics for Nport_id 0x613713
Failed Open of previously opened device 5
Device Statistics for Nport_id 0x750b13
Failed Open of previously opened device 6


Post a Comment

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks