summaryrefslogtreecommitdiff
path: root/roles/zfs
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-10-02 20:51:54 +0200
committerChristian Pointner <equinox@spreadspace.org>2019-10-02 20:51:54 +0200
commitf21ede2cd679e7bc92357b76d99a4b3977502e34 (patch)
tree52dbd0fa77eef7fb51b2a01dfab0eb9f1122fd45 /roles/zfs
parentfix vmhost network configs (diff)
zfs arc size limits
Diffstat (limited to 'roles/zfs')
-rw-r--r--roles/zfs/base/defaults/main.yml4
-rw-r--r--roles/zfs/base/tasks/main.yml8
2 files changed, 12 insertions, 0 deletions
diff --git a/roles/zfs/base/defaults/main.yml b/roles/zfs/base/defaults/main.yml
index 917f3d84..06218f6b 100644
--- a/roles/zfs/base/defaults/main.yml
+++ b/roles/zfs/base/defaults/main.yml
@@ -5,3 +5,7 @@ zfs_zpool_properties:
# zfs_zpool_name: storage
# zfs_zpool_mountpoint: /srv/storage
# zfs_zpool_create_vdevs: mirror sda sdb mirror sdc sdd log mirror nvme0n1p3 nvme1n1p3 cache nvme0n1p4 nvme1n1p4
+
+#zfs_arc_size:
+# min: {{ 2 * 1024 * 1024 * 1024 }}
+# max: {{ 8 * 1024 * 1024 * 1024 }}
diff --git a/roles/zfs/base/tasks/main.yml b/roles/zfs/base/tasks/main.yml
index cddfbb09..3f1e8416 100644
--- a/roles/zfs/base/tasks/main.yml
+++ b/roles/zfs/base/tasks/main.yml
@@ -1,4 +1,12 @@
---
+- name: configure arc size
+ when: zfs_arc_size is defined
+ copy:
+ content: |
+ options zfs zfs_arc_min={{ zfs_arc_size.min }}
+ options zfs zfs_arc_max={{ zfs_arc_size.max }}
+ dest: /etc/modprobe.d/zfs.conf
+
## TODO: @debian: make sure contrib repo is added
- name: install zfs packages