From 241833b7f320e7fca84ba226f1ecbb0c963534f7 Mon Sep 17 00:00:00 2001 From: Cullum Smith Date: Fri, 12 Jul 2024 15:20:54 -0400 Subject: initial commit of hypervisor configs --- scripts/os/freebsd/20-zfs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 scripts/os/freebsd/20-zfs (limited to 'scripts/os/freebsd/20-zfs') diff --git a/scripts/os/freebsd/20-zfs b/scripts/os/freebsd/20-zfs new file mode 100644 index 0000000..aa37c0a --- /dev/null +++ b/scripts/os/freebsd/20-zfs @@ -0,0 +1,11 @@ +#!/bin/sh + +# Every host should have a "state" dataset, which is a ZFS dataset which +# persists across OS rebuilds. +[ -n "${state_dataset:-}" ] || die 'state_dataset not defined!' +create_dataset "$state_dataset" + +# If this is baremetal host or a VM, trim the zpools periodically. +if [ "$BOXCONF_VIRTUALIZATION_TYPE" != jail ]; then + install_file -m 0644 /etc/cron.d/zfs-trim +fi -- cgit v1.2.3