Operating System - HP-UX
1826384 Members
4302 Online
109692 Solutions
New Discussion

Re: Advice on LVM allocation policy

 
SOLVED
Go to solution
CJENSEN_1
Regular Advisor

Advice on LVM allocation policy

Hello Guru's,
We have rx3600, running 11.31. The disks are on a EVA4400. We are just setting up the volume groups, logical volumes, and have a question. With regards to the creation of the logical volume - can you provide some advice on what to use for an "allocation policy" (eg: strict, strict,contiguous, PVG-strict, PVG-strict/contiguous,etc). I have not been able to find much in the LVM book on it. We will not be doing any mirroring or striping - it will be a basic disk to run Oracle applications.
Thanks...colin
4 REPLIES 4
Patrick Wallek
Honored Contributor
Solution

Re: Advice on LVM allocation policy

strict -- Mirror copies of an LV have to be on different disks, they cannot be on the same disk.

strict contiguous -- same as above, but all extents for an LV must be allocated sequentially (contiguously) on the disks. You cannot have extents from LV1, then LV2, then LV1 again on the disks.

PVG-strict -- Same concept as strict, but using physical volume groups. Mirror copies for an LV must be allocated to different PVGs ('man lvmpvg' for details).

PVG-strict/contiguous -- Combine PVG strict and strict contiguous.

If you are allocating to an array, I would not worry too much about the allocation policy. I would just use the default, which is strict.
chris huys_4
Honored Contributor

Re: Advice on LVM allocation policy

Hi Colin,

> With regards to the creation of the logical
> volume - can you provide some advice on what
> to use for an "allocation policy" (eg:
> strict, strict,contiguous, PVG-strict,
For non-boot logical volumes the standard one, strict, is more then enough.

> We have rx3600, running 11.31. The disks are
> on a EVA4400.
[..]
> We will not be doing any mirroring or striping

Most common mistake in solution designing of productions systems. If you dont have the money to buy 2 diskarrays, of a certain storage technology, eva's in your case, then buy some lower disk technology were you can buy two off, like 2 msa's and mirror the lvols between the 2 .. as sooner or later 1 storage array will fail.. (and restoring from backup can be a very lengthy process these days if you need to recover TB's of data ;) )

Greetz,
Chris

James R. Ferguson
Acclaimed Contributor

Re: Advice on LVM allocation policy

Hi Colin:

The default policy is 'strict' and that's appropriate for most logical volumes. The 'strict' policy simply means that mirrored, logical extents cannot occupy the same physical volume.

The 'contiguous' policy means that all phycial extents for a logical volume must reside on the volume without any intervening gaps (as for another logical volume). This is a requirement for the logical volumes like '/' and device swap. Contiguous allocation is not a default and unless required is generally not set as it restricts later opportunities for logical volume expansion.

By default, the distributed allocation policy is off, and all free extents are allocated from each available physical volume before proceeding to the next available physical volume as logical volumes are allocated. The 'PVG-strct' allocation policy is required to use distributed allocation. It insures that mirrors of distributed extents don't overlap.

Have a look at the manpages for 'lvcreate', 'lvextend', and 'lvchange'.

The defaults will be fine for you, since you indicated that you will not be doing any mirroring or striping at the LVM level.

Regards!

...JRF...
CJENSEN_1
Regular Advisor

Re: Advice on LVM allocation policy

Thank you everyone - that confirms what I was sort of thinking. Very much appreciate your time to answer my question...points assigned...colin