mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-06 01:19:23 +01:00
systemd: Enable irregularly regular btrfs balances
This commit is contained in:
parent
6473b62bb3
commit
83dc96181f
@ -0,0 +1,4 @@
|
|||||||
|
[Service]
|
||||||
|
# https://superuser.com/a/1290109
|
||||||
|
ExecStartPre=-/usr/sbin/btrfs balance start -dusage=25 -dlimit=10 -musage=25 -mlimit=10 /
|
||||||
|
ExecStartPost=-/usr/sbin/btrfs balance start -dusage=50 /
|
@ -8,6 +8,7 @@ TimeoutStartSec=infinity
|
|||||||
# Another attempt at ensuring Yggdrasil works with nordvpnd
|
# Another attempt at ensuring Yggdrasil works with nordvpnd
|
||||||
ExecStartPre=-/usr/bin/systemctl enable --now aminda-nocron-reboot.service
|
ExecStartPre=-/usr/bin/systemctl enable --now aminda-nocron-reboot.service
|
||||||
ExecStartPre=-/usr/bin/systemctl enable --now aminda-nocron-reboot.timer
|
ExecStartPre=-/usr/bin/systemctl enable --now aminda-nocron-reboot.timer
|
||||||
|
ExecStartPre=-/usr/bin/systemctl enable --now monthly-btrfs-balance.timer
|
||||||
ExecStartPre=-/usr/sbin/sysctl net.ipv6.conf.all.disable_ipv6=0
|
ExecStartPre=-/usr/sbin/sysctl net.ipv6.conf.all.disable_ipv6=0
|
||||||
ExecStartPre=-/usr/bin/systemctl enable --now tlp
|
ExecStartPre=-/usr/bin/systemctl enable --now tlp
|
||||||
ExecStart=-/usr/bin/systemctl restart yggdrasil.service
|
ExecStart=-/usr/bin/systemctl restart yggdrasil.service
|
||||||
|
13
etc/systemd/system/monthly-btrfs-balance.service
Normal file
13
etc/systemd/system/monthly-btrfs-balance.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Monthly BTRFS full balancing
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
TimeoutStartSec=infinity
|
||||||
|
ExecStart=/usr/sbin/btrfs balance start --full-balance /
|
||||||
|
User=root
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
10
etc/systemd/system/monthly-btrfs-balance.timer
Normal file
10
etc/systemd/system/monthly-btrfs-balance.timer
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Run full BTRFS balancing monthly
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=monthly
|
||||||
|
Persistent=true
|
||||||
|
RemainAfterElapse=false
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
Reference in New Issue
Block a user