This episode designs production storage on DragonFlyBSD: NAS with multi-volume HAMMER2, managing dedup and encryption, scheduling snapshots with cron, monitoring with hammer2 status, and growfs for filesystem resizing in 6.2+.

In episode 18 you ran VMs on top of NVMM. Now we apply all the storage knowledge you've gathered since episode 7 to one final, very tangible goal: designing production storage. This is the moment when HAMMER2 — the filesystem that motivated you to learn this series from the start — really does its job.
Imagine you've been assigned to build a company's storage server: many disks, ever-growing data, daily backup requirements, and demands for data integrity. Episode 19 lays out the blueprint: multi-volume HAMMER2 to use all the disks, dedup and encryption for efficiency and security, scheduled snapshots via cron, routine monitoring, and smooth resizing as capacity grows.
The basis of production storage is using all available disk space. With multi-volume HAMMER2, additional disks are formatted and joined without stopping services:
newfs_hammer2 -L data -s 4T /dev/da1s1d
newfs_hammer2 -L data -s 4T /dev/da2s1d
mount_hammer2 /dev/da1s1d@data /srv/nas
hammer2 volume-add /dev/da2s1d /srv/nasAfter volume-add, the data filesystem has 8 TB from two disks. When you need more, format a new disk and volume-add again — capacity grows hot.
Inside that large filesystem, split it into per-service PFSes so snapshots and properties can be managed per need:
hammer2 pfs-create /srv/nas/docker
hammer2 pfs-create /srv/nas/backup
hammer2 pfs-create /srv/nas/secure
mount_hammer2 /srv/nas/backup /mnt/backupThe secure PFS can be encrypted, the backup PFS gets the most frequent snapshots, and the docker PFS uses zstd compression for its repetitive images.
Dedup works best on repeated data — VM images, tar backups, ISOs. Enable and run scheduled bulkfree:
hammer2 bulkfree /srv/nasFor PFSes storing sensitive data, enable encryption and document the keys:
hammer2 set-encrypted /srv/nas/secureRegular snapshots are the backbone of recovery. Set up a schedule with cron — daily snapshots kept for a few days, weekly snapshots kept longer:
# snapshot harian jam 2 pagi, simpan 7 hari
0 2 * * * hammer2 snapshot /srv/nas/docker
0 2 * * * hammer2 snapshot /srv/nas/backupRemove snapshots past their target age with scheduled hammer2 pfs-destroy, or manage them manually at specific points in time. The key to a good schedule is regularity, not variety.
Warning
A snapshot that's never been test-restored is worth as much as no snapshot at all. Also schedule periodic restore tests — for example mounting the oldest snapshot and verifying its contents — as part of your monthly operational procedure.
hammer2 status becomes your health dashboard:
hammer2 status /srv/nas
df -h /srv/nasIntegrate it into a monitoring system (for example cron + mail, or output to an external tool). When usage approaches the limit, that's the moment to add a volume or clean up old snapshots.
When a volume is enlarged — for example a VM's virtual disk is expanded — HAMMER2 can extend the filesystem without unmounting. Since 6.2, growfs handles resizing automatically:
growfs /srv/nasAfter the physical disk grows, growfs adjusts the volume size. Check the size after growfs with hammer2 status — the new capacity is immediately available for the next volumes and snapshots.
A storage server without off-site backup is a time bomb. Combine:
Apply the 3-2-1 rule from episode 11: three copies, two media types, one off-site.
In this episode 19 you designed production storage with HAMMER2: building a multi-volume NAS with hammer2 volume-add, arranging per-service PFSes with different properties, enabling dedup and encryption, scheduling snapshots with cron, monitoring with hammer2 status, and expanding the filesystem with growfs (6.2+).
Key takeaways:
hammer2 volume-add /dev/da2s1d /srv/nas.hammer2 status and df -h are your daily monitoring dashboards.growfs expands the filesystem without unmounting; combine local snapshots + off-site rsync/send.In the next episode, episode 20, we play with source: build system & kernel customization. You'll build the system from source with make buildworld and make buildkernel, install with make installkernel, understand binary updates with dragonfly-update, and write a custom kernel config in /usr/src/sys.