- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- List all physical volumes and their respective 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
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
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
тАО04-30-2003 07:14 AM
тАО04-30-2003 07:14 AM
List all physical volumes and their respective sizes
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 07:19 AM
тАО04-30-2003 07:19 AM
Re: List all physical volumes and their respective sizes
If you want details of each vg
then vgdidisplay -v /dev/vgname
at the end of vgdisplay you will notice physical volumes
you can see pvdisplay /dev/dsk/devname to see details of PV.
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 07:20 AM
тАО04-30-2003 07:20 AM
Re: List all physical volumes and their respective sizes
vgdisplay -v /dev/vg01 >> /tmp/vgfile
Repeat second command for every volume group.
Take out the -v if it gives you too much info.
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
тАО04-30-2003 07:21 AM
тАО04-30-2003 07:21 AM
Re: List all physical volumes and their respective sizes
for i in $(ls)
do
echo $i
diskinfo $PWD/$i 2>&1 | grep -i size
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 07:24 AM
тАО04-30-2003 07:24 AM
Re: List all physical volumes and their respective sizes
for disk in `ioscan -funC disk | awk '/dev/ {print $NF}'`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 07:27 AM
тАО04-30-2003 07:27 AM
Re: List all physical volumes and their respective sizes
#!/usr/bin/ksh
for disk in `ioscan -funC disk | awk '/dev/ {print $NF}'`
do
echo "disk: $disk"
diskinfo -v $disk | grep -i size
done
the earlier post did not come out fine. ignore earlier post please.
HTH.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 07:29 AM
тАО04-30-2003 07:29 AM
Re: List all physical volumes and their respective sizes
It's called vgttl.
Rgds..Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 07:32 AM
тАО04-30-2003 07:32 AM
Re: List all physical volumes and their respective sizes
strings /etc/lvmtab | grep dsk
ie:
for DISC in $(strings /etc/lvmtab | grep dsk)
do
#sed the dsk for rdsk
#pvdisplay | grep ..
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 07:33 AM
тАО04-30-2003 07:33 AM
Re: List all physical volumes and their respective sizes
Here's sample output from vgttl:
# vgttl
VG Size(MB) In use Available
vg00 12940 5216 7481
vg01 12288 1807 10154
vg11 4096 1234 2695
vg12 129420 95381 33773
vg15 43140 9515 33364
vg18 15360 6182 8800
vg19 20176 8087 11589
vg20 35800 7342 27211
vg21 138048 125248 12486
vg22 138048 125172 12578
vg23 138048 131748 6218
vg24 138048 130182 7778
vg25 138048 128548 9379
vg26 138048 124050 13782
vg27 138048 119578 18114
vg28 138048 121159 16683
vg29 138048 134048 3872
vg40 25880 1533 23843
---- -------------- -------------- --------------
Totl 1541532 1276030 259800
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 08:59 AM
тАО04-30-2003 08:59 AM
Re: List all physical volumes and their respective sizes
vgs=$( bdf | awk '{print $1}' | awk -F/ '{print $3}' | sort | uniq)
for i in $vgs
do
vgdisplay /dev/$i > $i.vg.txt
pesz=$(cat $i.vg.txt | grep "PE Size" | awk '{print $4}')
tpe=$(cat $i.vg.txt | grep "Total PE" | awk '{print $3}')
(( vgsz = $pesz * $tpe ))
echo $i is $vgsz MB
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 09:18 AM
тАО04-30-2003 09:18 AM
Re: List all physical volumes and their respective sizes
it will tell you the total size of your EMC disks and list each disk and tell you a total of how many of which various sizes you have as well.
This is assuming that you have EMC disks and that the "inq" utility is located in /var/adm/scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 09:19 AM
тАО04-30-2003 09:19 AM
Re: List all physical volumes and their respective sizes
Thank you again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 09:25 AM
тАО04-30-2003 09:25 AM
Re: List all physical volumes and their respective sizes
# 1. Device layout by physical address
#
print "\n1.\tDEVICE LAYOUT (sorted by physical address):\n"
print " Device \t Address \t Vendor \t Product \t Size \n"
HWADDRs=`ioscan -fkCdisk | grep "^disk" | awk '{print $3}'`
for ADDR in $HWADDRs
do
DEV=`lssf /dev/dsk/c* | grep "$ADDR" | awk '{print $16}' | cut -d/ -f4`
VENDOR=`ioscan -fkH$ADDR | grep disk | awk '{print $7}' `
PROD=`ioscan -fkH$ADDR | grep disk | awk '{print $8}' `
if [[ $PROD = CD-ROM ]]
then
SIZE=""
else
SIZE=`diskinfo /dev/rdsk/$DEV | grep size: | awk '{print $2}' `
fi
print " " $ADDR "\t" $DEV "\t" $VENDOR " \t" $PROD "\t" $SIZE >> /tmp/disks.$$
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 10:04 AM
тАО04-30-2003 10:04 AM
Re: List all physical volumes and their respective sizes
the following script may come up with errors. to view only pertinate information you may wish to redirect standard error to /dev/null
this can be done by issuing the command like this:
yourscript 2> /dev/null
ioscan -fnkC disk | grep ^disk | awk '{print $3}' > disk.out
ioscan -fnkC disk | grep /dev | awk '{print $1}' > dev.out
paste disk.out dev.out > dd.out
pv=$(cat dd.out | awk '{print $2}')
for i in $pv
do
vgbelong=$(pvdisplay $i | grep "VG Name")
pesz=$(pvdisplay $i | grep "PE Size" | awk '{print $4}')
tpe=$(pvdisplay $i | grep "Total PE" | awk '{print $3}')
((dsksz=$pesz*$tpe))
echo $i is $dsksz MB and belongs to $vgbelong
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 10:10 AM
тАО04-30-2003 10:10 AM
Re: List all physical volumes and their respective sizes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 10:12 AM
тАО04-30-2003 10:12 AM
Re: List all physical volumes and their respective sizes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2003 10:24 AM
тАО04-30-2003 10:24 AM
Re: List all physical volumes and their respective sizes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-01-2003 03:29 AM
тАО05-01-2003 03:29 AM
Re: List all physical volumes and their respective sizes
--------------------------------
user has assigned 4 of 44 points
--------------------------------