Skip to content

Instantly share code, notes, and snippets.

@181192
Last active March 1, 2024 03:24
Show Gist options
  • Save 181192/cf7eb42a25538ccdb8d0bb7dd57cf236 to your computer and use it in GitHub Desktop.
Save 181192/cf7eb42a25538ccdb8d0bb7dd57cf236 to your computer and use it in GitHub Desktop.
How to increase the root partition size on Fedora

How to increase the root partition size on Fedora

Boot up with an Fedora Live USB stick.

  1. Run vgs to check if there's any space:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora   1   3   0 wz--n- <237.28g    0 
  1. If there is you can just run:
lvresize -L +5G --resizefs /dev/mapper/fedora-root

NB: Remember to check where your fedora root and home partition is mounted by running fdisk -l.

  1. If you don't have any free VFree space, you can shrink your home partition and then extend your root partition afterwards.

To scrink your home partition run:

lvresize -L -10G --resizefs /dev/mapper/fedora-home

And then to extend your root partition run:

lvresize -L +10G --resizefs /dev/mapper/fedora-root
@padys
Copy link

padys commented Nov 26, 2022

Works fine on Fedora 37. Thanks!

In case of encrypted disk, unlocking is a must first. I've followed this article: https://thequantitative.medium.com/resize-an-encrypted-partition-without-breaking-your-linux-system-6ef475619745

@FatCatLikesBeer
Copy link

This is exactly what I needed. I just ran into this issues while updating my 4 month old machine. I built my Fedora Server with a brand new 1TB drive, but apparently I only had 15GB assigned to root. Ran just the above code and it worked just fine! Thank you thank you!

@shakib98
Copy link

thank you worked in fedora 25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment