From 6ef8f06744733bb74f239ceb66286c8bacc5b4c1 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 20 May 2021 01:07:43 +0200 Subject: syncoid/autosuspend: tweak timing a little --- roles/storage/zfs/syncoid/tasks/main.yml | 16 ++++++++++++++-- roles/storage/zfs/syncoid/templates/autosuspend.timer.j2 | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'roles/storage') 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 -- cgit v1.2.3