Operating System - HP-UX
1831947 Members
2823 Online
110033 Solutions
New Discussion

LUN number to device file mapping in VA7100

 
SOLVED
Go to solution
Saneesh S
Advisor

LUN number to device file mapping in VA7100

Hi All,

Can anyone tells me how the LUN number to device file mapping in VA7100 is done. Suppose I want to find out the device file for the disk having in a particular LUN number. We have got HP Command View SDM.
Thnx in advance.

Regards,
Saneesh S.
6 REPLIES 6
RAC_1
Honored Contributor

Re: LUN number to device file mapping in VA7100

The device file mappping is as follows.

cxtxd0-cxtxd7

Then target changes. 0-7 is lun numbers.

You can run lssf on device files and check.
There is no substitute to HARDWORK
Luk Vandenbussche
Honored Contributor
Solution

Re: LUN number to device file mapping in VA7100

This is the rule

/dev/dsk/c10txdy (device file)

8*x + y = Z (LUN Z)

In your case

/dev/dsk/c10t0d0 : 8 * 0 + 0 = LUN 0
/dev/dsk/c10t0d1 : 8 * 0 + 1 = LUN 1
..
/dev/dsk/c10t0d7 : 8 * 0 + 7 = LUN 7
/dev/dsk/c10t1d0 : 8 * 1 + 0 = LUN 8

See also

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=364047
Saneesh S
Advisor

Re: LUN number to device file mapping in VA7100

Hi Vandenbussche,

Tnx a lot. I was looking for this answer only.

Regards,
Saneesh S.
Bob_Vance
Esteemed Contributor

Re: LUN number to device file mapping in VA7100

Of course, this doesn't give you the X value in cXtydz.
And for each 128 LUNs, the X value changes (and it doesn't just increment -- it depends on what order the LUNs were created).

The "real" formula is
LUN# = 128*x + 8*y + z

However, the "x", here, is *not* the "X" in cXtydz (the "y" and "z" are, as stated previously).

The "x" is part of the *hardware path* of the disk in ioscan.

The actual device name can be gotten as follows:

. if the LUN was just created, execute
# ioscan
# insf -e

. # ioscan -fnCdisk >/tmp/ioscan-fnCdisk

. each group of 128 LUNs is delimited by a line for a dummy "ext_bus" with driver type "fcparray"

. the formula 128*x + 8*y + z =LUN# will give you x,y,z values that correspond to the hardware path in that ioscan output.

. the path looks something like
... disk 91 0/2/1/0.1.0.0.x.y.z
so search for disk.*x\.y\.z

. the line after the matching HW path give you the actual device name:
... /dev/dsk/c32t2d0 /dev/rdsk/c32t2d0

If you have multiple HBA paths to the array then you will have 2 hardware paths and device names for the LUN.

If you have multiple arrays, then it is even more complicated -- you must also match the beginning part of the disk hardware path to the hardware path of the particular array.


hth
bv
"The lyf so short, the craft so long to lerne." - Chaucer
Uday_S_Ankolekar
Honored Contributor

Re: LUN number to device file mapping in VA7100

I would use armtopology command. It will give you all the details related to device name, LUN , Hosts etc
armtopology is in /opt/sanmgr/commandview/client/sbin directory

-USA
Good Luck..
Bob_Vance
Esteemed Contributor

Re: LUN number to device file mapping in VA7100

Hi, Uday

>I would use armtopology command.

Well sure, if you want to do it the *easy* way ;>)

However, 'armtopology' doesn't give the array name, so, in a multiple-array environment, you still have to somehow match it to an array.

There doesn't seem to be a way, a priori, to determine the particular array HW path in a multi-path, multi-array environment. I suspect that 'armtopology' is basically doing what I outlined manually -- I notice that there are various ioscan-like outputs in the /var/opt/sanmgr.

One way would be to create LUN0 in each array as a different size when first setting up the arrays. Another way, is to document the arrays' HW path when first setting it up. Another way would be to create a new temp LUN on a particular array and then see on which HW path it shows up.

BTW,
LUNs don't have to be created sequentially, so the situation where LUN# > 128 can easily arise. E.g., create LUNs above 500 as scratch LUNs, or whatever.


bv


"The lyf so short, the craft so long to lerne." - Chaucer