Understanding FreeBSD filesystems: UFS with soft updates and snapshots, ZFS with datasets and properties, and pseudo-filesystems like tmpfs, fdescfs, and devfs. You will also master mount and umount, /etc/fstab configuration, and swap management with swapon.

In the previous episode 6, you managed services with the rc system and sysrc. Now we go one layer down to the foundation of storage: filesystems, mounts, and disks. Understanding this layer matters because every decision — from layout to disaster recovery — rests on it.
FreeBSD provides two main filesystems with very different personalities: UFS, classic and simple, and ZFS, modern with checksums and snapshots. On top of those are pseudo-filesystems for devices and memory. This episode maps it all out, then covers mounts, fstab, and swap.
UFS (Unix File System) is a Berkeley legacy with a long history in FreeBSD. Its modern version (UFS2) supports soft updates and snapshots. For simple systems, UFS remains a legitimate choice:
mount
df -hUFS is fast for small workloads and easy to understand. Its drawbacks: no end-to-end checksums, no multi-disk pooling, and limited snapshots compared to ZFS.
ZFS combines a volume manager and a filesystem into a single layer. Datasets, properties, checksums, compression, and snapshots make it far superior for production. ZFS details are covered fully in episodes 8-9, but you've already seen its traces since the bsdinstall stage.
zfs listInfo
Generally speaking, for a new installation in this day and age, use ZFS. UFS remains useful for special cases — such as small boot volumes or very constrained environments — but ZFS is the future of FreeBSD.
FreeBSD mounts several virtual filesystems that don't store permanent data. Understanding them prevents confusion when mount displays many entries.
devfs provides device nodes in /dev. When you add a disk, new nodes appear automatically. This is why FreeBSD uses names like /dev/da0 for SCSI/SATA disks and /dev/ada0 for ATA disks.
tmpfs stores data in RAM and swap. It's well suited for /tmp, whose contents are easily discarded:
mount -t tmpfs tmpfs /tmpprocfs exposes processes as files (usually mounted at /proc for compatibility), and fdescfs provides file descriptors in /dev/fd. Both are rarely touched, but useful for compatibility with certain applications.
mount connects a filesystem to a directory (mount point):
mount -t ufs /dev/da1p1 /mnt
mount -t zfs tank/data /tank-datamount -t specifies the filesystem type. Without a flag, FreeBSD tries to detect it automatically. View all mount points with mount or df.
umount detaches a filesystem. Make sure no process is using the mount point:
umount /mnt
umount -f /mntThe -f flag forces an unmount when a process is still using it. Use it only when truly necessary — you can lose data that hasn't been synced yet.
Warning
Before detaching a disk, make sure no process is writing. Use fstat to find processes that have files open on the mount point: fstat /mnt will show the PIDs that must be stopped first.
/etc/fstab determines which filesystems are mounted automatically at boot. Each line has six columns: device, mount point, type, options, dump flag, and passno:
cat /etc/fstabOn UFS systems, entries like /dev/ada0p2 / ufs rw 1 1 appear in this file. On ZFS systems, fstab is usually empty or minimal — ZFS mounts its own datasets at boot through the pool.
To add a permanent filesystem, edit /etc/fstab with the right options. The noauto option prevents automatic mounting:
mount -amount -a mounts all fstab entries. After editing, run it to verify the syntax before rebooting.
Swap is configured via an fstab entry with type swap, or managed manually with swapon and swapoff:
swapon /dev/da1p3
swapoff /dev/da1p3
swapinfoswapinfo displays swap status. On a default ZFS installation, swap is created as a ZVOL in the pool.
Success
Check fstab with mount -a before rebooting every time you change this file. An error in fstab isn't always fatal — FreeBSD drops to single-user mode — but it's better to catch problems early.
A few commands for monitoring disks and filesystems:
df -h
pstat -s
fsck -f /dev/ada0p2df -h shows used capacity, pstat -s shows swap, and fsck checks and repairs UFS filesystems. ZFS doesn't need fsck — its integrity is maintained by checksums and zpool scrub (episode 9).
In this episode 7, you understood FreeBSD filesystems: UFS and ZFS as the two main choices, the pseudo-filesystems devfs, tmpfs, procfs, and fdescfs, the mount and umount commands, the format and use of /etc/fstab, and swap management with swapon.
Key takeaways:
/dev; tmpfs stores data in RAM.mount -t <type> and umount control filesystem mounting./etc/fstab determines automatic mounts; verify with mount -a.swapon/swapoff.In the next episode, episode 8, we'll cover ZFS fundamentals — pools and vdevs, datasets, properties like compression and checksum, plus snapshots, clones, and boot environments with bectl. This is the storage foundation most widely used in FreeBSD production.