LVM VG Capacity Calculator
Calculate total volume group capacity from combined physical volume extents.
Inputs
Total VG Capacity (GB)
2,000.000
Free Capacity (GB)
1,609.375
Total Physical Extents
512,000
Free Physical Extents
412,000
Allocated Percentage
19.53%
Number of PVs
3
Step by step
Values used
PV Sizes (comma-separated GB) = 500, 500, 1000; Physical Extent (PE) Size (MB) = 4; PEs Already Allocated to LVs = 100,000
VG capacity
VG_capacity = Σ(PV_usable_extents) × PE_size
Total VG Capacity (GB)
= 2,000.000
Free Capacity (GB)
= 1,609.375
Total Physical Extents
= 512,000
Free Physical Extents
= 412,000
Allocated Percentage
= 19.53
Number of PVs
= 3
How it works
A Volume Group pools the Physical Extents from every Physical Volume added to it (vgextend), so its total capacity is simply the sum of all member PVs' usable extents — this is what lets LVM present multiple physical disks as one flexible storage pool. Free PEs (total minus those already allocated to Logical Volumes) determine how much new LV space is available via lvcreate or how much an existing LV can grow via lvextend.
Formula
VG capacity
VG_capacity = Σ(PV_usable_extents) × PE_size
- E_i
- extents contributed by PV i
- P
- PE size
Frequently Asked Questions
What happens if I add a PV with a different PE size to a VG?
You can't — all PVs in a single Volume Group must share the same PE size, since VG capacity is tracked in units of extents. If you need a different PE size, it must be set consistently for the whole VG at creation time (vgcreate -s).
Can I remove a PV from a VG without data loss?
Yes, if there's enough free space elsewhere in the VG — first run pvmove to relocate any extents in use on that PV to other PVs in the group, then vgreduce to remove it, and finally pvremove to release it entirely.
How do I add more capacity to an existing VG?
Add a new physical disk or partition, initialize it with pvcreate, then run vgextend <vgname> <new-pv> to fold its extents into the existing volume group's free pool, immediately available for new or growing logical volumes.