Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 homepartition run:

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

And then to extend your rootpartition run:

lvresize -L +10G --resizefs /dev/mapper/fedora-root
@bcrnkovic

This comment has been minimized.

Copy link

@bcrnkovic bcrnkovic commented Mar 28, 2019

Just what I was looking for... thanks for this!

@Ben1980

This comment has been minimized.

Copy link

@Ben1980 Ben1980 commented Mar 29, 2019

Thanks for the tip. But unfortunately it seems not to work with Fedora 29 on VMWare Workstation. VFree is always 0 but there should be additional 10G available.

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2099199 2097152 1G 83 Linux
/dev/sda2 2099200 41943039 39843840 19G 8e Linux LVM

VG #PV #LV #SN Attr VSize VFree
fedora 1 2 0 wz--n- <19.00g 0

@kamalmeh

This comment has been minimized.

Copy link

@kamalmeh kamalmeh commented May 11, 2019

Thanks! Similar issue faced while upgrading my server from fedora 29 to 30.
Downloading failed due to root partition was 100% full after downloading 1.4G our of 1.9G. I was stuck in middle.
I had space available and simply executed the below command my problem was fixed.

[kmehta@dev ~]$ date
Sat May 11 19:28:42 IST 2019
[root@dev ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.4G 0 1.4G 0% /dev
tmpfs 1.5G 0 1.5G 0% /dev/shm
tmpfs 1.5G 1.2M 1.5G 1% /run
tmpfs 1.5G 0 1.5G 0% /sys/fs/cgroup
/dev/mapper/fedora00-root 15G 15G 45M 100% /
tmpfs 1.5G 32K 1.5G 1% /tmp
/dev/sda1 976M 205M 705M 23% /boot
/dev/sdb5 150G 70M 149G 1% /mnt/nas001
/dev/sdc1 1.9T 99G 1.8T 6% /mnt/nas000
tmpfs 288M 0 288M 0% /run/user/1000
[root@dev ~]# lvresize -L +5G --resizefs /dev/mapper/fedora-root
Volume group "fedora" not found
Cannot process volume group fedora
[root@dev ~]# vgs
VG #PV #LV #SN Attr VSize VFree
fedora00 1 2 0 wz--n- <148.05g 130.11g
[root@dev ~]# lvresize -L +35G --resizefs /dev/mapper/fedora00-root
[root@dev ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.4G 0 1.4G 0% /dev
tmpfs 1.5G 0 1.5G 0% /dev/shm
tmpfs 1.5G 1.2M 1.5G 1% /run
tmpfs 1.5G 0 1.5G 0% /sys/fs/cgroup
/dev/mapper/fedora00-root 50G 15G 36G 30% /
tmpfs 1.5G 32K 1.5G 1% /tmp
/dev/sda1 976M 205M 705M 23% /boot
/dev/sdb5 150G 70M 149G 1% /mnt/nas001
/dev/sdc1 1.9T 99G 1.8T 6% /mnt/nas000
tmpfs 288M 0 288M 0% /run/user/1000

Thanks once again.

Regards
Kamal Mehta
https://www.smiansh.com

@mwolski89

This comment has been minimized.

Copy link

@mwolski89 mwolski89 commented Aug 19, 2019

worked for me, thanks a lot 👍

@voneAbides

This comment has been minimized.

Copy link

@voneAbides voneAbides commented Dec 8, 2019

Thank you. Worked.

@vbasarkar

This comment has been minimized.

Copy link

@vbasarkar vbasarkar commented Feb 3, 2020

Worked for me with Fedora 25.

@luke-h1

This comment has been minimized.

Copy link

@luke-h1 luke-h1 commented Apr 18, 2020

thanks for this.

@dubst3pp4

This comment has been minimized.

Copy link

@dubst3pp4 dubst3pp4 commented Apr 29, 2020

Thank you very much! Works perfectly :-)

@whernandez

This comment has been minimized.

Copy link

@whernandez whernandez commented Aug 19, 2020

Works perfectly, booting from fedora 32. Thanks!

@LeonelSoriano

This comment has been minimized.

Copy link

@LeonelSoriano LeonelSoriano commented Oct 5, 2020

I love man :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.