LVM and VxVM

How can i see the totall allocatable free space

 
Shameem_4
Occasional Contributor

How can i see the totall allocatable free space

How can i see the total allocatable free space in a VG on HP-UX LVM ?. Looking for a command(s) that would tell, exactly to what max-size can a volume in that VG be expanded!!.something like vxassist maxgrow in Vxvm!!
6 REPLIES 6
Torsten.
Acclaimed Contributor

Re: How can i see the totall allocatable free space

if you do a "vgdisplay -v "
you will get
...
Max PV x
Max PE per PV y
PE Size (Mbytes) z
...

z*y*z gives you the allocatable/addressable size in the volume.

But if you want to know about the available free space, you have to look for

PE Size (Mbytes) x
Free PE y

and calculate that.

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!   
Arunvijai_4
Honored Contributor

Re: How can i see the totall allocatable free space

You can use
# vgdisplay /dev/vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4350
VGDA 2
PE Size (Mbytes) 8
Total PE 4340
Alloc PE 4026
Free PE 314
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

As well,
#vgdisplay -v

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Ranjith_5
Honored Contributor

Re: How can i see the totall allocatable free space

Hi,

Free space available on a vg = Free PE * PE Size (Mbytes). Thease can be obtained from the vgdisplay output.

Take the following example

root@HP in />#vgdisplay vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 8
Total PE 8680
Alloc PE 6180
Free PE 2500
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


Here Free PE = 2500 and PE Size=8MB

So the Max Size of a volume which can be created on this VG is 2500*8=20,000MB.


Regards,
Syam
Orhan Biyiklioglu
Respected Contributor

Re: How can i see the totall allocatable free space

Let the awk do the math for you:)

vgdisplay vg00 | awk '/PE Size \(Mbytes\)/{s=$4}; /Free PE/{f=$3}; END{print s*f" Mbytes free space available on volume group."}'

hth
Nguyen Anh Tien
Honored Contributor

Re: How can i see the totall allocatable free space

You issue
#vgdisplay -v vg_name|more
You will see
Total PE xxxx
Alloc PE yyyy
Free PE zzzz

Free PE is your free space. Multiply with "PE Size (Mbytes)" you will have values in MB
HTH
tienna
HP is simple
Manoj Sivan
Regular Advisor

Re: How can i see the totall allocatable free space

Hi Shameem,

Simply verify the output of the vgdisplay for which you have extend the VG. Find out the value of "Free PE" and "PE Size".The following value gives your desired output.



Free PE X PE Size = Extendable free size in MB.


:; vgdisplay vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 3
Open LV 3
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 4
Total PE 8680
Alloc PE 8680
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

Cheers

Manu