Archive for October, 2024

Stupid Ubuntu tricks – install defaults to allocating only 100GB of space even when you tell it to use it all.

Saturday, October 12th, 2024

So this is one of the most annoying features of Ubuntu I’ve found yet. If you install server (possibly the desktop too, not sure). By default ubuntu will partition the root to have the full disk space (other than grub boot etc…) but will install the OS on a LV (logical volume) that restricts the usable space on the root partition to only 100GB. This  is done regardless of the size of the disk you are installing to, even when you tell it to use the entire drive…

One would think they would ask if you want to make a smaller logical volume…

 

To fix this, after install I’ve been doing the following…

at the command line type:

$ sudo lvextend -l +100%FREE /dev/mapper/ubuntu–vg-ubuntu–lv

This will change the logical volume so it actually uses all the disk you told it to use at install.

Then you need to resize the partition

$ sudo resize2fs /dev/mapper/ubuntu–vg-ubuntu–lv

I usually reboot after that, but from my understanding all modern Ubuntu Kernels can be resized while the root partition is mounted… But just to be safe…

 

Update – (2024-11-05) had to make another server and found I didn’t pay close enough attention. When you tell Ubuntu to utilize all disk space there is a sub-check under it saying to allow it to use Logical Volumes. Uncheck that and it will actually use all space…