Online Expert Day - HPE Data Storage - Live Now
April 24/25 - Online Expert Day - HPE Data Storage - Live Now
Read more
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Command to get lun number in hp ux

KK07
Occasional Visitor

Command to get lun number in hp ux

Hi,

Is there any command to find out the lun number in hpux at the OS level, without access to storage ?

Thanks

 

 

P.S. This thread has been moved from HP 3PAR StoreServ Storage to o HP-UX > sysadmin. - Hp Forum Moderator

14 REPLIES
Matti_Kurkela
Honored Contributor

Re: Command to get lun number in hp ux

Maybe.
There are some free storage-system-specific tools that can read the SCSI attributes of the LUNs and translate them into human-readable storage LUN numbers.

For example, download & install "evainfo" for HP EVA storage systems, or "xpinfo" for HP XP storage. I understand they are available at http://www.hp.com/go/support if you search using the model name of the storage system.

EMC has an "inq" tool which covers all EMC storage systems. It is available for free here:
ftp://ftp.emc.com/pub/elab/inquiry/
Just pick the version you want (usually the latest one), download the appropriate file for your OS (inq.HPUXIA64 for Itanium systems, inq.hpux64 for PA-RISC), set it as executable and run it.

Other storage manufacturers may have their own tools.

MK
MK
Kapil Jha
Honored Contributor

Re: Command to get lun number in hp ux

which OS version and which storage?
From OS you can not tell the LUN number without any tools provided by Storage, becaouse OS would just see the device number and not the LUN number which is on storage side.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Prasanth V Aravind
Trusted Contributor

Re: Command to get lun number in hp ux

yes .. you have to know which is your storage model...

for xp storages you can use xpinfo
for ibm storages use sdd tool

GUdlcuk
Prasanth
singh sanjeev
Trusted Contributor

Re: Command to get lun number in hp ux

if you have EMC storage then you can use command

#syminq
or
#syminq -pdevfile
Sanjeev Singh
GPissutto
Frequent Advisor

Re: Command to get lun number in hp ux

For HP-UX 11.31:
#scsimgr get_info -D special_disk_device |grep WWID

Johnson Punniyalingam
Honored Contributor

Re: Command to get lun number in hp ux

command understand of lun number in hpux at OS level.

Example :-

1/0/2/1/0.6.1.0.0.0.1

1/0/2/1/0 -> HBA hardware address

.6.1.0 -> SAN domain/area/port

0.0.1 -> Array LUN ID
Problems are common to all, but attitude makes the difference
ani007
Super Advisor

Re: Command to get lun number in hp ux

Fire the following command if you have EMC storage.But it will not work for 10.20.

#inq -nodots -clar_wwn
---------------------------------------
Ex:-
ynefa11n:root [/root] inq -nodots -clar_wwn
Inquiry utility, Version V7.3-771 (Rev 0.0) (SIL Version V6.3.0.0 (Edit Level 771)
Copyright (C) by EMC Corporation, all rights reserved.
For help type inq -h.

-------------------------------------------------------------------------------------------------
CLARiiON Device Array Serial # SP IP Address LUN WWN (all 32 hex digits required)
-------------------------------------------------------------------------------------------------
/dev/rdsk/c32t0d0 APM00074202510 A xxx.xxx.xxx.xxx 0x009a 6006016068cf1a0088f85d0491a3dc11
/dev/rdsk/c32t0d1 APM00074202510 A xxx.xxx.xxx.xxx 0x03e8 6006016068cf1a006830077707e0dc11
/dev/rdsk/c32t0d2 APM00074202510 A xxx.xxx.xxx.xxx 0x03e9 6006016068cf1a006930077707e0dc11
/dev/rdsk/c32t0d3 APM00074202510 A xxx.xxx.xxx.xxx 0x03ea 6006016068cf1a004e359f8507e0dc11


Now look at the LUN column for the 1st one the value is 0x009a. just remove 0x.so now the value is 009a. it is in hexadecimal.you need to convert it to decimal.so the value in decimal is 154.so lun no is 154.
madhuchakkaravarthy
Trusted Contributor

Re: Command to get lun number in hp ux

hi

any how u need to have a tool as evainfo for EVA and xpinfo for XP storage.


regards

MC

Hakki Aydin Ucar
Honored Contributor

Re: Command to get lun number in hp ux

Hi,
it is specific to your H/W,but in generally speak about on LUN ;

The Logical Unit Number (LUN)can be used to identify the robotic mechanism in a tape
changer, or a logical unit in a disk array. For most SCSI devices, however, the LUN number
will simply be "0". The LUN number for each SCSI device appears in the last digit of the
deviceâ s hardware path.

note that the LUN is "0" for all the disks in the sample ioscan

ioscan -funCdisk

Class I H/W Path Driver S/W State H/W Type Description
disk 0 8/12.5.0 sdisk CLAIMED DEVICE SEAGATE ST32171W
disk 1 8/12.6.0 sdisk CLAIMED DEVICE SEAGATE ST32171W
Prasanth V Aravind
Trusted Contributor

Re: Command to get lun number in hp ux

Wow Johnson !!! is it possible to derive lunid from ioscan output??

[root@mumprod]/opt/IBMsdd/bin# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
===========================================================================
disk 110 2/0/1/1/0/4/0.201.66.0.41.14.3 sdisk CLAIMED DEVICE IBM 2107900
/dev/dsk/c33t14d3 /dev/rdsk/c33t14d3
disk 109 2/0/10/1/0.101.66.0.41.14.3 sdisk CLAIMED DEVICE IBM 2107900
/dev/dsk/c32t14d3 /dev/rdsk/c32t14d3

[root@mumprod]/# datapath query device

Serial: 75BW13114F3
==================================================================================
Path# Adapter H/W Path Hard Disk State Mode Select Error
0 2/0/10/1/0 c32t14d3 CLOSE NORMAL 1 0
1 2/0/1/1/0/4/0 c33t14d3 CLOSE NORMAL 0 0


14F3 is the actual lunid on this server.. will you pls explain .. how we can derive lunid from ioscan output.

Prasanth
KK07
Occasional Visitor

Re: Command to get lun number in hp ux

Hi All,

Thanks for your replies, storage being used is 3par. As such there is no storage/external tool installed. so used the vxdisk list command and used the formula method to get lun numbers(cxtydz--> (y*8)+z)
Torsten.
Acclaimed Contributor

Re: Command to get lun number in hp ux

The formula is good as long as the LUN number is not too high and it is the same cx(dytz) value. With another "x" you need another formula.

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!   
hpuxadm1
Occasional Advisor

Re: Command to get lun number in hp ux

LUN Identification command:-
------------------------------------
syminq |grep -i "ABCD"

Where ABCD = 4 digit unique number of disk. It is for EMC

For HP XP Storage .

xpinfo |grep -i "ABCD"


Where ABCD = 4 digit unique number of disk.
Jasvir819
Frequent Advisor

Re: Command to get lun number in hp ux

Simple command to get LUN details from storage (LUN present on HP UX server) is:

 

# xpinfo -i

 

 

To Recognise only physical disk status:

 

# ioscan -fnC disk