Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Periodic.conf tunables?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Periodic.conf tunables? (Read 2003 times)
gromit
Newbie
Posts: 39
Karma: 2
Periodic.conf tunables?
«
on:
November 10, 2022, 05:09:05 pm »
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"?)
Logged
franco
Administrator
Hero Member
Posts: 17675
Karma: 1613
Re: Periodic.conf tunables?
«
Reply #1 on:
November 10, 2022, 05:35:54 pm »
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
Logged
gromit
Newbie
Posts: 39
Karma: 2
Re: Periodic.conf tunables?
«
Reply #2 on:
November 19, 2022, 05:30:04 am »
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.
Logged
abulafia
Full Member
Posts: 156
Karma: 8
Re: Periodic.conf tunables?
«
Reply #3 on:
November 24, 2022, 12:04:09 pm »
Thank you both - I'll set up a .local on my system too to enable trim, scrub and snapshots.
Logged
dcol
Hero Member
Posts: 635
Karma: 51
Re: Periodic.conf tunables?
«
Reply #4 on:
December 21, 2022, 05:18:57 pm »
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
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: Periodic.conf tunables?
«
Reply #5 on:
December 21, 2022, 11:08:35 pm »
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".
Logged
dcol
Hero Member
Posts: 635
Karma: 51
Re: Periodic.conf tunables?
«
Reply #6 on:
December 21, 2022, 11:35:49 pm »
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/
Logged
dcol
Hero Member
Posts: 635
Karma: 51
Re: Periodic.conf tunables?
«
Reply #7 on:
December 21, 2022, 11:40:39 pm »
I see now. Leave the default periodic.conf alone and put the overrides in the new file in /etc/
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: Periodic.conf tunables?
«
Reply #8 on:
December 22, 2022, 12:00:30 am »
Yes. I would create a /etc/periodic.conf.local so it persists upgrades. That's probably what you were thinking of doing.
Logged
dcol
Hero Member
Posts: 635
Karma: 51
Re: Periodic.conf tunables?
«
Reply #9 on:
December 22, 2022, 12:11:23 am »
Got it. Thanks for the help.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Periodic.conf tunables?