These days fdisk
is kinda boomer. Here’s some alternatives:
pvs
- list physical volumeslvs
- list logical volumesvgs
- list volume groupslvcreate
- create logical volumelvextend
- extend existing volumepvcreate
- create physical volumelsblk
- list your block devicesblkid
- locate/print block device attributesvdisplay
- display detailed info about volume grouproot@mini1:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 ubuntu-vg lvm2 a-- <462.71g <362.71g
root@mini1:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
ubuntu-lv ubuntu-vg -wi-ao---- 100.00g
root@mini1:~# vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu-vg 1 1 0 wz--n- <462.71g <362.71g
Examples:
Add a 100G volume on a system with free disk in existing LVM volume group (ubuntu-vg) to allocate:
lvcreate -L 100G -n ubuntu-mirror ubuntu-vg