From 2ec0e5068aa5f66801e35f2539babfb8d6d9f7d2 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Fri, 12 Nov 2021 18:57:09 +0100 Subject: [PATCH] trim root, dont trim zs so often, as it takes some time --- bundles/zfs/metadata.py | 4 ++-- groups/os/linux.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bundles/zfs/metadata.py b/bundles/zfs/metadata.py index 115adb4..d91112c 100644 --- a/bundles/zfs/metadata.py +++ b/bundles/zfs/metadata.py @@ -37,12 +37,12 @@ defaults = { 'systemd-timers': { 'zfs-trim': { 'command': '/usr/lib/zfs-linux/trim', - 'when': 'hourly', + 'when': '*-*-16 02:00', 'persistent': True, }, 'zfs-scrub': { 'command': '/usr/lib/zfs-linux/scrub', - 'when': '*-2,4,6,8,10,12-1 02:00:00', + 'when': '*-2,4,6,8,10,12-1 02:00', 'persistent': True, }, 'zfs-auto-snapshot-hourly': { diff --git a/groups/os/linux.py b/groups/os/linux.py index 9f4052c..c199306 100644 --- a/groups/os/linux.py +++ b/groups/os/linux.py @@ -15,6 +15,12 @@ 'systemd-timers', ], 'metadata': { + 'systemd-timers': { + 'trim': { + 'command': '/usr/sbin/fstrim -v /', + 'when': 'daily', + }, + }, 'hosts': { '10.0.10.2': [ 'resolver.name',