[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: gnu: hydra-guix-129: Add a btrfs balance job.
From: |
Maxim Cournoyer |
Subject: |
branch master updated: gnu: hydra-guix-129: Add a btrfs balance job. |
Date: |
Fri, 29 Jul 2022 11:14:48 -0400 |
This is an automated email from the git hooks/post-receive script.
apteryx pushed a commit to branch master
in repository maintenance.
The following commit(s) were added to refs/heads/master by this push:
new 32547a9 gnu: hydra-guix-129: Add a btrfs balance job.
32547a9 is described below
commit 32547a9b4700a7474a086c18f7fbc3a901f8a50e
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jul 29 10:52:25 2022 -0400
gnu: hydra-guix-129: Add a btrfs balance job.
* hydra/deploy-node-129.scm (btrfs-balance-job): New mcron job.
(node-129-os)[services]: Register it.
---
hydra/deploy-node-129.scm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/hydra/deploy-node-129.scm b/hydra/deploy-node-129.scm
index 5283c4a..39d22a1 100644
--- a/hydra/deploy-node-129.scm
+++ b/hydra/deploy-node-129.scm
@@ -25,6 +25,7 @@
(gnu bootloader grub)
(gnu packages linux)
(gnu services base)
+ (gnu services mcron)
(gnu services ssh)
(gnu system file-systems)
(guix gexp)
@@ -65,6 +66,16 @@
(cons (cons "subvol" name)
%common-btrfs-options)))))
+(define btrfs-balance-job
+ ;; Re-allocate chunks which are using less than 5% of their chunk
+ ;; space, to regain Btrfs 'unallocated' space. The usage is kept
+ ;; low (5%) to minimize wear on the SSD. Runs at 5 AM every 3 days.
+ #~(job '(next-hour-from (next-day (range 1 31 3)) '(5))
+ (lambda ()
+ (execl #$(file-append btrfs-progs "/bin/btrfs") "btrfs"
+ "balance" "start" "-dusage=5" "/"))
+ "btrfs-balance"))
+
(define node-129-os
(let ((base-os (berlin-new-build-machine-os
@@ -114,6 +125,11 @@
%base-file-systems))
(services
(modify-services (operating-system-user-services base-os)
+ (mcron-service-type
+ config => (mcron-configuration
+ (inherit config)
+ (jobs (cons btrfs-balance-job
+ (mcron-configuration-jobs config)))))
(static-networking-service-type
networks =>
(cons (static-networking
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: gnu: hydra-guix-129: Add a btrfs balance job.,
Maxim Cournoyer <=