1822081 Members
3519 Online
109640 Solutions
New Discussion юеВ

Re: Change vg's param

 
Eli_pok
Frequent Advisor

Change vg's param

Hi,
Is there any way to change a vg's parameter (PE size) on the fly ?
If there isn't what is the best way copy a vg after creating a new vg with the needed parameter.
Thanks....
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Change vg's param

Shalom,

No way to change it.

the volume group must be exported (vgexport) and then re-created with vgcreate.

I suggest instead of PE size you use the -p physical volumes paramter. This defaults to 255 and if you set it to 10 you can get around storage limitations which you obviously face.

Either way vgcreate is required.

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_pok
Frequent Advisor

Re: Change vg's param

How will vgexport help me ?
I need the data on my vg, but I cant increase the lvol size over 262 giga, so I need a bigger PE size.
The only way that seems posible is to create a new vg and copy the data. My quastion is, what is the best way to do it ?
Or maybe there is a way to import a vg on a new vg with the needed params ?
Steven E. Protter
Exalted Contributor

Re: Change vg's param

Shalom,

vgexport will get rid of the existing vg structure without damaging the data.

The BEST way to do it is as follows:

vgchange (deactivate the vg)
vxexport (to remove old vg structure)
vcreate (the new volume group as I stated)
vgimport (to get the data back)

I think a backup prior to start is a good idea.

My method is not the only way but I've done it a few times and its worked for me. This problem caused persistant issues for me a few years back when data growth went out of control due to Oracle requirements.

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
Patrick Wallek
Honored Contributor

Re: Change vg's param

You can't vgcreate and then vgimport. That won't work. The vgimport will read the VG configuration from the VGRA of the disks and you will have the exact same configuration as before.

What you'll have to do:

1) Backup your data
2) Remove old VG
3) Create new VG with new VG parameters
4) Create your LVs and mount them
5) Restore data

If you have sufficient disk space, create a new VG and LVs with some temporary mount points and copy your data. Then unmount the LVs from both VGs and mount the LVs from the NEW VG in there permanent spots.