Operating System - HP-UX
1832120 Members
3196 Online
110038 Solutions
New Discussion

increasing size of VG and corresponding lvol by a user specified %

 
SOLVED
Go to solution
andi_1
Frequent Advisor

increasing size of VG and corresponding lvol by a user specified %

Hi,

Is it possible to increase size of VG and corresponding lvol by a pre-determined %?

e.g. I'd like to increase size of /dev/vg00 and all corresponding lvol by 10%?

Thank you!
8 REPLIES 8
harry d brown jr
Honored Contributor

Re: increasing size of VG and corresponding lvol by a user specified %

if you have the disk space available, go into sam, and increase the lvol by 10%. Is there another question that we are missing?

live free or die
harry
Live Free or Die
Sridhar Bhaskarla
Honored Contributor

Re: increasing size of VG and corresponding lvol by a user specified %

Leon,

Size of a VG?. It is dependent on the size of the disk that you are adding to it. If you have 4x4G disk in a VG, to increase it by 10%, you need to add a 2GB disk to it.

Once it is done, you can then increase the lvols by 10%. You need to write a script to do it for you and you need onlineJFS installed for vg00 (else get it to single user mode).

It is not automatic and also you need to understand the restrictions on /stand and swap filesystems.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
andi_1
Frequent Advisor

Re: increasing size of VG and corresponding lvol by a user specified %

Thanks for your replies.

Unfortunatelly, I cannot use SAM, it should be done from the script!
Christopher McCray_1
Honored Contributor

Re: increasing size of VG and corresponding lvol by a user specified %

Hello,

Literally speaking, no.

But, you can go into sam highlight the lvol you wish to increase see the size in MB it is and multiply by 1.1 on you rhandy dandy calculator.

Hope this helps

Chris
It wasn't me!!!!
Christopher McCray_1
Honored Contributor

Re: increasing size of VG and corresponding lvol by a user specified %

Hello again,

I apologize if I am in the minority in my thinking, but is doing something like this something you want to trust to a script?

Be that as it may, you are most likely aware that most of the filesystems within vg00 are not extendable unless in single-user mode (unless you have Online JFS) and some, like / from an ignite tape.

Just some thoughts

Good luck and God Speed!

Chris
It wasn't me!!!!
S.K. Chan
Honored Contributor
Solution

Re: increasing size of VG and corresponding lvol by a user specified %

Just to add a few things on top of what others have said. To increase the size of the VG you can extend the VG by adding more disk to it. For example :
# vgextend /dev/vg00 /dev/dsk/cXtXdX
Then after you've determined the new size of all the lvols in vg00, you can extend them while unmounted (or single user mode) if you don't have OnlineJFS. For example :
# lvextend -L /dev/vg00/lvolX
# extendfs -F vxfs /dev/vg00/rlvolX
Due to the contigous nature of /stand and swap, you cannot simply do an lvextend directly. If you want to increase those lvols it has to be done with a make_recovery tape which has backup of vg00, bootup from that tape then make changes to the lvols and perform recovery.

harry d brown jr
Honored Contributor

Re: increasing size of VG and corresponding lvol by a user specified %

Leon,

You can script this, but it's very very dangerous and really silly. Let's say the user, obiviously not root, extends the file system by say 10%, but accidently does it 7 times, their lvol was 10GB, it would all of a sudden be at over 19GB. It's like allowing an alligator tend to your chickens. ONLY System's Administrator's should perform SYSTEM ADMINISTRATOR tasks!

live free or die
harry
Live Free or Die
Darrell Allen
Honored Contributor

Re: increasing size of VG and corresponding lvol by a user specified %

Hi Leon,

You can not do this for vg00. Don't even attempt it. /, swap, and /stand must be contiguous filesystems. You can only increase those by rebuilding their logical volumes.

A VG is only increased by adding disks. You can't simply add 10%.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)