Ask Your Question

resize root folder

asked 2019-03-28 02:11:04 -0500

plasticknight gravatar image

my root folder 50gb is full, not able to upgrade fedora or install new packages - i want to incease my root folder to 100 gb coz i have packages i will be installing without disturbing any data or installations already present -

i tried many methods including lvreduce/lvresize/using gparted live but futile/ with command line tools mostly i got messages suggesting there may be data loss if i went ahead with resizing/reducing - reallocating space - pl advise or walk me through the process.

edit retag flag offensive close merge delete



I can link you to my similar question, anyway it is highly recommended to back up your data inside fedora-root before resizing it in order to avoid data loss.

0novanta gravatar image0novanta ( 2019-03-28 06:10:03 -0500 )edit

Actually, I've never managed to fill up 50Gb on my root partition (though I guess that's not that hard if you're determined to do so). Is your /home on your root partition or on separate one?

If your /home is separate, we can try to see what eats up space on you root partition, and if there's any way to free up space. It can be easier then resizing with lesser risks involved.

Night Romantic gravatar imageNight Romantic ( 2019-03-28 06:48:22 -0500 )edit

this is how it is

/dev/fedora_localhost-live/swap /dev/fedora_localhost-live/home /dev/fedora_localhost-live/root

i guess it is separate, how to find root contents, getting message root is not a directory

plasticknight gravatar imageplasticknight ( 2019-03-28 10:45:08 -0500 )edit

HI,@Night Romantic and @0novanta..I agree. please, backup first and it try do but carefully try to extend root partition.

simmon gravatar imagesimmon ( 2019-03-28 10:45:25 -0500 )edit

thanks let me try and tell you,

plasticknight gravatar imageplasticknight ( 2019-03-29 04:07:31 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2019-03-28 12:45:11 -0500

updated 2019-03-29 05:27:46 -0500

We are always thirsty in storage space. In particular, if you are setting up for a server, the root partition should be used for service logging, storage space for the services requested by the user, and storage management in case the user needs to be particularly busy in real time. If you are a single user, a small root partition is sufficient, but the larger the number of clients, the greater the service requirement. When you consider how to add storage space, you can see that the server size is growing.

 Therefore, it is natural to consider storage space when using the server.

please back up first and use check gparted.

Sample Fedora LVM root Partition [17GB root] -> Extend 22[GB root] Problem...root partition from 95% full change to 74% full, root extend lvm volume. resize lvm root partition --Two Question For F29 System @plasticknight and @0novanta

A. use fdisk or gparted - add New partition [8e LVM - sdc1]

 fedora - Volume Name / root or home  - Logical Name

image description

B. pvcreate for root

 # pvcreate /dev/sdc1
 # vgextend fedora /dev/sdc1

C. Root or Home Partition for extend

 # lvextend -L  [desire Capacity] /dev/fedora/root -r   
 # lvextend -l 100%FREE  [desire Capacity] /dev/fedora/root -r

 Just resize effect for lvm
 # lvresize /dev/fedora/root -L [desire Capacity]

image description

edit flag offensive delete link more


thanks, let me try and tell you -

plasticknight gravatar imageplasticknight ( 2019-03-29 04:07:46 -0500 )edit

How is it your status??

simmon gravatar imagesimmon ( 2019-03-30 06:55:13 -0500 )edit

answered 2019-03-29 04:36:49 -0500

Night Romantic gravatar image

Well, It's not an answer to the question per say, but it's another way to resolve underlying problem -- with it's own strong points and failures. It can be useful/applicable or not depending mostly on what you want. I'll write it as "answer" so I wouldn't need to create a ton of small comments.

As I've said earlier (in the comment), for several years at least I've never filled up 50 Gbs on my root partition. Partly that's because I don't install huge number of packages/applications anymore -- or small number of huge applications, I guess. One other thing is I reinstall (not upgrade) each new Fedora version with reformatting my root partition, so I don't accumulate junk from version to version.

Besides installed rpms themselves, one other likely culprit to eat up much space would be flatpaks. If you use many of them -- then maybe it's easier to allocate more space for the root partition. Other than that I believe 50 gigs for root should be enough in most cases.

Thing to look for would be programs, which keep their data in /var. One example I know of is PlexMediaServer, it's database/storage area can be HUGE, and it default to /var/lib/something. Now that I think about it, VirtualBox and libvirt/qemu virtual machines keep their drive images somewhere in /var/lib.

When I identify such programs, I move their data to my data partition and make a symbolic link to new destination in the original one:

cd /path/where/I/need/to/place/a/link
ln -s </new/destination/path> <optionally_filename_in_the current_location>

Sometimes you also need to set right selinux context for the place you've moved the data to.

How to check what eats up space.

If you're using default Fedora Workstation, which comes with Gnome desktop environment, then you have a nice graphical application preinstalled just for this purpose. It's called "baobab", or "Disk Usage Analyzer". You can search for it as "baobab" or "disk usage" in gui or launch it from terminal as baobab.

In this exact case we need to check the root partition, and some areas of it aren't accessible to ordinary user. Baobab would count all the data it can read, and give you a warning, that it can't access all the data on a partition. To count all data baobab can be launched with root privileges, but I'd suggest not doing it right now. Baobab can be used to delete folders you think you don't need, and if you launch it with root privileges you can delete absolutely anything on you system and render it unusable.

So I suggest just running it with ordinary user privileges while keeping in mind it can't see some of the folders. We can check all it sees, decide if we can clear something -- and if that wouldn't be enough, then we can ... (more)

edit flag offensive delete link more


thanks for the detailed answer - looks like it will take time for me to check properly - will be at it on sunday and will post results

plasticknight gravatar imageplasticknight ( 2019-03-29 23:51:59 -0500 )edit

Question Tools



Asked: 2019-03-28 02:08:47 -0500

Seen: 216 times

Last updated: Mar 29 '19