linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: Eric Ren <zren@suse.com>,
	LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] is it right to specify '-l' with all the free PE in VG when creating a thin pool?
Date: Fri, 10 Mar 2017 10:07:06 +0100	[thread overview]
Message-ID: <d5d2d65c-0c81-8179-e53e-f81410c86658@redhat.com> (raw)
In-Reply-To: <7bff98df-3de3-3291-8bdf-81e84cbe8a7a@suse.com>

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

      reply	other threads:[~2017-03-10  9:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d5d2d65c-0c81-8179-e53e-f81410c86658@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=linux-lvm@redhat.com \
    --cc=zren@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).