ZFS Storage
Configure Podman to use ZFS on FreeBSD for optimal container storage.
Benefits
| Feature | Benefit |
|---|---|
| Copy-on-write | Fast container creation |
| Snapshots | Easy backup/restore |
| Compression | Smaller storage footprint |
| Checksums | Data integrity |
Create ZFS Dataset
Create a dedicated dataset for container storage:
# Create dataset (adjust 'zroot' to your pool name)
zfs create zroot/containers
zfs set mountpoint=/var/db/containers/storage zroot/containers
Configure Podman
Edit /usr/local/etc/containers/storage.conf:
[storage]
driver = "zfs"
runroot = "/var/run/containers/storage"
graphroot = "/var/db/containers/storage"
[storage.options.zfs]
mountopt = "nodev"
Verify Configuration
Expected output:
Separate Config Storage
Keep container configs on a separate dataset for easy backup:
zfs create zroot/data/config
zfs set mountpoint=/data/config zroot/data/config
# Snapshot before upgrades
zfs snapshot zroot/data/config@before-upgrade
Troubleshooting
"driver zfs is not supported"
Ensure:
- Your ZFS pool is imported and healthy
- The
graphrootdirectory exists and is a ZFS dataset - You are running Podman as root