[linux-lvm] Questions about thin pools and segment properties

Zdenek Kabelac zkabelac at redhat.com
Thu Nov 29 10:39:01 UTC 2012


Dne 29.11.2012 04:07, ben napsal(a):
> If I start with a pool like this:
>
> lvs --all --segments -o +chunksize,discards
>    LV            VG   Attr      #Str Type      SSize   Chunk  Discards
>    pool1         vg1  twi-a-tz-    1 thin-pool 100.00m 64.00k passdown
>    [pool1_tdata] vg1  Twi-aot--    1 linear     50.00m     0
>    [pool1_tdata] vg1  Twi-aot--    1 linear     50.00m     0
>    [pool1_tmeta] vg1  ewi-aot--    1 linear      2.00m     0
>
> My first question is if I look at "pool1" with liblvm2pp will
> there ever be more than one segment? I know "pool1_tdata"


For now yes - thin pool volume should (and internally must have)
only 1 segment.


> can have more but it looks like "pool1" is just one.
> My second question is if discards and chunksize are segment
> properties, can a pool have more than one setting of either?


LV is container of segments - segment has its type - and they have their 
properties. The problem is there is not very clear distinction/definition
what is actually property of  LV and what is property of lvsegment  and a lot
of segment properties have landed historically as LV property.

There is some black magic internally to handle things properly.
But lvm2 will not allow you to create i.e. linear volume with thin pool 
segment inside (unless there is a bug).

My proposal here would be - to probably auto magically check for
segment properties in the first LV segment if they are queried via
lv property call. (Agk ?) - that would probably made the live easier.

Zdenek




More information about the linux-lvm mailing list