From: Zdenek Kabelac <zkabelac@redhat.com>
To: 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: Thu, 9 Mar 2017 12:46:29 +0100 [thread overview]
Message-ID: <1ffc3903-4d55-ee1e-c58c-6fd3ea723856@redhat.com> (raw)
In-Reply-To: <4f9b8bba-d219-fca3-3b48-41e732044021@suse.com>
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
next prev parent reply other threads:[~2017-03-09 11:46 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 [this message]
2017-03-10 1:39 ` Eric Ren
2017-03-10 9:07 ` Zdenek Kabelac
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=1ffc3903-4d55-ee1e-c58c-6fd3ea723856@redhat.com \
--to=zkabelac@redhat.com \
--cc=linux-lvm@redhat.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).