archive mirror
 help / color / mirror / Atom feed
From: Scott Moser <>
Subject: [linux-lvm] Why does thinpool take 2*poolmetadatasize space?
Date: Tue, 20 Oct 2020 12:33:41 -0400	[thread overview]
Message-ID: <> (raw)

When I create an lvmthinpool with size S and poolmetadatasize P,
it reduces the available freespace by S+2P. I expected that to
be S+P. Where did the extra poolmetadatasize get used?

See below for example.
before lvcreate we had 255868 free, after we had 254588.
The difference is 1280.  (1024 + 2*128).

# lvm vgcreate --metadatasize=128m myvg0 /dev/vda
  Physical volume "/dev/vda" successfully created.
  Volume group "myvg0" successfully created

# pvs --unit=m
  PV         VG    Fmt  Attr PSize      PFree
  /dev/vda   myvg0 lvm2 a--  255868.00m 255868.00m

# vgs --unit=m
  VG    #PV #LV #SN Attr   VSize      VFree
  myvg0   1   0   0 wz--n- 255868.00m 255868.00m

# lvm lvcreate --ignoremonitoring --yes --activate=y \
   --setactivationskip=n --size=1024m --poolmetadatasize=128m \
   --thinpool=mythinpool myvg0
  Thin pool volume with chunk size 64.00 KiB can address at most 15.81 TiB of da
  Logical volume "mythinpool" created.

# vgs --unit=m
  VG    #PV #LV #SN Attr   VSize      VFree
  myvg0   1   1   0 wz--n- 255868.00m 254588.00m

# lvs --all --unit=m
  LV                 VG    Attr       LSize    Pool Origin Data%
Meta%  Move Log Cpy%Sync Convert
  [lvol0_pmspare]    myvg0 ewi-------  128.00m
  mythinpool         myvg0 twi-a-tz-- 1024.00m             0.00   10.03
  [mythinpool_tdata] myvg0 Twi-ao---- 1024.00m
  [mythinpool_tmeta] myvg0 ewi-ao----  128.00m

             reply	other threads:[~2020-10-20 16:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 16:33 Scott Moser [this message]
2020-10-20 17:02 ` Alasdair G Kergon
2020-10-20 18:02 ` 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:

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

  git send-email \
    --in-reply-to='' \ \ \
    --subject='Re: [linux-lvm] Why does thinpool take 2*poolmetadatasize space?' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).