Operating System - HP-UX
1843869 Members
7364 Online
110225 Solutions
New Discussion

Re: Hardware Path = fabric N_Port_id?

 
Andy_188
Occasional Contributor

Hardware Path = fabric N_Port_id?

I am trying to find a way to correlate the fibre channel target N_Port_id or WWN for a fabric attached tape drive with it's corresponding device file. Using the command `fcmsutil /dev/td0 get remote all` I can get all of the tape drives N_Port_id's and WWN's that are zoned through that particular HBA, but I don't know how to correlate these identifiers back to a hardware address or tape drive device file.

Is there any relationship between the Target N_Port_id returned by the fcmsutil command and the hardware address returned from ioscan? If not, any other suggestions?
7 REPLIES 7
Hoang Chi Cong_1
Honored Contributor

Re: Hardware Path = fabric N_Port_id?

Hello.

Why don't you the -rls option?
Please try.

Jim
Looking for a special chance.......
Brian Butscher
Frequent Advisor

Re: Hardware Path = fabric N_Port_id?

Andy,

Run the command fcmsutil /dev/td0 and you will get the following formatted output:
casper:/#fcmsutil /dev/td0

Vendor ID is = 0x00103c
Device ID is = 0x001028
TL Chip Revision No is = 2.3
PCI Sub-system Vendor ID is = 0x00103c
PCI Sub-system ID is = 0x000006
Topology = PTTOPT_FABRIC
Local N_Port_id is = 0x011000
N_Port Node World Wide Name = 0x50060b00000b76ed
N_Port Port World Wide Name = 0x50060b00000b76ec
Driver state = ONLINE
Hardware Path is = 0/2/0/0
Number of Assisted IOs = 94254276
Number of Active Login Sessions = 0
Look at the hardware path, it will show something similiar to the hardware path above, like 0/2/0/0. Run an ioscan -fnC tape and you will get the output similiar to the following output:
casper:/#ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
=================================================================================
tape 4 0/2/0/0.1.17.0.0.0.4 atdd CLAIMED DEVICE IBM ULTRIUM-TD1
/dev/rmt/4m /dev/rmt/c3t0d4BEST
/dev/rmt/4mb /dev/rmt/c3t0d4BESTb
/dev/rmt/4mn /dev/rmt/c3t0d4BESTn
/dev/rmt/4mnb /dev/rmt/c3t0d4BESTnb

tape 5 0/2/0/0.1.17.0.0.0.5 atdd CLAIMED DEVICE IBM ULTRIUM-TD1
/dev/rmt/5m /dev/rmt/c3t0d5BEST
/dev/rmt/5mb /dev/rmt/c3t0d5BESTb
/dev/rmt/5mn /dev/rmt/c3t0d5BESTn
/dev/rmt/5mnb /dev/rmt/c3t0d5BESTnb

In the above example, hardware path
0/2/0/0.1.17.0.0.0.4 correlates to tape /dev/rmt/4m, 0/2/0/0.1.17.0.0.0.5 correlates to tape /dev/rmt/5m that are configured on N_Port Port World Wide Name = 0x50060b00000b76ec (from the output of the fcmsutil command above).

I hope this helps you out.

Regards,


Brian



Andy_188
Occasional Contributor

Re: Hardware Path = fabric N_Port_id?

Brian,

Thank you for taking the time to put all of that information into your reply. The information is helpful, but I still need a little more info.

You showed how to correlate a tape drive device file to the N_Port_ID of the HBA. I need to correlate the tape drive device file to the N_Port_ID or WWN of the actual tape drive. I can get the tape drives WWN with the `get remote all` option for fcmsutil, but can't find a way to correlate this back to the tape drives device file.
David Child_1
Honored Contributor

Re: Hardware Path = fabric N_Port_id?

Andy,

Try this. I came up with this for our network about a year ago.

The hardware path is derived by converting nport ID as follows;

Note: the nport ID is in hex

1. convert the first two characters in the nport ID to decimal

Example: nport ID: 621755 -> 0x62 -> 98

2. convert the 3rd and 4th characters of the nport ID to decimal

Example: 621755 -> 0x17 -> 23

In this example nport ID: 621755 = 0.98.23.

Another Example:

$ ls -l /dev/rmt/10m
crw-rw-rw- 2 bin bin 205 0x1f5000 Jul 21 12:15 /dev/rmt/10m

$ lssf /dev/rmt/10m
stape card instance 35 SCSI target 5 SCSI LUN 0 at&t best density available at address 6/2/0.97.21.255.5.5.0 /dev/rmt/10m

This equals nport ID: 611555

David
Andy_188
Occasional Contributor

Re: Hardware Path = fabric N_Port_id?

Chad,

thanks for the info! How do the 5th and 6th characters of the n_port_id relate back to the hardware address?
David Child_1
Honored Contributor

Re: Hardware Path = fabric N_Port_id?

Sorry about that.

For disk drives you just take the last two and convert them to decimal. It then becomes the next set of numbers in the hardware path;

0x650913 => 0/0/0.101.9.19.0 (the 19 in this case).

For tape drives this set of numbers in the hardware path always seems to come up as 255 (e.g. 0/0/0.102.8.255.0). I have not been able to determine what the last two digits in the nport ID mean in this case. It may depend on whether your drives are loop or fabric.

David
Sundar_7
Honored Contributor

Re: Hardware Path = fabric N_Port_id?

Andy,

Refer the attached guide on FC addressing. Could be of some help in understanding the FC addressing mechanism in HP-UX :-)

Sundar
Learn What to do ,How to do and more importantly When to do ?