FreeNAS Bash Script to Start a ZFS Scrub on Each Pool
Hype-o-thetic.com has published a script which performs a scrub on each pool. ZFS automatically checks for errors when it reads/writes files, but you can force a check with the scrub command.
After uploading the script to your FreeNAS machine, hype-o-thetic.com suggest you make it run automatically, by going to System –> Advanced –> Cron and add it as Monthly cron job.
You can find the script here:
FreeNAS Bash script to start a ZFS scrub on each pool (scrub.sh) – hype-o-thetic?com