linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Why does thinpool take 2*poolmetadatasize space?
@ 2020-10-20 16:33 Scott Moser
  2020-10-20 17:02 ` Alasdair G Kergon
  2020-10-20 18:02 ` Zdenek Kabelac
  0 siblings, 2 replies; 3+ messages in thread
From: Scott Moser @ 2020-10-20 16:33 UTC (permalink / raw)
  To: linux-lvm

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-20 18:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-20 16:33 [linux-lvm] Why does thinpool take 2*poolmetadatasize space? Scott Moser
2020-10-20 17:02 ` Alasdair G Kergon
2020-10-20 18:02 ` Zdenek Kabelac

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