Skip to contentSkip to conversation

Allocation policies

linux-lvm Anthony Johnson 2 participants 2 messages Sep 10, 2002 – Sep 11, 2002

lore
Share & tools
lore
#0 lore raw

I know there are 2 allocation policies, contiguous and next free. Is there any information that describes in detail how LVM determines the extents to assign to a logical volume with it is created or extended? For example, if the policy is "contiguous", must the LV contain all contiguous extents or does it use a "best-case" scenario, and how would that work? Likewise, in the "next free" scenario, is there any weight given to contiguous space, does it automatically allocate across PVs, etc?

Thanks!
Anthony

#1 lore raw
Quoted 3 lines · Anthony Johnson

I know there are 2 allocation policies, contiguous and next free. Is there any information that describes in detail how LVM determines the extents to assign to a logical volume with it is created or extended?

It goes by the sequence defined by the internal PV number shown by "vgdisplay -v". Free space on PVs with lower internal is allocated first.

Quoted 2 lines

For example, if the policy is "contiguous", must the LV contain all contiguous extents

Yes.

Quoted 1 line

or does it use a "best-case" scenario,

No.

Quoted 4 lines

and how would
that work? Likewise, in the "next free" scenario, is there any weight given to contiguous space, does it automatically allocate across PVs, etc?

No, there's no weight.
In both cases it does allocate accross PVs.
In the contiguous case, it can't allocate on the same PV unless there's free space after the already allocated extents.
You need to use pvmove if there's not free space following to move extents allocated to other LVs away.

Quoted 9 lines

Thanks!
Anthony

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

Signature · 15 lines
Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
[email protected]                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-