* [linux-lvm] is it right to specify '-l' with all the free PE in VG when creating a thin pool?
@ 2017-03-09 11:12 Eric Ren
2017-03-09 11:46 ` Zdenek Kabelac
0 siblings, 1 reply; 4+ messages in thread
From: Eric Ren @ 2017-03-09 11:12 UTC (permalink / raw)
To: LVM general discussion and development
Hello,
I find that it will fail to create a thin pool with all the free PE in VG as follows:
# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb lvm2 --- 200.00g 200.00g
# vgcreate vgtest /dev/sdb
Volume group "vgtest" successfully created
# pvdisplay
--- Physical volume ---
PV Name /dev/sdb
VG Name vgtest
PV Size 200.00 GiB / not usable 32.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 51192
Free PE 51192
Allocated PE 0
PV UUID JD74c2-R4zZ-cgs5-c5Ty-1abQ-cf7l-gdSxzz
# lvcreate -l 51192 --thinpool thinpool0 vgtest
Volume group "vgtest" has insufficient free space (51167 extents): 51192 required.
while it works when specifying '-l' this way:
# lvcreate -l 100%FREE --thinpool thinpool0 vgtest
Logical volume "thinpool0" created.
Is this something by design? or something may be wrong?
I can replicate this on both:
CentOS Linux release 7.3.1611 (Core)
lvm2-2.02.166-1.el7.x86_64
and
SUSE Linux Enterprise Server 12 SP2
lvm2-2.02.120-72.8.x86_64
Thanks,
Eric
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] is it right to specify '-l' with all the free PE in VG when creating a thin pool?
2017-03-09 11:12 [linux-lvm] is it right to specify '-l' with all the free PE in VG when creating a thin pool? Eric Ren
@ 2017-03-09 11:46 ` Zdenek Kabelac
2017-03-10 1:39 ` Eric Ren
0 siblings, 1 reply; 4+ messages in thread
From: Zdenek Kabelac @ 2017-03-09 11:46 UTC (permalink / raw)
To: LVM general discussion and development
Dne 9.3.2017 v 12:12 Eric Ren napsal(a):
> Hello,
>
> I find that it will fail to create a thin pool with all the free PE in VG as
> follows:
>
> # pvs
> PV VG Fmt Attr PSize PFree
> /dev/sdb lvm2 --- 200.00g 200.00g
> # vgcreate vgtest /dev/sdb
> Volume group "vgtest" successfully created
> # pvdisplay
> --- Physical volume ---
> PV Name /dev/sdb
> VG Name vgtest
> PV Size 200.00 GiB / not usable 32.00 MiB
> Allocatable yes
> PE Size 4.00 MiB
> Total PE 51192
> Free PE 51192
> Allocated PE 0
> PV UUID JD74c2-R4zZ-cgs5-c5Ty-1abQ-cf7l-gdSxzz
> # lvcreate -l 51192 --thinpool thinpool0 vgtest
> Volume group "vgtest" has insufficient free space (51167 extents): 51192
> required.
>
> while it works when specifying '-l' this way:
>
> # lvcreate -l 100%FREE --thinpool thinpool0 vgtest
> Logical volume "thinpool0" created.
>
> Is this something by design? or something may be wrong?
> I can replicate this on both:
Hi
Yes this is by DESIGN
When you specify '-l|-L' you specify size of 'dataLV' (logical size)
But then you need some more space for 'metadata' LVs (_tmeta & _pmspare)
-l100%FREE figure this automagically and reduces size a bit to fit in metadata LV.
Some 'future' version of lvm2 may support something like '--physicalsize'
which will be 'a total size used for every allocation made by command).
Regards
Zdenek
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] is it right to specify '-l' with all the free PE in VG when creating a thin pool?
2017-03-09 11:46 ` Zdenek Kabelac
@ 2017-03-10 1:39 ` Eric Ren
2017-03-10 9:07 ` Zdenek Kabelac
0 siblings, 1 reply; 4+ messages in thread
From: Eric Ren @ 2017-03-10 1:39 UTC (permalink / raw)
To: LVM general discussion and development, Zdenek Kabelac
On 03/09/2017 07:46 PM, Zdenek Kabelac wrote:
> [snip]
>>
>> while it works when specifying '-l' this way:
>>
>> # lvcreate -l 100%FREE --thinpool thinpool0 vgtest
>> Logical volume "thinpool0" created.
>>
>> Is this something by design? or something may be wrong?
>> I can replicate this on both:
>
> Hi
>
> Yes this is by DESIGN
>
> When you specify '-l|-L' you specify size of 'dataLV' (logical size)
> But then you need some more space for 'metadata' LVs (_tmeta & _pmspare)
>
> -l100%FREE figure this automagically and reduces size a bit to fit in metadata LV.
>
>
> Some 'future' version of lvm2 may support something like '--physicalsize' which will be 'a
> total size used for every allocation made by command).
Hi Zdenek,
Thanks a lot for your clarification!
Looks some changes to thin-pool feature make it behave differently since a certain version.
It worked on lvm2-2.02.98 (sles12) by specifying '-l' with all the free PE. Anyway, '-l
100%FREE'
looks more reasonable in such case:)
Regards,
Eric
>
>
> Regards
>
> Zdenek
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] is it right to specify '-l' with all the free PE in VG when creating a thin pool?
2017-03-10 1:39 ` Eric Ren
@ 2017-03-10 9:07 ` Zdenek Kabelac
0 siblings, 0 replies; 4+ messages in thread
From: Zdenek Kabelac @ 2017-03-10 9:07 UTC (permalink / raw)
To: Eric Ren, LVM general discussion and development
Dne 10.3.2017 v 02:39 Eric Ren napsal(a):
> On 03/09/2017 07:46 PM, Zdenek Kabelac wrote:
>> [snip]
>>>
>>> while it works when specifying '-l' this way:
>>>
>>> # lvcreate -l 100%FREE --thinpool thinpool0 vgtest
>>> Logical volume "thinpool0" created.
>>>
>>> Is this something by design? or something may be wrong?
>>> I can replicate this on both:
>>
>> Hi
>>
>> Yes this is by DESIGN
>>
>> When you specify '-l|-L' you specify size of 'dataLV' (logical size)
>> But then you need some more space for 'metadata' LVs (_tmeta & _pmspare)
>>
>> -l100%FREE figure this automagically and reduces size a bit to fit in
>> metadata LV.
>>
>>
>> Some 'future' version of lvm2 may support something like '--physicalsize'
>> which will be 'a total size used for every allocation made by command).
> Hi Zdenek,
>
> Thanks a lot for your clarification!
>
> Looks some changes to thin-pool feature make it behave differently since a
> certain version.
> It worked on lvm2-2.02.98 (sles12) by specifying '-l' with all the free PE.
> Anyway, '-l 100%FREE'
> looks more reasonable in such case:)
Well I'm pretty much sure it has never ever had different logic for this
allocation (yep it's been me doing this and there is also large regression
test suite running behind all the time...)) - you could have get success only
by having some 'spare room' on different PV.
But as already mentioned you are not the only one who would like to have
control over 'total allocated size' so there is already a BZ about this and
something will be implemented - thought it's not as easy as it may sound...
(-l100%FREE is quite a cheating piece of code ;))
Regards
Zdenek
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-10 9:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09 11:12 [linux-lvm] is it right to specify '-l' with all the free PE in VG when creating a thin pool? Eric Ren
2017-03-09 11:46 ` Zdenek Kabelac
2017-03-10 1:39 ` Eric Ren
2017-03-10 9:07 ` Zdenek Kabelac
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.