1755164 Members
4226 Online
108830 Solutions
New Discussion юеВ

Re: PVG mirrors?

 
SOLVED
Go to solution
thinphony
Advisor

PVG mirrors?

Hi!
Should anyone kindly give me some clear idea about the difference about PVG mirror and mirror & in which case they are used?


Thanks in advance.
thinphonny
8 REPLIES 8
Tom Danzig
Honored Contributor

Re: PVG mirrors?

Physical Volume Groups allow you to group disks together so that when you create mirrors, they are spread accross the disks you intended.
Denver Osborn
Honored Contributor

Re: PVG mirrors?

be sure to refer to the man page for lvmpvg, it gives an example for setting up the /etc/lvmpvg file.

Let's say you have vg03 and it contains 6 physical volumes. You could create an /etc/lvmpvg file with the following.

VG /dev/vg03
PVG pvg0
/dev/dsk/c0t2d0
/dev/dsk/c0t3d0
/dev/dsk/c0t4d0
PVG pvg1
/dev/dsk/c1t2d0
/dev/dsk/c1t3d0
/dev/dsk/c1t4d0

Now if you have an lvol1 in vg03 that is contained on c0t2d0 and c0t3d0 you can extend it to mirrored copies of 1 by specifing the PVG that contains pv c1t*d0

# lvextend -m 1 /dev/vg03/lvol1 pvg1
It'd be the same as
# lvextend -m 1 /dev/vg03/lvol1 /dev/dsk/c1t2d1 /dev/dsk/c1t2d2

You could see that if you are working with several disks it may help with keeping track of how things are layed out on the system.
Dan Hetzel
Honored Contributor

Re: PVG mirrors?

Hi Denver,

Good explanation, but I guess that last lines should read:
---------------
It'd be the same as
# lvextend -m 1 /dev/vg03/lvol1 /dev/dsk/c1t2d0 /dev/dsk/c1t3d0
---------------

Shouldn't they ?

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Denver Osborn
Honored Contributor

Re: PVG mirrors?

yup, it should've read that way. once again I was thinking one thing and typing another. oops.
Dan Hetzel
Honored Contributor

Re: PVG mirrors?

Hi,

One more point, you do NOT need the PVG to mirror your LVOLs, it's just a bit more convenient because it saves typing (see Denver's answer above)

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
thinphony
Advisor

Re: PVG mirrors?

Thank you all for quick reply.
But can I make two PVs as a mirror without PVG?
then why I use PVG?
What's the differences?


Thanks!
thinphony.
Darrel Louis
Honored Contributor

Re: PVG mirrors?

Don't know if you're using hpux 10.20 or hpux 11.X
Check the man page for lvsplit and lvmerge aswell.

Within hpux 11.X you can specify which PVG you want to split.
e.g.
# lvsplit -g PVG1 /dev/vg04/lvol1
This functionallity wasn't in the previous version of hpux. This can be handy for instance when you have a three way mirror.

Good luck

Rob Mallard
Valued Contributor
Solution

Re: PVG mirrors?

PVGs are usually used to group PV by controller to increase performance. LV can be mirrored on the same disk, on two different disks (default), or on two different PVGs. This is controlled by the -s option (strictness) of lvextend -m

lvextend -m 1 -s n ... (allow mirroring on same disk)

lvextend -m 1 -s y ... (mirrors can not be on the same disk - DEFAULT)

lvextend -m 1 -s g ... (mirrors must be on different PVG)

Setting up PVGs in the /etc/lvmpvg file allows PV location to be defined once. You can build your own /etc/lvmpvg by hand or use the -g option of vgcreate when creating the volume groups.