Operating System - HP-UX
1748034 Members
4665 Online
108757 Solutions
New Discussion юеВ

Re: Extending mirrored LV onto second set of drives

 
Thomas J. Harrold
Trusted Contributor

Extending mirrored LV onto second set of drives

I have a data VG, with a single LV that uses all of the extents.

The VG consists of two physical volumes (100GB each), from separate storage arrays, and the data is mirrored with LVM, so that loss of an array will not cause any data loss.

All is well.

Now, I need to add an additional pair of physical volumes (80GB each), and grow my LV.

Do I need to use PVG to make this happen, or can I simply extend my LV onto one of the new 80GB drives, and (since I have already configured for a mirror copy) have it continue to mirror extents to the second 80GB volume?

Thanks in advance.
I learn something new everyday. (usually because I break something new everyday)
5 REPLIES 5
Mustafa Gulercan
Respected Contributor

Re: Extending mirrored LV onto second set of drives

hi Thomas;
you need to pvcreate first.
after an ioscan and insf -e, you should vgextend.
and finally use lvextend.

regards,
mustafa
Sajjad Sahir
Honored Contributor

Re: Extending mirrored LV onto second set of drives


pvcreate /dev/dsk/disk1(new disk)
vgextend /dev/vg01 /dev/dsk/disk1

then lvextend -L size(new size) -n logical volume name /dev/vg01
first create physical volume then volume group exnted then logical volume extend

sajjad
Sajjad Sahir
Honored Contributor

Re: Extending mirrored LV onto second set of drives


pvcreate /dev/dsk/disk1(new disk)
vgextend /dev/vg01 /dev/dsk/disk1

then lvextend -L size(new size) -n logical volume name /dev/vg01
if u want to mirror copy u have to use -m option
for example lvextend -m 1 -L new size of the logical volume -n logical volume name volume group name
first create physical volume then volume group exnted then logical volume extend

sajjad
TwoProc
Honored Contributor

Re: Extending mirrored LV onto second set of drives

You would only need to use PVGs if you had used PVGs in the first place when you created the VG. So, just pvcreate the two drives, and then do a vgextend to add them to the vg. Then lvextend the lv over one of the drives, then mirror. If that doesn't work, you may have to reduce the mirror out, then extend your lv, then remirror both the second 100G and 80G drives into the lv.
We are the people our parents warned us about --Jimmy Buffett
Ivan Krastev
Honored Contributor

Re: Extending mirrored LV onto second set of drives

Hello Thomas,

If you have 100GB in one PVG mirrored (using 200GB from 2 LUN's) just create additional PVG group with 2 new disks.

After extending logical volume +80GB LVM automaticaly will use both disks. Mirror is automatically.

regards,
ivan