From 9b3859cd9d5e8ad795b66cdcd2a3cbac1d068982 Mon Sep 17 00:00:00 2001 From: mg Date: Wed, 14 Jul 2021 19:48:50 +0200 Subject: [PATCH] Bugfix: zfs_arc_mem (#153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit arc pve2 Bugfix: zfs_arc_mem --- Einträge wurden mehrfach angelegt Co-authored-by: Michael Grote Reviewed-on: https://git.mgrote.net/mg/ansible/pulls/153 Co-Authored-By: mg Co-Committed-By: mg --- host_vars/pve2.grote.lan.yml | 2 +- roles/mgrote.zfs_arc_mem/tasks/main.yml | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/host_vars/pve2.grote.lan.yml b/host_vars/pve2.grote.lan.yml index 8a469dde..a42191c2 100644 --- a/host_vars/pve2.grote.lan.yml +++ b/host_vars/pve2.grote.lan.yml @@ -157,7 +157,7 @@ apcupsd_nis_master: true apcupsd_nis_master_hostname: pve2.grote.lan ### mgrote.zfs_extra # Variablen für mgrote.zfs_health/trim/scrub/zed/arc_mem/ sind zusammengefasst unter zfs_extra_* - zfs_extra_arc_max_size: "17179869184" # 16GB in Bytes + zfs_extra_arc_max_size: "8589934592" # 8GB in Bytes zfs_extra_max_usage_health: "90" zfs_extra_zfs_pools: - name: "rpool" diff --git a/roles/mgrote.zfs_arc_mem/tasks/main.yml b/roles/mgrote.zfs_arc_mem/tasks/main.yml index bc9bde41..2e3e4255 100644 --- a/roles/mgrote.zfs_arc_mem/tasks/main.yml +++ b/roles/mgrote.zfs_arc_mem/tasks/main.yml @@ -1,7 +1,6 @@ --- - name: Limit ZFS Memory Usage become: yes - ansible.builtin.lineinfile: - path: /etc/modprobe.d/zfs.conf - line: options zfs zfs_arc_max={{ zfs_extra_arc_max_size }} - create: yes + ansible.builtin.copy: + dest: /etc/modprobe.d/zfs.conf + content: options zfs zfs_arc_max={{ zfs_extra_arc_max_size }}