Linux Server Install: Part 7

Laxfed Paulacy
2 min readJan 6, 2023

This is kind of whack, but it might be needed to fix LVM on Ubuntu, bruh.

Previous

LVM

This is something that might be specific to Ubuntu. For whatever reason the default partitioning for Ubuntu is kind of odd they don’t use the entire LVM and so here’s a few commands I run to use our entire disk.

Logical Volume Manager (LVM) is a system for managing disk storage space on Linux systems. It allows you to create logical volumes, which are like virtual disks that can be created from one or more physical disks or disk partitions.

With LVM, you can create and resize logical volumes on the fly, without having to worry about the underlying physical layout of the disks. This makes it easier to manage and allocate disk space, as well as to perform tasks such as adding new disks or migrating data from one disk to another.

LVM is implemented as a kernel module and is supported by most Linux distributions. It is often used in conjunction with other technologies such as RAID (Redundant Array of Independent Disks) to provide additional features such as data redundancy and performance improvements.

First we’ll run the following:

sudo lvm

Next we’re going to run LVM extend along with some additional parameters and this will use all of our free space.

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

You should see it extend, after that exit out.

lvm> exit

Then we’ll run resize2fs to resize the volume.

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

You should get a success output. I’m not sure why Ubuntu does this, but I’ve had to run this on a lot of machines hopefully they fix this in the future.

Next

--

--

Laxfed Paulacy
Laxfed Paulacy

Written by Laxfed Paulacy

Delivering Fresh Recipes, Crypto News, Python Tips & Tricks, and Federal Government Shenanigans and Content.

No responses yet