12. The Z File System

Even though we are keen to improve our hardware every 5 years, but still we are using a 40 years old filesystem. While those architectures have been improved and made robust but they are still same basic architecture and prone to errors.

ZFS combines existing well-understood principles into a single cohesive, well-engineered whole with design that can be updated with new hashing or data trees or indexing algorithms without losing backwards compatibility.

ZFS is almost an operating system on its own, or perhaps a special-purpose database. Usually a install of ZFS-based FreeBSD is preferred and automatically handles prerequisties like, setting zfs_load=YES in loader.conf and zfs_enable=YES in rc.local.

ZFS has 3 main components : datasets, pools, and virtual devices.

Datasets

A database is defined as a named chunk of ZFS data. ZFS includes snapshots, block devices for virtualization and iSCSI targets, clones and more, all of those are datasets. zfs(8) is used to manage all ZFS datasets. Execute zfs list to view all existing datasets.