Operating System - HP-UX
1829116 Members
2288 Online
109986 Solutions
New Discussion

Difference of mirroring with strict allocation policy and without strict allocation policy

 
SOLVED
Go to solution
jkumar
Advisor

Difference of mirroring with strict allocation policy and without strict allocation policy


Hi ,

Can any one explain what the difference and advantage between Mirrored disk which is set to Strict allocation policy and Mirrored disk without strict allocation policy.
14 REPLIES 14
Steven E. Protter
Exalted Contributor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

Shalom,

Strict allocation policy requires the contents of the logical volume to be contiguous.

This can improve performance but it depends on the application using the space.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Torsten.
Acclaimed Contributor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

Some LVOLS must be contiguous, thatswhy they are using the strict policy, like swap, stand, root.

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!   
Ralph Grothe
Honored Contributor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

No, I would assume that contiguity is a different (more stringent) policy which is for instance required with swap devices or the first three LVs of the system.
Whereas strict policy only requires the extends to remain on the same PV or PVG (which is sensible for mirroring).
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

I should have added, strict as opposed to strict *and* contiguous, allows to have "gaps" of an LV's extents that may be "interleaved" by extents from a different LV (important when you need to lvextend later!)
Madness, thy name is system administration
jkumar
Advisor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

Hello ,

Thx for ur Quick responce,,

I need to know for example In mirroring we are
having 2 different disk to mirror ,So if 1 disk
fails ,It will work with other disk which is mirrored ,If we want to extend we are using lvextend -l and increasing the lvol size with or without online JFS ,So i need the info that whats the advantage of strict allocation policy.
Ralph Grothe
Honored Contributor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

As far as the Redundancy part of RAID is concerned, what sense would it make to have both mirrors reside on the same physical device (let alone the likely bad writing performance)?
That's why you would want to create the LV like

# lvcreate [-s y] -m 1 /dev/dsk/c[12]t2d0

Since strict allocation policy is the default I enclosed the -s option in square brackates to designate its optional appearance.
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

Oops, a silly typo
Of course it should be the VG

# lvcreate -s y -m 1 /dev/vgsomething
Madness, thy name is system administration
jkumar
Advisor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy


Thx for the info ,

One more question ,

how to extend a lvol when its in strict alloaction policy
For me its giving the below error
while extending the volume getting the following error.
lvextend -L 400 /dev/vg00/lvol4
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol4" could not be extended.
Failure possibly caused by strict allocation policy

can any-one give me the steps
how to perform without any dataloss or downtime
Torsten.
Acclaimed Contributor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

Check "vgdisplay -v vg00" if free extends are left.

LVOL4 is usually /tmp and not strict.

The message says "...Failure **possibly** caused by strict allocation policy"

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!   
jkumar
Advisor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

I tryed for /opt which is lvol6 But the same error. how to extend ?
Torsten.
Acclaimed Contributor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

Post

vgdisplay -v vg00

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!   
Ralph Grothe
Honored Contributor
Solution

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

If the LV you wish to extend has strict policy
then you can extend by as many PEs as are free on any PV with the smallest number of PEs.

Identify allocation policy of LVs like that (e.g. here of vg00 LVs)

# lvdisplay $(vgdisplay -v vg00|awk '/LV Name/{print$NF}')|grep -E 'LV Name|Allocation'

Then look at smallest No. of free PEs

e.g. here I could extend strictly allocated LVs by maximally 64*32 MB (i.e. 2 GB)

# vgdisplay -v vg00|grep -E 'PE Size|Free PE|PV Name'
PE Size (Mbytes) 32
Free PE 174
PV Name /dev/dsk/c0t6d0
Free PE 110
PV Name /dev/dsk/c3t6d0
Free PE 64
Madness, thy name is system administration
MHudec
Frequent Advisor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

Hi all,

strict allocation does not mean the same as contiguous! No! It does not!

Strict allocation means that mirrored physical extents cannot be on the same physical volume, like original. Or PVG-strict cannot have the originals and mirrors (still talking about physical extents) on the same physical volume group.

Contiguous means that physical extents have to be in ascending order (like /dev/vg00/lvol3 which is usualy strict/contiguous), so you have to have extents going like 1-30 (these numbers are just for an example), and when you're extending by 10 extents you cannot have 1-30, and then 210-220, you have to have 1-40. I am still talking about physical extents allocation on physical volumes. Though this contiguous stuff might be bit hard to get over with like when trying to extend /dev/vg00/lvol3 (I mean /) it can be easily extended (provided you have OnlineJFS product). But extension of / is not supported solution, so be aware (it is the area of voodoo tricks were big red dragons live :) ).

Please check man lvcreate for this (sections about -s and -C).

As for your first question, if you are mirroring, it would be actually better to have strict allocation, because when you do not have strict allocation, your mirroring would be pretty useless.

Imagine two disks, c0t0d1 (as original) and c1t0d1 (as mirror). With strict allocation, you would have original physical extents on c0t0d1 and mirrored on c1t0d1. In case when one disk fails, you have another one, and the system is happy. But without strict allocation, you could end up with original physical extents on c0t0d1 and some mirrored on c1t0d1 and some mirrored on c0t0d1 too! In case when c0t0d1 fails, you would loose the data (if you do not have any backups of course), as you would loose both original and mirrored physical extents on the same disk.

As for your second question, you have to first check your /dev/vg00/lvol4 as which physical volumes are being used and check their free extents. One of them will have smaller number of free extents (Ralph pretty much illustrated it with his 64 extents free). You cannot go above that number (well actually you can, but that would require introducing of another set of two physical volumes to the volume group).

Please use -l when creating or extending the logical volume. It uses extents instead of megabytes as does -L use (when using megabytes, LVM has to round up the number of extents). So instead of -L 400 you would use -l 100 (considering that size of extent is 4MB).

Martin
jkumar
Advisor

Re: Difference of mirroring with strict allocation policy and without strict allocation policy

Hi All,

Thanks a lot for the info ....