I'm having space pressure under /: Fedora 40 won't install because it runs out of space. I'm thinking I can solve this by moving some hogs from / into /home and bind mounting them back into / like so:
/home/storage/cache /var/cache none bind /home/storage/flatpak /var/lib/flatpak none bind
in fstab. Does this seem like a sensible approach? I'm running 39 under this scheme to see if it works in general. Will there be any surprises when I try to update or upgrade under this scheme?
On 8/27/24 8:40 AM, R. Clayton wrote:
I'm having space pressure under /: Fedora 40 won't install because it runs out of space. I'm thinking I can solve this by moving some hogs from / into /home and bind mounting them back into / like so:
/home/storage/cache /var/cache none bind /home/storage/flatpak /var/lib/flatpak none bind
in fstab. Does this seem like a sensible approach? I'm running 39 under this scheme to see if it works in general. Will there be any surprises when I try to update or upgrade under this scheme?
I've symlinked /var/lib/dnf/system-upgrade to a directory in /home. That's usually enough to let it work. All the incoming rpms go in there.
On 27 Aug 2024, at 16:40, R. Clayton factotum@rclayton.org wrote:
I'm having space pressure under /
Depending on the details of your disk partition and file system setup you may be able to grow / Are you using LVM? I assuming you do not use btrfs.
What is the output of this?
lsblk -f
Barry
Depending on the details of your disk partition and file system setup you may be able to grow / Are you using LVM? I assuming you do not use btrfs.
Apparently I am using LVM, although I didn't set it up. I specify ext4 whenever I make file systems; it doesn't look like anything has helped me by using btrfs in a file system.
$ lsblk -f NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS sda ├─sda1 │ ext4 1.0 981faec7-1770-4f29-96aa-30e7fc479e59 524.2M 39% /boot └─sda2 LVM2_m LVM2 MM7jJv-ar5b-KC6l-bez8-9cPQ-CJmJ-6KAwxW ├─fedora-root │ ext4 1.0 65a51d0a-4132-4af0-8170-94be6c67deef 858.2M 93% / ├─fedora-swap │ swap 1 6b92c40e-8f23-4360-90a9-fba7670ebeeb [SWAP] └─fedora-home ext4 1.0 2124d813-f982-4d49-b2d7-a26522ce254a 336.7G 11% /var/lib/flatpak /var/cache /home sdb ├─sdb1 │ ext4 1.0 partition-1 ed902376-506e-4ff9-98f0-b32f796d43a6 801G 7% /mnt/sg/1 └─sdb2 ext4 1.0 partition-2 9ee90eaf-d345-4d75-a2e4-fe1439fa8f12 869.2G 0% /mnt/sg/2 sr0 zram0 [SWAP] $
I'm guessing the implication is I can shift 100g or so from fedora-home to fedora-root instead of using bind mounts. (I haven't emptied out /var/{lib/flatpak,cache} yet, so / is still full.)
On 8/28/24 10:28 AM, R. Clayton wrote:
Depending on the details of your disk partition and file system setup you may be able to grow / Are you using LVM? I assuming you do not use btrfs.
Apparently I am using LVM, although I didn't set it up. I specify ext4 whenever I make file systems; it doesn't look like anything has helped me by using btrfs in a file system.
If you had used btrfs, then home and / would share the available space and you wouldn't have this issue.
On Wed, 2024-08-28 at 13:28 -0400, R. Clayton wrote:
Apparently I am using LVM, although I didn't set it up. I specify ext4 whenever I make file systems; it doesn't look like anything has helped me by using btrfs in a file system.
Is this an old system that has been updated across several versions? At one time LVM was the default in Fedora. Ext4 would then sit on top of LVM. New installs use BTRFS by default, which IMHO is preferable (and more understandable) in a desktop system.
poc
Is this an old system that has been updated across several versions?
It is; my notes start at 31, and it's been all updates since.
On Thu, 2024-08-29 at 23:22 -0400, R. Clayton wrote:
Is this an old system that has been updated across several versions?
It is; my notes start at 31, and it's been all updates since.
You might want to consider doing a fresh install, using BTRFS rather than LVM. Your disk space admin will become a lot easier and it's worth cleaning out the cruft once in a while. I did this for F39 after many years of just updating.
poc
On 28 Aug 2024, at 18:28, R. Clayton factotum@rclayton.org wrote:
'm guessing the implication is I can shift 100g or so from fedora-home to fedora-root instead of using bind mounts.
Yes that is what I would do.
You need to shrink /home and then you grow /. I know you can grow an EXT4 LVM partition on-line, not sure about shrinking on-line.
Does anyone else know how to do the shrinking?
This is the script I use to grow a EXT4/LVM partition.
$ more grow-volume.sh #!/bin/bash NAME=${1:?volume name} SIZE=${2:?volume size}
while read GROUP do GROUP=${GROUP#*"} GROUP=${GROUP%"*} DEVICE=/dev/${GROUP}/${NAME} if [ -e $DEVICE ] then break fi done < <(vgscan)
if [[ ! -e $DEVICE ]] then echo "Error: Volume not found $DEVICE" exit 1 fi
echo -n "Grow ${DEVICE} size ${SIZE}GiB? " read X case "$X" in yes) lvresize -L+${SIZE}G --resizefs ${GROUP}/${NAME} ;; *) echo ignored ;; esac
Barry