If you’re building a homelab, backup server, or expandable NAS using mixed-size hard drives, combining Ubuntu Server with ZFS is one of the most powerful and reliable solutions available today. This guide walks through deploying a ZFS pool using uneven disk sizes, enabling automated maintenance, and integrating everything into Webmin for easier management. Based on the deployment guide provided in the uploaded document
Why Use ZFS with Uneven Disks?
Traditional RAID solutions often struggle with drives that are different sizes. ZFS offers much more flexibility by allowing you to combine mirrored drives with single disks inside the same storage pool.
Recommended Layout
This deployment uses:
- Two drives in a mirrored vdev for redundancy
- One large standalone drive for additional storage capacity
Example:
| Disk | Size | Purpose |
|---|---|---|
/dev/sdb | 1.9TB | Mirror member |
/dev/sdc | 1.8TB | Mirror member |
/dev/sda | 3.7TB | Single-disk vdev |
Resulting ZFS pool:
tank
├─ mirror-0 (1.9TB + 1.8TB)
└─ sda (3.7TB)
This setup gives you:
- Redundancy for important data
- Extra storage capacity
- Expandable architecture
- Snapshot support
- Compression and integrity checking
Ubuntu Server Installation
Start with a clean installation of:
- Ubuntu Server 22.04 LTS or newer
During installation:
- Choose Custom Storage Layout
- Do NOT select the automatic ZFS installer
- Install Ubuntu onto a separate SSD, NVMe, or USB boot device
Once installation finishes:
sudo apt update && sudo apt -y upgrade
sudo reboot
Install ZFS Utilities
Install the ZFS packages:
sudo apt install -y zfsutils-linux
Verify connected drives:
lsblk -o NAME,SIZE,MODEL
Creating the ZFS Pool
⚠️ Warning: The following command erases all data on the target drives.
sudo zpool create \
-o ashift=12 \
-o autotrim=on \
tank \
mirror /dev/sdb /dev/sdc \
/dev/sda
Verify the pool:
zpool status
zpool list
Recommended ZFS Settings
These settings improve performance and reduce unnecessary disk activity.
sudo zfs set compression=lz4 tank
sudo zfs set atime=off tank
sudo zfs set xattr=sa tank
sudo zfs set normalization=formD tank
What These Settings Do
| Setting | Purpose |
|---|---|
compression=lz4 | Fast transparent compression |
atime=off | Reduces unnecessary writes |
xattr=sa | Improves metadata handling |
normalization=formD | Better filename compatibility |
Creating Organized Datasets
Datasets make ZFS management much easier.
sudo zfs create tank/data
sudo zfs create tank/backups
sudo zfs create tank/media
sudo zfs create tank/docker
Optional custom mount points:
sudo zfs set mountpoint=/tank/data tank/data
sudo zfs set mountpoint=/tank/backups tank/backups
Enable SMART Disk Monitoring
Install SMART monitoring tools:
sudo apt install -y smartmontools
sudo systemctl enable smartd --now
Test a drive:
sudo smartctl -a /dev/sda
This allows you to monitor disk health and detect failures early.
Schedule Weekly ZFS Scrubs
ZFS scrubs verify data integrity and should run regularly.
Create the scrub script:
sudo nano /usr/local/sbin/zfs-scrub-tank.sh
Add:
#!/bin/bash
/usr/sbin/zpool scrub tank
Make it executable:
sudo chmod +x /usr/local/sbin/zfs-scrub-tank.sh
Edit root cron:
sudo crontab -e
Add this line:
15 0 * * 0 /usr/local/sbin/zfs-scrub-tank.sh
This runs every Sunday at 12:15 AM.
Check scrub status anytime:
zpool status
Installing Webmin
Webmin provides a convenient browser-based administration panel for your Linux server.
Install the repository key:
curl -fsSL https://download.webmin.com/jcameron-key.asc | sudo gpg --dearmor -o /usr/share/keyrings/webmin.gpg
Add the repository:
echo "deb [signed-by=/usr/share/keyrings/webmin.gpg] https://download.webmin.com/download/repository sarge contrib" \
| sudo tee /etc/apt/sources.list.d/webmin.list
Install Webmin:
sudo apt update
sudo apt install -y webmin
Access Webmin:
https://SERVER-IP:10000
Integrating ZFS with Webmin
Install required dependencies:
sudo apt install -y perl libjson-perl
Inside Webmin:
- Navigate to Others → Command Shell
- Run:
zpool status
zfs list
Optional:
- Install the ZFS Filesystems module
- Restart Webmin
Best Practices for ZFS + Webmin
Recommended
- Manage datasets through Webmin
- Monitor disk usage
- Run snapshots
- Review scrub results
Avoid
- Destroying pools from the GUI
- Making vdev-level changes in Webmin
Always use the CLI for advanced ZFS management tasks.
Optional Enhancements
Automatic Snapshots
sudo apt install -y zfs-auto-snapshot
Email Notifications
sudo apt install -y mailutils
Health Checks
zpool status -x
Final Thoughts
This deployment provides a powerful balance between:
- Capacity
- Redundancy
- Flexibility
- Expandability
Using Ubuntu Server, ZFS, and Webmin together creates an enterprise-style storage environment perfect for:
- Homelabs
- Media servers
- Backup systems
- Docker storage
- Virtualization platforms