32 lines
925 B
Markdown
Raw Permalink Normal View History

2024-03-22 12:59:04 +01:00
# TrueNAS_change_arc_size
2024-03-22 13:25:45 +01:00
Script for checking if arc size was changed, and changing it back.
## Usage
Set **arc_check.sh** file to run with cron, InitScript or both.
2024-04-20 19:01:52 +02:00
In **arc_check.sh** change ***<CHANGE_ME>*** value to match the size you want. For converting GiB to bytes. I've used [this site](https://www.dataunitconverter.com/gibibyte-to-byte).
2024-03-22 13:25:45 +01:00
### Crontab
2024-03-23 19:14:14 +01:00
Go to **System Settings -> Advanced -> Cron Jobs**
2024-03-22 13:25:45 +01:00
2024-03-23 19:14:14 +01:00
Click **Add**
2024-03-22 13:25:45 +01:00
2024-03-23 19:14:14 +01:00
In **Command** filed you need write path that contains your script, as follows:
/dir/to/file/arc_check.sh
You can run this script as root, but you should set your permission up so that a special user can run and edit zfs_arc_max file.
In **Schedule** you set it to run every at minute 0 past every 4th hour.
00 */4 * * *
You can also uncheck Hide Standard Output/Error.
2024-03-22 13:25:45 +01:00
### InitScript
2024-04-20 19:01:52 +02:00
You can configure it in TrueNAS GUI under System Settings > Advanced > Init/Shutdown Scripts