Operating System - HP-UX
1748169 Members
3925 Online
108758 Solutions
New Discussion юеВ

Re: how to map disk devices on HP-UX to WW LUN Name on an EVA4

 
SOLVED
Go to solution
Taoufik Grira
Occasional Advisor

how to map disk devices on HP-UX to WW LUN Name on an EVA4

Hi all,

I have an hp-ux 11.11 serer connected to an eva-4k disk bay. I would like to determine for each disk device on the system the associated LUN the eva-4k.
For another plateform of hp-ux 11.11 and an eva-3k, I'm using secure path manager to do determine this mapping; But this tool is not supported by eva-3k.

Any help will be greately appreciated.

Thanks a lot,
Taoufik Grira
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: how to map disk devices on HP-UX to WW LUN Name on an EVA4

Shalom Taoufik,

1) Use the control station of the EVA to assign LUNS to the 11.11 server by WWN
2) insf -C disk or reboot the 11.11 server
3) Run ioscan or ioscan -fnC disk to get the hardware path of the EVA-4000 assigned LUNS.

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
Taoufik Grira
Occasional Advisor

Re: how to map disk devices on HP-UX to WW LUN Name on an EVA4

Hi Steven,

Thank you for your quick response;

In fact LUNS are already created and presented to the server. What I need, is to determine which LUN on EVA-4k corresponds to my disk device /dev/dsk/c22t1d6.
How can I do this using with hp-ux and EVA-4k

Thanks again,
Taoufik Grira
Torsten.
Acclaimed Contributor
Solution

Re: how to map disk devices on HP-UX to WW LUN Name on an EVA4

You can either decode the LUN from hardware path or use "evainfo" (from www.hp.com).

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!   
Taoufik Grira
Occasional Advisor

Re: how to map disk devices on HP-UX to WW LUN Name on an EVA4

Thanks a lot for your help Trosten; I have used evainfo tool for hp-ux pa_11.11, and I found what I'm looking for.
But could you please give an idea about how to decode LUN Id or WW Name from hardware path?

Thanks again,
Taoufik Grira
Torsten.
Acclaimed Contributor

Re: how to map disk devices on HP-UX to WW LUN Name on an EVA4

Several threads about this, e.g.

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1317801

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!   
Sivakumar MJ._1
Respected Contributor

Re: how to map disk devices on HP-UX to WW LUN Name on an EVA4

This link will give you the details..

http://www.docs.hp.com/en/AB379-96004/ch01s11.html
Alzhy
Honored Contributor

Re: how to map disk devices on HP-UX to WW LUN Name on an EVA4

It is possible to get the LUN ID (or is it number) from HW Path BUT not the WWWID of the EVA Vdisk. Only "evainfo" or a low level SCSI inquiry or "diskinfo" can.

For instance:

evainfo output:

/dev/rdsk/c70t0d5 5000-1FE1-501F-0040 6005-08B4-000C-E392-0003-C000-08A6-0000 1048576MB Ctl-B/FP-4/NonOptimized

# ioscan -kf /dev/rdsk/c70t0d5
Class I H/W Path Driver S/W State H/W Type Description
==========================================================================
disk 494 1/0/0/0.6.186.128.0.0.5 sdisk

The last 3 numbers in your HW path will define the LUN Number from an EVA perspective. b.t.l

Hakuna Matata.

Re: how to map disk devices on HP-UX to WW LUN Name on an EVA4

The only way I know of to get from a DSF to a vdisk name is:

i) Manually by using a combination of evainfo and then looking up WWID in Command View EVA

-or-

ii) Install a copy of sssu on the HP-UX system and use it to grab the data you need direct from Command View using a simple script... Here's a quick and dirty example I've used in the past (note only tested on 1 EVA and 1 version of Command View to might need some tweaking - also note its very slow as it logs in and out of Command View EVA for each LUN. I'm sure it could be optimised fairly easily...)

You'll need to ensure you can get sssu working correctly on the HP-UX host and in your PATH before running the script - you'll also need to set the 4 variables at the top of the script appropriately for your environment (USER, PASS, CV and SYSTEM). If your security policies say "no clear text passwords" then this isn't going to work for you...

Anyway you're welcome to give it a try:

-------------------------------------------
#!/usr/bin/sh

USER=Administrator
PASS=xxxxxxx
CV=mycmdview.mycompany.com
SYSTEM=MYEVANAME_IN_CV


typeset -l wwid
typeset -L20 dsf
typeset -R40 vdisk

function call_sssu
{
sssu << EOF
${CV}
${USER}
${PASS}
select system ${SYSTEM}
${1}
exit
EOF
}


echo "DSF |vdisk Name |Size"
echo "---------------------+----------------------------------------+------"
evainfo -a -f csv | sed 1d | awk -F, '{ print $1, " ", $3}' | while read dsf wwid
do
vdisk=$(call_sssu "find vdisk lunwwid=${wwid}" | tr '\\' '/' | awk -F: '/objectname/ { print $2 }' | sed -e 's/\/Virtual Disks//g' -e 's/\/ACTIVE//g' )
size=$(call_sssu "find vdisk lunwwid=${wwid}" | awk -F: '/allocatedcapacity / { print $2 }' )
echo "${dsf} ${vdisk} ${size}GB"
done
-------------------------------------------

Here's a typical output:


DSF |vdisk Name |Size
---------------------+----------------------------------------+------
/dev/rdsk/c1t0d1 /mygroup/vdisk1 100GB
/dev/rdsk/c3t0d1 /mygroup/vdisk1 100GB
/dev/rdsk/c6t0d1 /mygroup/vdisk1 100GB
/dev/rdsk/c6t0d2 /mygroup/vdisk2 100GB
/dev/rdsk/c6t0d3 /mygroup/vdisk3 100GB
/dev/rdsk/c6t0d4 /mygroup/vdisk4 100GB
/dev/rdsk/c8t0d1 /mygroup/vdisk1 100GB
/dev/rdsk/c8t0d3 /mygroup/vdisk3 100GB
/dev/rdsk/c8t0d4 /mygroup/vdisk4 100GB
/dev/rdsk/c8t0d2 /mygroup/vdisk2 100GB
/dev/rdsk/c1t0d2 /mygroup/vdisk2 100GB
/dev/rdsk/c1t0d3 /mygroup/vdisk3 100GB
/dev/rdsk/c1t0d4 /mygroup/vdisk4 100GB
/dev/rdsk/c3t0d2 /mygroup/vdisk2 100GB
/dev/rdsk/c3t0d3 /mygroup/vdisk3 100GB
/dev/rdsk/c3t0d4 /mygroup/vdisk4 100GB

If you look at the raw output from sssu, you'll see there's a lot more you could include in here if you wanted to.

HTH

Duncan

I am an HPE Employee
Accept or Kudo

Re: how to map disk devices on HP-UX to WW LUN Name on an EVA4

>> But could you please give an idea about how to decode LUN Id or WW Name from hardware path?


There's no direct relationship between an EVA LUN ID and HW path on HP-UX11iv2/11iv1, as it's not how hardware paths are defined in HP-UX - if you present *all* your LUNs from your EVA to just one HP-UX host, you should be able to figure out the LUN IDs, just from the HW path (obviously with LUN1 starting at cXt0d1, LUN2 at cXt0d2, LUN8 at cXt1d0 and proceeding up until the LUN ID 128 with is at c(X+1)t0d0 and so on...

But if you are presenting to multiple hosts you won't see anything like this...

HTH

Duncan

I am an HPE Employee
Accept or Kudo