1830251 Members
2601 Online
110000 Solutions
New Discussion

Recreate Volume Group

 
SOLVED
Go to solution
Neil Wilson_2
Valued Contributor

Recreate Volume Group

The Physical Extents are too small for a VG. I need to recreate the VG with a larger PE size. All LVs are mirrored. What is the best way to do this? recreate a new VG, LVs and copy from existing or use lvsplit? how do i do this?
5 REPLIES 5
harry d brown jr
Honored Contributor

Re: Recreate Volume Group


I believe that if you split mirror's, they still belong to the VG (its been a year since I've played with mirrors), and since the PE is a definition of the VG, you have to delete the VG and recreate it with large PE's. So, I'd backup the LV's (twice), delete the LV's, then the VG, and then do my restores.
Live Free or Die
James R. Ferguson
Acclaimed Contributor
Solution

Re: Recreate Volume Group

Hi Neil:

I presume that you are not dealing with vg00. If that is the case, I would look to using Ignite 'make_tape_recovery' to reinstall and due your resizing changes via the advanced filesystem options menus.

Thus, I presume that the volume group isn't vg00. Then, since you are going to have to bite-the-bullet and recreate the volume group to change the LVM geometry, 'lvsplit' isn't going to gain you much. The bit map created by a split remains in existence only until a merge is completed, or until one of the logical volumes is extended, reduced, split again, or until the system is rebooted.

I think you will want to 'lvreduce' and 'vgreduce' the volume to gain the physical disk you will use to recreate the volume group. Then make a new volume group with a new volume group number. Create your logical volumes, and a set of mount points. Then using 'cpio' copy your filesystems from their current mount point to the new ones:

# cd /old_mount_point
# find . | cpio -pudlmv /new_mount_point

When done, edit /etc/fstab replacing the "old_mount_point" with the "new_mount_point" and remove the "old" ones.

Lastly, remirror your newly created logical volumes on your newly created volume group.

Regards!

...JRF...

Re: Recreate Volume Group

Hi
yo can use the pvmove to copy a logical Volume
from a disk to other if this are persisting.
look man page for pvmove.

regards
mo.
the world of unix is beautifull
Sundar_7
Honored Contributor

Re: Recreate Volume Group

Hey Neil,

I was wondering why U fancy destorying the entire VG and then recreating it ..

U can always extend it...is it not ?

Add a new disk..

# pvcreate

# vgextend

This should be an easy and safe way in extending the number of PE's

See if this helps and assing the points :-)

Sundar
Learn What to do ,How to do and more importantly When to do ?
Andrew R.
Advisor

Re: Recreate Volume Group

I do agree with JRF as this is the only way, you have to recreate the VG. I am having the same problem where my existing VG has 4GB disks and now I need to add 8GB disks to the VG of course I couldn't because the max extents 1075 with the default extent size 4MB So I recreated the VG with

#vgcreate -p 255 -s 32 /dev/vgxx /dev/dsk/c.t.d

This consumes some more over head but it is safe.
Good Luck
Live for the infinity life