LVM PV Size Calculator
Calculate LVM physical volume size and metadata overhead for a given block device.
About LVM PV Size Calculator
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
Worked example
With the default values below, LVM PV Size Calculator returns Usable PV Size (GB) of 499.9961. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Disk / Partition Size (GB)minimum 0.1
- 500
- Physical Extent (PE) Size (MB)minimum 1
- 4
- Metadata Areas (mdas)accepts 1–2
- 1
- Metadata Area Size (MB, per mda)minimum 0.25
- 1
Results
- 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
- 1Values used
- 2Usable PV size
- 3Usable PV Size (GB)= 499.9961
- 4Total Physical Extents= 127,999
- 5Total Overhead (MB)= 4.000
- 6Metadata Area Overhead (MB)= 2.000
- 7PE Alignment Waste (MB)= 2.0000
- 8Overhead Percentage= 0.0008
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 4 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
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.
