1833779 Members
1955 Online
110063 Solutions
New Discussion

WWN in HP-UX

 
SOLVED
Go to solution
Bruno Cunha
Frequent Advisor

WWN in HP-UX

Hello all,

I have connected a storage with several fiber tape drives. How can I see the wwn of each drive so I can figure out in what position is each drive in the storage ?

Thanks
Do it today, don't leave for tomorrow
8 REPLIES 8
Massimo Bianchi
Honored Contributor
Solution

Re: WWN in HP-UX

Hi,
i don't know why do you want to know the wwn...

the only utility i know that show the wwn is fcmsutil, refer to the man pages for all the option.


But you can decipher the ioscan more easily, and with the same information:



|---------------> Protocol type
| |------------> Area
| | |---------> Port ID
0/8/0/0.3.23.42.0.0.0
| | |--> Lun: 3 bits for LUN from 0 to 7
| |----> Target: 4 bits for target from 0 to 15
|------> Bus: 8 bits but it uses only 4 upper bits for bus

In general, we have for example: (terminology)

0/8/0/0 --> This is HBA address (Host Bus Adapter)
3.23.42 --> Fibre channel Path has 3 decimal fields
0.0.0 --> Virtual SCSI-2 has 3 decimal fields


Massimo
Massimo Bianchi
Honored Contributor

Re: WWN in HP-UX

Hi,
forgot to say that previous was the output in case of a SAN, with a brocade switch.

Massimo
Eugeny Brychkov
Honored Contributor

Re: WWN in HP-UX

fcmsutil /dev/tdX devstat all | more
you can look at 'man fcmsutil' to see more options of fcmsutil utility.
Usually you can match drives to device files/paths by checking their SCSI or loop ids (or switch ports and switch domain Ids), see Massimo's post.
In addition to his reply I would add that FC identifier of storage device consists of 3 numbers, which are
x.y.z
x = switch domain ID (switch to which storage device is connected to), 8 for private loop;
y = switch's port to which storage device is connected to (0 for private loop);
z = alpa, 0 for fabric
Eugeny
RolandH
Honored Contributor

Re: WWN in HP-UX

Do an ioscan on you server

# ioscan -kfnCfc (in my case I get)

Class I H/W Path Driver S/W State H/W Type Description
=================================================================
fc 0 0/10/0/0 td CLAIMED INTERFACE HP Tachyon XL2 Fibre Channel Mass Storage Adapter
/dev/td0
fc 1 0/12/0/0 td CLAIMED INTERFACE HP Tachyon XL2 Fibre Channel Mass Storage Adapter
/dev/td1

thend do

# /opt/fcms/bin/fcmsutil /dev/td0

Vendor ID is = 0x00103c
Device ID is = 0x001029
XL2 Chip Revision No is = 2.3
PCI Sub-system Vendor ID is = 0x00103c
PCI Sub-system ID is = 0x00128c
Topology = PRIVATE_LOOP
Link Speed = 2Gb
Local N_Port_id is = 0x000001
Local Loop_id is = 125
N_Port Node World Wide Name = 0x50060b000011b42b
N_Port Port World Wide Name = 0x50060b000011b42a
Driver state = ONLINE
Hardware Path is = 0/10/0/0
Number of Assisted IOs = 28429722
Number of Active Login Sessions = 4
Dino Present on Card = NO
Maximum Frame Size = 960
Driver Version = @(#) PATCH_11.11: libtd.a : Jun 28 2002, 11:08:35, PHSS_26799



Similar for all other fc devices


Regards
Roland
Sometimes you lose and sometimes the others win
Bruno Cunha
Frequent Advisor

Re: WWN in HP-UX

Thanks to all,

that will help me alot.

Now some points... :-)
Do it today, don't leave for tomorrow
RolandH
Honored Contributor

Re: WWN in HP-UX

I forgot something If you want the wwn for all attched devices at this fc controller you must do

# /opt/fcms/bin/fcmsutil /dev/td0 get remote all

the device file is valid in my case. replace it with your device file from the tachyon controller where your drive is attached.


Regards
Roland
Sometimes you lose and sometimes the others win
Bruno Cunha
Frequent Advisor

Re: WWN in HP-UX

In my case isn't a tachyon but a jnic fc card.
The fcmsutil is a utility for tachyon only ? Or it will work for jnic ?
The output will give a association from a wwn to a device file ? For example /dev/rmt/ wwn:0x50060b000011b42b
I want to get this association because I only know for a fisical drive is wwn, then I will know that the drive with the wwn something belongs to the device file /dev/rmt/xxxx wich belongs to the fisical drive in position 5 in the library.

Regards
Do it today, don't leave for tomorrow
RolandH
Honored Contributor

Re: WWN in HP-UX

Hi Bruno,

I'm not familar with jnic cards but I found this on http://www.jni.com/Drivers
----------------------------------------------
Determine the jnic interface name and World Wide Port Name (WWPN)
of the storage.

This can be done by searching the /var/adm/syslog/syslog.log file
for messages that look like:

vmunix: jnic0: Port 0000EF (WWN 50060B0000092B1E:50060B0000125F8E)
available.

The following UNIX shell command will also expose all storage
ports found by the HBA:

grep ') available' /var/adm/syslog/syslog.log

In the example above, the jnic interface name is "jnic0", and
the WWPN is "50060B0000125F8E".
----------------------------------------------

So, figure out your product ID from your card and get the manual from the side.

Regards
Roland
Sometimes you lose and sometimes the others win