LVM PV Size Calculator
Calculate LVM physical volume size and metadata overhead for a given block device.
Inputs
LVM default is 4MB
pvcreate default is 1MB (--metadatasize)
Usable PV Size (GB)
499.9961
Total Physical Extents
127,999
Total Overhead (MB)
4.000
Metadata Area Overhead (MB)
2.000
PE Alignment Waste (MB)
2.0000
Overhead Percentage
0.0008%
Step by step
Values used
Disk / Partition Size (GB) = 500; Physical Extent (PE) Size (MB) = 4; Metadata Areas (mdas) = 1; Metadata Area Size (MB, per mda) = 1
Usable PV size
usable_PV = floor((disk_size − metadata_overhead) / PE_size) × PE_size
Usable PV Size (GB)
= 499.9961
Total Physical Extents
= 127,999
Total Overhead (MB)
= 4.000
Metadata Area Overhead (MB)
= 2.000
PE Alignment Waste (MB)
= 2.0000
Overhead Percentage
= 0.0008
How it works
pvcreate reserves a small label area plus one or two metadata areas (mdas) at the start of a block device before the usable Physical Volume space begins, and the remaining space is then divided into whole Physical Extents (PEs, 4MB by default) — any remainder smaller than one PE is wasted to alignment. Because PE size is small relative to modern disk sizes, LVM's overhead is typically well under 0.01% of total capacity, far less than filesystem-level overhead layered on top afterward.
Formula
Usable PV size
usable_PV = floor((disk_size − metadata_overhead) / PE_size) × PE_size
- D
- disk size
- M
- label + metadata area overhead
- P
- physical extent size
Frequently Asked Questions
Why does pvcreate report slightly less space than the raw partition size?
pvcreate reserves a small label area (1 sector) and one or two metadata areas (1MB each by default) at the start of the device to store LVM's own volume group metadata, and it rounds the remaining space down to a whole number of physical extents — both reduce usable PV size very slightly below the raw device size.
Should I change the default 4MB PE size?
Rarely necessary on modern systems. Larger PE sizes (e.g. 8MB, 16MB) reduce the metadata needed to track very large volume groups (multi-TB+) but coarsen the smallest possible LV size increment; 4MB is a good default for most deployments.
Can I have two metadata areas on one PV?
Yes, using pvcreate --metadatacopies 2, which duplicates the VG metadata for redundancy in case one copy becomes corrupted. This doubles the small fixed metadata overhead but adds meaningful resilience against metadata corruption.