Operating System - HP-UX
1832606 Members
2673 Online
110043 Solutions
New Discussion

how to check the size of vg00

 
SOLVED
Go to solution
Karthick K S
Frequent Advisor

how to check the size of vg00

Hi all,

I have vg00 vg i want to check the disk space of this vg,pls tell how to check
28 REPLIES 28
Arunvijai_4
Honored Contributor

Re: how to check the size of vg00

#vgdisplay

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

Re: how to check the size of vg00

Hi,

vgdisplay -v vg00

Free space (MB) = free PE x 4 PE size

Check this for each Physical volume

LV size in MB is given for each lvol

If used PV = 2 or greater, then you have a mirrored disk
Mel Burslan
Honored Contributor

Re: how to check the size of vg00

vgdisplay vg00

look at the output and note these values

PE size
Total PEs

multiply these two numbers the result is tha total capacity of the vg00 in megabytes.

if you want to calculate free space, instead of Total PEs, use Free PEs.

Hope this helps
________________________________
UNIX because I majored in cryptology...
Rajesh SB
Esteemed Contributor

Re: how to check the size of vg00

Hi,

Just run the cmd like

# vgdisplay vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 6
Open LV 6
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 4340
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

In the output observe for Alloc PE (eg:4340), and PE Size (Mbytes).
Caluclate now
actual size=Alloc PE * PE Size (Mbytes)

CHeers,
Rajesh
Devender Khatana
Honored Contributor

Re: how to check the size of vg00

Hi,

#vgdisplay -v /dev/vg00

will give you all details.

Check

PE Size (Mbytes) 16
Total PE 17496
Alloc PE 14256
Free PE 3240

Total size of vg00 is

=Total PE * PE Size

HTH,
Devender
Impossible itself mentions "I m possible"
Rajesh SB
Esteemed Contributor

Re: how to check the size of vg00

Just a correction here.
Look for Total PE and PE Size (Mbytes)

Actual Size = Total PE * PE Size (Mbytes)

Regards,
Rajesh
Orhan Biyiklioglu
Respected Contributor

Re: how to check the size of vg00

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

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

hth
Adisuria Wangsadinata_1
Honored Contributor
Solution

Re: how to check the size of vg00

Hi,

Use 'vgdisplay' command :

# vgdisplay /dev/vg00

--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 14
Open LV 14
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4384
VGDA 4
PE Size (Mbytes) 32
Total PE 8748
Alloc PE 1830
Free PE 6918
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

From the example above, the size of vg00 is [Alloc PE x Free PE] = 1830 x 32 = 58560 Mbytes.

You need also to check if the vg00 is mirrored or not. Check by using lvdisplay onto the logical volume at vg00.

# lvdisplay /dev/vg00/lvol1

If mirrored, you need to devide it by the number of mirror + 1.

Let say if from lvdisplay, you find mirror copies is 1, so the vg00 size above is 58560 / (1+1) = 58560 / 2 = 29280 MBytes.

The condition above if all logical volume in vg00 is mirrored.

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Karthick K S
Frequent Advisor

Re: how to check the size of vg00

how to check free space
Joseph Loo
Honored Contributor

Re: how to check the size of vg00

hi,

adi should have explain how to retrieve free space from the output of vgdisplay:

# vgdisplay -v vg00
refer to Free PE where PE is in extents, thus to convert to MB, multiply by PE Size.

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

regards.
what you do not see does not mean you should not believe
AwadheshPandey
Honored Contributor

Re: how to check the size of vg00

link:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=763059&admit=-682735245+1130402918678+28353475

view attached documents in this thread.

Solution to ur lvm issues

Awadhesh
It's kind of fun to do the impossible
Karthick K S
Frequent Advisor

Re: how to check the size of vg00

but in my server

VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 12
Open LV 12
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 8680
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

see Free PE is 0
AwadheshPandey
Honored Contributor

Re: how to check the size of vg00

See attached doc

Solution to ur lvm issues

Awadhesh
It's kind of fun to do the impossible
Joseph Loo
Honored Contributor

Re: how to check the size of vg00

hi,

this would mean u have allocated all your extents from that volume group, vg00.

use bdf to check the available and used file system, if that is what u want to know.

regards.
what you do not see does not mean you should not believe
Joseph Loo
Honored Contributor

Re: how to check the size of vg00

hi,

this would mean u have allocated all your extents from that volume group, vg00.

use "bdf" command to check the available and used file system, if that is what u want to know:

# bdf

regards.
what you do not see does not mean you should not believe
Devender Khatana
Honored Contributor

Re: how to check the size of vg00

Hi,

You can see the free space allocated to file systems using bdf command.

If you wish to see unallocated space in the vg then Free PE multiplied by PE Size will get that fot you. Allthough here as the free PE is zero, you do not have any space in the VG unallocated.

HTH,
Devender
Impossible itself mentions "I m possible"
AwadheshPandey
Honored Contributor

Re: how to check the size of vg00

use df and du command to check free space,
man df
man du
u can use
man lvdisplay
man vgdisplay
man pvdisplay

Awadhesh
It's kind of fun to do the impossible
Muthukumar_5
Honored Contributor

Re: how to check the size of vg00

Your VG status is as,

VG Status available

Total PE 8680
Alloc PE 8680
Free PE 0


Free PE = Total PE - Alloc PE
0 = 8680 - 8680

It is stating correct information.

# bdf will give file system usage statistics.

My VG status is as,

Total PE 4374
Alloc PE 639
Free PE 3735

They are calculated as per above calculation.

-Muthu
Easy to suggest when don't know about the problem!
Alzhy
Honored Contributor

Re: how to check the size of vg00

Use the attached script - which I got from the forums and mod'ed.

Hakuna Matata.
Sandman!
Honored Contributor

Re: how to check the size of vg00

Karthik,

This one-liner awk script might help:

vgdisplay vg00|awk '/^PE Size/{size=$NF}/^Free PE/{free=$NF}END{print size*free" MB"}'

cheers!
Geoff Wild
Honored Contributor

Re: how to check the size of vg00

Your vg00 has no more unallocated space.

However - there may be space in an existing lvol...

do a vgdisplay -v vg00

check the lvols and see if they are in your fstab file.

If there is any the=at are not in fstab - then they may be free - you might want to mount them temporarily first...

IE - say there is a lvol12 in the vgdisplay -v vg00 output - but lvol12 isn't in the fstab...

Make sure it isn't in swap with a swapinfo -tam

mount /dev/vg00/lvol12 /mnt

take a look - if it isn't needed - then remove it with the lvremove command - then reallocate that space to another lvol...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Karthick K S
Frequent Advisor

Re: how to check the size of vg00

hi how to extend root filesystem.
Arunvijai_4
Honored Contributor

Re: how to check the size of vg00

Here are some threads about extending root FS
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=865252
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=97821

Try to assign points to replies..

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

Re: how to check the size of vg00

Owing to contiguous extent allocation for boot/root/swap your SAFEST bet is to use ignite. Make a recovery tape; boot your system off it and interactively change the size of root.

You can extend the root filesystem online with fsadm, but that procedure's tedious and fraught with risks as the system could panic if the appropriate patches aren't present.

regards!