Published on

Steps to expand Root File System Storage in Linux Ubuntu Server

Authors

You can expand the root filesystem to utilize the remaining space in the volume group. Here’s how you can do it:

Expand the logical volume to use the free space:

If there is free space in the volume group, you can extend the logical volume. For example, to extend the root logical volume to use all available space, run:

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

Resize the filesystem:

After extending the logical volume, you need to resize the filesystem to make use of the newly allocated space. If you’re using ext4 (which is common), you can resize it with:

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

Verify the new size:

Finally, verify that your root partition has expanded:

df -h