Skip to main content

lvresize

Know what's annoying? I'll tell you: default Ubuntu server installs from I-don't-know-when don't actually use 100% of the disk space you allocate to them. Neat right? NOPE! Anyway, if that happens to you, this article will get you squared away, and here's the TLDR version:

Reclaim 100% of disk space in Ubuntu server

Check if you can actually do the resize

sudo lvresize -tvl +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

Resize it for realsiez

sudo lvresize -vl +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

Resize the file system to match

sudo resize2fs -p /dev/mapper/ubuntu--vg-ubuntu--lv