From 'man lvcreate':
Quote:
lvcreate [-l|--extents LogicalExtentsNumber[%{VG|FREE|ORIGIN}
Below is a command to create a logical volume that spans the whole free space in the VolumeGroup
Code:
# vgs
VG #PV #LV #SN Attr VSize VFree
rootVG 1 2 0 wz--n- 20.00g 0
vmVG 1 0 0 wz--n- 128.81g 128.81g
# lvs
LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert
rootLV rootVG -wi-ao---- 18.55g
swapLV rootVG -wi-ao---- 1.44g
# lvcreate vmVG -n vmLV -l 100%FREE
Logical volume "vmLV" created
# vgs
VG #PV #LV #SN Attr VSize VFree
rootVG 1 2 0 wz--n- 20.00g 0
vmVG 1 1 0 wz--n- 128.81g 0
# lvs
LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert
rootLV rootVG -wi-ao---- 18.55g
swapLV rootVG -wi-ao---- 1.44g
vmLV vmVG -wi-a----- 128.81g