enlarging the / partition in crowded context
Hello,
I am in trouble with an Ubuntu lapto where the / partition is now too small, but without space 'at right' to enlarge it. The partitioning order is the following : efi, swap, / and /home. (I also have a second internal HD, with lots of space) df -h gives the following : ~$ df -hI understand, maybe wrongly, that - I cannot move or expand / without booting from elsewhere (at least this is not available in GParted) - it would be very dangerous, and long, to try moving the enormously filled /home - maybe it is similarly bad to touch the / itself, even though it's smaller. Any ideas on how to proceed? As far as I can see, the latest Ubuntu upgrade won't pass, because of the lack of space... Thank you! Herve |
Herve5,
What really helped me in Linux Mint was to remove older kernels, apart from the current one and its predecessor: Update Manager > View > Linux kernels > Continue > Select 5.15 (in my case) and then keep latest two kernels. Remove all earlier kernels. Now again run: Code:
df -m / When you next do a fresh installation, make sure you create a larger root partition. |
Quote:
|
Generally speaking linux filesystems (XFS excluded) can be resized at will, and easily moved around. gparted used to permit it, but maybe they got too many problem reports they didn't want to handle.
That mount for .Private implies /home is an encfs - ugh. Everything should still be do-able from a gparted liveUSB. Let's see the (uneditted) output from these commands - add sudo in need. Code:
lsblk -f -e 1,7 -o +SIZE |
Does your system now use LVM = Logical Volume Management, or can you now install it? This might well get rid of your problem entirely.
Under LVM, physical space is described as "storage pools" which can span multiple partitions and volumes. Then, filesystems are allocated from "logical volumes" defined within those pools. If you run low on space, you can simply expand the storage pool, then reformat the filesystem to recognize the added space. (An operation which can be performed without downtime.) |
Quote:
|
Thank you all for these very significant comments!
I discovered that it's not /tmp but /var/temp that is overloaded, with lots of 80-Mb files more than one year old. I also understood that, contrary to the files in /tmp, those in /var/tmp are NOT cleaned at startup. So after a lot of hesitation I issued the following command : sudo find /var/tmp -type f -atime +300 -deleteI used type f to only address files not folders, atime 300 looks very conservative, keeping almost one year of old files. I saved a LOT of space, and the system seems stable including after reboot. I'll wait a bit, launching more apps before maybe cleaning further. But at this moment it seems I don't need resizing partitions anymore... Again, thank you, you were precious! H. |
You haven't given much (any) info, but a systemd based system should clean up both - using different durations. From memory 30 days for /var/tmp. Depends on how often you boot of course.
|
you can use ncdu -x / to check it. For root partition 50G is more than enough, you ought to clean/remove unnecessary things. Otherwise you need to move personal files (videos, databases, any huge files ) onto another partition.
|
Have you read the thread ?. Seems the OP has been cleaning up.
|
Quote:
Nonetheless it might be worth double checking.. (and mapping the issue) Code:
du -sh /lib/modules/ /tmp/ /usr/src/ /usr/ |
Quote:
|
Quote:
|
Quote:
My bad. Does Ubuntu use /usr/local? In that case, he could do it with /usr/local |
All times are GMT -5. The time now is 04:07 AM. |