1833770 Members
1889 Online
110063 Solutions
New Discussion

Re: LVM to PVG

 
Frédéric DAMEZ
Occasional Advisor

LVM to PVG

Hi,

Sommes times ago, we had a smal server with
smal activity. Litle by litle our system comme
big and we inserted the disk to our VG01.

Is there a way to change a classic VG to PVG ?

I read the lvchange manuel but is not so clear
pour me.

Thanks


6 REPLIES 6
Torsten.
Acclaimed Contributor

Re: LVM to PVG

PVG ensures that mirrors go to the right disk.

Your question is not clear to me.

For PVGs, see

man lvmpvg

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Eric SAUBIGNAC
Honored Contributor

Re: LVM to PVG

Bonsoir Frederic,

As Torsten said, your needs are not very clear.

Any way, if you want to change allocation policy to Distributed it will not be possible in a strict definition of Distributed. man lvchange :

----------------
The -D y option will fail if the existing logical volume has any two consecutive logical extents on the same physical volume. To override this failure, use the -D f option. If a logical volume with the distributed allocation policy has at least two consecutive logical extents on the same physical volume, then lvdisplay(1M) will display the allocation as partially-distributed (vs. distributed).
----------------

That is the case : I guess that all LV in your VG01 have at least 2 contiguous extends.

So in a strict definition you can modify the LV to a partially-distributed plociy. That means that new LV's extends will be allocate in a distributed manner and that existing ones will stay as they are now. Not a problem at all ...

But why do you want to do that ?

Regards

Eric
Sandman!
Honored Contributor

Re: LVM to PVG

There is no easy way to go from a classic VG to a PVG other than starting from scratch. A PVG requires that each successive LE go to a different PV and each of the LEs should be mirrored onto a PV in a different PVG. Mirrored LEs follow the distributed allocation policy in which each successive LE goes to a different PV. In a classic VG all the LEs occupy a PV one after another until it runs out of space and then a new PV needs to be added for lvol expansion.

~hope it helps
Tim Nelson
Honored Contributor

Re: LVM to PVG

This assumes you have already configured the primaries with Distributed striping. If not you can only rebuild or create new and migrate.

You should be able to drop all your mirror disks, edit /etc/lvmpvg then..

put all primaries in group1 and secondaries in group2 then remirror using strict policy.


i.e.
VG /dev/vgdata1
PVG PVG1
/dev/dsk/c8t0d0
/dev/dsk/c8t1d0
/dev/dsk/c8t2d0
/dev/dsk/c8t3d0
/dev/dsk/c8t4d0
/dev/dsk/c8t5d0
/dev/dsk/c8t8d0
PVG PVG2
/dev/dsk/c9t0d0
/dev/dsk/c9t1d0
/dev/dsk/c9t2d0
/dev/dsk/c9t3d0
/dev/dsk/c9t4d0
/dev/dsk/c9t5d0
/dev/dsk/c9t8d0
Frédéric DAMEZ
Occasional Advisor

Re: LVM to PVG


Thanks every body. I did create new PVG and
copy vg01 over it.
Bob_Vance
Esteemed Contributor

Re: LVM to PVG

I'm not sure how the discussion got to Distributed Allocation Policy, but you can use PVGs *without* Distributed Allocation.

However, the converse is not true.
DAP does *require* PVGs.

All PVG-strict mirroring policy means is that mirrored extents will go on PVs in different PVGs.
((The default, "strict", means just use *any* different PV. With "none", mirrored PEs can actually go on the *same* PV -- useful for splitting, but no HA redundancy.
))

The original idea of PVGs, before DAP, was simply to make it easy to ensure that mirroring occurred across HBA boundaries, so that a loss of an HBA would not completely blow up the mirroring.

With lots of PVs, it might be hard to remember which guys are on different HBAs or buses or arrays. Once, you set up /etc/lvmpvg correctly, making sure that all PVs on an HBA, for example, are in a separate PVG, then you don't have to remember when you extend the mirrored LVOL.

bv

"The lyf so short, the craft so long to lerne." - Chaucer