When I use LVM to partition one or more storages I noticed it use 4 MiB' blocks (physical extent) by default, while the storage itself usually uses 512 bytes per sector.
I believed it should not be a problem if I align the LVM partitions to 4 MiB, but no matter what size they be, it will always show some "not usable" size when run
--- Physical volume --- PV Name /dev/sda2 VG Name xpto PV Size 17.00 GiB / not usable 4.00 MiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 4351 Free PE 0 Allocated PE 4351 PV UUID xxxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxxx
But even if I reallocate the PV to match the size minus the not usable, it decrease the total PE and still have remaining not usable size. Even using
pvdisplay --unit B to see the exact number.
I'm wondering what is the exact size of the LVM header, I read some text arguing it would be 4 sectors of 512 bytes, other saying it is 180 KiB, but I have tried all combinations and was not able to discover how it is calculated.
Is there a way to align the PV partition in order to zero the not usable size, or at least reduce to minimum?