1826421 Members
3503 Online
109692 Solutions
New Discussion

Re: PVG then mirroring

 
Margaret Frank
Occasional Contributor

PVG then mirroring

I am trying to mirror 30G that is currently on 3 10G drives. We have attached 2 15G drives. I need the data to specifically go to the new drives. I cannot mirror the data to the new drives specifically because I am going from 3 drives to 2 drives. Can this be done if a PVG group is created? How is that done?
Here is an example of what I have
vg01
/dev/dsk/c13t1d0
/dev/dsk/c13t1d1
I tried vgcreate -g emc /dev/dsk/c15t1d0 /dev/dsk/c15t1d1
then vgextend -g emc /dev/vg01 /dev/dsk/c15t1d2
then I tried lvextend -m 1 -s /dev/vg01/lvol1 emc
I get errors. I have removed the group emc with the hopes of finding out what I have done wrong to set this up correctly. Thank you for any information you can provide.
5 REPLIES 5
hbhua_231
Advisor

Re: PVG then mirroring

hi,be sure you have create the correct /etc/lvmpvg file,try:

lvchange -s g /dev/vg01/lvol1
then
lvextend -m 1 /dev/vg01/lvol1
TwoProc
Honored Contributor

Re: PVG then mirroring

First,

$> vgextend /dev/vg01 /dev/dsk/c15t1d1 /dev/dsk/c15t1d2

Now you'll just need to create your mirrors.

$> lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/c15t1d1 /dev/dsk/c15t1d2

When it's done, you should be working.

To see where you are while the above is running, from another shell prompt:

$> lvdisplay -v /dev/vg01/lvol1 | grep -i "Stale"

That will show you the next PE that's going to be mirrored in the lvol, and if you repeat running it, you'll see it progress along until complete.
We are the people our parents warned us about --Jimmy Buffett
Sujit
Advisor

Re: PVG then mirroring


1) You need to add new disk (15GB) to VG01

#vgextednd /dev/vg01 /dev/dsk/c15t1d0 /dev/dsk/c15t1d1

After this there are 2 ways to do the mirroring Create PVG or mirror as we do with normal disk.

PVG :
2)Create /etc/lvmpvg file. For you it will look something like
VG /dev/vg01
PVG PVG0
/dev/dsk/c13t1d0
/dev/dsk/c13t1d1
Third_DISK
PVG PVG1
/dev/dsk/c15t1d0
/dev/dsk/c15t1d1
Save the file.
3) Now you need to just run lvextend cmd without specifying disk path. /etc/lvmpvg will take care of the disk.

# lvextend -m 1 /dev/vg01/lv_name

NORMAL Method;
4) Mirroe each LV by specifying pv_path.

# lvextend -m 1 /dev/vg01/lv_name pv_path

Sujit.
Margaret Frank
Occasional Contributor

Re: PVG then mirroring

thank you for all of your help, however, I have 1 issue. I created the /etc/lvmpvg file as needed. However, when I try to mirror a copy of my data it is not going onto the disks in the new pvg group, but instead going onto disk that has available space.
I need to force the mirror copy to go onto the disk that is in the pvgroup. Does anyone know the syntax? I do not want to mirror from 1 disk to another, but instead from 1 lvol to available space that is is the new pv group.
Margaret Frank
Occasional Contributor

Re: PVG then mirroring

I got it finally!! Thanks so much for all the help.