diff options
Diffstat (limited to 'roles/storage/zfs')
-rw-r--r-- | roles/storage/zfs/syncoid/tasks/main.yml | 16 | ||||
-rw-r--r-- | roles/storage/zfs/syncoid/templates/autosuspend.timer.j2 | 2 |
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 |