This episode takes HAMMER2 to an advanced level: creating snapshots with hammer2 snapshot, managing the PFS list with pfs-list, rollback and clones, block deduplication, per-PFS encryption with hammer2 set-encrypted, and the experimental 6.4 remote mounting feature.

In episode 8 you understood PFS, volumes, and HAMMER2 properties — the foundations that make this filesystem unique. Now we pick up the features people search for most: snapshots, deduplication, and encryption. These are the three biggest reasons someone chooses DragonFlyBSD as a storage platform.
Imagine a snapshot as a polaroid of your warehouse at a single moment: the entire contents — every file, every byte — recorded exactly, without using up double the space. Deduplication is the staff member who finds twin items and stores them only once. Encryption is the padlock that ensures the warehouse contents can only be read with the right key.
HAMMER2 snapshots are made with hammer2 snapshot. Every snapshot is a new PFS that records the state of the filesystem at a particular point in time:
hammer2 snapshot /mnt/data
hammer2 pfs-list /mnt/dataThe first command creates a snapshot with a dated default name; the second shows all PFSes including the newly created snapshot. Every snapshot can be mounted, accessed, even rolled back.
Show details of all PFSes:
hammer2 pfs-list /mnt/data
hammer2 pfs-destroy /mnt/data/.snapshot/2026.08.03-1200pfs-destroy removes a PFS or snapshot. Be careful — this operation is permanent. Always verify the snapshot name before deleting.
Rollback returns the filesystem to the state recorded in a snapshot. It's the lifesaver when data is deleted or corrupted:
hammer2 snapshot /mnt/data
umount /mnt/data
hammer2 rollback /mnt/data@ROLLBACK
mount_hammer2 /mnt/data /mnt/dataThe safe pattern: create a new snapshot first (if possible), unmount, perform the rollback, then remount. Present-day data won't be lost because it's still stored as a snapshot.
Warning
Rollback changes the active PFS to the snapshot state. Processes writing to the filesystem must be stopped first — that's why umount happens before the rollback. In production, do this in a maintenance window.
A clone is a copy of a PFS that can be mounted in parallel — useful for development, staging, or data analysis without touching the original data:
hammer2 snapshot /mnt/data
hammer2 clone /mnt/data@CLONE /mnt/data/.snapshots/clone-1
mount_hammer2 /mnt/data/.snapshots/clone-1 /mnt/cloneWith a clone, you can experiment freely on /mnt/clone — changes there don't affect the original PFS.
Deduplication finds identical data blocks and stores them only once, significantly reducing space usage — especially for VM images, backups, and package repositories that contain lots of repeated data. HAMMER2 runs dedup via bulkfree or explicitly:
hammer2 bulkfree /mnt/datahammer2 bulkfree scans the filesystem, identifies identical blocks, and frees the duplicate space. This is a safe operation that can be scheduled regularly — we'll put it into practice as a cron job in episode 19.
Deduplication works best when data repeats on a large scale. Consider placing VM images, tar backups, and ISOs in a single deduplicated PFS — that way the savings really show. Unique data like logs and databases don't benefit much.
HAMMER2 supports per-PFS encryption. That means you can encrypt one PFS (for example sensitive data) while other PFSes remain plain. Enabling encryption:
hammer2 set-encrypted /mnt/data/sensitiveOnce enabled, that PFS requires a key at mount time. Without the key, the data can't be read — perfect protection for stolen media or moved drives.
Danger
Encryption without a key means data locked forever. Store your PFS keys safely — for example in a password manager or a separate encrypted file. There's no backdoor in HAMMER2: losing the key is equivalent to losing the data.
A practical pattern: separate data that needs encryption into its own PFS, enable encryption, and document how to mount with the key. For serious needs, consider a combination: per-PFS encryption for core data, scheduled snapshots for recovery, and off-site backups for disasters.
Release 6.4 brings experimental remote mounting of HAMMER2 — mounting a HAMMER2 filesystem from another host over the network, similar to the NFS concept but with HAMMER2 features:
mount_hammer2 //host1/mnt/data /mnt/remoteThis feature is young and labeled experimental — good for exploration, but don't make it the backbone of production before it matures. In episode 11 we'll also look at hammer2 send, which uses the snapshot model for data transfer.
In this episode 9 you mastered HAMMER2's advanced features: creating snapshots with hammer2 snapshot, managing PFSes with pfs-list and pfs-destroy, rollback and clones, block deduplication with hammer2 bulkfree, per-PFS encryption with hammer2 set-encrypted, and getting to know the experimental remote mounting in 6.4.
Key takeaways:
hammer2 snapshot, pfs-list, and rollback are the basic cycle.hammer2 bulkfree saves space for repeated data.hammer2 set-encrypted protects sensitive data; store keys safely.In the next episode, episode 10, we switch from storage to networking: networking & network configuration. You'll configure interfaces in /etc/rc.conf (DHCP and static), use ifconfig and route, lay out /etc/resolv.conf, then get to know the custom newbee network stack, interface aliases, VLAN, lagg bonding, bridge, and IPv6.