bundles/zfs: enable autotrim on debian bullseye and above
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
1c10be5cdc
commit
7d4a99344b
1 changed files with 8 additions and 8 deletions
|
@ -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": {
|
||||
|
|
Loading…
Reference in a new issue