The official OPNsense documentation about tunables (https://docs.opnsense.org/manual/settingsmenu.html) says they are for loader.conf and sysctl.conf tunables. I have a ZFS setup on which I would like to enable a periodic scrub. FreeBSD has a built-in /etc/periodic/daily/800.scrub-zfs task that is disabled by default. I'd like to enable this via the daily_scrub_zfs_enable setting.
Assuming this can't be added as a tunable to the "System: Settings: Tunables" section, the normal way in FreeBSD would be to add it to /etc/periodic.conf or /etc/periodic.conf.local. Will the latter persist across updates?
(Are there any plans to add periodic settings to "System: Settings: Tunables"?)
It looks like either /etc/periodic.conf or /etc/periodic.conf.local will persist on updates as long as FreeBSD will not add them to the base system by default (the .local is probably the safest). We don't write any of these files.
The tunables GUI will likely not gain periodic.conf support though. sysctl.conf and loader.conf are a bit intermingled in the grand scheme of things, but periodic.conf is something else.
Cheers,
Franco
Thank you. I added the setting to /etc/periodic.conf.local. I just updated to 22.7.8 and the file persisted across that update.
Thank you both - I'll set up a .local on my system too to enable trim, scrub and snapshots.
Can we get some more details on how to add this feature? I do not have the file /etc/periodic.conf.local in my system. Using SSD for my ZFS without a mirror is risky without these tools.
Thanks
It's a file that needs to be created unless modifying the default .conf file /etc/defaults/periodic.conf
Just create the file and enable the option you want. Change from "NO" to "YES".
So I can just make the change 'daily_scrub_zfs_enable="YES"' in /etc/defaults/periodic.conf
Or do I need to create periodic.conf file and put it in /etc/
I see now. Leave the default periodic.conf alone and put the overrides in the new file in /etc/
Yes. I would create a /etc/periodic.conf.local so it persists upgrades. That's probably what you were thinking of doing.
Got it. Thanks for the help.