TrueNAS Scale
Advanced TrueNAS Scale installation with single-drive optimization for cache and write intent log configuration in lab environments.
Video [IBRACORP Video Tutorial - Coming Soon]
Useful Links
Related Videos
- ZFS Pool Configuration
- Storage Management
- Container Deployment
⚠️ Advanced Configuration Warning
The method described in this guide allows using a single drive as:
- TrueNAS Scale boot device
- ZFS cache device (L2ARC)
- ZFS write intent log (ZIL/SLOG)
This configuration is:
- ❌ NOT officially supported by TrueNAS
- ❌ NOT recommended for production environments
- ⚠️ Only suitable for lab/testing installations
- 💾 Requires SSD storage (NOT mechanical drives)
Use at your own risk and ensure you have proper backups!
Thank you for choosing to collaborate with IBRACORP 🙏
Please read our disclaimer https://docs.ibracorp.io/disclaimer
Credits
Role | Contributor |
---|---|
Writer / Producer | Sycotix |
Video Recording and Voice | Sycotix |
Contributor | DiscDuck, Hawks |
Testing / Proofreading | North |
Feature List
Comprehensive NAS and Storage Platform
- ZFS Storage Management with advanced features
- Kubernetes Integration for container workloads
- TrueCharts Applications for easy service deployment
- SMB/NFS Sharing for network file access
- Snapshot Management with automated scheduling
- Replication Services for backup and disaster recovery
- User and Group Management with ACL support
- Plugin System for extended functionality
- Web-based Management interface
- REST API for automation and integration
- Virtual Machine Support with KVM
- Monitoring and Alerting system
- Enterprise Features in open-source package
Prerequisites
Hardware Requirements
- CPU: 64-bit processor with virtualization support
- RAM: 8GB minimum (16GB+ recommended for VMs/containers)
- Storage:
- Boot device: 16GB+ SSD (32GB+ recommended)
- Data drives: As needed for storage pool
- Network: Gigabit Ethernet (10GbE recommended for high performance)
Software Requirements
- TrueNAS Scale ISO (latest stable version)
- Basic understanding of ZFS concepts
- Network configuration knowledge
- SSH client for advanced configuration
Standard Installation
Download and Prepare
- Download TrueNAS Scale: Visit TrueNAS Downloads
- Create Bootable Media: Use Rufus, Balena Etcher, or dd command
- Boot from USB: Configure BIOS/UEFI to boot from USB
Installation Process
Standard Installation Steps
-
Boot Menu: Select "Install/Upgrade" from boot menu
-
Welcome Screen: Press Enter to continue
-
Select Installation Drive: Choose your boot device
-
Admin User Setup:
- Username: admin (default)
- Password: Set strong password
- Confirm password
-
Installation: Wait for installation to complete
-
Reboot: Remove installation media and reboot
-
Network Configuration: Configure via console or DHCP
-
Web Access: Access via
http://truenas-ip-address
Advanced Single-Drive Installation
Custom Installation Method
This method allows using a single SSD for boot, cache, and ZIL/SLOG.
⚠️ WARNING: This modifies the TrueNAS installer and is unsupported!
Pre-Installation Setup
Boot to Shell
-
Boot from ISO: Start TrueNAS Scale installer
-
Access Shell: Press
Alt + F2
or select "Shell" option -
Switch to Bash:
bash
-
Navigate to Installer:
cd /usr/sbin/
Modify Installation Script
Edit TrueNAS Installer
-
Backup Original Installer:
cp truenas-install truenas-install.backup
-
Edit Installer Script:
vi truenas-install
-
Find Boot Pool Configuration: Look for the section that creates the boot pool (around line 400-500)
-
Modify Boot Pool Creation: Change the boot pool configuration to allow additional partitions:
# Original line (approximate):
# zpool create -f -o cachefile=/tmp/zpool.cache boot-pool ${BOOT_DEVICE}2
# Modified line to allow more partitions:
zpool create -f -o cachefile=/tmp/zpool.cache boot-pool ${BOOT_DEVICE}2 -
Save and Exit: Press
Esc
, type:wq
, press Enter
Run Modified Installation
Execute Custom Installation
-
Run Modified Installer:
./truenas-install
-
Follow Installation Prompts:
- Select installation drive (your SSD)
- Choose "Fresh Install"
- Create admin password
- Complete installation
-
Do NOT Create Swap: When prompted, skip swap partition creation
-
Reboot: Complete installation and reboot
Post-Installation Configuration
Create Additional Partitions
- Boot into TrueNAS: Complete initial setup
- Enable SSH: System → General → SSH (for easier command execution)
- SSH into TrueNAS: Connect as admin user
- Switch to Root:
sudo -i
Partition Management
Add Cache and ZIL Partitions
-
Check Current Partitions:
sgdisk -p /dev/sda
-
Add Cache Partition (Partition 4):
sgdisk -n4:0:+8G -t4:BF01 /dev/sda
-
Add ZIL/SLOG Partition (Partition 5):
sgdisk -n5:0:+2G -t5:BF01 /dev/sda
-
Update Kernel Partition Table:
partprobe
-
Verify Partitions:
sgdisk -p /dev/sda
lsblk
ZFS Pool Configuration
Add Cache and ZIL to Storage Pool
-
Create Storage Pool (via Web UI first):
- Navigate to Storage → Pools
- Create your main data pool with available drives
-
Add Cache Device:
zpool add [your-pool-name] cache /dev/sda4
-
Add ZIL/SLOG Device:
zpool add [your-pool-name] log /dev/sda5
-
Verify Configuration:
zpool status [your-pool-name]
Example Commands
Useful Partition Commands
# View partition table
sgdisk -p /dev/sda
# Delete a partition (if needed)
sgdisk -d 4 /dev/sda
# List all block devices
lsblk
# Check ZFS pool status
zpool status
# Remove cache device (if needed)
zpool remove [pool-name] /dev/sda4
# Remove log device (if needed)
zpool remove [pool-name] /dev/sda5
Standard Configuration
Initial Setup
Web Interface Setup
- Access Web UI: Navigate to
http://truenas-ip
- Login: Use admin credentials created during installation
- Initial Configuration Wizard:
- Set timezone
- Configure NTP servers
- Set up email notifications
- Configure network settings
Network Configuration
Network Setup
-
Navigate: Network → Interfaces
-
Configure Interface:
Interface: em0 (or your network interface)
Type: Static IP or DHCP
IP Address: 192.168.1.100/24
Gateway: 192.168.1.1
DNS Servers: 8.8.8.8, 1.1.1.1 -
Apply Configuration: Test and apply changes
Storage Pool Creation
Create ZFS Pool
-
Navigate: Storage → Pools
-
Create Pool: Click "Add"
-
Pool Configuration:
- Name: tank (or your preferred name)
- Select drives for pool
- Choose RAID level (RAIDZ-1, RAIDZ-2, or mirror)
-
Advanced Options:
- Encryption: Enable if needed
- Compression: LZ4 (recommended)
- Deduplication: Usually not recommended
Dataset Management
Create Datasets
- Navigate: Storage → Pools → [Your Pool]
- Add Dataset: Click "Add Dataset"
- Dataset Configuration:
Name: documents
Compression: LZ4
Quota: Optional
Snapshot Directory: Visible
Share Configuration
SMB/CIFS Shares
-
Navigate: Sharing → Windows (SMB) Shares
-
Add Share:
Path: /mnt/tank/documents
Name: documents
Purpose: Default share parameters -
Configure ACL: Set appropriate permissions
-
Start SMB Service: Services → SMB
NFS Shares
-
Navigate: Sharing → Unix (NFS) Shares
-
Add Share:
Path: /mnt/tank/documents
Networks: 192.168.1.0/24 -
Start NFS Service: Services → NFS
Advanced Features
Kubernetes and Applications
Enable Kubernetes
- Navigate: Apps → Settings
- Choose Pool: Select pool for Kubernetes
- Configure: Set resource limits
- Install: Wait for Kubernetes deployment
TrueCharts Integration
-
Add Catalog: Apps → Manage Catalogs
-
Add TrueCharts:
Catalog Name: truecharts
Repository: https://github.com/truecharts/catalog
Branch: main -
Browse Apps: Install applications from TrueCharts
Snapshot and Replication
Automated Snapshots
- Navigate: Tasks → Periodic Snapshot Tasks
- Create Task:
Dataset: tank/documents
Recursive: Yes
Snapshot Lifetime: 1 month
Schedule: Daily at 2:00 AM
Replication Setup
- Navigate: Tasks → Replication Tasks
- Create SSH Connection: To destination TrueNAS
- Configure Replication:
Source: Local datasets
Destination: Remote TrueNAS
Schedule: After snapshot creation
User and Group Management
Create Users
- Navigate: Accounts → Users
- Add User:
Username: john
Full Name: John Doe
Password: Strong password
Primary Group: users
Home Directory: /mnt/tank/home/john
Configure Groups
-
Navigate: Accounts → Groups
-
Create Group:
Group Name: family
GID: Auto-assign -
Add Users to Group: Edit group membership
Monitoring and Alerts
Configure Alerts
- Navigate: System → Alert Services
- Add Email Service:
Name: email-alerts
Type: Email
SMTP Server: smtp.gmail.com
Port: 587
Security: TLS
System Monitoring
- Navigate: Reporting
- View Metrics:
- CPU usage
- Memory utilization
- Network traffic
- Storage I/O
Troubleshooting
Common Issues
Boot Problems
-
Boot Device Full: Clean old boot environments:
beadm list
beadm destroy old-environment-name -
Partition Table Corruption: Restore from backup:
sgdisk --backup=table.backup /dev/sda
sgdisk --load-backup=table.backup /dev/sda
Storage Issues
-
Pool Import Failure: Force import:
zpool import -f tank
-
Cache/Log Device Errors: Remove and re-add:
zpool remove tank /dev/sda4
zpool add tank cache /dev/sda4
Network Problems
-
Web UI Inaccessible: Check network configuration:
ifconfig
ping 8.8.8.8 -
Share Access Issues: Verify SMB/NFS services:
systemctl status smbd
systemctl status nfs-server
Recovery Procedures
Emergency Recovery
- Boot from USB: Use TrueNAS installer in shell mode
- Import Pool: Import existing pools to recover data
- Backup Configuration: Export system configuration
- Reinstall: Fresh installation if needed
Log Analysis
System Logs
# View system logs
tail -f /var/log/messages
# Check ZFS events
zpool events
# View SMB logs
tail -f /var/log/samba4/log.smbd
# Check pool scrub status
zpool status -v
Best Practices
Security
Security Hardening
- Change Default Passwords: Use strong, unique passwords
- Enable 2FA: Configure two-factor authentication
- Firewall Rules: Restrict access to necessary ports
- Regular Updates: Keep TrueNAS updated
- Backup Configuration: Regular config backups
Performance Optimization
Performance Tips
- SSD Cache: Use SSDs for L2ARC cache
- Dedicated ZIL: Separate ZIL/SLOG device
- Network Tuning: Use 10GbE for high throughput
- Memory: More RAM improves ZFS performance
- Pool Layout: Choose appropriate RAID level
Maintenance
Regular Maintenance
# Pool scrub (monthly)
zpool scrub tank
# Check disk health
smartctl -a /dev/sda
# Update system
truenas-update
# Monitor pool health
zpool status
Special Thanks
- iXsystems Team for developing TrueNAS Scale
- OpenZFS Community for the excellent filesystem
- DiscDuck and Hawks for testing and feedback
- To our fantastic Discord community for their input and support
Please support the developers and creators involved in this work to help show them some love. ❤️
Final Words
We hope you enjoyed this guide. It was conceptualized, written, and implemented by our Admin Sycotix.
Support Us
Our work sometimes takes months to research and develop.
If you want to help support us please consider:
- Liking and Subscribing to our Youtube channel
- Joining our Discord server
- Becoming a paid member on our IBRACORP website
- Donating via Paypal
Thank you for being part of our community!