DevsouContact

Resize disk partition via command line

4 months ago
TutorialLinux

List disk usage:

df -h
lsblk

Extend/resize in one step:

sudo lvextend -l +100%FREE -r /dev/mapper/ubuntu-root

If it shows "Size of logical volume ubuntu/root unchanged...", then you need to resize the physical volume first:

pvresize /dev/sdaX