This episode opens the door to HAMMER2 thoroughly: the PFS (Pseudo File System) concept as a dataset, how to mount with mount_hammer2, adding volumes via hammer2 volume-add for multi-volume disk spanning, plus the zstd and lz4 compression properties, checksums, and important mount options.

In episode 7 you got to know HAMMER2 as one of the filesystem choices, formatted it with newfs_hammer2, and set up mounts in /etc/fstab. Now we go inside: what actually happens behind HAMMER2, and how its features are controlled. This episode is the technical foundation for all subsequent storage discussions.
HAMMER2 isn't just a filesystem — it's a storage system with a different model from UFS or ext4. Rather than one filesystem per device, HAMMER2 knows the concepts of PFS (Pseudo File System), volumes, and more flexible mount points. Imagine HAMMER2 as a building with many entrances you can configure individually.
PFS (Pseudo File System) is the main unit in HAMMER2 — similar to a ZFS dataset. One HAMMER2 filesystem can contain many PFSes, each with its own properties: compression options, checksums, even encryption. A default PFS is created during formatting and named after the filesystem label.
To list the PFSes in a filesystem:
hammer2 pfs-list /mnt/dataEach PFS can be mounted to a different mount point. That's what makes HAMMER2 flexible: one disk, many "logical filesystems" with different settings.
Creating a new PFS means giving the storage system a new layer. A new PFS appears as a directory inside the filesystem and can be mounted separately:
hammer2 pfs-create /mnt/data/apps
mkdir /apps
mount_hammer2 /mnt/data/apps /appsThis pattern is a key theme of this series: you'll often create one PFS per application or per service, so snapshots and properties can be managed per-PFS.
Mounting HAMMER2 is done with mount_hammer2. The basic syntax points to a label or PFS path:
mount_hammer2 @LABEL /mnt/data
mount_hammer2 @data:local /mnt/dataThe @LABEL notation points to a PFS with a given label. Once mounted, all of the PFS's properties — compression, checksum, mount options — apply to that mount point. For automatic mounting at boot, write an entry in /etc/fstab with -t hammer2:
/dev/da1s1d@ROOT /mnt/data hammer2 rw 0 0A volume is a block of physical space contributed to a HAMMER2 filesystem. One filesystem can consist of many volumes spread across several disks — this is HAMMER2's RAID-like, disk-spanning mechanism. When one disk fills up, add a new disk as a volume without stopping services.
To add a disk to an existing HAMMER2 filesystem:
newfs_hammer2 -L data -s 20G /dev/da2s1d
mount_hammer2 /dev/da1s1d@data /mnt/data
hammer2 volume-add /dev/da2s1d /mnt/dataThe order: format the new disk with newfs_hammer2, mount the main filesystem, then hammer2 volume-add to join the new disk into the filesystem. After that, data can automatically make use of the extra space.
Info
Multi-volume HAMMER2 isn't RAID — it spans, not mirrors. Data is spread across all volumes to use the total space, but there's no automatic redundancy. In episode 19 we'll design the right production strategy: deduplication, scheduled snapshots, and backups, so the lack of mirroring isn't a problem.
Checking volumes and filesystem properties:
hammer2 info /mnt/data
hammer2 status /mnt/datahammer2 info shows the joined volumes, PFS types, and version; hammer2 status shows size, usage, and filesystem health.
HAMMER2 supports per-PFS compression, and the setting can be changed while the filesystem is already mounted:
| Algorithm | Characteristics |
|---|---|
zstd | Best compression ratio, higher CPU usage |
lz4 | Very fast, lower ratio |
none | No compression |
Setting compression on a mount:
mount -o comp=zstd /mnt/data
hammer2 set-compress zstd /mnt/dataChecksums are what let HAMMER2 detect data corruption early. Every block stores a checksum, and when data is read, the checksum is verified. Checksums are on by default and can be set per-PFS:
mount -o check /mnt/data
hammer2 set-check /mnt/dataSome HAMMER2 mount options you'll encounter in mount -o ...:
| Option | Purpose |
|---|---|
rw / ro | Read-write / read-only |
noatime | Don't update access times — saves I/O |
comp=zstd | Per-mount compression |
bulkfree | Run bulkfree (the cleaner) automatically |
Viewing the currently active options:
mount | grep hammer2In this episode 8 you mastered the foundations of HAMMER2: the PFS concept as a separately mountable dataset, using mount_hammer2 with the @LABEL notation, adding volumes with hammer2 volume-add for multi-volume disk spanning, and the compression properties (zstd, lz4), checksums, and important mount options.
Key takeaways:
hammer2 pfs-list, hammer2 pfs-create, and mount_hammer2 are the PFS management trio.hammer2 volume-add joins a new disk into the filesystem for spanning — not mirroring.zstd/lz4 compression and checksums are set per-PFS via mount -o or hammer2 set-compress.hammer2 info and hammer2 status are your windows into filesystem health.In the next episode, episode 9, we'll take HAMMER2 to the next level: snapshots, dedup & encryption. You'll create snapshots with hammer2 snapshot, manage the PFS list with pfs-list, perform rollbacks and clones, enable block deduplication, encrypt a PFS with hammer2 set-encrypted, and look at the experimental remote mounting feature in 6.4.