Reg LVM PE Size and any limitations out of it

Lakshmi Narasimhan Sundararajan <[email protected]> Thu, 29 May 2025 22:36:07 +0530
Newsgroups dev.linux.lists.lvm-devel
Message-ID <CAHJKXw3v-UUwg1sAvYThJMZHi5GBvqvHpaDVSYaVcLGTe048Lg@mail.gmail.com>
Hi Team,
A very good day to you.

During vgcreation there exists a field '-s|--physicalextentsize'.
From the man pages it calls out as extent size of PVs in VG.
As a reference on a vg already created, I see that it is called out as
4MiB. [see below]

My questions are as follows:
1) Is this dynamically computed based on the installed PV during VG creation?
Given this cannot be changed after VG creation, what would happen if
the pool were to grow or even the disks were to grow (think san
volumes). would vg limit itself to some capacity limitations above
which it cannot grow, leading to my second follow up question.
2) Is there any limit to the max number of PE in a VG?
It is not called out in any man pages, but an internet search gave me
a max of 16M extents in a VG. So here I am asking for clarification,
and worried if there is such a limit, would it limit then the VG
capacity expansion to only 16M * 4M ~ 64 T [It did not though, I
experimentally validated it].
3) under what scenarios does one need to consider applying
physicalextentsize explicitly?
I am trying to understand the usecase this came about.

Many thanks for your help.
Regards
LN
```
:/# lvm vgdisplay pwx0
  --- Volume group ---
  VG Name               pwx0
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  100
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               99.93 GiB
  PE Size               4.00 MiB  <<<<< This one
  Total PE              25583
  Alloc PE / Size       25583 / 99.93 GiB
  Free  PE / Size       0 / 0
  VG UUID               Fqmp94-5X9b-O3Xp-JdFh-HSXu-ed8M-YFgflT

:/#
```