I think there are few options you can try out before reinstalling Linux.
First and easiest thing you can do is to try to find unnecessary files that could be deleted. Your partition scheme only includes /
, /home
and swap
. This means that applications files and logs that are stored within /usr
, /opt
and /var
are stored within your rl-root
partition.
Try using the du
utility to locate unnecessary files that you could remove:
root@rocky:~# du --max-depth=1 -hc /{usr,opt,var}
Second of all, you could repartition your system. These are your partitions:
lvscan
ACTIVE '/dev/rl/swap' [4.00 GiB] inherit
ACTIVE '/dev/rl/home' [<3.57 TiB] inherit
ACTIVE '/dev/rl/root' [70.00 GiB] inherit
And it seems you have a lot of free space on your /home
partition:
Avail Use% Mounted on
/dev/mapper/rl-home 2.9T 19% /mnt/boot-sav/mapper/rl-home
/dev/mapper/rl-root 20K 100% /mnt/boot-sav/mapper/rl-root
The quick fix, but one that probably will not help you in the long run, is to delete the swap
partition, use the lvm
utility to extend the rl-root
partition and than expand
the xfs
filesystem. And than create a swap file
on your /home
partition instead.
I cannot tell you the exact commands at the moment, but it would go something like that:
root@rocky:~# lvremove /dev/mapper/rl-swap
root@rocky:~# lvextend --size +4G /dev/mapper/rl-root
root@rocky:~# xfs_growfs /
root@rocky:~# dd if=/dev/zero of=/home/swapfile bs=1M count=4096
root@rocky:~# chmod 600 /home/swapfile
root@rocky:~# mkswap /home/swapfile
root@rocky:~# swapon /home/swapfile
root@rocky:~# echo '/home/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
and delete the old swap
entry from /etc/fstab
.
The other, more durable way to do it, is to backup your /home
partition, remove it with lvremove
and extend your rl-root
to 200GB or something and recreate your /home
.
Unfortunately xfs
filesystem cannot be shrinked, therefore you need to remove it.
While you at it, you can rethink your partition scheme and maybe add a separate partion for /var
or /usr
.
Especially for you only use 20% of your /home
. Maybe you could allocate only 1TB to your /home
and leave the rest unallocated. This gives you the flexibility to expand and partition that is getting clogged in the future.