1753830 Members
9467 Online
108806 Solutions
New Discussion юеВ

Extend a volume group

 
SOLVED
Go to solution
Fernando_44
Occasional Contributor

Extend a volume group

I've a volume group and I want extend this volume group with a large capacity disk and the VG was created without considering future updates (options of vgcreate). Is necesary remove this vg and make it like a new vg losting all data or is possible extend my vg using all capacity disk without remove it?

Thanks
4 REPLIES 4
Stefan Farrelly
Honored Contributor

Re: Extend a volume group

Sorry, youre going to have to remove your VG and recreate it with the larger options for this large disk. You cannot extend your VG using all the capacity of this larger disk.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Donald Kok
Respected Contributor

Re: Extend a volume group

Hi ,

If it is not your vg00, you could create a new vg with your new (bigger) disk, and move the data to this vg.

Now you can add the the old disk to the new vg.

HTH
Donald
My systems are 100% Murphy Compliant. Guaranteed!!!
T G Manikandan
Honored Contributor
Solution

Re: Extend a volume group

you cannot.

This is because when the volumegroup is created,by default the MAX_PE number is set to the largest disk in the VG.
Now if you are to extend the VG using a bigger disk then you cannot use the new disk for its size.The only option is to re-create the VG or to create a new VG for that disk.

Steven E. Protter
Exalted Contributor

Re: Extend a volume group

I've run into this in the past, got out of it as follows.

1) shut down open databaes in the vg
2) run fbackup of all the data
3) created a new vg with appropriate parameters
4) added that big disk as disk 1.
5) lvremove(d) the filesystems in the original volume group
5) lvreduced all the disks out of the original vg.
6) extended the new vg to the now unassigned disks.
7) recreated all fileystems with a few adjustments to use space more efficiently(if you don't need this you can use vgexport/vgimport
8)mae appropriate adjustments to /etc/fstab
9) restored the data from fbackup.

I know its a pain, but its safe and there are a lot of good things to be said about lvm, thats why it was "ported" to Linux.

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