1835920 Members
2489 Online
110088 Solutions
New Discussion

confuse about PV group

 
SOLVED
Go to solution
stephen peng
Valued Contributor

confuse about PV group

dear all,
i have never deal with PV group,so what is its benifit? and how to create PV group and how to maintance? is there any document about PV group?

thanks a lot
1 REPLY 1
Matti_Kurkela
Honored Contributor
Solution

Re: confuse about PV group

(Hmm... you have assigned points to only about half of the answers to your questions. Please assign points, it helps others to find out the *best* solutions if they are having similar problems.)

A physical volume group (PVG) is a level of organization between physical volumes (PVs) and volume groups (VGs). The PVG names must be unique within a volume group, but the same PVG name can be reused in a different VG. It's useful when you have e.g. four or more disks on two SCSI buses, and want to make a mirrored volume group out of them with MirrorDisk.

Normally, the LVM system considers all four PVs as equals. So, it will place the mirror copy on the next available PV - which, in this case, might be on the same SCSI bus as the first copy. This is bad both performance- and reliability-wise, so you'll want to avoid that.

In a setup like this, it's recommended that you group the PVs into PVGs, so that each PVG will contain all the PVs on a single SCSI bus. Then you can set the mirror allocation policy of each LV to "PVG-strict" (lvcreate/lvchange -s g).

When the allocation policy is "PVG-strict", the MirrorDisk will automatically place the mirror copy of a LV onto a different PVG than the original... so both SCSI buses get used in parallel.

When creating or extending a VG, you can use the "-g" option to add the new PV to a designated PVG within that VG. If the PVG does not exist yet, it will be created automatically.

You can also set up the PVGs manually by creating the /etc/lvmpvg file (or editing it, if it exists). You must be very careful if you do that. See "man lvmpvg" for details.

When you have PVGs set up for a VG, you could also use "distributed" extent allocation policy (lvcreate -D y) on LVs of that VG. It's sort of equivalent to striping, but stripe size is equal to the extent size. The standard striping option (lvcreate -i) is more finely-grained and is likely to produce better performance.
MK