1835137 Members
2754 Online
110077 Solutions
New Discussion

Mirroring and PVG help

 
Patrick Graham
Occasional Advisor

Mirroring and PVG help

I have VG (VG01) with one LV (lvol1) spread across two PVs (c2t2d0 & c2t1d0).
I want to mirror the logical volume onto an attached JBOD. If I vgextend two new jbod disks (c4t2d0 & c4t3d0) into VG01, can I use the command "lvextend ???m 1 /dev/vg01/lvol1" and expect that lvol1 will be mirrored onto the recently added JBOD disks? If this won???t work, can I place only the two new jbod disks into a PVG and mirror onto the PVG? In other words can I mirror onto a PVG from a non-PVG (my current lvol1)?
7 REPLIES 7
erics_1
Honored Contributor

Re: Mirroring and PVG help

Patrick,

You can specify which disk you would like to mirror to within the lvextend command. There is a good document within the Knowledge Base describing the procedure.
Doc Id: ULVMKBRC00008267

Hope this helps!
Eric
Michael Tully
Honored Contributor

Re: Mirroring and PVG help

Hi,

I would explicitly the physical volumes you wish to mirror to.

Lets assume two disks you wish to use are:
/dev/dsk/c4t2d0 and /dev/dsk/c4t3d0

To do the mirroring:
# pvcreate /dev/dsk/c4t2d0
# pvcreate /dev/dsk/c4t3d0
# vgextend /dev/yourvg /dev/dsk/c4t2d0
# lvextend -m 1 /dev/yourvg/yourlv1 /dev/dsk/c4t2d0
# lvextend -m 1 /dev/yourvg/yourlv2 /dev/dsk/c4t3d0

Continue for each logical volume.

HTH
Michael

Anyone for a Mutiny ?
James R. Ferguson
Acclaimed Contributor

Re: Mirroring and PVG help

Hi Patrick:

As already noted, using 'lvextend' and specifying the pv_path(es) as arguments to restrict (here) the mirrored extents to particular disks is one method.

You can also manually edit the '/etc/lvmpvg' file and define the PVG for the unmirrored and the "mirrored-to-be" group of disks. Then:

# lvchange -s g /dev/vgXX/lvolX

...to establish a PVG strict allocation policy, and finally, 'vgextend' using the PVG name of the "mirrored-to-be" group of disks.

See the man pages for 'lvchange' and 'lvextend' for more information.

Regards!

...JRF...
Victor_5
Trusted Contributor

Re: Mirroring and PVG help

Luc Bussieres_1
Trusted Contributor

Re: Mirroring and PVG help

Patrick,

When I was working for HP I have written an LVM Quick Reference that contains multiple steps by steps for LVM. Whithin the document there is a section for PVG.

The document is named: LVM Quick reference
and the docid is KBAN00000514.

The following link should access the document:
http://us-support2.external.hp.com/cki/bin/doc.pl/sid=9f022c54125c117f45/screen=ckiDisplayDocument?docId=200000058994424
Paul Thomson_2
Super Advisor

Re: Mirroring and PVG help

Could try the attached.
Argh ye land lovers !
Patrick Graham
Occasional Advisor

Re: Mirroring and PVG help

Thanks Everybody !