System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Relating iSCSI target Address to HP-UX hardware path

 
SOLVED
Go to solution
Records Management
Frequent Advisor

Relating iSCSI target Address to HP-UX hardware path

I have a 11.31 HP-UX server with a P4300 Lefthand array. The P4300 already had nine volumes created. They were shared to the server, and are visible.

 

My question, and I've tried everything that I can think of, is how do I relate the target number coming out of "/opt/iscsi/bin/iscsiutil -pO" with the LUn that was created by the OS?

 

As an example, target #1 from the iscsiutil shows:

 

Target # 1
-----------
        Target Name               : iqn.2003-10.com.lefthandnetworks:jcw-lefthand-san:40:lock-disk
        Target Alias              :
        No. of Target Addresses   : 1

This gived me enough info to relate it back to the P4300. But I have nine LUNS showing up on the server.

 

disk     13  64000/0xfa00/0x6  esdisk   CLAIMED     DEVICE       LEFTHANDiSCSIDisk
                      /dev/cdisk/disk1   /dev/disk/disk13   /dev/rcdisk/disk1  /dev/rdisk/disk13
disk     14  64000/0xfa00/0x7  esdisk   CLAIMED     DEVICE       LEFTHANDiSCSIDisk
                      /dev/cdisk/disk2   /dev/disk/disk14   /dev/rcdisk/disk2  /dev/rdisk/disk14
disk     15  64000/0xfa00/0x8  esdisk   CLAIMED     DEVICE       LEFTHANDiSCSIDisk
                      /dev/cdisk/disk3   /dev/disk/disk15   /dev/rcdisk/disk3  /dev/rdisk/disk15
disk     16  64000/0xfa00/0x9  esdisk   CLAIMED     DEVICE       LEFTHANDiSCSIDisk
                      /dev/cdisk/disk4   /dev/disk/disk16   /dev/rcdisk/disk4  /dev/rdisk/disk16
disk     17  64000/0xfa00/0xa  esdisk   CLAIMED     DEVICE       LEFTHANDiSCSIDisk
                      /dev/cdisk/disk5   /dev/disk/disk17   /dev/rcdisk/disk5  /dev/rdisk/disk17
disk     18  64000/0xfa00/0xb  esdisk   CLAIMED     DEVICE       LEFTHANDiSCSIDisk
                      /dev/cdisk/disk6   /dev/disk/disk18   /dev/rcdisk/disk6  /dev/rdisk/disk18
disk     19  64000/0xfa00/0xc  esdisk   CLAIMED     DEVICE       LEFTHANDiSCSIDisk
                      /dev/cdisk/disk7   /dev/disk/disk19   /dev/rcdisk/disk7  /dev/rdisk/disk19
disk     20  64000/0xfa00/0xd  esdisk   CLAIMED     DEVICE       LEFTHANDiSCSIDisk
                      /dev/cdisk/disk8   /dev/disk/disk20   /dev/rcdisk/disk8  /dev/rdisk/disk20
disk     21  64000/0xfa00/0xe  esdisk   CLAIMED     DEVICE       LEFTHANDiSCSIDisk
                      /dev/cdisk/disk9   /dev/disk/disk21   /dev/rcdisk/disk9  /dev/rdisk/disk21

How can I relate the iSCSI target number to the appropriate LUN?

 

For the EVA, I have always used the evainfo tool to accomplish this.

1 REPLY
Records Management
Frequent Advisor
Solution

Re: Relating iSCSI target Address to HP-UX hardware path

Ok, I think I figured it out.

 

Old ioscan

$ ioscan -H255 will show:    

disk     12  255/0/8.0.0.0   sdisk   CLAIMED     DEVICE       LEFTHANDiSCSIDisk
                            /dev/dsk/c11t0d0   /dev/rdsk/c11t0d0

             255/<iscsi_virtual_HBA>/<session_instance>.<virtual_bus>.<virtual_target>.<lun>
             Note the session_instance field.

             This is actually an iSCSI Session ID number.

New ioscan

ioscan -m lun, which will show:

disk     21  64000/0xfa00/0xe   esdisk  CLAIMED     DEVICE       online  LEFTHANDiSCSIDisk
             64000/0x2/0x0.0x8.0x0
                      /dev/cdisk/disk9   /dev/disk/disk21   /dev/rcdisk/disk9  /dev/rdisk/disk21

The iSCSI session number is here ==> 64000/0x2/0x0.0x8.0x0
                                                     ^

# iscsiutil -p -S <session instance>    
To get details about the session including the IP address of the target and information about the specific LUN.

jcwvmh1 #  /opt/iscsi/bin/iscsiutil -p -S 8

Session information
-------------------

Session # 1
------------
        Session Instance No.      : 8
        ISID                      : 0x800000000008
        Session State             : Online
        Target Name               : iqn.2003-10.com.lefthandnetworks:jcw-lefthand-san:40:lock-disk
        Target Alias              :
        No. of Target Addresses   : 1