diff options
author | Christian Pointner <equinox@spreadspace.org> | 2021-05-20 01:07:43 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2021-05-20 01:07:43 +0200 |
commit | 6ef8f06744733bb74f239ceb66286c8bacc5b4c1 (patch) | |
tree | cdf0740bbfd588ca36436a018bf0633189f6f4be | |
parent | Merge branch 'topic/syncoid-autosuspend' (diff) |
syncoid/autosuspend: tweak timing a little
-rw-r--r-- | inventory/host_vars/ch-epimetheus.yml | 2 | ||||
-rw-r--r-- | roles/storage/zfs/syncoid/tasks/main.yml | 16 | ||||
-rw-r--r-- | roles/storage/zfs/syncoid/templates/autosuspend.timer.j2 | 2 |
3 files changed, 16 insertions, 4 deletions
diff --git a/inventory/host_vars/ch-epimetheus.yml b/inventory/host_vars/ch-epimetheus.yml index 4668f67c..c088a137 100644 --- a/inventory/host_vars/ch-epimetheus.yml +++ b/inventory/host_vars/ch-epimetheus.yml @@ -78,7 +78,7 @@ zfs_syncoid_sources: ssh_hostname: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets['ch-prometheus']) | ipaddr('address') }}" ssh_port: "{{ hostvars['ch-prometheus'].ansible_port }}" periodic: - schedule: "*-*-* 00,06,12,18:30:00" + schedule: "*-*-* 00,06,12,18:31:00" timeout: 5h paths: nvme/vm: 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 |