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

How to find the LUN ID of a HPUX 11.31 11iv3 system

 
SOLVED
Go to solution
Albert Smith_1
Regular Advisor

How to find the LUN ID of a HPUX 11.31 11iv3 system

I have been searching for this info for a while and have been hard pressed to find an answer until recently.

I found this by downloading the "The Next Generation Mass Storage Stack" Manual for 11iv3

First step is to determine the LUN to DSF mapping

> ioscan -m lun

----snip-----
disk 25 64000/0xfa00/0xb esdisk CLAIMED DEVICE online FALCON IPSTOR DISK
0/4/0/0/0/0.0x2101001b323cacb9.0x4002000000000000
0/4/0/0/0/0.0x2101001b323cdbb7.0x4002000000000000
0/4/0/0/0/0.0x2101001b323c8abe.0x4002000000000000
0/4/0/0/0/0.0x2101001b323c6dba.0x4002000000000000
0/4/0/0/0/0.0x2101001b323a0ac3.0x4002000000000000
0/4/0/0/0/0.0x2101001b323c70ba.0x4002000000000000
0/4/0/0/0/0.0x2101001b323cd0bc.0x4002000000000000
0/4/0/0/0/0.0x2101001b323c47bd.0x4002000000000000
0/4/0/0/0/0.0x2101001b323c76be.0x4002000000000000
0/4/0/0/0/0.0x2101001b3230c99b.0x4002000000000000
0/4/0/0/0/0.0x2101001b323cc5b9.0x4002000000000000
0/4/0/0/0/0.0x2101001b3222a4d9.0x4002000000000000
0/4/0/0/0/1.0x2101001b323c4bb8.0x4002000000000000
0/4/0/0/0/1.0x2101001b323cddb1.0x4002000000000000
0/4/0/0/0/1.0x2101001b323c6dba.0x4002000000000000
0/4/0/0/0/1.0x2101001b323c70ba.0x4002000000000000
0/4/0/0/0/1.0x2101001b323cc5b9.0x4002000000000000
0/4/0/0/0/1.0x2101001b323c47bd.0x4002000000000000
0/4/0/0/0/1.0x2101001b323c01bd.0x4002000000000000
0/4/0/0/0/1.0x2101001b323c76be.0x4002000000000000
0/4/0/0/0/1.0x2101001b3230c99b.0x4002000000000000
0/4/0/0/0/1.0x2101001b323ae5c2.0x4002000000000000
0/4/0/0/0/1.0x2101001b323cd0bc.0x4002000000000000
0/4/0/0/0/1.0x2101001b3222a4d9.0x4002000000000000
/dev/disk/disk25 /dev/rdisk/disk25



Take one path of this map do get the lun id by the following

> scsimgr get_attr -H 0/4/0/0/0/1.0x2101001b3222a4d9.0x4002000000000000 lunid


SCSI ATTRIBUTES FOR LUN PATH : 0/4/0/0/0/1.0x2101001b3222a4d9.0x4002000000000000

name = lunid
current =0x4002000000000000 (LUN # 2, Flat Space Addressing)
default =
saved =


8 REPLIES
Torsten.
Acclaimed Contributor
Solution

Re: How to find the LUN ID of a HPUX 11.31 11iv3 system

Hi Albert,

is it a question? I don't think so.

However, according to the docs the 0x4002 means

40 (based on binary values) Volume Set Addressing (Flat Space Addressing)

02 is the LUN number in hex.

This is for FC devices.


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: How to find the LUN ID of a HPUX 11.31 11iv3 system

BTW, I still prefer to use the legacy path for this ;-)

If you have for example something like

0/4/0/0/0/1....0.7.6

You convert the 6 into 3 binary digits

110

and the 7 into 4 binary digits

0111

and combine them
7_____6
0111 110

Then make this (0111110) a decimal:
it is LUN 62.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Steven E. Protter
Exalted Contributor

Re: How to find the LUN ID of a HPUX 11.31 11iv3 system

Shalom,

If this is EMC, consider using the inq tool to get more information.

ioscan -m dsf

ioscan -m hwpath

Might provide you easier to digest information.

If you like playing with awk, you can even write a script that depots all this to you.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Torsten.
Acclaimed Contributor

Re: How to find the LUN ID of a HPUX 11.31 11iv3 system

FALCONSTOR is software (more or less), isn't it?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Dennis Handly
Acclaimed Contributor

Re: How to find the LUN ID of a HPUX 11.31 11iv3 system

>Torsten: If you have for example something like: 0/4/0/0/0/1....0.7.6

Or simply: echo $(( 7 * 8 + 6 ))
Prasanth Thomas
Valued Contributor

Re: How to find the LUN ID of a HPUX 11.31 11iv3 system

Hi,
in v3 you have to run the below command

#ioscan -m dsf

And let me know what you are looking for.

Regards,
Prasanth Thomas.
Prasanth Thomas
Valued Contributor

Re: How to find the LUN ID of a HPUX 11.31 11iv3 system

Hi,

After finding the disk number you can use the below command.
#scsimgr get_info all_lpt -D /dev/rdisk/diskxx

Regards,
Prasanth Thomas.
Albert Smith_1
Regular Advisor

Re: How to find the LUN ID of a HPUX 11.31 11iv3 system

All Answers are correct but for those not familiar with HP-UX or new to it and are cutting their teeth with HP-UX 11iv3 they may not know how to use all the options of the ioscan.

But in the upcoming releases of HP-UX the legacy view will be removed and all you have is the agile view.