diff --git a/files/zfs.conf b/files/zfs.conf new file mode 100644 index 0000000..b2fd714 --- /dev/null +++ b/files/zfs.conf @@ -0,0 +1,4 @@ +# 4GB +options zfs zfs_arc_max=4294967296 +# 2GB +options zfs zfs_arc_min=2147483648 diff --git a/setup-zfs-and-lxd.py b/setup-zfs-and-lxd.py index 8d5bcf1..35efa99 100644 --- a/setup-zfs-and-lxd.py +++ b/setup-zfs-and-lxd.py @@ -79,3 +79,17 @@ systemd.service( enabled=True, ) +files.put( + name='Push ZFS kernel config', + src='files/zfs.conf', + dest='/etc/modprobe.d/zfs.conf', + user='root', + group='root', + mode='644', +) + +server.shell( + name='Update initramfs', + commands=['update-initramfs -u -k all'] +) +