Resize Partitions with LVM on Arch Linux: A Step-by-Step Guide

2026-01-03

Background

Couple of days ago I installed Arch Linux with i3wm. During installation I enabled LVM without understanding its effects. But after I realized, by default Arch has allocated only 20 gigs of space for \root (which was almost full after installing my required packages) and rest of the space of the whole hard disk for \home. Both of these partitions were logically separate which is basically LVM is all about. So, scoured the internet to increase the space of my root directory. As it turns out, there are no single article that thoroughly covers this specific problem. I have read RedHat's guide on LVM, LVM's own documentation, some other articles. After hours of searching and reading I was able to come up with a solution.

Prerequisites

Steps

Step 1: Boot into the Arch Live Environment

To perform this process safely, you need to boot into a live environment where /home and / aren’t mounted. The best way to do this is by booting from an Arch ISO or a live USB.

Step 2: Activate LVM

Once you’re in the live environment, you will need to activate the Logical Volume Manager (LVM) so you can make changes to your volumes. Run the following command to activate the volume group:

vgchange -ay

To verify that the logical volumes are available, use:

lvdisplay

This command will display details about your LVM volumes, ensuring everything is set up and accessible. Note the paths of partitions.

Step 3: Check /home Filesystem

Before you shrink the /home partition, you need to check its filesystem integrity. This can help prevent data corruption during the shrinking process.

e2fsck -f /dev/ArchinstallVg/home

This will check and fix any filesystem issues on /home before proceeding.

Step 4: Shrink the /home Filesystem

Next, you want to shrink the filesystem on the /home partition. For this example, we’ll shrink it by 20 gigs, leaving /home with approximately 130 gigs of space (you will have determine your space amount). Use the following command to resize the filesystem:

resize2fs /dev/ArchinstallVg/home 130G

Always shrink the filesystem before shrinking the logical volume. If you shrink the logical volume first, it can cause filesystem corruption.

Step 5: Shrink the /home Logical Volume

Once the filesystem is resized, it’s time to shrink the logical volume itself. This will reduce the space allocated to /home, making room for the root (/) partition. To shrink the logical volume by 20 gigs, run:

lvreduce -L -20G /dev/ArchinstallVg/home

Confirm the action when prompted. Double-check the values to ensure you’re not shrinking it too much.

Step 6: Check root / Filesystem

Before you extend the root (/) partition, you need to check its filesystem integrity. This can help prevent data corruption during the shrinking process.

e2fsck -f /dev/ArchinstallVg/root

This will check and fix any filesystem issues on /root before proceeding.

Step 7: Extend the Root Logical Volume

Now that you’ve freed up 20 gigs of space, you can allocate that space to the root (/) partition. To do this, extend the root logical volume:

lvextend -L +20G /dev/ArchinstallVg/root

This command adds the 20 gigs of free space to the root partition.

Step 8: Grow the Root Filesystem

Now that you've extended the root logical volume, it’s time to grow the filesystem. For ext4, you can resize the filesystem with the following command:

resize2fs /dev/ArchinstallVg/root

This step ensures that the root partition recognizes and uses the newly added space.

Step 9: Reboot the System

Once you've resized the logical volumes and grown the filesystem, it's time to reboot the system back into your usual environment.

reboot

Once the system has rebooted, you can verify the changes by checking the disk usage:

lsblk
df -h

These commands will show the updated sizes for your partitions and the amount of space available.

Bye Bye

By following this guide, you’ve successfully freed up space from /home and allocated it to your root partition. This process ensures that your root (/) gets its space allocated without breaking your filesystem.