summaryrefslogtreecommitdiff
path: root/roles/storage
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-05-20 01:07:43 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-05-20 01:07:43 +0200
commit6ef8f06744733bb74f239ceb66286c8bacc5b4c1 (patch)
treecdf0740bbfd588ca36436a018bf0633189f6f4be /roles/storage
parentMerge branch 'topic/syncoid-autosuspend' (diff)
syncoid/autosuspend: tweak timing a little
Diffstat (limited to 'roles/storage')
-rw-r--r--roles/storage/zfs/syncoid/tasks/main.yml16
-rw-r--r--roles/storage/zfs/syncoid/templates/autosuspend.timer.j22
2 files changed, 15 insertions, 3 deletions
diff --git a/roles/storage/zfs/syncoid/tasks/main.yml b/roles/storage/zfs/syncoid/tasks/main.yml
index 6232eea7..c03a8325 100644
--- a/roles/storage/zfs/syncoid/tasks/main.yml
+++ b/roles/storage/zfs/syncoid/tasks/main.yml
@@ -69,6 +69,18 @@
- name: enable autosuspend
when: zfs_syncoid_autosuspend
block:
+ - name: create systemd override directory for sanoid timer
+ file:
+ path: /etc/systemd/system/sanoid.timer.d
+ state: directory
+
+ - name: make saoind timer not persistent
+ copy:
+ content: |
+ [Timer]
+ Persistent=false
+ dest: /etc/systemd/system/sanoid.timer.d/no-persistence.conf
+
- name: generate syncoid post script
copy:
content: |
@@ -78,8 +90,8 @@
sleep 5
systemctl start --wait sanoid-prune.service
- echo "wait 60s (autosuspend cooldown period)"
- sleep 60
+ echo "wait 30s (autosuspend cooldown period)"
+ sleep 30
echo "done."
dest: /var/lib/syncoid/syncoid_post
mode: 0755
diff --git a/roles/storage/zfs/syncoid/templates/autosuspend.timer.j2 b/roles/storage/zfs/syncoid/templates/autosuspend.timer.j2
index 40852739..44413114 100644
--- a/roles/storage/zfs/syncoid/templates/autosuspend.timer.j2
+++ b/roles/storage/zfs/syncoid/templates/autosuspend.timer.j2
@@ -2,7 +2,7 @@
Description=automatic system suspender for syncoid-based backups
[Timer]
-OnCalendar=*-*-* *:03/10:00
+OnCalendar=*-*-* *:04/10:30
[Install]
WantedBy=timers.target