cancel
Showing results for 
Search instead for 
Did you mean: 

contiguous allocation

newunix
Frequent Advisor

contiguous allocation

as i read docs it states that

logical extents are always contiguous.

what is meant by contiguous
8 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: contiguous allocation

Hi:

A dictionary lookup would help you.

That said, in LVM, 'contiguous' allocation means that all of the logical extents of a logical volume are allocated in an unbroken sequence of physical extents. Logical volumes used for swap (and for '/') must have contiguous extent allocation. Other logical volumes might have (for instance) 100 logical extents spanning physical extent #300 through #399 and later another 50 logical extents added that occupy physical extents 1000-1049. In this case, the 'contiguous' allocation policy is not in force.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: contiguous allocation

All the extents numbers in the lvol are numbered in order:

1 2 3 4 5 6

For non-contiguous arrangements, they can be like this:

1 17 1234 3 5 88

But usually it refers to splitting an lvol into two or three sections when it is extended. If there is something else already at the end of the lvol (like lvol1 followed by lvol2) and the additional extents must come from some location after all the existing lvols. This is not allowed for lvol1 and lvol3 as they are involved in bootup and constrained to have only contiguous extents.


Bill Hassell, sysadmin
Ismail Azad
Esteemed Contributor

Re: contiguous allocation

Hi newunix!,

"logical extents are always contiguous:.
This sentence has been taken out of context. Contiguous as said before refers to a "continous" space of "allocatable units" and in this case the smallest allocatable unit on LVM is a "logical extent".

Sometimes careless pvmove's, lvextend's etc. "fragments" the extent space referring to a semi-fragmented and completely fragmented extent space. Hence, fragmentation is not only related to a F/S but at the LVM level also and is monitored by glance.

As mentioned before "root" and "boot" logical volumes cannot exist without this policy enforced and hence "extending" these filesystem is sometimes a lengthy task! {referring to the boot logical volume}



Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
newunix
Frequent Advisor

Re: contiguous allocation

still i am not getting the correct point.

can any one explain with an example or pictorial representation.
Torsten.
Acclaimed Contributor

Re: contiguous allocation

If you imagine a disk, after several headers the LVM area for LVOLs begins.

First there must be LVOL1 without any gap, followed by lvol2 followed by lvol3. All in one "block", without any gap.


This is important, because in case of emergency the system is accessing these area "blind" without activating the volume group.

Each other LVOL can be "anywhere" on the disks in a VG, spread across the disks, with gaps, without gaps, filling existing gaps, etc ...



Maybe it helps to translate "contiguous" to your language?

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!   
Ismail Azad
Esteemed Contributor

Re: contiguous allocation

Hi,

When a logical volume is created it is divided into logical extents and these map to the disk location in units called as physical extents. Let's refer to this as L.E and P.E. This mapping is termed as an extent map.


This is a contiguous space....

PE0 -> data:LE0
PE1 -> data:LE1
PE2 -> data:LE2
PE3 -> data:LE3
_ _ _ _ _ _ _ _ _ _

This would be an LV that could termed as "semi fragmented"..

PE0-> data:LE0
PE1 -> data:LE1
PE4 -> data:LE2
PE5 -> data:LE3

Hope this helps. Well that's the diagram I could draw here. :)

regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
Torsten.
Acclaimed Contributor

Re: contiguous allocation

>> "logical extents are always contiguous"


Where exactly is this taken from?

There is a single google hit - your thread. wow.



The post above from Ismail Azad most likely describes what you meant.

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!   
Ismail Azad
Esteemed Contributor

Re: contiguous allocation

Hi,

Relating to Torsten's post...

In the second example i mentioned, PE2 and PE3 would be the "gaps". Forgot to put that in the diagram. :)

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....