Maintaining my home lab requires me to keep a constant eye on my drive health. On TrueNAS SCALE, one of my favorite tools for this is the Multi-Report script. However, I’ve found that updates can sometimes break dependencies. Here is a quick guide on how I get it running and keep it persistent.

1. The “Loophole” (Restoring bc after updates)

I’ve noticed that TrueNAS SCALE updates often reset the root filesystem protection. If my report fails because bc (the arbitrary precision calculator language) is missing, I run these commands in order to restore it:

sudo /usr/local/libexec/disable-rootfs-protection
sudo chmod +x /usr/bin/apt* /usr/bin/dpkg
sudo apt update && sudo apt install bc -y

2. Downloading the Scripts

I use specific versions of the Multi-Report script and an email helper. I like to keep these in /root for persistence across certain types of updates, though I always make sure to back up my configs.

Main Script (v3.28):

curl -L https://raw.githubusercontent.com/JoeSchmuck/Multi-Report/refs/heads/main/multi_report_v3.28_2025_12_09.txt -o /root/report.sh
chmod +x /root/report.sh

Email Helper:

mkdir -p /root/usr/bin/
curl -L https://raw.githubusercontent.com/oxyde1989/standalone-tn-send-email/main/sendemail.py -o /root/usr/bin/sendemail.py
chmod +x /root/usr/bin/sendemail.py

3. Initial Configuration

When I’m doing a fresh setup, I run the interactive configuration first. This generates the necessary config file for me.

/root/report.sh -config

I select ‘N’ for New Config, then follow the prompts.

If I need to manually fix or edit the config later:

nano /root/report.cfg

I make sure defaultFile="0" and my email="your@email.com" are correctly set.

4. Critical WebUI Configuration

The script relies on TrueNAS’s internal mail system and task scheduler, so I have to make sure these are set up in the WebUI.

  • SMTP Setup: I go to System Settings > General > Email. I ensure my SMTP settings are correct and that the ‘Test Mail’ function works.
  • Cron Job: I go to Data Protection > Cron Jobs.
    • Command: /root/report.sh -c /root/report.cfg
    • User: root
    • Schedule: Weekly (I usually set mine for Mon 03:00)
  • Persistence: To ensure things like my MOTD updates persist, I go to System Settings > Advanced > Init/Shutdown Scripts and add /root/update_motd.sh as a ‘Post-Init’ script.

5. Quick Commands

Once I have everything set up, I can test the email functionality or update the drive database:

  • Test Email: /root/report.sh -testemail -c /root/report.cfg
  • Update DB: /root/report.sh -update_all

Thanks to this script emailed to me, I’ve managed to catch several issues before they resulted into data losses: I found one disk with 16 unrecoverable sectors, another with 7 CRC errors (which turned out to be a dodgy SATA cable), and an Offline Uncorrectable Sectors warning that was being caused by a fan failure and subsequent heat issue.