User Tools

Site Tools


ZFS on NAS4Free

On NAS4Free ZFS version 28 is included. Later versions use ZFS version 5000 (feature flags) provided by FreeBSD. This supplies a very large number of tools and toys for managing your disks and filesystems. The new feature flags system allows greater cross-compatibility with other implementations of ZFS.

ZFS is a fundamentally different file system because it is more than just a file system. ZFS combines the roles of file system and volume manager, enabling additional storage devices to be added to a live system and having the new space available on all of the existing file systems in that pool immediately. By combining the traditionally separate roles, ZFS is able to overcome previous limitations that prevented RAID groups being able to grow. Each top level device in a zpool is called a vdev, which can be a simple disk or a RAID transformation such as a mirror or RAID-Z array. ZFS file systems (called datasets) each have access to the combined free space of the entire pool. As blocks are allocated from the pool, the space available to each file system decreases. This approach avoids the common pitfall with extensive partitioning where free space becomes fragmented across the partitions.

Included ZFS features:

(These features are baked into ZFS)

  • Disk Management - disk(s) assigned to ZFS pools do not need to be micromanaged by other tools
  • ZFS Managed Software Raid - stripe, mirror, or raidz (or, some combination/variation like Striped-Raidz)
  • Datasets - child filesystems of the pool, no special partitioning required.
  • Volumes - virtual disks created from raw storage of the pool, no special partitioning required
  • Compression - lzjb, gzip, gzip-[1-9], zle, or none (Pool version 5000 adds lz4 to this list)
  • Dedup - Identical blocks are not stored more than once. VERY HIGH MEMORY COST, AND SPEED IS SACRIFICED, PLUS OTHER HAZARDS. NOT RECOMMENDED, but available.
  • Snapshots - read-only reference to a dataset or volume as of a specific moment in time
  • Cloning - replica of a dataset/volume created from a snapshot

ZFS Structural Elements:

  • vdev - structural elements that make up a pool
  • Pool - the nexus that presents the underlying storage devices
  • Dataset - a child filesystem of the pool
  • Volume - a child of the pool that acts as a virtual block device
  • Snapshot - a point-in-time reference to the state of a dataset or volume
  • Clone - a new dataset or volume that starts with a snapshot as its template
Link Source Notes
FreeBSD zpool man page for creation, manipulation, and destruction of pools
FreeBSD zfs man page for creation, manipulation, and destruction of datasets, snapshots, clones, and volumes
FreeBSD zdb man page ZFS debugger - useful for checking pool and vdev parameters
FreeBSD ZFS wiki
ZFS Tuning Guide
ZFS Best Practices Guide Some is Solaris specific, but most is equally valid
ZFS snapshot, clone, volume
Dedup details In case you're curious about dedup. Dedup is NOT recommended
Migrating ZFS pools
zfs copies=x
Moving ZFS pools
ZFS Compression - A Win-Win
Becoming a ZFS Ninja (video)
ZFS Cheatsheet
ZFS: Read Me 1st
Fixing the 4k problem local mirror
zfs/main.txt ยท Last modified: 2016/02/19 10:33 (external edit)