From 005e5f4efa9f87f58ca3d5e9194d2b4f7c615500 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 3 Aug 2023 10:53:25 -0400 Subject: [PATCH] ansible: zfs tuning Performance tuning on zfs 'tank', set atime=off and xattr=sa. Add a dataset for libvirt images with a recordsize of 64k which matches the default cluster size of qcow2 images. Change-Id: I4c697f4b984821e4f856daeca569ac07db33cb93 Signed-off-by: Michael Jeanson --- automation/ansible/roles/zfs/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/automation/ansible/roles/zfs/tasks/main.yml b/automation/ansible/roles/zfs/tasks/main.yml index 447224f..6e237fe 100644 --- a/automation/ansible/roles/zfs/tasks/main.yml +++ b/automation/ansible/roles/zfs/tasks/main.yml @@ -14,6 +14,8 @@ state: present extra_zfs_properties: compression: zstd + atime: 'off' + xattr: 'sa' - name: Create datasets community.general.zfs: name: "tank/{{item}}" @@ -29,3 +31,10 @@ state: present extra_zfs_properties: mountpoint: '/var/lib/iso' +- name: Create libvirt/images dataset + community.general.zfs: + name: 'tank/libvirt/images' + state: present + extra_zfs_properties: + mountpoint: '/var/lib/libvirt/images' + recordsize: '64k' -- 2.34.1