What is ZFS (Zettabyte File System)?

ZFS (Zettabyte File System) is a file system designed by Sun Microsystems in October 2001 and implemented in OpenSolaris four years later.

What is ZFS?

What is the ZFS File System?

The idea behind ZFS is not to upgrade existing technology but to develop a new approach to data management by improving the file system and logical unit manager integration in one system.

Its purpose is simple management, performance, data integrity, and scalability.

ZFS History and Development

It started in 2001 at Sun Microsystems. It was released in CDDL as part of Open Solaris in 2005. Later, Pawel Jakub Dawidek chose ZFS for FreeBSD in 2007.

Brian Behlendorf launched the ZFSOnLinux project in 2008 for high-performance calculations at LLNL. Oracle bought Sun Microsystems in 2010 and stopped Open Solaris later that year.

The Illumos project began to replace Open Solaris, and Mateo Ahrens and Jeff Bonwick, members of the ZFS core team, resigned. Many of them found jobs in companies and continued to develop open-source ZFS as part of the Illumos project.

ZFS is licensed under CDDL, a popular and widely used OSI-certified open-source license that is recognized by FSF as a free software license but is not compatible with the GNU GPL.

Because ZFS cannot be added directly to the Linux kernel, however, it can be distributed as a separate DKMS package from the core package.

ZFS Features

The main features of the ZFS are listed below:

   Verifiable Data Integrity

This feature ensures that the data in the file is always adequately protected, insufficient data is detected, and bad data is automatically repaired. This is done thanks to the operational file model.

   Operational Model

The operational file model includes the storage of events or processes.

For this, the technique known as write-on-copy is used when data is changed on the disk. This data is not overwritten with new blocks where it is saved, and then the corresponding structures are changed to point to these new blocks.

   Snapshots

Snapshots correspond to copies of the file system at a specific time. It is swift to allow backups or backups almost instantly, except that these copies are read-only.

   Clones

Similar to snapshots, clones are copies of the file system at some point, but writing is allowed. This created file system shares blocks on disk with the original to save space but is managed independently.

   Storage Areas

Unlike traditional file systems that require a volume manager, it uses virtual storage spaces, virtual storage pools, or zpools on a single device.

Zpool is created from virtual devices created from device blocks, such as hard disk partitions or entire disks. Also, the storage capacity of all vdevs is available for all instances of the file system in zpool.

   Lightweight File System

Filing systems are much easier to manage than other existing systems, making the creation of these systems a very light process.

In addition, there is no free quota for each user, but there is a quota per file system, so file systems are created for each user instead of folders in the same file system.

   Compression

This allows us to maximize space on the disc, remove small unused parts of the disc, and, as a result, maximize reading speed most of the time.

ZFS Capacity

ZFS is a 128-bit file system, so it has much more storage capacity than other 64-bit systems like NTFS.

Since the boundaries of ZFS are designed to be so large, theoretical results were obtained instead of practical values:

  • Number of entries in a folder: 248
  • Number of properties in a file: 248
  • Maximum file size in bytes: 264
  • Number of devices in Zpool: 264
  • Maximum number of zoos in a system: 264
  • Maximum number of file systems in Zpool: 264
  • Some zpool bytes as maximum size: 278

Operating System Compatibility

ZFS is self-contained and included in the Solaris operating system, but since this file system’s code is freely accessible, it can also be seen on other platforms, such as FreeBSD.

Platforms that support ZFS are listed below:

Supported Operating Systems and Distributions
Oracle Solaris 11.3NexentaStor Community 3.1.0Schillix 0.7.2EON NAS (v1.0beta)
Oracle Solaris 10 1/13 (U11)NexentaStor Community 4.0StormOS “hail”napp-it
Oracle Solaris 11.2NexentaStor EnterpriseJarisOmniOS CE
Oracle Solaris 11 2011.11GNU/kFreeBSD “Squeeze” (as of 1/31/2013)MilaX 0.5SmartOS
Oracle Solaris Express 11 2010.11GNU/kFreeBSD “Wheezy-9” (as of 2/21/2013)FreeNAS 8.0.2 / 8.2macOS 10.5, 10.6, 10.7, 10.8, 10.9
OpenSolaris 2009.06FreeBSDFreeNAS 8.3.0macOS 10.6, 10.7, 10.8
OpenSolaris (last dev)zfs-fuse 0.7.2FreeNAS 9.1.0NetBSD
OpenIndianaZFS on Linux 0.6.5.8NAS4Free 10.2.0.2/10.3.0.3MidnightBSD
Nexenta Core 3.0.1KQ Infotech’s ZFS on LinuxKorona 4.5.0Ubuntu Linux 16.04 LTS, 18.04 LTS, 18.10, 19.10, 20.04 LTS
NexentaStor Community 3.0.1BeleniX 0.8b1EON NAS (v0.6)ZFSGuru 10.1.100

ZFS File Structure

File systems are created on top of virtual storage pools called zpools. Zpool is made from virtual devices from block devices.

Features of this structure:

  • Abstraction: free.
  • There are no sections to manage.
  • It automatically grows or shrinks.
  • All bandwidth is always available.
  • All storage areas in the pool are shared.

Operational Model

ZFS uses the copy-processing model when overwriting. All file system block markers contain a 256-bit checksum on the pointed block, controlled by reading the block.

Blocks containing active data are never overwritten. Instead, a new block is allocated, and the changed data is written to it. Then, all the metadata blocks referring to it are repositioned and written similarly.

To reduce the overhead of this process, multiple updates are added to the process groups, and the ZFS Intent Log is used when simultaneous writing is required.

Snapshots

Since ZFS doesn’t overwrite data, taking snapshots means not releasing blocks used by older versions of data.

The advantage is that it is space-efficient because snapshots are taken quickly, and unmodified data is shared with the file system. You can create snapshots of both file system and zvol datasets.

Changeable snapshots can be created, resulting in two independent file systems created by sharing a standard set of blocks. File system blocks decompose as changes are made, but standard blocks are preserved regardless of how many clones there are.

Differences Between Other File Systems

The idea behind this concept is structured from a single physical device, unlike the usual file systems.

ZFS is not limited to specific devices thanks to the Pool concept, which eliminates the idea of logical volume.

In addition, it provides access to the same resource from multiple processes called Transactional Copy-on-Write, which facilitates the same marker. It does not lose consistency without the need for Fsck.

It protects data integrity by silently detecting and correcting data corruption.

Add a Comment

Your email address will not be published. Required fields are marked *