From 9a2c019db9a505b5d81d71440b1371df02ba54d8 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Wed, 30 Apr 2025 11:57:27 +0300 Subject: [PATCH] {aminda-duperemove.service,monthly-btrfs-balance.service}.d: correct fedora-atomic.conf based on fstab reading --- .../91-fedora-atomic-home.conf | 9 --------- .../aminda-duperemove.service.d/91-fedora-atomic.conf | 9 +++++++++ .../fedora-atomic-home.conf | 5 ----- .../monthly-btrfs-balance.service.d/fedora-atomic.conf | 9 +++++++++ 4 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 etc/systemd/system/aminda-duperemove.service.d/91-fedora-atomic-home.conf create mode 100644 etc/systemd/system/aminda-duperemove.service.d/91-fedora-atomic.conf delete mode 100644 etc/systemd/system/monthly-btrfs-balance.service.d/fedora-atomic-home.conf create mode 100644 etc/systemd/system/monthly-btrfs-balance.service.d/fedora-atomic.conf diff --git a/etc/systemd/system/aminda-duperemove.service.d/91-fedora-atomic-home.conf b/etc/systemd/system/aminda-duperemove.service.d/91-fedora-atomic-home.conf deleted file mode 100644 index 8b0b5be6..00000000 --- a/etc/systemd/system/aminda-duperemove.service.d/91-fedora-atomic-home.conf +++ /dev/null @@ -1,9 +0,0 @@ -[Service] -# This unit will make it duperemove Fedora Kinoite's home -ExecStart= -ExecStart=-duperemove -rdhq --hashfile=/root/var-home.hash /var/home -[Service] -# https://superuser.com/a/1290109 -# Contained in `systemd-path search-binaries-default` -ExecStartPre=-btrfs balance start -dusage=25 -dlimit=10 -musage=25 -mlimit=10 /var/home -ExecStartPost=-btrfs balance start -dusage=50 /var/home diff --git a/etc/systemd/system/aminda-duperemove.service.d/91-fedora-atomic.conf b/etc/systemd/system/aminda-duperemove.service.d/91-fedora-atomic.conf new file mode 100644 index 00000000..9ce54564 --- /dev/null +++ b/etc/systemd/system/aminda-duperemove.service.d/91-fedora-atomic.conf @@ -0,0 +1,9 @@ +[Service] +ExecStart= +# /home is actually in /var/home so the latter command should catch it +#ExecStart=-duperemove -rdhq --hashfile=/root/home.hash /home +ExecStart=-duperemove -rdhq --hashfile=/root/var.hash /var +ExecStartPre= +# Same filesystem although different subvolume, so this should work? +ExecStartPre=-btrfs balance start -dusage=25 -dlimit=10 -musage=25 -mlimit=10 /var +ExecStartPost=-btrfs balance start -dusage=50 /var diff --git a/etc/systemd/system/monthly-btrfs-balance.service.d/fedora-atomic-home.conf b/etc/systemd/system/monthly-btrfs-balance.service.d/fedora-atomic-home.conf deleted file mode 100644 index cbdd113f..00000000 --- a/etc/systemd/system/monthly-btrfs-balance.service.d/fedora-atomic-home.conf +++ /dev/null @@ -1,5 +0,0 @@ -[Service] -# The overlayfs is not BTRFS and errors out, so the actual partition needs -# to be specified. -ExecStartPre=-btrfs balance cancel /var/home -ExecStart=btrfs balance start --full-balance /var/home diff --git a/etc/systemd/system/monthly-btrfs-balance.service.d/fedora-atomic.conf b/etc/systemd/system/monthly-btrfs-balance.service.d/fedora-atomic.conf new file mode 100644 index 00000000..68fe4351 --- /dev/null +++ b/etc/systemd/system/monthly-btrfs-balance.service.d/fedora-atomic.conf @@ -0,0 +1,9 @@ +[Service] +# The overlayfs is not BTRFS and errors out, so the actual partition needs +# to be specified. +ExecStartPre= +ExecStartPre=-btrfs balance cancel /var +#ExecStartPre=-btrfs balance cancel /var/home +ExecStart= +ExecStart=btrfs balance start --full-balance /var +#ExecStart=btrfs balance start --full-balance /var/home