1834478 Members
3577 Online
110067 Solutions
New Discussion

Recreating VG01

 
SOLVED
Go to solution
Doug_85
Regular Advisor

Recreating VG01

Lserver HP-UX 11.0

VG01 is mirrored on /dev/dsk/c1t0d0 and /dev/dsk/c2t2d0 respectively. To change the PE size from 4mb to 8mb (36GB) I plan on doing the following.

**Since this is a non-root volume is this the most expedient way of doing this? Also will I need to reduce the mirrors before initiating?

1.pvcreate /dev/rdsk/c1t0d0
2.vgextend /dev/vg01 /dev/rdisk/c1t0d0
3.lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/c2t2d0
4.lvextend -m 1 /dev/vg01/lvol2 /dev/dsk/c2t2d0
5.lvextend -m 1 /dev/vg01/lvol3 /dev/dsk/c2t2d0
6.lvextend -m 1 /dev/vg01/lvol4 /dev/dsk/c2t2d0
7.lvextend -m 1 /dev/vg01/lvol5 /dev/dsk/c2t2d0
8.lvextend -m 1 /dev/vg01/lvol6 /dev/dsk/c2t2d0
9.lvextend -m 1 /dev/vg01/lvol7 /dev/dsk/c2t2d0
10.lvextend -m 1/dev/vg01/lvol8 /dev/dsk/c2t2d0
11.lvextend -m 1/dev/vg01/lvol9 /dev/dsk/c2t2d0
12.lvextend -m 1 /dev/vg01/lvol10 /dev/dsk/c2t2d0

Thanks,
Doug
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: Recreating VG01

Doug,

The only time you get to specify the PE size is at vgcreate. You're going to have to back up the contents of VG01, vgexport it, pvcreate, vgcreate, lvcreate, lvextend, restore.


Pete

Pete
Pedro Cosmen
Valued Contributor

Re: Recreating VG01

Hello Doug, Is c1t0d0 already a part of your VG01?, or are you planning to change or add this disk?. Anyway, the only method for changing the PE size is at the moment you create the VG, so you need to re-create your VG with the correct values and then restore your information.

Regards.
Sanjay_6
Honored Contributor

Re: Recreating VG01

Hi Doug,

The only way you can change the PE_size is by recreating the vg. So what you'll have to do is take a complete backup of all the filesystems in vg01 (take two to be on the safer side) and then recreate the vg and then restore the data after recreating the lvs.

Hope this helps.

Regds
Fred Ruffet
Honored Contributor
Solution

Re: Recreating VG01

As long as you need to recreate to change PE size, you could go into the following scenario which has the advantage of not going into backup restore (at least not restore, backup is always needed :)

. Actual VG01 on /dev/dsk/c1t0d0, mirror copies on /dev/dsk/c2t2d0.
. reduce lv by breaking mirrors
. once lv are no longer on /dev/dsk/c2t2d0, it should be empty
. reduce vg by removing /dev/dsk/c2t2d0
. create a new vg with /dev/dsk/c2t2d0 (and the good PE), copy all lvs from vg01 to the new vg.
. remove vg01
. add /dev/dsk/c1t0d0 to new vg
. mirror

It won't be OK if you absolutely want to have this vg name as VG01...

I'm giving this solution not to use restore, cause I'm actually having a hard time with a bad backup and restore seems a bad word to me :/

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Steven E. Protter
Exalted Contributor

Re: Recreating VG01

The process of running vgcreate IS as Pete states the only way to change the PE size of the volume group. This process is desstructive and a backup must be done prior to starting.

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