| pick your distro, get ZFS on root
kldload — your platform, your way, free
Source
← Back to Overview

Storage Server — NAS that actually protects your data.

Most NAS boxes run ext4 or btrfs and pray your data stays intact. A kldload storage server runs ZFS — every block checksummed, every read verified, self-healing on mirrors. This is what TrueNAS does. Now you can build your own.

The recipe

# Start with a kldload server install, then:

# Install file sharing packages
kpkg install nfs-kernel-server samba tgt prometheus-node-exporter

# Create datasets for shares
kdir /srv/shared
kdir /srv/backups
kdir -o compression=zstd /srv/media

# NFS export
echo "/srv/shared  10.0.0.0/24(rw,sync,no_subtree_check)" >> /etc/exports
exportfs -ra

# Samba share
cat >> /etc/samba/smb.conf <<EOF
[shared]
  path = /srv/shared
  browsable = yes
  writable = yes
  valid users = @users
EOF
systemctl enable --now smbd

# iSCSI target (block storage over network)
zfs create -V 100G -s rpool/srv/iscsi-lun0
# Configure tgt to export the zvol...

# Enable Prometheus metrics (scrape on :9100)
systemctl enable --now prometheus-node-exporter

What you'll learn

File vs. block storage

NFS and Samba serve files. iSCSI serves raw blocks. When do you use which? Why databases prefer block storage. Why humans prefer file shares.

Data integrity

What happens when a disk lies about writing data. How ZFS detects and corrects it. Why RAID-5 is dead and RAIDZ exists. The real cost of silent corruption.