bundles/zfs: enable autotrim on debian bullseye and above
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-06-25 20:05:35 +02:00
parent 1c10be5cdc
commit 7d4a99344b
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -82,14 +82,14 @@ zfs_pools = {}
for name, attrs in node.metadata.get('zfs/pools', {}).items():
zfs_pools[name] = attrs
# Not yet supported on debian buster
#actions[f'pool_{name}_enable_trim'] = {
# 'command': f'zpool set autotrim=on {name}',
# 'unless': f'zpool get autotrim -H -o value {name} | grep -q on',
# 'needs': [
# f'zfs_pool:{name}'
# ]
#}
if node.os_version[0] > 10:
actions[f'pool_{name}_enable_trim'] = {
'command': f'zpool set autotrim=on {name}',
'unless': f'zpool get autotrim -H -o value {name} | grep -q on',
'needs': [
f'zfs_pool:{name}'
]
}
directories = {
"/etc/zfs-snapshot-backup-pre.d": {