- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to List Disks(LUNs) in a System with their Siz...
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
Forums
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
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
09-15-2003 06:16 AM
09-15-2003 06:16 AM
Is there a tool in HP-UX (similar to EMC's inquire) that lists all disks with thier capacities? I am trying to inventory the LUNs (from an EVA) allocated to an HPUX box. ioscan lists the disks but no capacities. SAM only shows the 1st LUN....
Thanks..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 06:21 AM
09-15-2003 06:21 AM
SolutionThe following shell code should give you what you need.
ioscan -funCdisk | awk ' /rdsk/ {print $2}' | while read disk
do
diskinfo $disk
done
It might hang for a moment or two while looking at CD-ROMS.
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 06:21 AM
09-15-2003 06:21 AM
Re: How to List Disks(LUNs) in a System with their Sizes
#diskinfo /dev/rdsk/cntndn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 06:22 AM
09-15-2003 06:22 AM
Re: How to List Disks(LUNs) in a System with their Sizes
We use EMC's inq.HP (or syminq or inq). Its a small binary and it works fine on HP servers which dont have EMC. Gives a nice single view of all luns and their sizes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 06:26 AM
09-15-2003 06:26 AM
Re: How to List Disks(LUNs) in a System with their Sizes
# cd /dev/rdsk
# for DISK in *
do
SIZE=$(diskinfo $DISK | grep size: | awk '{print $2}')
echo "$DISK Capacity: $SIZE Kbytes"
done
#
Pls note that more than one device file can be referring to the same LUN. So a literal addition of all the sizes displayed would not be accurate.
--Sundar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 06:37 AM
09-15-2003 06:37 AM
Re: How to List Disks(LUNs) in a System with their Sizes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 06:38 AM
09-15-2003 06:38 AM
Re: How to List Disks(LUNs) in a System with their Sizes
Document id: DKKBRC00006641 "Only first LUN of 3rd party disk array visible in SAM"
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062906734
Elena.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 07:46 AM
09-15-2003 07:46 AM
Re: How to List Disks(LUNs) in a System with their Sizes
My version of the script showed all disks, though it did hang for a while on the cd-rom.
Another mod would be converting the diskinfo output to Megabytes or Gigabytes.
Good Show.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 09:35 AM
09-15-2003 09:35 AM
Re: How to List Disks(LUNs) in a System with their Sizes
Hope it helps.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 11:27 AM
09-15-2003 11:27 AM
Re: How to List Disks(LUNs) in a System with their Sizes
Since your asking Im guessing you don't have syminq/inq commands.
On my EMC frames, all my LUNS are set to a "standard" size. Do you have different sized LUNs in your Storage? It makes life alot easier with BCVs and creating new VGs/LVs.
______________________________________
Here is a script one of our great techs wrote, you can modify it... It includeds the verbose version of the display commands so you might want to remove the -v option.
_______________CUT HERE _____________________________
# cat findspace
#!/sbin/sh
# findspace... to look at ALL disks on the HP box, extract pertinent
# information so that an administator can find out what is in use.
# This program uses "ioscan" to get the disks on the box, then to
# pvdisplay to get the information.
#
#
# syntax is just "findspace [-s]"
# output is to a file /tmp/disk1
# with option -s, the size of the physical extent (normally 4 meg) is printed
# and the allocated physical extents are not printed.
#
# optional printing is: pr -2Ft -l60 -w80 /tmp/disk1
if [ $# -ne "0" ]
then
if [ $1 = "-s" ]
then
SZ=yes
else
echo "\n\n\tUsage: `basename $0` [ -s ] \n"
echo "option -s shows extent size (normally 4meg) rather than allocated
extents"
echo "\n\n" ; exit
fi
fi
hostname > /tmp/disk1
echo "" >> /tmp/disk1
# first, find all disks except "CD-ROM" using ioscan
echo "\n estimate 2 seconds per disk to run.\n\n"
ioscan -fun -C disk | awk '( $1 == "disk" ) && ( $8 !~ /ROM/ ) { print $3
getline
print $1, $2 }' | paste - - > /tmp/crs1
# use that list to get diskinfo and pvdisplay of each disk
exec < /tmp/crs1
while read HDWR DSK RDSK
do
echo $DSK "\t" $HDWR >> /tmp/disk1
diskinfo $RDSK >> /tmp/disk1
pvdisplay -v $DSK >> /tmp/disk1 2>/dev/null
echo "----------------------------------" >> /tmp/disk1
done
# get rid of all of the info that I don't want.
# depends on if I wanted size of sector or know they are all 4 meg
if [ "${SZ}" = "yes" ]
then
ed /tmp/disk1 << DONE
g/current/d
g/free/d
g/Physical volumes/d
g/PV Name/d
g/extents/d
g/Status/d
g/Distribution/d
g/Allocatable/d
g/Allocated/d
g/VGDA/d
g/PV Status/d
g/Stale PE/d
g/SCSI describe of/d
g/vendor:/d
g/product id:/d
g/bytes per sector:/d
g/Timeout/d
g/^ /s///
w
q
DONE
#
else
ed /tmp/disk1 << DONE
g/current/d
g/free/d
g/Physical volumes/d
g/PV Name/d
g/extents/d
g/Status/d
g/Distribution/d
g/Allocatable/d
g/VGDA/d
g/PE Size/d
g/PV Status/d
g/Stale PE/d
g/SCSI describe of/d
g/vendor:/d
g/product id:/d
g/bytes per sector:/d
g/Timeout/d
g/^ /s///
w
q
DONE
fi
#
echo "\n\noutput is in /tmp/disk1\n\n"
######
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:34 PM
09-15-2003 03:34 PM
Re: How to List Disks(LUNs) in a System with their Sizes
As mentioned before, you can use a combination of 'ioscan -fnkC disk' and 'diskinfo' commands to get what you need. There isn't a default tool like EMC's syminq or XP's xpinfo. But you can run "/opt/ignite/bin/print_manifest" or "sysinfo" to get the same information in a more readable format. They will print the other information also.
Try searching this forums for sysinfo.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 08:56 PM
09-15-2003 08:56 PM
Re: How to List Disks(LUNs) in a System with their Sizes
EMC inq and syminq is not a free tool but it doesn't required any lic.
Sunil