KingDezigns โ€” NAS08 ZFS Pool Maintenance Scripts

๐Ÿ“… 2026-05-14 ๐Ÿ–ฅ NAS08 / Raspberry Pi 5 โš™๏ธ OpenMediaVault (OMV) ๐Ÿณ Docker Compose ๐Ÿ’พ ZFS RAIDZ2 โ€” Penta SATA HAT
The goal

NAS08 serves as a Pi-Hole DNS server, nginx proxy server, Vaultwarden Server, Plex server, as well as an OpenMediaVault Nas Server

ZFS Scrubbing ZFS Reporting

The goal is to create regular maintenance to the ZFS pools for this NAS. This is done to protect and keep the pools healthy.

โš  Critical โ€” store this document off NAS16

Keep a copy of this document on your workstation, a USB drive, or in print. If NAS08 is down you cannot read files stored on it.

Script to Create ZFS report
1 Create the folders on NAS08

This script gets the current ZFS pool status and reports it back to the administrator via email. Use these commands to setup the scripts on the NAS.

ssh rufusking@192.168.150.35
sudo mkdir /usr/scripts/zfs
sudo nano nas08_zfs_report.sh
2 Copy the content of the entire nas08_zfs_report.sh script and paste it in the terminal window. Save (CTRL + X) and commit (Y) the changes
nas08_zfs_report.sh
3 Make the script executable โ€” NAS08
chmod +x /usr/scripts/zfs/nas08_zfs_report.sh
4 Run a test report โ€” NAS08
sudo /usr/scripts/zfs/nas08_zfs_report.sh

Watch for the report in your inbox

Script to perform a ZFS pool scrub
1 Create the folders on NAS08

This script initiates a ZFS pool scrub and reports back the status to the administrator via email. Use these commands to setup this script on the NAS.

ssh rufusking@192.168.150.35
sudo mkdir /usr/scripts/zfs
sudo nano nas08_zfs_scrub.sh
2 Copy the content of the entire nas08_zfs_scrub.sh script and paste it in the terminal window. Save (CTRL + X) and commit (Y) the changes
nas08_zfs_scrub.sh
3 Make the script executable โ€” NAS08
chmod +x /usr/scripts/zfs/nas08_zfs_scrub.sh
4 Run a test report โ€” NAS08
sudo /usr/scripts/zfs/nas08_zfs_report.sh

Watch for the report in your inbox

Key differences from NAS16
AreaNAS08NAS16
Primary role Docker containers (Pi-hole, Plex, Vaultwarden, Nextcloud, NPM) Web server (Apache/PHP), databases (MariaDB), Webmin admin
What's backed up beyond /etc + OMV Docker Compose files, Pi-hole data, Plex config/metadata Apache vhosts, PHP config, MariaDB dumps, Webmin config
Website files N/A Intentionally excluded โ€” stored on NAS drives, covered by redundancy
Database backup None (no databases) Full mysqldump of all user databases, .sql.gz per database
Backup destination /export/kingdezigns-all/Backups/NAS08/ /export/kingdezignsnas-16/Backups/NAS16/
ZFS pool name kingdezignsnas kingdezignsnas-16 (assumed โ€” verify with sudo zpool list)
Recovery phases 9 phases, 34 steps 10 phases, 40 steps
Notes & assumptions to verify
โš  Verify these before first run

The script was written based on information provided and follows Raspberry Pi OS / Debian conventions. Verify the following on NAS16 before treating any backup as production-ready.

ItemAssumed valueHow to verify
ZFS pool name kingdezignsnas sudo zpool list
Backup destination path /export/kingdezigns08/Backups/NAS08/ ls /export/ โ€” confirm share name matches
MariaDB auth method Uses /etc/mysql/debian.cnf (maintenance account, no password when run as root) Run: sudo mysql --defaults-file=/etc/mysql/debian.cnf -e "SHOW DATABASES;" โ€” should work without password
PHP version(s) Auto-detected from /etc/php/*/ php -v and ls /etc/php/
Apache config location /etc/apache2/ (standard Debian) apache2 -V โ€” confirms config path
Webmin config location /etc/webmin/ ls /etc/webmin/
Network map โ€” items to update
ItemOld valueNew value
NAS16 โ€” Backup status None Automated โ€” every 3 days โ€” 30-day retention
NAS16 โ€” Backup destination None /export/kingdezignsnas-16/Backups/NAS16/
NAS16 โ€” Backup script None /usr/scripts/omv/nas16-backup.sh
NAS16 โ€” PCIe requirement not documented dtparam=pciex1 + dtparam=pciex1_gen=3 required in /boot/firmware/config.txt on fresh OS
NAS16 โ€” Web stack not documented Apache ยท PHP ยท MariaDB ยท Webmin ยท Adminer
NAS16 โ€” Recovery plan None NAS16-Backup-Summary.html โ€” 40 steps across 10 phases + ZFS troubleshooting