- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Identify LUN ID with SCSIMGR
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2011 02:08 PM
07-30-2011 02:08 PM
Re: Identify LUN ID with SCSIMGR
I don't have a problem to read some hex values, but other folks want to see the relation
/dev/disk/disk_xx == LUN xx
from the array in decimal, just as promised by scsimgr.
This is the root cause of the question.
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2011 06:20 AM
08-02-2011 06:20 AM
Re: Identify LUN ID with SCSIMGR
hey, try this.....
write this in a file and execute it.
ioscan
insf
for i in `ioscan -m dsf|grep disk|awk '{print $1}`
do
a=`scsimgr get_attr -D $i -a wwid |grep -v -e default -e saved -e SCSI -e name |grep current |awk '{print $3}'`
echo "$i ==> $a"
done > rdisk_wwid
now the rdisk_wwid file has all the OS disk DEvice files followed by corresponding WWID.
Hope this helps.
Regards,
VA
iGATE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2011 06:29 AM
08-02-2011 06:29 AM
Re: Identify LUN ID with SCSIMGR
Thanks for reply.
I currently have no system access, so I cannot try.
But I think this is again NOT what I want to have.
The goal is somelike
/dev/disk/disk25 is LUN 5 (from array xy)
/dev/disk/disk273 is LUN 25
etc ...
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2011 06:36 AM
08-02-2011 06:36 AM
Re: Identify LUN ID with SCSIMGR
@Duncan Edmonstone wrote:I can't see a reason why this shouldn't work - I'd be tempted to report that as a bug and see where you get
Can somebody advise me how to do this?
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2011 10:08 PM
08-02-2011 10:08 PM
Re: Identify LUN ID with SCSIMGR
>Can somebody advise me how to do this?
Log a support case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2014 07:15 AM - edited 01-21-2014 07:19 AM
01-21-2014 07:15 AM - edited 01-21-2014 07:19 AM
Re: Identify LUN ID with SCSIMGR
Ok, so after playing around with shell scripting, I've come up with this, and it seems to work... for the most part :)
First, run an
ioscan -m lun
it should produce output similar to what's displayed below.
. . . . disk 49 64000/0xfa00/0x13 esdisk CLAIMED DEVICE online 3PARdataVV 0/0/0/5/0/0/0.0x20120002ac004b08.0x4004000000000000 0/0/0/5/0/0/0.0x21120002ac004b08.0x4004000000000000 0/0/0/5/0/0/1.0x20120002ac004b08.0x4004000000000000 0/0/0/5/0/0/1.0x21120002ac004b08.0x4004000000000000 /dev/disk/disk49 /dev/rdisk/disk49 disk 50 64000/0xfa00/0x14 esdisk CLAIMED DEVICE online 3PARdataVV 0/0/0/5/0/0/0.0x20120002ac004b08.0x4009000000000000 0/0/0/5/0/0/0.0x21120002ac004b08.0x4009000000000000 0/0/0/5/0/0/1.0x20120002ac004b08.0x4009000000000000 0/0/0/5/0/0/1.0x21120002ac004b08.0x4009000000000000 /dev/disk/disk50 /dev/rdisk/disk50 . . . .
I'm using 3PAR, with 2 nodes over FC, so I've got a total of 4 paths per LUN. You may have more, same or less.
Next pick a path (any path) from any LUN and copy the hardware path, BUT LEAVE OUT the last section that refers to the LUN ID. For instance, in the example below, copy only the section in bold
0/0/0/5/0/0/0.0x20120002ac004b08.0x4009000000000000
Next, paste it into this script, as marked in bold
typeset -i N=1 while (( N <= 100 )) do DIR="/dev/rdisk/disk${N}" if [ -c $DIR ] then echo /dev/rdisk/disk${N} scsimgr get_attr -H $(ioscan -m lun /dev/rdisk/disk${N} | grep '0/0/0/5/0/0/0.0x20120002ac004b08') -a lunid N=$N+1 else N=$N+1 fi done
You may need to modify the "while" statement to suite your environment, depending on how many disks you have on the server. If you have more than 100 disks, change it appropriately.
Lastly, run the script. Below is sample output. I have 9 LUNs. The script prints out the device_file followed by the lunid attribute for the associated LUN.
# typeset -i N=1 # while (( N <= 100 )) > do > DIR="/dev/rdisk/disk${N}" > if [ -c $DIR ] > then > echo /dev/rdisk/disk${N} > scsimgr get_attr -H $(ioscan -m lun /dev/rdisk/disk${N} | grep '0/0/0/5/0/0/0.0x20120002ac004b08') -a lunid > N=$N+1 > else > N=$N+1 > fi > done /dev/rdisk/disk1 scsimgr: ERROR: Need to specify hardware path with -H /dev/rdisk/disk7 SCSI ATTRIBUTES FOR LUN PATH : 0/0/0/5/0/0/0.0x20120002ac004b08.0x4001000000000000 name = lunid current =0x4001000000000000 (LUN # 1, Flat Space Addressing) default = saved = /dev/rdisk/disk12 SCSI ATTRIBUTES FOR LUN PATH : 0/0/0/5/0/0/0.0x20120002ac004b08.0x4002000000000000 name = lunid current =0x4002000000000000 (LUN # 2, Flat Space Addressing) default = saved = /dev/rdisk/disk41 scsimgr: ERROR: Need to specify hardware path with -H /dev/rdisk/disk42 scsimgr: ERROR: Need to specify hardware path with -H /dev/rdisk/disk43 SCSI ATTRIBUTES FOR LUN PATH : 0/0/0/5/0/0/0.0x20120002ac004b08.0x4005000000000000 name = lunid current =0x4005000000000000 (LUN # 5, Flat Space Addressing) default = saved = /dev/rdisk/disk44 SCSI ATTRIBUTES FOR LUN PATH : 0/0/0/5/0/0/0.0x20120002ac004b08.0x4006000000000000 name = lunid current =0x4006000000000000 (LUN # 6, Flat Space Addressing) default = saved = /dev/rdisk/disk45 SCSI ATTRIBUTES FOR LUN PATH : 0/0/0/5/0/0/0.0x20120002ac004b08.0x4007000000000000 name = lunid current =0x4007000000000000 (LUN # 7, Flat Space Addressing) default = saved = /dev/rdisk/disk46 SCSI ATTRIBUTES FOR LUN PATH : 0/0/0/5/0/0/0.0x20120002ac004b08.0x4008000000000000 name = lunid current =0x4008000000000000 (LUN # 8, Flat Space Addressing) default = saved = /dev/rdisk/disk47 scsimgr: ERROR: Need to specify hardware path with -H /dev/rdisk/disk48 SCSI ATTRIBUTES FOR LUN PATH : 0/0/0/5/0/0/0.0x20120002ac004b08.0x4003000000000000 name = lunid current =0x4003000000000000 (LUN # 3, Flat Space Addressing) default = saved = /dev/rdisk/disk49 SCSI ATTRIBUTES FOR LUN PATH : 0/0/0/5/0/0/0.0x20120002ac004b08.0x4004000000000000 name = lunid current =0x4004000000000000 (LUN # 4, Flat Space Addressing) default = saved = /dev/rdisk/disk50 SCSI ATTRIBUTES FOR LUN PATH : 0/0/0/5/0/0/0.0x20120002ac004b08.0x4009000000000000 name = lunid current =0x4009000000000000 (LUN # 9, Flat Space Addressing) default = saved =
I hope HP release a tool soon like xpinfo or evainfo for 3PAR, and save us all the trouble :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2014 07:37 AM
01-21-2014 07:37 AM
Re: Identify LUN ID with SCSIMGR
https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=3PARinfo
http://h20566.www2.hp.com/portal/site/hpsc/template.BINARYPORTLET/public/kb/docDisplay/resource.process/?javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken&javax.portlet.rid_ba847bafb2a2d782fcbb0710b053ce01=docDisplayResURL&javax.portlet.rst_ba847bafb2a2d782fcbb0710b053ce01=wsrp-resourceState%3DdocId%253Demr_na-c03611522-3%257CdocLocale%253Den_US&ja...
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!
- Tags:
- 3PARinfo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2014 04:37 AM
01-22-2014 04:37 AM
Re: Identify LUN ID with SCSIMGR
Thanks Torsten,
I guess they've already done it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2014 04:49 AM
01-22-2014 04:49 AM
Re: Identify LUN ID with SCSIMGR
# scsimgr -p get_attr all_lun -a lunid
(see my initial question)
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2014 11:41 PM
01-27-2014 11:41 PM
Re: Identify LUN ID with SCSIMGR
Hi Torsten,
I got blank lines, same as you. What I realized is that "lunid" doesn't appear to be among the attributes listed.
If you do:
scsimgr get_attr all_lun
It returns all attributes for all luns, but lun id is not listed among lun attributes. However, if you do:
scsimgr get_attr -H <Hardware Path>
Then lun ID is listed amongst the attributes. So I figured, I'd create a script that gets a device file, get's the corresponding hardware path and echos the LUN id attribute from the hardware path.
But looks like 3parinfo might provide what's needed. Anyone actually tired it?
- « Previous
-
- 1
- 2
- Next »