1753385 Members
5756 Online
108792 Solutions
New Discussion юеВ

command for size disk

 
SOLVED
Go to solution
Eli Daniel
Super Advisor

command for size disk

Hello,

There is a command to determine the size available or used in a disk of a VG?
7 REPLIES 7
Steven E. Protter
Exalted Contributor
Solution

Re: command for size disk

Shalom,

vgdisplay # shows free PE and size of each PE in a volume group.This shows what portion of a VG is part of a logical volume.

pvdisplay # will show on a physical volume free versus allocated PE's and these figure can be translated into MB or GB


bdf, general tool for checking file systems.

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
Eli Daniel
Super Advisor

Re: command for size disk

thanks steven,

in this case disk free size 3.9 GB???

--- Physical volumes ---
PV Name /dev/dsk/c27t1d4
VG Name /dev/vgQAECC
PV Status available
Allocatable yes
VGDA 2
Cur LV 10
PE Size (Mbytes) 4
Total PE 15359
Free PE 1021
Allocated PE 14338
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On
Proactive Polling On
subodhbagade
Regular Advisor

Re: command for size disk

(1) # vgdisplay

will list all vg , to get the total/ used / free size in vg

total = PE size * Total PE
used = PE size * Alloc PE
free = PE size * Free PE

(2) And to check how many disk in vg

#vgdisplay -v /dev/vgname

Regards,
Subodh B
Raj D.
Honored Contributor

Re: command for size disk

Daniel,

> There is a command to determine the size available or used in a disk of a VG?

- There is no single command , but you can try this, for: Total,Allocated and Available space on the VG:


# vgdisplay vg_name | grep -e "PE Size" -e "Total PE" -e "Alloc PE" -e "Free PE" | cut -c 25- | xargs | awk '{print "Total =\t"$1 * $2 "MB\n" "Allocated =\t" $1*$3 "MB\n" "Free =\t" $1*$4 "MB" }'| awk '{printf "%-15s%-2s%s\n",$1,$2,$3}'



Output:
Total = 138208MB
Allocated = 131072MB
Free = 7136MB
_____________________________

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Suraj K Sankari
Honored Contributor

Re: command for size disk

Hi,
As everyone post above "vgdisplay" is the command.
for more information on vgdisplay check the man pages.

http://docs.hp.com/en/B2355-90692/vgdisplay.1M.html

Suraj
Kapil Jha
Honored Contributor

Re: command for size disk

When disks are added in VG, they lose there identity(from storage point of view) it becomes the pool a disk area for VG,
You can see the free space from vgdisplay command
(Free PE*PE Size)/1024 GB.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Eli Daniel
Super Advisor

Re: command for size disk

Thanks
PVdisplay: solved problem