Table of Contents
FreeBSD has the most mature ZFS implementation outside of OpenZFS on Solaris. ZFS-on-Linux (ZoL) has caught up significantly, but FreeBSD's native ZFS integration, network stack stability, and bhyve hypervisor make it an excellent choice for a mass-storage node that also hosts VMs.
The design philosophy here is: FreeBSD owns the disks and the network. Everything else (SMB, additional services) runs as bhyve VMs that get NFS mounts from the FreeBSD host. This way, a misbehaving VM cannot corrupt your ZFS pool.
| Component | Details | Role |
|---|---|---|
| OS Disks | 2ร SSDs (mirror) | FreeBSD boot volume โ mirrored for redundancy |
| SLOG | 2ร SSDs (mirror) | ZFS Intent Log โ write acceleration, crash protection |
| L2ARC | 1ร Large SSD | Read cache โ dramatically speeds up frequent reads |
| Data Pool | 30ร HDDs | Primary data storage โ 27TB+ usable across RAIDZ |
| Network | 2ร 1GbE (LAGG) | LACP bonding โ 2Gbps throughput + failover |
-
1
Download FreeBSD 14
Get the amd64 installer ISO from freebsd.org. Write to USB with
ddor Rufus (DD mode). -
2
Install to Mirrored SSDs
During install, choose Auto (ZFS) partitioning. Select both OS SSDs and choose mirror. This puts the FreeBSD OS on a redundant ZFS mirror โ if one OS disk dies, the system keeps running.
-
3
Enable Required Services
In
/etc/rc.conf, enable the services you'll use:hostname="odin" zfs_enable="YES" nfs_server_enable="YES" nfsv4_server_enable="YES" rpcbind_enable="YES" mountd_enable="YES" vm_enable="YES" # bhyve VM framework vm_dir="zfs:data/vms" # store bhyve VMs on ZFS
LAGG (Link Aggregation) bonds two NICs for 2Gbps throughput and automatic failover if one link drops.
With 30 data disks you have options. RAIDZ2 (dual parity) gives you 2 drive failure tolerance โ recommended for drives of this count.
Create your primary datasets:
compression=lz4 on ZFS datasets. LZ4 compression is so fast it actually improves performance on most workloads (fewer bytes to read/write from disk) while reducing space usage 20โ50% for typical media and data files.Export your ZFS datasets over NFS so other hypervisors and VMs can mount them as shared storage.
Other hosts can now mount:
Windows clients need SMB, not NFS. Rather than running Samba directly on FreeBSD, a cleaner approach is to run a Debian VM via bhyve that mounts the NFS shares and re-exports them as SMB. This isolates Samba's complexity from the storage host.
-
1
Install vm-bhyve Framework
pkg install vm-bhyve bhyve-firmware vm init vm switch create public vm switch add public lagg0 # bridge to your LAGG -
2
Create and Install Debian VM
vm iso https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.x-amd64-netinst.iso vm create -s 30G -m 2G -c 2 smb-gateway vm install smb-gateway debian-12.x-amd64-netinst.iso -
3
Mount NFS Shares in the VM
Inside the Debian VM, add to
/etc/fstab:10.10.3.234:/data/media /mnt/media nfs defaults 0 0 10.10.3.234:/data/appdata /mnt/appdata nfs defaults 0 0
Install Samba in the Debian VM and share the NFS-mounted paths:
Add users and start Samba:
Windows clients can now map: \\10.10.3.234\Media
ZFS snapshots are instantaneous and space-efficient. Set up automated snapshots with a cron job:
ZFS Send/Receive for off-site backup:
- FreeBSD Handbook: ZFS Official FreeBSD ZFS documentation
- OpenZFS Documentation Comprehensive ZFS reference
- FreeBSD Handbook: bhyve Official bhyve hypervisor guide