This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

References


The TrueNAS References section includes additional information on various topics helpful for a TrueNAS user.

If you are searching for additional information on a topic and are unable to find it, you can try searching the TrueNAS Community Forum .

Copyrights and Trademarks

FreeNAS®, TrueNAS®, TrueNAS® SCALE, TrueCommand, and all related logos are registered trademarks of iXsystems, dba TrueNAS .

These trademarks and copyrights are owned by their respective Companies or Foundations:

  • Active Directory® is a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.
  • AIStor is a trademark of the MinIO Corporation.
  • Apple, Mac and Mac OS are trademarks of Apple Inc., registered in the U.S. and other countries.
  • Asigra Inc. Asigra, the Asigra logo, Asigra Cloud Backup, Recovery is Everything, Recovery Tracker and Attack-Loop are trademarks of Asigra Inc.
  • AWS® is a registered trademark of Amazon.
  • Broadcom® is a trademark of Broadcom Corporation.
  • Chelsio® is a registered trademark of Chelsio Communications.
  • Cisco® is a registered trademark or trademark of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.
  • Django® is a registered trademark of Django Software Foundation.
  • Facebook® is a registered trademark of Facebook Inc.
  • FreeBSD® and the FreeBSD® logo are registered trademarks of the FreeBSD Foundation®.
  • Helm® is a registered trademark of The Linux Foundation.
  • Infiniband® is a registered trademark Mellanox Technologies Ltd. which is a subsidiary of NVIDIA.
  • Intel, the Intel logo, Pentium Inside, Pentium, and Xeon are trademarks of Intel Corporation in the U.S. and/or other countries.
  • Kubernetes® is a registered trademark of The Linux Foundation.
  • LinkedIn® is a registered trademark of LinkedIn Corporation.
  • Linux® is a registered trademark of Linus Torvalds.
  • Mellanox® is a registered trademark Mellanox Technologies Ltd. which is a subsidiary of NVIDIA.
  • MinIO is a trademark of the MinIO Corporation.
  • Nextcloud® is a registered trademark of Oracle Corporation and/or its affiliates.
  • NVM Express® is a registered trademark of Nextcloud GmbH.
  • OpenStack® is a registered trademark of The OpenStack Foundation.
  • Oracle® is a registered trademark of Oracle Corporation and/or its affiliates.
  • Plex® is a registered trademark of Plex, Inc.
  • Storj® is a registered trademark of Storj Labs Inc.
  • Trusted Computing Group® is a registered trademark of the Trusted Computing Group.
  • Twitter® is a trademark of Twitter, Inc. in the United States and other countries.
  • UNIX® is a registered trademark of The Open Group.
  • Veeam® is a registered trademark of Veeam Software.
  • VirtualBox® is a registered trademark of Oracle.
  • VMware® and vCenter® is a registered trademark of VMware, Inc.
  • Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
  • Windows® is a registered trademark of Microsoft Corporation in the United States and other countries.

For more information on copyrights and trademarks see TrueNAS Trademarks .

ACL Primer

An Access Control List (ACL) is a set of rules that controls which users or processes can access a resource and what operations they can perform on it. TrueNAS uses ACLs to manage permissions on datasets and shares, supporting both POSIX and NFSv4 ACL types depending on how your environment is configured.

ACL Overview

In TrueNAS, ACLs specify which users or system processes (trustees) have access to datasets or shares. ACLs also determine what operations trustees can perform.

Each entry in an ACL specifies a trustee and an operation. For example, if an SMB share has an ACL that contains:

Who: User
User: user1
Permissions: Full Control

Who: User
User: user2
Permissions: Read

The ACL would give user1 permission to view, edit, and create files and directories within the share, but only give user2 viewing permissions.

NFSv4 in TrueNAS

While the POSIX ACL type has basic read, write, and execute permissions, the NFSv4 ACL type lets administrators fine-tune advanced read, modify (write), and traverse (execute) permissions.

For example, NFSv4 advanced permissions allow an administrator to set up a trustee that can read and write data, but not delete anything.

The NFSv4 ACL type also lets administrators apply basic or advanced inheritance flags. Basic flags enable or disable ACE (Access Control Entry) inheritance. Advanced flags give further control of how an ACE applies to a dataset’s files and directories.

For example, advanced flags allow an administrator to apply the ACL to new directories within a dataset, but not new files.

NFSV4.1 Support in TrueNAS

TrueNAS 24.04 and later includes NFSv4.1 support to the NFS Linux client and brings support for higher ACL types to the filesystem NFS and SMB clients.

It also enhances the SMB client to present the Windows NT security descriptor as xattr in our system. This security descriptor is a list containing the discretionary access control lists (DACLs) entries that grant or deny access to users or groups. It also contains system access control lists (SACLs) that control audit logging for users and groups.

Additionally, it brings support for server-side discretionary access control lists (DACLs) and client-side support for the existing client DACL support for transport. This permits support for DACLs or system access control lists (SACLs). By default, The flag remains set at zero for ACL. The ACL Type determines whether we operate on an ACL or DACL.

DACL support is modeled on the existing ACL support. Some functions have widened signatures to include the ACL type parameter. Only OWNER@, GROUP@, EVERYONE@ and numeric UIDs or GIDs are supported in the ACEs, which is the way NFSv4 transfers them. A new xattr handler easily preserves and converts the content of the SMB Security Descriptor DACL into native ZFS ACL when ingesting data during migration via SMB client.

There is a new endpoint that can be used to control error handling. The default behavior is to prevent modifications to remote SMB server ACL, and fail xattr read if ID mapping fails.

In general, NFSv4.1 adds these new features:

  • Enhances network performance and security, and client-side support for parallel NFS (pNFS). This allows presenting the same datastore on multiple data paths, enabling redundancy and load-balancing It also adds support for high-speed I/O to clustered servers, increases scalability and overall performance through parallel I/O.

  • Adds a new session layer on top of the transport layer so a separate TCP connection for callbacks is no longer requiring. The NFS server can grant delegations to a client even when it cannot contact the client, for example, when NAT or a firewall interferes.

  • Provides improvements that prevent a previous issue where certain operations could return an inaccurate result if a reply was lost and the operation was sent twice.

  • Allows storing metadata, such as directory information, on a server other than where data is stored, keeping it out of the data path. The directory delegation, allows servers to delegate control of files to clients, allowing the client to perform file operations without requiring server interaction.

Preferred Configurations for SMB Shares

To properly configure ACLs on SMB shares, users should consider how they intend to access the dataset/share with other devices and services on the network.

Even though TrueNAS NFSv4 ACL support provides the best possible compatibility with a Windows file system security model, it is not the best choice for every situation.

When to use NFSv4 ACLs

TrueNAS administrators should use NFSv4 ACLs to cleanly migrate Windows-style ACLs across Active Directory domains (or stand-alone servers) that use ACL models richer than POSIX.

Since POSIX ACLs are a Linux-specific ZFS feature, administrators should use NFSv4 to maintain compatibility with FreeBSD-based TrueNAS versions, FreeBSD, or other non-Linux ZFS implementations.

Warning

Administrators must use NFSv4 if they intend to replicate data from Linux-based TrueNAS to a FreeBSD-based TrueNAS disaster recovery target.

TrueNAS administrators should also use NFSv4 ACLs if their organization requires advanced NFSv4 ACL features.

If an organization requires managers to review all data before deletion, administrators can use advanced NFSv4 permissions to let employees access and create files, but not edit or delete existing files.

NFSv4 can operate alongside CIFS, allowing organizations that use UNIX-based processing systems features to use Windows-based clients. It can also cooperate with CIFS to bypass the NFS 16-group limitation by generating NFS credentials based on Unix and Windows groups.

Users should use NFSv4 ACLs when they intend to have nested groups within an SMB share. Since users and nested groups might have different permissions for directories, the NFSv4 Traverse permission can enable users to connect to and move through directories that their nested group might not have read or write access to.

When to use POSIX ACLs

TrueNAS administrators should use POSIX ACLs when the data backup target for the organization does not support native NFSv4 ACLs. Since the Linux platform used POSIX for a long time, many backup products that access the server outside the SMB protocol cannot understand or preserve native NFSv4 ACLs.

Verify Permissions Backups

When deciding how to configure ACLs, administrators must verify they can correctly restore permissions from backups first.

Inversely, TrueNAS administrators should use POSIX ACLs when TrueNAS is the backup target for clients that use POSIX ACLs. Since ZFS provides superb safety and data protection, many administrators use their TrueNAS system as a target for file-based backups from computers on their networks. Using POSIX ACLs preserves POSIX.1e ACLs from client systems.

TrueNAS administrators should also use POSIX ACLs if they wish to replicate SMB datasets to other non-TrueNAS Linux servers with ZFS, especially when the Linux server should seamlessly take over serving files during disaster recovery.

TrueNAS creates a POSIX.1e ACL for datasets created when the Dataset Preset (ACL Type) is set to Generic.

Concepts and Terminology

TrueNAS is very complicated software that combines many different open-source solutions into one cohesive software package. While TrueNAS is designed for and ever-evolving towards increased user friendliness, there are many terms and concepts that can be learned to improve your ability to understand and configure the software.

General Concepts

  • Operating System (OS): An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.

  • Open Source: Open-source software is a type of computer software in which source code is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software to anyone and for any purpose.

  • Network Attached Storage (NAS): Network-attached storage (NAS) is a computer data storage server connected to a computer network providing data access to a heterogeneous group of clients.

  • Storage Area Network (SAN): A storage area network (SAN) or storage network is a computer network which provides access to consolidated, block-level data storage. SANs are primarily used to access storage devices, such as disk arrays and tape libraries from servers so that the devices appear to the operating system as direct-attached storage.

  • Software as a Service (SaaS): Software as a service (SaaS) is a software licensing and delivery model in which software is licensed on a subscription basis and is centrally hosted. It is sometimes referred to as on-demand software.

  • SSD Metadata: File system metadata that can be stored on SSDs for faster performance while large data files can be stored on HDDs for lower costs.

  • Storage: Computer data storage is a technology consisting of computer components and recording media that are used to retain digital data.

  • File System: A file system or filesystem (fs) controls how data is stored and retrieved. Without a file system, data placed in a storage medium would be one large body of data with no way to tell where one piece of data stops and the next begins.

  • Networking: A computer network is a group of computers that use a set of common communication protocols over digital interconnections for the purpose of sharing resources located on or provided by the network nodes.

  • Sharing: File sharing is the public or private sharing of computer data or space in a network of multiple systems.

  • Virtualization: Virtualization refers to the act of creating a virtual (rather than physical) version of something, including virtual computer hardware platforms, storage devices, and computer network resources.

  • Encryption: In cryptography, encryption is the process of encoding information. This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext. Ideally, only authorized parties can decipher a ciphertext back to plaintext and access the original information. Encryption does not itself prevent interference but denies the intelligible content to a would-be interceptor.

Accounts Terminology

  • root User: root is the primary account that by default has access to all commands and files on a Linux and Unix-like operating systems. It is also referred to as the root account, root user, and/or the superuser. This is similar to the administrator account on Windows.

  • User: A user account is an additional account on a Linux and Unix-like operating system that has a lower permission levels than the root account.

  • Group: A group is a collection of users. The main purpose of the groups is to easily define a set of privileges like read, write, or execute permission for a given resource that can be shared among the multiple users within the group.

Storage Terminology

  • Block Device: A block device is a data storage device that supports reading and writing data in fixed-size blocks, sectors, or clusters. These blocks can vary in size based on formatting.

  • Self-Encrypting Drive (SED): A SED (or Self-Encrypting Drive) is a hard drive that automatically and continuously encrypts the data on the drive without any user action.

  • Zettabyte File System (ZFS) : ZFS is a next-generation file system designed by Sun Microsystems that eliminates most, if not all of the shortcomings found in legacy file systems and hardware RAID devices.

  • iSCSI: iSCSI stands for Internet Small Computer Systems Interface. iSCSI is a transport layer protocol that works on top of the Transport Control Protocol (TCP). It provides block-level access to storage devices by carrying SCSI commands over a TCP/IP network.

ZFS

  • L2ARC : sometimes called a CACHE vdev. This is a special class of vdev. ARC stands for Adaptive Replacement Cache and is a caching algorithm that tracks both the blocks in cache and blocks recently evicted from cache. The main ARC resides in system memory. The L2ARC is 2nd layer ARC assigned to a disk to expand ARC capability.

  • ZFS Datasets : similar to a conventional mounted filesystem. It appears in casual inspection as “just another folder”. However, unlike conventional mounted filesystems, each ZFS dataset has its own set of properties.

  • ZFS Pools : filesystem container that is composed of one or more vdevs.

  • ZFS vdev : ZFS virtual device. A ZFS pool is made up by one or more vdevs. A vdev can be created using a single disk or many. A vdev has many configurations: single disk, stripe, RAIDz1, RAIDz2, RAIDz3, or mirror.

  • ZFS zvols : datasets that represent block devices.

  • ZIL (or ZFS Intent Log): special vdev class. This is also sometimes referred to as a SLOG or Separate Intent Log.

  • Fusion Pool (or metadata vdev): is a special class of vdev. This special vdev can store meta data such as file locations and allocation tables. Using a special vdev drastically speeds up random I/O and can cut the average number of spinning-disk I/Os needed to find and access a file by up to half.

  • Checksum : As ZFS writes data, it creates a checksum for each disk block it writes. As ZFS reads data, it validates the checksum for each disk block it reads.

  • Self-healing : Media errors or bit rot can cause data to change. As a result, the checksum no longer matches. When ZFS identifies a disk block checksum error on a pool that is mirrored or uses RAIDZ, it replaces the corrupted data with the correct data.

  • ZFS Snapshots : read-only copy of a file system or volume. When a snapshot of a dataset is made, ZFS records the timestamp of when the snapshot was made. No data is copied and no extra storage is consumed. Only when changes occur in the filesystem and the data in it diverges from the snapshot does the snapshot start using additional storage.

  • ZFS Scrub : the process that ZFS uses to verify the data on disk. All of the data is read and checked against the computed checksums to verify that no corruption has occurred.

  • ZFS Resilver : process to reconstruct data on a disk when that disk has replaced a failed disk.

  • ZFS Replication : copying a ZFS dataset to another dataset. The receiving dataset can be on the same machine or on another machine in a remote location. Replication works with snapshots so only the changes to the stored data need to be sent to the receiving dataset.

  • Cloud Sync : TrueNAS sending, receiving, or synchronizing data with a Cloud Storage provider like Amazon S3, Google Cloud, or Microsoft Azure.

Networking Terminology

  • Certificate Authority (CA): A certificate authority or CA is an entity that issues digital certificates. A digital certificate certifies the ownership of a public key by the named subject of the certificate.

  • Certificate: A Certificate is an electronic document used to prove the ownership of a public key. The certificate includes information about the key, information about the identity of its owner, and the digital signature of an entity that has verified the certificate.

  • Virtual Private Network (VPN): A virtual private network (VPN) extends a private network across a public network and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network.

  • Interface: An interface is a boundary across which two or more different components of a computer system exchange information. The exchange can be between software, computer hardware, peripheral devices, humans, or other things. A network interface such as a LAN port or wi-fi facilitates data exchanging between two systems. A Human Interface Device (HID) such as a mouse or keyboard allows a person to interact with a system. A hardware interface like a USB port allows for the exchange of information between a computer and another device.

  • Default Route: The default route is a configuration of the IP Network that establishes a forwarding rule for packets when no specific address of a next-hop host is available from the routing table or other routing mechanisms.

  • Nameserver: A name server refers to the server component of the Domain Name System (DNS). A nameserver provides responses to queries against a directory service which translates an often human readable text-based identifier to an numeric identification or addressing component.

  • Domain Name System: The Domain Name System (DNS) is a hierarchical and decentralized naming system for computers, services, or other resources connected to the Internet or a private network.

  • IP Address: An Internet Protocol address (IP address) is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. IPv4 addresses are decimal while IPv6 addresses are hexadecimal.

  • Hostname: A hostname is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication.

  • NFS: Network File System (NFS) is a distributed file system protocol originally developed by Sun Microsystems, which allows users on a client computer to access files over a computer network much like local storage is accessed.

  • SMB: SMB, or sometimes the Common Internet File System (CIFS), is a communication protocol for providing shared access to files, printers, and serial ports between nodes on a network. It was originally designed by IBM in the early 1980s.

  • Active Directory: Active Directory (AD) is a directory service developed by Microsoft for Windows domain networks. Active Directory uses the Lightweight Directory Access Protocol (LDAP), Microsoft versions of Kerberos, and DNS.

  • DDNS: Dynamic DNS (DDNS) is a method to realtime update a name server in the Domain Name System (DNS) according to the active DDNS configuration of its configured hostnames, addresses or other information.

  • LDAP: The Lightweight Directory Access Protocol is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an IP network.

  • DHCP: The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on IP networks. A DHCP server dynamically assigns an IP address and other network configuration parameters to each device on the network, so devices can communicate with each other.

  • LLDP: The Link Layer Discovery Protocol (LLDP) is a link layer protocol used by network devices for advertising their identity, capabilities, and neighbors on a local area network based on IEEE 802 technology, typically wired Ethernet.

  • IPMI: The Intelligent Platform Management Interface (IPMI) is a set of computer interface specifications for a computer subsystem that provides management and monitoring capabilities independently of the host system CPU, firmware (BIOS or UEFI) and operating system.

  • NIS: The Network Information Service (NIS) originally designed by Sun Microsystems is a client–server directory service protocol for distributing system configuration data such as user and host names between computers on a computer network.

  • NTP: The Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks.

  • SSH: SSH or Secure Shell is a cryptographic network protocol for operating network services securely over an unsecured network.

  • VLAN: A virtual LAN (VLAN) is any broadcast domain that is partitioned and isolated in a computer network at the data link layer (OSI layer 2). LAN is the abbreviation for local area network and in this context virtual refers to a physical object recreated and altered by additional logic.

  • WebDAV: WebDAV (Web Distributed Authoring and Versioning) is an extension of the Hypertext Transfer Protocol (HTTP) that allows clients to perform remote Web content authoring operations.

  • Kerberos: Kerberos is a computer-network authentication protocol designed by MIT that works on the basis of tickets to allow nodes communicating over a non-secure network to prove their identity to one another in a secure manner.

  • NAT: Network address translation (NAT) is a method of remapping an IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic routing device.

  • VNET: VNET is the name of a technique on FreeBSD to virtualize the network stack. The basic idea is to change global resources, most notably variables, into per-network stack resources and have functions, sysctls, and eventhandlers access and handle the resources in the context of the correct instance.

  • FTP: The File Transfer Protocol (FTP) is a classic network protocol that transfers computer files between a server and a client over a computer network. FTP is built on a client-server model architecture using separate control and data connections between the client and the server.

  • AFP: The Apple Filing Protocol (AFP), formerly AppleTalk Filing Protocol, a proprietary network protocol, is part of the Apple File Service (AFS), AFP offers file services for macOS and the classic Mac OS. AFP was the primary protocol for file services, in Mac OS 9 and earlier. The protocol was deprecated starting in OS X 10.9 Mavericks, and AFP Server support was removed in macOS 11 Big Sur.

  • MAC Address: A media access control address (MAC address) is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. Within the Open Systems Interconnection (OSI) network model , MAC addresses are used in the medium access control protocol sublayer of the data link layer.

Virtualization

  • AHCI: The Advanced Host Controller Interface (AHCI) is a technical standard defined by Intel that specifies the operation of Serial ATA (SATA) host controllers in a non-implementation-specific manner in its motherboard chipsets. The specification describes a system memory structure for computer hardware to exchange data between host system memory and attached storage devices. For modern solid state drives, the interface has been superseded by NVMe.

  • VirtIO: VirtIO is a virtualization standard for network and disk device drivers where just the guest device driver knows it is running in a virtual environment, and cooperates with the hypervisor. VirtIO was chosen to be the main platform for IO virtualization in KVM.

  • UEFI: The Unified Extensible Firmware Interface (UEFI) is a specification that defines a software interface between an operating system and platform firmware. UEFI replaces the legacy Basic Input/Output System (BIOS) firmware interface originally present in all IBM PC-compatible personal computers.

  • UEFI-CSM: To ensure backward compatibility, most UEFI firmware implementations on PC-class machines also support booting in legacy BIOS mode from MBR-partitioned disks through the Compatibility Support Module (CSM). In this scenario, booting is performed in the same way as on legacy BIOS-based systems: ignoring the partition table and relying on the content of a boot sector.

  • GRUB: GNU GRUB stands for GNU GRand Unified Bootloader and is commonly referred to as GRUB. GRUB is a boot loader package from the GNU Project and the reference implementation of the Free Software Foundation (FSF) Multiboot Specification, which provides the choice to boot into one of multiple operating systems installed on a computer or select a specific kernel configuration available on a particular operating system partitions.

  • VNC: Virtual Network Computing (VNC) is a graphical desktop-sharing system that uses the remote frame buffer protocol to remotely control another computer. It transmits the keyboard and mouse events from one computer to another and relays back the graphical-screen updates through a network.

iSCSI

  • Portals: An iSCSI portal is a target IP and TCP port pair.

  • Initiator: An initiator is software or hardware that enables a host computer to send data to an external iSCSI-based storage array through a network adapter.

  • Targets: An iSCSI target is a storage resource located on an iSCSI server.

  • Extents: Extents are used to define resources to share with clients. There are two types of extents: device and file.

Bits or Bytes?

Which is it, bit or byte? And what is the difference between a bit or a byte?

Both bit and byte are basic measurements for computerized data but they represent different measurements.

A bit is the smallest unit of measure for computerized storage, and when combined with a time measurement such as seconds, becomes the common basis for determining how fast raw data bits transfer across a network, as in bits per second (bps). It is the basic unit of measurement for network bandwidth. A bit is the raw data unit, and is either a zero (0) or one (1). A bit is represented in measurements as the lower case b as it kilobits (kbs), megabits (Mbs), gigabits (Gbs), etc. When discussing the rate of speed as in bits per second (b/s or bps) you see measurements as Kbps for kilobits/second, Mbps for megabits/second, Gbps for gigabits/second, etc.

A byte is made up of eight bits and is the basic measurement for estimating storage capacity of drives or other storage media. When grouped in twos (2s), fours (4s), or eights (8s) they form words or groups of bytes, with the machine used determining the grouping size of these words. The byte is the most basic unit of measure on a machine (or device such as a hard disk drive). Bytes contain 256 permutations of eight binary digits to represent the ASCII characters, such as the letter upper or lower case “A” or an @ or other symbol. A byte can represent any number between zero and 255. Think of a byte as representing the characters stored in them. A byte is represented by the upper case B as in kilobytes (KBs), megabytes (MBs), gigabytes (GBs). A byte is the basic measurement to estimate how long it takes to exchange (store/retrieve) locally-stored information. Or for the store/retrieve rate, KBps for kilobytes/second, MBps for megabytes/second, GBps for gigabytes/second, etc. As a provider of storage, TrueNAS represents storage measures in bytes.

For TrueNAS, which is correct and do they represent the same measurement?

No they are not the same measurement. It takes eight (8) bits to make a byte, and the bit is used to estimate the speed at which data transmits across a network. The network capacity, or bandwidth, determines how fast the raw data bits transmit across it. TrueNAS refers to bits when discussing the network transmission speed of data from TrueNAS storage to another system across a network. Network provider capacity and other network related devices such as network interface cards (NICs) can either determine or influence the network transmission speeds.

A byte, or eight bits of raw data formed into words to represent characters, is the unit of measure to estimate local storage capacity (such as on a hard drive or other storage device) and measures the rate computerized data is stored or retrieved on a local storage device or system. TrueNAS, like other storage providers, uses bytes to quantify the storage capacity it provides based on the system hardware platforms it provides to customers.

To B or not to b?

Lower case b denotes bits. Lower case b because a bit is smaller than a byte.

Upper case B denotes bytes. Upper case B because the byte is larger and it takes eight bits to make a byte.

Tebibytes (TiB) verses terabytes (TB)?

What is the difference between tebibytes (TiB) and terabytes (TB) measurements? It comes down to math, the meaning of the prefixes, and changes in the computer industry.

The original standard, set by the International System of Units (SI) , is based on metric system measurements of multiples where kilo has come to represent 1000, mega a million, giga a billion, tera a trillion, and peta a quadrillion, etc.

The International Electrotechnical Commission (IEC) also uses the same prefix syllable of the name but adds the second syllable “bi” (pronounced bee). These are not part of the International System of Units (SI) but were derived from the SI positive powers of ten. The “bi” recalls the word binary. The lower case i in the measurement represents the word binary, so a tebibyte (TiB) is the unit of measure for a trillion, pebibyte for a quadrillion, etc.

Why the difference?

It comes down to math and the actual equivalent of 2^10^ which nearly equals 1000 but is actually 1024. Most people accept kilo to represent 1000. As the computer industry grew and change, the measurements of capacity grew along with it making gigabyte and terabyte more common and available but these are not based on binary trees. IEC developed a standard to address the discrepancy between binary arithmetic and decimal arithmetic. While most people understand megabyte to represent a million, computer manufacturers use megabyte to mean 2^20^ or 1,048,576 bytes when discussing memory but use 1,000,000 bytes when talking about computer storage. This can lead to confusion in the consumer mind when trying to sort out available capacity in their computer systems.

The Institute of Electrical and Electronics Engineers (IEEE) standards board decided that IEEE will use the conventional SI prefixes (mega, kilo, tera, peta, etc.) to mean, 1,000,000 for mega (and so forth). The base-two definition may be used by computer manufacturers on a case-by-case basis, and until prefixes for binary multiples are adopted by an appropriate standards body.

Controller or Node?

Controller or Node?

The terms controller and node have different meanings when used in reference to TrueNAS storage arrays and their configuration scenarios.

In general, a node runs the services or back end applications that access data on shared external disks but it is not the brains of the operation. In networking, a node can refer to a client, server, or peers. TrueNAS uses node to refer to an individual TrueNAS storage array (system) when it is a member of a cluster of systems.

A controller, or the brains of the system, is the major controlling element in a TrueNAS storage array. It manages, controls, directs, or regulates behaviors of other devices like in a storage array system. You might hear it referred to as the head unit in the the physical system hardware. TrueNAS uses controller to refer to the control unit in our physical platforms, and in TrueNAS Enterprise High Availability (HA) systems that have two controllers, a primary and standby controller. These are not nodes, they are controllers.

Understanding IPv6

What is IPv6?

IPv6 is the next generation Internet protocol replacing the current IPv4 protocol. IPv4 is running out of numbers due to the ever increasing number devices world wide wanting to connect. The rise of the Internet of Things (IoT), where smart sensors in homes, motor vehicles, and businesses all want or need to connect to the Internet to allow data collection and sharing for analytics, device maintenance and monitoring, increased safety and productivity, and overall improvement in consumer and customer experiences is a source of an ever-increasing demand for IP addresses. Because of the length and configuration of IPv6 addresses, there is little risk of this protocol running out of numbers any time soon.

IPv6 Addresses

An IPv6 address is a 128-bit alphanumeric address organized into eight groups of 16 bits with each group expressed as four-digit hexadecimal numbers separated by colons. An example of an IPv6 address is fe80:cd00:0000:0cde:1257:0000:211e:729c.

IPv6 addresses are split into two parts: a network (routing prefix) and a node component (interface ID).

The network component (commonly 64 bits) is the first part of the address and is used for routing. This component can be split into a block for global network addresses and a block network administrators can use for subnets on an internal network.

The node component is the second part of the IPv6 address. If using auto-configuration, this part of the address can be derived from a physical or MAC address, using the 64-bit extended unique identifier (EUI-64) format defined by the Institute of Electrical and Electronics Engineers (IEEE). This format is designed to provide unique addresses to any electronic device equipped with sensors and connect them for data sharing.

The IPv6 total address can be shortened. The addressing scheme allows the omission of any leading zero as well as any sequences consisting of only zeros. Using the example above, a shorted address can look like fe80:cd00:0:cde:1257:0:211e:729c.

The specific layout of IPv6 addresses can vary depending on its format. It has three basic parts: routing prefix, subnet ID, and the interface ID. The routing prefix and subnet ID can represent either global or site specific information. The interface ID can be manually or automatically configured.

What are the Benefits of IPv6?

The IPv6 protocol eliminates the need for:

Network address translation (NAT)

The structure of the 128 bit IPv6 address does not need the NAT method of remapping one IP address space into another by modifying network address information in the IP header of in-transit packets.

IPv6 uses both auto-configuration methods and the Neighbor Discovery Protocol (NDP) to resolve addresses and discover neighbors and routers so NAT is not required.

Private address collisions Private address collisions occur when the same IP address is assigned to two different devices within the same private network, which can happen if IP addresses are not properly managed. Using DHCP-assigned addresses is one way to manage IP address assignments to prevent assigning an IPv4 address to two different devices.
DHCP

IPv6 uses one of two types of auto-configuration of the device addresses, stateful or stateless address autoconfiguration (SLAAC). SLAAC allows devices to generate their own IPv6 addresses without requiring a central server like IPv4 networks that use DHCP. Devices can generate their own address by basing the interface identifier on the device MAC address. This combines with the network prefix received from the router advertisement message that includes network configuration information.

DHCPv6, which is DHCP with the v6 extension, is an alternative that can still be used in IPv6 networks for more advanced configuration options, such as DNS server assignments and additional parameters.

the IPv6 protocol adds new capabilities:

Built-in auto-configuration

IPv6 supports stateful and stateless auto-configuration (SLAAC). Stateful auto-configuration requires some human intervention because it needs a DHCPv6 server for the installation and administration of nodes. The DHCPv6 server maintains state information so the server knows how long each address is in use and when it might be available for reassignment.

Stateless auto-configuration (SLAAC) is suitable for small organizations and individuals. It can automatically configure IPv6 host parameters on an IPv6 host without the need for manual configuration or a DHCP server. Each host determines its addresses from the contents of received router advertisements and using the IEE EUI-64 standard to define the network ID portion of the address, to assume uniqueness of the host address on the link. For more information see IPv6 Stateless Address Auto-configuration (SLAAC) .

Improved multicast routing

IPv6 multicast routing uses multicast groups that logically-group devices that are interested in receiving the multicast traffic. These groups are associated with a specific multicast address, which is typically in the range of 244.0.0.0 to 239.255.255.255 (IPv4) or the IPv6 range starting with the prefix ff00::/8.

Routers in an IPv6 network must be configured to support multicast routing and enable an IPv6 multicast routing protocol like Protocol Independent Multicast (PIM) for IPv6. Routers in the network use the multicast routing protocol to determine how to forward multicast packets based on multicast group membership. Packet forwarding occurs to interfaces where devices have joined the corresponding multicast group interested in receiving the traffic. With IPv6, multicast boundaries can constrain traffic within specific boundaries or domains of the network to control propagation.

Simpler header format IPv6 headers omit the IPv4 flags and fragmentation offset, time to live (TTL), Internet header length, header checksum, and protocol bits in routing headers. It uses a flow label for identification, a traffic class that is similar to the IPv4 type of service portion of the header, and adds a hop limit, payload length, and next header. Both IPv6 and IPv4 include the source and destination in the header, but IPv4 allocates fewer bits to IPv4 headers (32 bits) than what is in IPv6 (128 bits).
Simplified, more efficient routing

IPv6 routing routes traffic through the network much the same as IPv4 using network routing protocols, routing tables and the principles of packet forwarding, but it introduces enhancements such as larger address space, simplified header formats, and improvements in routing protocols to accommodate modern network requirements.

It removes NAT and uses Neighbor Discovery Protocol (NDP) to resolve addresses and discover neighbors and routers.

Flow labeling and true quality of service (QoS)

Flow labeling is a 20-bit part in the IPv6 header. It is intended to identify packets belonging to the same flow or traffic stream. Flow labeling provides routers and network devices with a way to recognize and classify packets that are part of the same flow, such as packets that belong to a specific real time audio or video stream. This allows for more efficient handling of packets within the network.

Despite potential benefits, flow labeling adoption is currently limited. There is a lack of standardized QoS mechanisms and policies on how to make use of this field. Flow labeling depends on widespread support and consistent implementation across network devices and protocols but it not implemented this way at present.

Built-in encryption, authentication, and privacy support

IPv6 includes built-in support for authentication and privacy features to enhance security and protect network. Two key mechanism for authentication and privacy are Secure Neighbor Discovery (SEND) and Internet Protocol Security (IPsec).

Secure Neighbor Discovery (SEND) is an extension of NDP. It introduces cryptographic mechanisms for neighbor and routing authentication to ensure devices can authenticate the identity of neighboring devices and routers before establishing communication. This provides protection against various attacks such as neighbor spoofing and address theft. It also includes mechanisms for securing IPv6 address autoconfiguration to prevent unauthorized devices from obtaining valid IPv6 addresses on the network.

Internet Protocol Security (IPsec) is a suite of protocols used to secure IPv6 communications at the IP layer. IPsec originally defined two protocols for securing IP packets, Authentication Header (AH) and Encapsulating Security Payload (ESP). AH provides both data integrity and anti-replay services. ESP provides encryption and authenticates data. It can also includes Internet Key Exchange (IKE), which is used to generate shared security keys that establish security associations (SAs). A special router or firewall sitting between two networks usually handles the security associations needed for the encryption/decryption process to negotiate a security level between the two entities.

It can establish secure tunnels between IPv6 hosts or networks, encrypting all traffic passing through the tunnel and providing protection against eavesdropping and tampering. If implemented in transport mode, only the payload of IP packets is encrypted. If implemented in tunnel mode, the entire IP packet including the original IP header is encapsulated and encrypted. IPsec is widely supported in IPv6-capable devices, and is commonly used to secure communication over IPv6 networks, particularly enterprise and VPN environments.

Easier implementation of services like peer-to-peer (P2P) networks and voice over IP

Peer-to-peer (p2p) works better on IPv6 because unlike IPv4, it does not require using NAT, and therefore does not experience issues resulting from broken NAT implementations. The increased complexity required to resolve NAT-driven communication issues can also degrade performance.

Voice over IP (VoIP) on IPv6 benefits from the enhanced security in the IPsec protocol, which encrypts data at the network layer. It also experiences greater transmission speed than what IPv4 provides, and has more flexibility in endpoint access. VoIP benefits from the vast number of IPv6 addresses available that allow for globally unique IPv6 addresses. IP telephony terminals can be plug-and-play on any network, and mobile terminals can access VoIP servers remotely from anywhere at any time.

What Are the Downsides of IPv6?

Limited Adoption of IPv6 Globally IPv6 is not widely used, but ISPs worldwide are increasing their adoption of this protocol over IPv4 because it offers a significantly larger address space to support the ever growing Internet and the various devices connecting to networks through the Internet of things (IoT) and other emerging technologies.
Existing Infrastructure IPv6 Compatibility

Existing IPv4 network infrastructure components might not be IPv6-compatible. This can result in costly changes to upgrade components or replace all or some of enterprise hardware. It takes time and effort to train IT professionals on how to implement and manage IPv6 networks.

An IPv6 website or network cannot be seen by or communicated with by an IPv4 network without a gateway. IPv4 and IPv6 do not directly communicate with each other without the aid of either a gateway or other network configuration changes like dual-stacking the two protocols within the same network or deploying IPv6 tunneling to route traffic.

IPv6 Security Requirements IPv6 requires IP security where IPv4 security is optional. IPv6 uses an IPsec protocol to provide the required IP security. For more information, see IPsec (Internet Protocol Security) .

Implementing IPv6

Before implementing IPv6, there are a few things to consider:

Does your network infrastructure accommodate IPv6?

Most modern operating systems (Windows, Linux, MacOS) include IPv6 compatibility, but some Internet of Things (IoT) devices, older systems, and legacy network devices might require updates or replacement.

Organizations need to determine if the return on investment justifies the cost of converting to an all IPv6 infrastructure if your network components cannot accommodate v6 addresses. Research your current infrastructure components to determine what is required to implement the network configuration that suits your use case.

Alternatively, you can migrate to IPv6 infrastructures through a staged approach. See How enterprises can migrate from IPv4 to IPv6 for more information.

Can your network infrastructure receive and send both IPv6 and IPv4 traffic?

IPv6 and IPv4 networks cannot see or communicate with each other unless some gateway exists to allow for this. Your DNS server needs to be capable of providing name resolution for these more complex IPv6 addresses.

Specific network topology and configuration instructions and recommendations are outside the scope of this article. Consult with your IT network administrator or service provider for how to equip your network to allow communication between both IP protocols.

You can dual-stack IPv4 and IPv6.

What type of IPv6 address do you want to assign?

Internal only or publicly routable, for individual nodes or different nodes, for broadcast or point-to-point communication on the same LAN/VLAN.

There are six types of IPv6 addresses:

  • Global unicast - Addresses that are routable on the Internet and the equivalent of the public IPv4 addresses. The prefix typically ranges from 2000-3FFF.

  • Unicast - Addresses used to identify the interface of an individual node.

  • Anycast - Addresses used to identify a group of interfaces on different nodes.

  • Multicast - Address used to define multicast that send a single packet to multiple destination at one time.

  • Link local - Addresses used inside an internal network (not routed over the Internet), are self-assigned to all interfaces with the IPv6 protocol enabled. It is non-routable but can use for all point-to-point communications on the same LAN/VLAN (broadcast domain). It begins with fe80 as the prefix group.

  • Unique local - Addresses used for private networks (not routed over the Internet), and are the equivalent of the IPv4 addresses 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.

Assign either a global unicast address for publicly-accessible systems or use unique local addresses for private internal-only interfaces. When assigning publicly-accessible IPv6 addresses, research the security implication for your network and implement appropriate security measures as part of your IPv6 implementation.

IPv6 security resources:

What type of auto-configuration should you use?

IPv6 supports stateful and stateless auto-configuration (SLAAC).

Stateful auto-configuration requires some human intervention. It needs a DHCPv6 server for the installation and administration of nodes. The DHCPv6 server maintains state information so the server knows how long each address is in use and when it might be available for reassignment.

Stateless auto-configuration (SLAAC) is suitable for small organizations and individuals. SLAAC can automatically configure IPv6 host parameters on an IPv6 host without needing an IT admin to manually configure or use a DHCPv6 server to assign the IP address. Each host determines its addresses from the contents of received router advertisements and using the IEE EUI-64 standard to define the network ID portion of the address, to assume uniqueness of the host address on the link. For more information see IPv6 Stateless Address Auto-configuration (SLAAC) .

Helpful IPv6 Commands

These commands are for troubleshooting IPv6 networks:

Showing IPv6 address information

OSCommandDescription
Linuxip addrShows IPv6 address information.
MacOSifconfigShows IPv6 address information.
WindowsipconfigShows IPv6 address information.
You might need to include the /all parameter to show all IPv6 configurations in addition to the IPv4 on older windows devices.

Using IPv6 Neighbor Discovery

OSCommandDescription
Linuxip -6 neighbor showUses the IPv6 Neighbor Discovery to determine nearby nodes on the same segment. Shows the neighbor discovery table to troubleshoot or survey the environment.
MacOS`ndp-aUses the IPv6 Neighbor Discovery to determine nearby nodes on the same segment. Shows the neighbor discovery table to troubleshoot or survey the environment.
Windowsnetsh interface ipv6 show neighborsUses the IPv6 Neighbor Discovery to determine nearby nodes on the same segment. Shows the neighbor discovery table to troubleshoot or survey the environment.

Pinging a Remote Node

OSCommandDescription
Linuxping6 IPv6-addressUse to ping a remote node.
MacOSping6 IPv6-addressUse to ping a remote node.
Windowsping -6 IPv6-addressUse to ping a remote node.

Checking a Network Path

OSCommandDescription
Linuxtraceroute6 IPv6-addressUse to check the network path to a remote system.
MacOStraceroute6 IPv6-addressUse to check the network path to a remote system.
Windowstraceroute -6 IPv6-addressUse to check the network path to a remote system.
Windowstracert-6 IPv6-addressUse to trace IPv6 address routes.

Additional IPv6 Resources

For a list of available IPv6 addresses, refer to Reserved IPv6 Addresses or the IANA IPv6 Special-Purpose Address Registry .

For more information on SLAAC, refer to IPv6 Stateless Address Auto-configuration (SLAAC) . This article provide in depth explanations of the 128bit IPv6 address, how SLAAC works to detect device addresses to create unique addresses, and provides information on configuring Cisco routers for IPv6.

The Internet Society has created a guide to help organizations wade through the process of setting up IPv6.

IPMI

How do I connect to Remote Management?

TrueNAS Enterprise systems provide two modes for connecting the remote management (IPMI) features to the network. The first method is a dedicated connection via a separate Ethernet jack on the back panel of the system. On most servers, this jack is located above the USB ports near the keyboard and mouse port on the rear I/O panel. This port runs at 100Mb/s and has a link status and speed/traffic lights.

The second method is a shared connection with the first LAN port, which is the port on the lower left on the rear I/O panel. By default, remote management chooses which port to use by searching for a link when the server is initially plugged in. If there is an Ethernet link on the dedicated port, it chooses dedicated mode. If no link is detected, shared mode is chosen. The connection mode does not change while the server continues to receive power unless the LAN port mode is changed to force one port or the other in the web interface.

Remote management uses an Ethernet MAC address for communications, regardless of which port it uses, and by default obtains its own IP address using DHCP.

What are the advantages and disadvantages of dedicated mode?

One advantage of dedicated mode is that remote management traffic is kept separate from host traffic. Since heavy traffic on a shared mode connection can cause performance degradation, dedicated mode connections do not interfere with host traffic. Dedicated mode allows for separate data and control planes (networks), but requires more physical connections – one wire for the dedicated port and one for the host network connection. To avoid accidental switches to shared mode, use the web interface to configure the LAN port mode to dedicated.

What are the advantages and disadvantages of shared mode?

Shared mode is the easiest way to get connected and requires no additional cabling beyond a single connection. Remote management can be configured to use an alternate VLAN ID, allowing communication on a separate VLAN from host traffic. However, Remote Management and host traffic competes for physical network access and could degrade each other in high traffic scenarios. The switch port for the shared connection must be set to auto-negotiate speed and duplex for remote management to be accessible when the system is powered down.

How do I configure IP of Remote Management?

Network configuration for remote management can happen in a number of ways. By default, remote management obtains an IP address using DHCP. The obtained address is available to standard IPMI tools or in the BIOS setup under Advanced/IPMI Configuration/IPMI LAN Configuration. If a static address is desired, the following configuration methods are available:

  1. The easiest method is to set the IP in the BIOS Setup at server deployment time. The IPMI LAN configuration is found under Advanced/IPMI Configuration/IPMI LAN Configuration.

  2. If an operating system is already installed, an IPMI-compliant local configuration tool, such as ipmitool for UNIX-style platforms, can be used to configure the network parameters. Some operating systems might require loading IPMI drivers before using tools like ipmitool and the tool might need to be configured to use the system interface instead of a network connection. When using ipmitool, the ipmitool lan feature set provides subcommands to set and view the current configuration.

How do I perform firmware updates?

Remote management firmware can be upgraded using two methods: the firmware update in the maintenance menu of the web interface or a DOS utility run on the host. For the sensors to begin recording data again, restart the host after the update . In most cases the update should be run without saving the existing configuration, though it can be saved if there is extensive network and user configuration already present that would take time to reconfigure.

What is the ipmitool and how do I get it?

ipmitool is the industry standard open source CLI tool for viewing and configuring IPMI systems. Originally written by Sun Microsystems, it has grown independently to support any IPMI-compliant system. TrueNAS Enterprise remote management is IPMI v2.0 compliant and ipmitool can make use of most of its capabilities.

For most operating systems, ipmitool is generally available in third-party package repositories. It can also be downloaded from its GitHub Repository . For local use on Linux operating systems, ipmitool requires the ipmi-si and ipmi-devintf kernel modules. On FreeBSD, the ipmi kernel module is required to provide access to the remote management hardware. No kernel modules are necessary for access to a remote server.

ipmitool is designed for CLI environments where simple management commands and a scriptable interface are needed. It supports both local (System Interface) connections and LAN connections via the lanplus interface. ipmitool also supports Serial over LAN (SOL) connections. ipmitool can be incorporated into monitoring frameworks to provide monitoring, trending, and alerting features. Some common ipmitool commands are:

ipmitool lan print – displays network configuration

ipmitool sel elist – displays expanded version of the system event log

ipmitool sensor list – displays sensors, their readings, state, and thresholds

When opening a TrueNAS Enterprise support ticket in regards to troubleshooting remote management exceptions, include the output of ipmitool sel elist and ipmitool sensor list. The output of these commands helps us determine the specific issue.

What is IPMIView?

IPMIView is a no-cost Windows application providing central control and management of multiple remote management-enabled servers. Servers can be grouped for speedy administration of multiple servers at once and their video displays can be quickly viewed without logging into each individual server remote management interface. Servers reporting trouble can be seen at-a-glance.

What is IPMICFG?

IPMICFG, for DOS, Linux, and Windows platforms, provides network configuration options as well as some hardware-specific commands, such as factory settings reset. IPMICFG can be downloaded from: ftp://ftp.supermicro.com/utility/IPMICFG/ .

How do I reset Remote Management?

In rare circumstances, remote management can malfunction and require a reset. To reset remote management, log in to the web interface and select Reset Controller from the Maintenance menu. Wait approximately two minutes before logging in to the web interface again. It might be necessary to restart the host to allow the sensors to repopulate afterward.

If the procedure above does not address the issue, remote management might need to be power-cycled by shutting down and unplugging the server for approximately 30 seconds, then reconnecting and powering up the server. This causes remote management to re-initialize itself upon the next boot.

In some cases, the software might become corrupted and need to be re-flashed. If the web interface is operational, the firmware can be reflashed as in an upgrade. If not, a DOS tool can be used to reflash the firmware. Refer to the instructions included in the readme associated with the remote management firmware for exact instructions and commands to re-flash the firmware manually.

What is Serial Over LAN?

Serial Over LAN (SOL) provides the redirection of a virtual serial port to remote management. The virtual serial port acts like a standard PC serial port and the operating system generally attaches its serial port driver automatically. In server environments, serial ports are used for the operating system console, which can then be logged to disk or accessed remotely via out-of-band means in the event of failure. On TrueNAS Enterprise systems, the SOL virtual port can appear as COM2 or COM3 depending on the system, as the virtual port is numbered after the physical serial ports and some systems have one physical port and others have two. The virtual serial port settings can be configured in the BIOS Setup. By default, the BIOS is configured to copy its screen output to the virtual serial port so the BIOS can be manipulated via SOL. The SOL serial port can be connected to and viewed using IPMI SOL-compliant tools such as ipmitool or by an applet in the web GUI. Authentication is required to connect to the port and the connection can be encrypted if supported by the tool.

L2ARC

ZFS has several features to help improve performance for frequent access data read operations. One is Adaptive Replacement Cache (ARC), which uses the server memory (RAM). The other is second-level adaptive replacement cache (L2ARC), which uses cache drives added to ZFS storage pools. These cache drives are multi-level cell (MLC) SSD drives and, while slower than system memory, are still much faster than standard hard drives. ZFS (including TrueNAS) uses all of the RAM installed in a system to make the ARC as large as possible, but this can be very expensive. Cache drives provide a cheaper alternative to RAM for frequently accessed data.

How Does L2ARC Work?

When a system gets read requests, ZFS uses ARC (RAM) to serve those requests. When the ARC is full, and there are L2ARC drives allocated to a ZFS pool, ZFS uses the L2ARC to serve the read requests that overflowed from the ARC. This reduces the use of slower hard drives and therefore increases system performance.

Implementation in TrueNAS

TrueNAS integrates L2ARC management in the web interface Storage section. Specifically, adding a Cache vdev to a new or existing pool and allocating drives to that pool enables L2ARC for that specific storage pool.

Cached drives are always striped, not mirrored. To increase an existing L2ARC size, stripe another cache device with it. You cannot share dedicated L2ARC devices between ZFS pools.

A cache device failure does not affect the integrity of the pool, but it might impact read performance depending on the workload and the dataset size-to-cache size ratio.

Beginning in TrueNAS 27 (OpenZFS 2.4), L2ARC uses a revised write algorithm designed to produce steadier write rates and that better protects cache device endurance.

Multi-Sublist Scanning

Previous versions scanned ARC eviction lists one sublist at a time, and somewhat randomly, which could cause bursty and inconsistent L2ARC population. New algorithm scans across all sublists evenly within each write burst, distributing headroom consistently and reducing gaps in cache coverage.

Persistent Scan Positions

L2ARC now saves its scan position between iterations on larger cache devices (usage at or above half of arc_c_max), instead of always re-scanning from the tail of the eviction list. This reduces CPU overhead. Smaller devices retain the original head/tail scanning behavior based on ARC warmup state.

Per-Device Feed Threads

Each L2ARC device now runs its own feed thread instead of sharing a single global thread, allowing devices to write in parallel. Write throughput scales with the number of cache devices in the pool.

Drive Writes Per Day (DWPD) Rate Limiting

L2ARC write speed is now governed by a drive writes per day (DWPD) budget instead of the older boost/interval-based approach. This is intended to produce stable, predictable write rates and reduce unnecessary wear on cache SSDs. In this DWPD:

  • The l2arc_dwpd_limit tunable sets the allowed writes per day, as a multiple of device capacity (default: 1).
  • The unused write budget accumulates over a rolling 24-hour period and carries over.
  • The writes occur in controlled bursts (up to 50 MB) with adaptive intervals to hit the target rate.
  • The rate limiting applies only after the cache device’s initial fill, once total L2ARC usage reaches half of arc_c_max. First-pass fill writes are unrestricted.
  • The l2arc_write_boost and l2arc_write_interval tunables are removed and no longer apply.

See Creating Pools for more information on adding a cache VDEV.

Persistent L2ARC in TrueNAS

When Persistent L2ARC is enabled, a sysctl repopulates the cache device mapping during the restart process, preserving L2ARC performance even after a system restarts.

TrueNAS 24.04 and later enable persistent L2ARC by default. We do not recommend disabling it.

Enabling Persistent L2ARC on Earlier TrueNAS Releases

TrueNAS releases before 24.04 have persistent L2ARC disabled by default and require manual activation.

Go to System > Tunables and click ADD. For the Variable, enter vfs.zfs.l2arc.rebuild_enabled. Set the Value to 1 and the Type to sysctl. We recommend noting in the Description that this is the persistent L2ARC activation. Make sure Enabled is selected and click SUBMIT.

Alternatively, in a command line, enter sysctl vfs.zfs.l2arc.rebuild_enabled=1. When successful, the output reads: vfs.zfs.l2arc.rebuild_enabled: 0 -> 1

Important

TrueNAS does not write settings changed through the CLI to the configuration database. TrueNAS resets them on restarts.

Device Recommendations

Like all complicated features, deciding whether L2ARC is effective or not requires a strong understanding of your storage environment, performance goals, and the software you are using.

However, we have a few recommendations for L2ARC devices:

  • Using multiple L2ARC devices helps reduce latency and improve performance.

  • Using large-capacity L2ARC SSDs can benefit random read-heavy workloads. L2ARC SSDs are faster than the existing data storage drives.

  • Using an L2ARC device that is much faster than the data storage devices makes better use of its larger capacity. Sequential or streaming workloads need very fast, low-latency L2ARC devices. We recommend Enterprise-grade NVMe devices . L2ARC device capacity depends on how much faster it is than the data storage devices.

Resources

Performance

This section contains performance testing results and other publications from the TrueNAS Performance team.

Interconnect Maximum Effective Data Rates

These tables list the maximum effective data rates, in a single data flow direction, for various data interconnect protocols. A best effort attempt has been made to exclude physical link encoding overheads where appropriate.

PCI Express 5.0Maximum Effective Data Rate (One Direction)
(10242 Bytes) MiB/s(10002 Bytes) MB/s(10003 Bits) Gb/sNotes
x13,7563,93831.5
x27,5127,87763.0NVMe M.2 (M+B Key)
x415,02415,754126NVMe M.2 (M Key)
U.2/U.3 (1x4 or 2x2)
E1.S/E1.L (typical)
E3
x830,04831,508252.1E1.S/E1.L (max)
E3
x1660,09663,015504.1E3 (max)
PCI Express 4.0Maximum Effective Data Rate (One Direction)
(10242 Bytes) MiB/s(10002 Bytes) MB/s(10003 Bits) Gb/sNotes
x11,8781,96915.8
x23,7563,93831.5NVMe M.2 (M+B Key)
x47,5127,87763.0NVMe M.2 (M Key)
U.2/U.3 (1x4 or 2x2)
E1.S/E1.L (typical)
E3
x815,02415,754126.0E1.S/E1.L (max)
E3
x1630,04831,508252.1E3 (max)
PCI Express 3.0Maximum Effective Data Rate (One Direction)
(10242 Bytes) MiB/s(10002 Bytes) MB/s(10003 Bits) Gb/sNotes
x19399857.9
x21,8781,96915.8NVMe M.2 (M+B Key)
x43,7563,93831.5NVMe M.2 (M Key)
U.2/U.3 (1x4 or 2x2)
x87,5127,87763.0
x1615,02415,754126.0
SAS-4 (24 Gb/s)Maximum Effective Data Rate (One Direction)
(10242 Bytes) MiB/s(10002 Bytes) MB/s(10003 Bits) Gb/s
x12,2892,40019.2
x49,1559,60076.8
x818,31119,200153.6
SAS-3 (12 Gb/s)Maximum Effective Data Rate (One Direction)
(10242 Bytes) MiB/s(10002 Bytes) MB/s(10003 Bits) Gb/s
x11,1441,2009.6
x44,5784,80038.4
x89,1529,60076.8
SAS-2 & SATA 3.0 (6 Gb/s)Maximum Effective Data Rate (One Direction)
(10242 Bytes) MiB/s(10002 Bytes) MB/s(10003 Bits) Gb/s
x15726004.8
x42,2892,40019.2
x84,5764,80038.4
EthernetMaximum Effective Data Rate (One Direction)
(10242 Bytes) MiB/s(10002 Bytes) MB/s(10003 Bits) Gb/s
1 GbE1191251.0
10 GbE1,1921,25010.0
25 GbE2,9803,12525.0
40 GbE4,7685,00040.0
100 GbE11,92012,500100.0
200 GbE23,84225,000200.0
400 GbE47,68450,000400.0
Fibre ChannelMaximum Effective Data Rate (One Direction)
(10242 Bytes) MiB/s(10002 Bytes) MB/s(10003 Bits) Gb/s
8 Gb7738106.5
16 Gb1,5451,62013.0
32 Gb3,0913,24125.9
64 Gb6,5436,86154.9

SMB Directory List Times

TrueNAS and ZFS by default can support large numbers of files. Per directory this can grow to 281+ trillion and per file system there is no upper limit. However, these are theoritical limits, and there are host and client side practical limits dealing with large quantity of files. Specifically when it comes to how fast you can list or “enumerate” them.

Starting in Dragonfish 24.04 and later, the meta-data performance of directory listings over SMB is greatly improved. Depending on your SMB client, it is possible to support a single directory with anywhere from 100,000 to 1,000,000 files on flash systems with decent load times.

The TrueNAS team has done some very preliminary testing to provide guidance on the approximate time ranges that are possible. Users should understand that as directory file counts increase, listing times increase too.

Hardware Limitations

CPU and Memory speed play a major factor in metadata listing times. For this testing, flash media was used. Spinning disks will generally not perform at the same speeds as flash.

These numbers are provided as rough guides as to what kind of performance might be expected. Many external factors can impact this and your mileage might vary.

Test System Specifications:

  • CPU: Intel i5-12600
  • Memory: 64GB
  • Storage: SAS Flash - Two-Drive ZFS Mirror

Workload: 1K, 100K and 200K Mixed PNG Data

File Count
Operating System100K250K500K1 Million
Windows 111.5~ Seconds4-6~ Seconds7-10~ Seconds14-20~ Seconds
OS X (Sonoma)15.5 MinutesDid not runDid not runDid not run
Ubuntu - File Manager (GUI)13-15~ Seconds1~ MinuteDid not runDid not run
Linux SMB (In-Kernel CIFS CLI)3~ Seconds8~ Seconds17~ Seconds30~ Seconds
Linux smbclient (Userspace CLI)1.2~ Seconds4~ Seconds6~ Seconds12-14~ Seconds

SLOG Devices

To improve read performance, ZFS uses system memory as an Adaptive Replacement Cache (ARC). System memory stores the most frequent and recent ZFS pool data used. Layer 2 ARC (L2ARC ) is another option to extend the ARC to dedicated disks for dramatic improvement in read speeds versus slower data disks in the pool.

Another OpenZFS performance feature is the ZFS intent log (ZIL). The ZIL writes synchronous transactions to disk in special pre-allocated space so ZFS can confirm that data is on non-volatile storage, providing lower latency for synchronous writes. The data is then written to disk in a normal transaction group (TXG) which allows reusing of the ZIL space for further writes.

ZIL is often referred to as a log whose main purpose is data integrity. The ZIL exists to track in-progress, synchronous write operations. If the system crashes or loses power, the ZIL can replay the operation. While you lose a standard system cache on power failure, a ZIL persists through system restarts.

By default, ZIL does not handle asynchronous writes. System memory handles these like any standard caching method. This means the ZIL only works for select use cases, like database storage or virtualization over Network File System (NFS). OpenZFS does allow using the ZIL for added data integrity protection with asynchronous writes.

You can further improve ZIL performance by using a dedicated vdev called a separate intent log (SLOG). A SLOG moves the ZIL to a dedicated SSD(s) instead of a section of the data disks to function. This can provide a large benefit due to lower latency of a SLOG on SSD(s) vs data disks.

SLOG Use Case

A ZIL alone does not improve performance. Every ZFS data pool uses a ZIL that is stored on disk to log synchronous writes before flushing to a final location in the storage. This means synchronous writes operate at the speed of the storage pool and must write to the pool twice or more (depending on disk redundancy).

A separate high-speed SLOG device provides the performance improvements so ZIL-based writes are not limited by pool input/outputs per second (IOPS) or penalized by the RAID configuration. Using a SLOG for ZIL is recommended for database applications, NFS environments, virtualization, and data backups. In general, a storage environment with heavy synchronous writes benefits from using a SLOG for the pool ZIL.

SLOG Devices

Disk latency and write endurance capability are the primary concern for slog devices. You might need multiple striped slog devices to reach write endurance and the synchronous write throughput needs of each slog device. Combined SLOG write throughput should be higher than the planned synchronous write throughput of the pool.

The current TrueNAS project recommendation is a 16 GB SLOG device over-provisioned from larger SSDs to increase the write endurance and throughput of an individual SSD, though this is not the only usable size for SLOG devices. This 16 GB size recommendation is based on performance characteristics of typical HDD pools with SSD SLOGs and capped by the value of the tunable vfs.zfs.dirty_data_max_max.

TrueNAS Enterprise appliances might have an additional platform specific auto-tuning set and are built with SLOG devices specifically set up for the performance of that appliance.

TrueNAS Implementation

Add and manage SLOG devices in the Storage > Pools web interface area. When creating or expanding a pool, open the ADD VDEV dropdown list and select the Log. Allocate SSDs into this vdev according to your use case.

Users can exercise an optional step to avoid data loss from device failure or any performance degradation by arranging the Log VDev as a mirror. The drives must be the same size. As stated earlier, the recommended drive size is 16 GB after over-provisioning. See the SLOG over-provisioning guide for more information.

SLOG for Asynchronous Writes

By default, SLOG is not used for asynchronous writes. In some scenarios that require additional transactional data safety, such as iSCSI, dataset/ZVOLSync setting can turn asynchronous writes into synchronous, using SLOG, if available. To do this go to Storage > Pools and for the dataset/ZVOL click and select Edit Options from the drop-down list. Set Sync to Always and click SAVE.

Server Message Block (SMB)

Server Message Block (SMB) shares, also known as Common Internet File System (CIFS) shares, are accessible by Windows, macOS, Linux, and BSD computers. SMB provides more configuration options than NFS and is a good choice on a network for Windows or Mac systems.

TrueNAS uses Samba to share pools using Microsoft SMB protocol. SMB is built into the Windows and macOS operating systems, and most Linux and BSD systems pre-install an SMB client to support the SMB protocol.

The maximum file size for a write request is determined from MS-FSA section 2.1.5.4 (Server Requests a Write) . The maximum file size in TrueNAS 24.10.1 and later versions is 64 TiB. 24.10.0.2 and earlier versions limit file size to 16 TiB.

The SMB protocol supports many different types of configuration scenarios, ranging from the simple to complex. The complexity of the scenario depends upon the types and versions of the client operating systems that connect to the share, whether the network has a Windows server, and whether Active Directory is used. Depending on the authentication requirements, you might need to create or import users and groups.

Samba supports server-side copy of files on the same share with clients from Windows 8 and higher. Copying between two different shares is not server-side. Windows 7 clients support server-side copying with Robocopy .

SMB Tips and Tricks shows helpful hints for configuring and managing SMB networking.

Another helpful reference is Methods For Fine-Tuning Samba Permissions .

SMB1 Protocol Deprecation

As of TrueNAS 22.12 (Bluefin) and later, TrueNAS does not support SMB client operating systems that are labeled by their vendor as End of Life or End of Support. This means MS-DOS (including Windows 98) clients, among others, cannot connect to TrueNAS SMB servers.

The upstream Samba project that TrueNAS uses for SMB features notes in the 4.11 release that the SMB1 protocol is deprecated and warns portions of the protocol might be further removed in future releases. Administrators should work to phase out any clients using the SMB1 protocol from their environments.

Note: the SMB1 protocol is disabled by default .

By default, Samba disables NTLMv1 authentication for security. If legacy clients require NTLMv1 authentication, enable it by selecting NTLMv1 Auth in the SMB service configuration screen. NTLMv1 is insecure and vulnerable. We recommend using modern operating systems that support NTLMv2 or Kerberos.

Microsoft NTLM Network Authentication Changes

Microsoft is deprecating NTLM network authentication in a staged process. Windows 11 version 24H2, Windows Server 2025, and later versions have removed NTLMv1 network authentication. See Upcoming changes to NTLMv1 in Windows 11 version 24H2 and Windows Server 2025 for more information. Microsoft also plans to disable all NTLM authentication by default in a future major Windows release. See Advancing Windows Security: Disabling NTLM by Default for more information.

Enterprise and Active Directory deployments are not affected by either change. TrueNAS SMB deployments that use Active Directory rely on Kerberos authentication and are unaffected by these changes. Active Directory remains the recommended configuration for business and enterprise SMB deployments.

Home and workgroup deployments that use local TrueNAS accounts are affected as follows:

  • The NTLMv1 Auth setting in the TrueNAS SMB service has no effect for Windows 11 (version 24H2 and later) or Windows Server 2025 clients, which no longer send NTLMv1. This setting might still be relevant for legacy or non-Windows devices that use NTLMv1.
  • Windows clients using NTLMv2 (standard for workgroup and local account SMB access) currently connect without issue. These clients lose SMB access when Microsoft enforces the full NTLM disable-by-default in a future Windows release. macOS, Linux, older Windows versions, and network-attached devices such as printers and MFPs are not affected. When that change takes effect, re-enabling NTLM in Windows security policy is a temporary workaround.

TrueNAS plans to add improved authentication support for home and workgroup users in a future release, dependent on upstream development in Samba.

Most configuration scenarios require each user to have their own user account and to authenticate before accessing the share. This allows the administrator to control access to data, provide appropriate permissions to that data, and to determine who accesses and modifies stored data. A Windows domain controller is not needed for authenticated SMB shares, which means that additional licensing costs are not required. However, because there is no domain controller to provide authentication for the network, each user account must be created on the TrueNAS system. This type of configuration scenario is often used in home and small networks as it does not scale well if many user accounts are needed.

Shadow Copies , also known as the Volume Shadow Copy Service (VSS) or previous versions, is a Microsoft service for creating volume snapshots. Shadow copies can be used to restore previous versions of files from within Windows Explorer.

By default, all ZFS snapshots for a dataset underlying an SMB share path are presented to SMB clients through the volume shadow copy service (or accessible directly with SMB if the hidden ZFS snapshot directory is located within the path of the SMB share).

Before using shadow copies with TrueNAS, be aware of these caveats:

  • If the Windows system is not fully patched to the latest service pack, Shadow Copies might not work. If no previous versions of files to restore are visible, use Windows Update to ensure the system is fully up-to-date.

  • Shadow copy support only works for ZFS pools or datasets.

  • Appropriate permissions must be configured on the pool or dataset being shared by SMB.

  • Users cannot delete shadow copies via an SMB client. Instead, the administrator can remove snapshots from the TrueNAS web interface. Shadow copies can be disabled for an SMB share by unsetting the Enable shadow copies advanced option for the SMB share. Note that this does not prevent access to the hidden .zfs/snapshot directory for a ZFS dataset if it is located within the Path for an SMB share.

macOS includes the Time Machine feature which performs automatic backups. TrueNAS supports Time Machine backups for both SMB and AFP shares.

Configuring a quota for each Time Machine share helps prevent backups from using all available space on the TrueNAS system. Time Machine waits two minutes before creating a full backup. It then creates ongoing hourly, daily, weekly, and monthly backups. The oldest backups are deleted when a Time Machine share fills up, so make sure that the quota size is large enough to hold the desired number of backups. A default installation of macOS is over 20 GiB.

Currently maintained macOS versions allow setting maximum time machine backup sizes from the client, which provides even greater flexibility over setting a share-wide quota.

See vfs_fruit(8) and the Apple documentation for detailed Time Machine configuration instructions.

Thin Provisioning

Thin provisioning is a storage management technique used to optimize storage utilization and efficiency. It allows administrators to allocate storage capacity dynamically, on an as-needed basis, rather than allocating it all upfront.

How Does Thin Provisioning Work?

Traditional thick storage allocation involves dedicating a specific amount of physical storage space for each zvol upfront, regardless of whether that space is immediately used. This can lead to inefficient use of storage resources and increased costs.

Thin provisioning, on the other hand, enables administrators to allocate storage space virtually, without immediately assigning physical storage. When a new zvol is created, it is assigned a size limit, but it consumes physical storage only as data is actually written to the volume. This allows for more flexible and efficient use of storage resources.

Enabling Thin Provisioning

When creating zvols in TrueNAS, select to create the zvol as sparse.

Once a zvol is created, you cannot change the Sparse option through the GUI; you must recreate the zvol.

Benefits of Thin Provisioning

Thin provisioning helps your organization utilize storage resources more efficiently. By using the dynamic, in-line compression available in TrueNAS, you can maximize your available storage capacity.

Organizations can reduce capital expenditures on storage hardware by leveraging data-reduction features such as thin provisioning.

Risk of Over-Allocation

While thin provisioning offers flexibility and efficiency, organizations risk over-allocating storage capacity if they do not manage it properly. It is essential for organizations to configure and monitor free space alerts in TrueNAS to avoid unexpected depletion of physical storage.

Recommendations

When using TrueNAS to present block storage to devices that support TRIM or UNMAP functionality to reclaim disk space, organizations should create the underlying zvols as sparse volumes. This allows TrueNAS to coordinate with the guest operating system to free the underlying physical space on the storage, ensuring optimal space utilization and efficiency. Most modern operating systems and hypervisors default to this behavior, but organizations should verify it.

Validation Examples

Windows

Run the command fsutil behavior query DisableDeleteNotify in the command prompt and observe the results. If either filesystem shows that DisableDeleteNotify is set to 1, the TRIM functionality is disabled, and should be re-enabled.

Linux

Run lsblk -D and verify that the contents of the DISC-GRAN and DISC-MAX columns are non-zero, indicating the granularity and maximum discard segment.

VMware

Verify in the VMware UI that automatic space reclamation is enabled for your datastore.

You can also use the esxcli tools to confirm this by using the NAA ID of your datastore.

ZFS Deduplication

ZFS supports deduplication as a feature. Deduplication means that identical data is only stored once, which can significantly reduce storage size. However, deduplication is a compromise and balance between many factors, including cost, speed, and resource needs. Consider and understand the implications of using deduplication before adding it to a pool.

Deduplication on ZFS

Deduplication is one technique ZFS can use to store files and other data in a pool. If several files contain the same pieces (blocks) of data or any other pool data occurs more than once in the pool, ZFS stores just one copy of it. Instead of storing many copies of a book it stores one copy and an arbitrary number of pointers to that one copy. Only when no file uses the data is the data deleted. ZFS keeps a reference table that links files and pool data to the actual storage blocks containing their data. This is the deduplication table (DDT).

The DDT is a fundamental ZFS structure and is part of the metadata or the pool. If a pool (or any dataset in the pool) has ever contained deduplicated data, the pool contains a DDT, and that DDT is as fundamental to the pool data as any of its other file system tables. Like any other metadata, DDT contents might be temporarily held in the ARC (RAM/memory cache) or L2ARC (disk cache) for speed and repeated use, but the DDT is not a disk cache. It is a fundamental part of the ZFS pool structure and how ZFS organizes pool data on its disks. Therefore, like any other pool data, if DDT data is lost, the pool is likely to become unreadable. DDT is not needed for reads, but any writes or deletions of deduplicated blocks. So, it is important to store on redundant devices.

A pool can contain any coexisting mix of deduplicated data and non-deduplicated data. If deduplication is enabled at the time of writing, the DDT is used to write data. It writes non-deduplicated data if deduplication is not enabled at the time of writing. Subsequently, the data remains the same as it was at the time it was written until it is deleted.  

The only way to convert existing current data to all deduplicated or non-deduplicated or to change how it is deduplicated is to create a new copy while new settings are active.
Copy the data within a file system or to a different file system, or replicate it using the Web UI replication functions. Data in snapshots is fixed and can only be changed by replicating the snapshot to a different pool with different settings (which preserves its snapshot status) or copying its contents.

It is possible to stipulate deduplicating only specified datasets and volumes in a pool. The DDT encompasses the entire pool, but only data in these locations is deduplicated when written. Other data not well deduplicated or where deduplication is not appropriate, is not deduplicated when written, saving resources.

Fast Deduplication on ZFS

Fast deduplication is a feature included in OpenZFS 2.3.0. It makes backend changes to legacy deduplication in ZFS that improve performance and can reduce latency in some use cases. These improvements speed up I/O processes, look-ups, and reclaim storage space, and in situations where pools are handling reasonable workloads, improve latency over legacy dedup. Fast deduplication accomplishes these improvements through four new functions: DDT log, prefetch, pruning, and a quota.

DDT Log

Instead of writing DDT entries in random order as they arrive, which causes excessive write inflation, and since single DDT record writes might require a whole ZFS attribute processor (ZAP) leaf block, fast dedup temporarily writes them into a log, flushing it into actual DDT ZAP only after sorting. Improving write locality allows aggregating multiple DDT entry writes into one ZAP leaf write.

Prefetch

Prefetch fills the ARC cache by loading deduplication tables into it. Loading the DDT into memory speeds up operations by reducing on-demand disk reads for every record the system processes. The prefetch is particularly important in systems with large deduplication tables (DDTs) where loading the table on demand can take days after an import/reboot. The prefetch might also be used to reload portions of a DDT evicted due to inactivity into the ARC.

Pruning

Pruning cleans up old, non-duplicate (unique) records in the deduplication table (DDT) to reclaim storage and improve performance in ZFS when the DDT becomes too large. Reclaiming available space is a prerequisite to the deduplication table (DDT) quota and pruning functions.

How does pruning work? Pruning reduces the size of the deduplication table (DDT) by removing unique entries created more than a specified time ago. It assumes that if some block has no duplicates since that time, it might never have them in the future, and so tracking this wastes resources. Since the blocks with DDT entries removed can never be deduplicated again, this might reduce deduplication efficiency if the assumptions appear false. So pruning should be used reasonably, either if the DDT size becomes too big for the system to manage, or if we are sure that we know that for the workload of a specific system, the older blocks likely remain unique forever. To free up more space and improve efficiency, DDT pruning works in combination with ZAP shrinking. ZFS Attribute Processor is a data structure used to store directories and a number of other tables, including DDT. ZAP consists of a hash table and a (large) number of leaf blocks, each storing the entries for a range of hash table prefixes. When ZAP detects two empty adjacent leaf blocks, it frees one of them, making its sibling handle both of their prefixes. In case of massive entry removals, the process might be repeated multiple times. If more entries are added some of the remaining blocks get overflowed later, the new sibling for it is allocated and the entries are split between them by dividing the hash prefix.

Quota

Quota manages the deduplication table (DDT) by keeping it from unbounded growth that can hurt RAM and performance. Setting a quota for the on-disk DDT effectively disables new entries for blocks if the allotted space reaches the upper limit. It works for both legacy and fast dedup tables.

There are three quota options: Auto, Custom, and None. Auto is the default option that allows the system to determine the quota, and the size of a dedicated dedup vdev is used as the quota limit. Custom allows administrators to set a quota. None leaves the DDT unrestricted and disables the quota.

How does quota work?

Quota uses two new pool properties, table size and quota. Table size is the total size of all DDTs on the pool. Table quota is the maximum possible size of all DDTs in the pool.

When set, the quota checks for a new entry about to be created. When a pool exceeds the set quota, the entry is not created and the corresponding write is converted to a regular non-dedup write. Updating existing entries is allowed because this reuses space rather than requiring more space.

Quota options determine the behavior. Auto sets quota based on the size of the devices backing the dedup allocation class. This makes it possible to limit the DDTs to the size of a dedup vdev only. When the device fills, no new blocks are deduplicated. If the quota is set to zero, it translates to None.

If a dedup table already exists and is larger than this size, it is not removed as part of setting a quota. Existing entry reference counts are still updated. The actual size limit of the table can be above or below the quota depending on the actual on-disk size of the entries (which can be approximated for purposes of calculating the quota).

Reclaiming this space after deleting entries relies on ZAP shrinking behavior (see Pruning). Pruning allows reclaiming space. If space is not recovered the DDT is still considered over quota.

Deduplication Benefits

The main benefit of deduplication is that, where appropriate, it can greatly reduce the size of a pool and the disk count and cost. For example, if a server stores files with identical blocks, it could store thousands or even millions of copies for almost no extra disk space. When data is read or written, it is also possible that a large block read or write can be replaced by a smaller DDT read or write, reducing disk I/O size and quantity.

Costs

The deduplication process is very demanding! There are four main costs to using deduplication: large amounts of RAM, requiring fast SSDs, CPU resources, and a general performance reduction. The trade-off with deduplication is reduced server RAM/CPU/SSD performance and loss of top-end I/O speeds in exchange for saving storage size and pool expenditures.

Reduced I/O Deduplication requires almost immediate access to the DDT. In a deduplicated pool, every block potentially needs DDT access. The number of small I/Os can be colossal; copying a 300 GB file could require tens, perhaps hundreds of millions of 4K I/O to the DDT. This is extremely punishing and slow. RAM must be large enough to store the entire DDT and any other metadata and the pool is commonly is configured using fast, high-quality SSDs allocated as special vdevs for metadata. Data rates of 50,000-300,000 4K I/O per second (IOPS) have been reported by the TrueNAS community for SSDs handling DDT. When the available RAM is insufficient, the pool runs extremely slowly. When the SSDs are unreliable or slow under mixed sustained loads, the pool can also slow down or even lose data if enough SSDs fail.
CPU Consumption Deduplication is extremely CPU intensive. Hashing is a complex operation and deduplication uses it on every read and write. It is possible for some operations (notably scrub and other intense activities) to use an entire 8 - 32 core CPU to meet the computational demand required for deduplication.
Reduced ZFS Performance Deduplication adds extra lookups and hashing calculations into the ZFS data pathway, which slows ZFS down significantly. A deduplicated pool does not reach the same speeds as a non-deduplicated pool.

When data is not sufficiently duplicated, deduplication wastes resources, slows the server down, and has no benefit. When data is already being heavily duplicated, then consider the costs, hardware demands, and impact of enabling deduplication before enabling on a ZFS pool.

Hardware Recommendations

Disks

High-quality mirrored SSDs configured as a special vdev for the DDT (and usually all metadata) are strongly recommended for deduplication unless the entire pool is built with high-quality SSDs. Expect potentially severe issues if these are not used as described below. NVMe SSDs are recommended whenever possible. SSDs must be large enough to store all metadata.

The deduplication table (DDT) contains small entries about 300-900 bytes in size. It is primarily accessed using 4K reads. This places extreme demand on the disks containing the DDT.

When choosing SSDs, remember that a deduplication-enabled server can have considerable mixed I/O and very long sustained access with deduplication. Try to find real-world performance data wherever possible. It is recommended to use SSDs that do not rely on a limited amount of fast cache to bolster a weak continual bandwidth performance. Most SSD performance (latency) drops when the onboard cache is fully used and more writes occur. Always review the steady state performance for 4K random mixed read/write.

Special vdev SSDs receive continuous, heavy I/O. HDDs and many common SSDs are inadequate. As of 2021, some recommended SSDs for deduplicated ZFS include Intel Optane 900p, 905p, P48xx, and better devices. Lower-cost solutions are high-quality consumer SSDs such as the Samsung EVO and PRO models. PCIe NVMe SSDs (NVMe, M.2 “M” key, or U.2) are recommended over SATA SSDs (SATA or M.2 “B” key).

When special vdevs cannot contain all the pool metadata, then metadata is silently stored on other disks in the pool. When special vdevs become too full (about 85%-90% usage), ZFS cannot run optimally and the disks operate slower. Try to keep special vdev usage under 65%-70% capacity whenever possible. Try to plan how much future data you wan to add to the pool, as this increases the amount of metadata in the pool. More special vdevs can be added to a pool when more metadata storage is needed.

RAM

Deduplication is memory intensive. When the system does not contain sufficient RAM, it cannot cache DDT in memory when read, and system performance can decrease.

The RAM requirement depends on the size of the DDT and the amount of stored data to be added to the pool, and the more duplicated the data, the fewer entries, and smaller DDT. Pools suitable for deduplication, with deduplication ratios of 3x or more (data can be reduced to a third or less in size), might only need 1-3 GB of RAM per 1 TB of data. The actual DDT size can be estimated by deduplicating a limited amount of data in a temporary test pool.

CPU

Deduplication consumes extensive CPU resources and it is recommended to use a high-end CPU with 4-6 cores at minimum.

Identifying Inadequate Hardware

If deduplication is used in an inadequately built system, these symptoms might be seen:

  • Cause: The system must perform disk I/O to fetch DDT entries, but these are usually 4K I/O and the underlying disk hardware is unable to cope in a timely manner.
  • Solutions: Add high-quality SSDs as a special vdev and either move the data or rebuild the pool to use the new storage.
  • Cause: This is a byproduct of the disk I/O slowdown issue. Network buffers can become congested with incomplete demands for file data and the entire ZFS I/O system is delayed by tens or hundreds of seconds because huge amounts of DDT entries have to be fetched. Timeouts occur when networking buffers can no longer handle the demand. Because all services on a network connection share the same buffers, all become blocked. This is usually seen as file activity working for a while and then unexpectedly stalling. File and networked sessions then fail too. Services can become responsive when the disk I/O backlog clears, but this can take several minutes. This problem is more likely when high-speed networking is used because the network buffers fill faster.
  • Cause: When ZFS has fast, special vdev SSD disks, sufficient RAM, and is not limited by disk I/O, then the hash calculation becomes the next bottleneck. Most of the ZFS CPU consumption is from attempting to keep hashing up to date with disk I/O. When the CPU is overburdened, the console becomes unresponsive and the web UI fails to connect. Other tasks might not run properly because of timeouts. This is often encountered with pool scrubs and it can be necessary to pause the scrub temporarily when other tasks are a priority.
  • Diagnose: An easily seen symptom is that console logins or prompts take several seconds to display. Generally, multiple entries with command kernel {z_rd_int_[NUMBER]} can be seen using the CPU capacity, and the CPU is heavily (98%+) used with almost no idle.
  • Solutions: Changing to a higher-performance CPU can help but might have limited benefits. 40-core CPUs have been observed to struggle as much as 4- or 8-core CPUs. A usual workaround is to temporarily pause scrub and other background ZFS activities that generate large amounts of hashing. It can also be possible to limit I/O using tunables that control disk queues and disk I/O ceilings, but this can impact general performance and is not recommended.
Hashing Note Deduplication hashes (calculates a digital signature) for the data in each block to be written to disk and checking to see if data already exists in the pool with the same hash. When a block exists with the same hash, the block is not written and a reference count is incremented in the DDT, saving that space. Depending on how the hash is calculated, there is a possibility that two different blocks could have the same hash and cause the file system to believe the blocks are the same. To minimize this risk, choose a complex hash like SHA 256, SHA 512, and Skein. A SHA 512 checksum hash is recommended for 64-bit platforms.

Additional Resources

ZFS Primer

Zettabyte File system (ZFS) is an advanced, modern file system specifically designed to provide features not available in traditional UNIX file systems. Sun originally developed and intended ZFS to be an open-source file system that can be ported to other operating systems. After the Oracle acquisition of Sun, some of the original ZFS engineers founded OpenZFS to provide continued, collaborative development of the open source version.

ZFS Feature Overview

Here is an overview of the features provided by ZFS.

ZFS Copy-On-Write (COW) File System

ZFS is a transactional, Copy-On-Write (COW ) file system. For each write request, a copy is made of the associated disk blocks and all changes are made to the copy rather than to the original blocks. When the write completes, all block pointers change to point to the new copy. This means that ZFS always writes to free space. Most writes are sequential, and old versions of files are not unlinked until it writes a complete new version.

ZFS has direct access to disks and bundles multiple read and write requests into transactions. Most file systems cannot do this, as they only have access to disk blocks. A transaction either completes or fails, meaning there are never write holes. A write-hole is a traditional parity RAID failure that applies to any stripe plus parity RAID layout like RAID4, RAID5, etc.

With ZFS, you do not need file system checker utilities. Because of the transactional design, any storage capacity you add immediately becomes available for writes. To re-balance the data, one can copy it to rewrite the existing data across all available disks. As a 128-bit file system, the maximum file system or file size is 16 exabytes.

ZFS Self-Healing File System

ZFS is a self-healing file system. As ZFS writes data, it creates a checksum for each disk block. As ZFS reads data, it validates the checksum for each disk block. Media errors or bit rot can change data and cause unmatched checksums. When ZFS identifies a disk block checksum error on a pool that is mirrored or uses RAIDZ, it replaces the corrupted data with the correct data. Since ZFS rarely reads some disk blocks, you should schedule regular scrubs so that ZFS can read all the data blocks to validate their checksums and correct any corrupted blocks. While providing redundancy and data correction requires multiple disks, ZFS still provides data corruption detection to a system with one disk. TrueNAS automatically schedules a monthly scrub for each ZFS pool. Checking scrub results provides an early indication of potential disk problems.

ZFS Partition Sizes and File Systems

ZFS does not need defined partition sizes when creating file systems. Unlike traditional UNIX file systems, you do not need to define partition sizes when creating file systems. Instead, a ZFS pool uses a built-in group of disks called a vdev. You can create file systems from the pool as needed. As you need more capacity, stripe identical vdevs into the pool. After creating a pool, you can divide it into dynamically-sized datasets or fixed-size zvols as needed. Use datasets to optimize storage for the type of stored data. You can set permissions and properties such as quotas and compression on a per-dataset level. A zvol is a raw, virtual block device that you can use for applications that need raw-device semantics, such as iSCSI device extents.

ZFS Real-Time Data Compression

ZFS supports real-time data compression. Compression happens when writing a block to disk, but only if the written data benefits from compression. When accessing a compressed block, it is automatically decompressed. Since compression happens at the block level and not at the file level, it is transparent to any applications accessing the compressed data. The LZ4 compression algorithm is generally recommended for new pools.

ZFS Snapshots

ZFS provides low-cost, instantaneous snapshots of a specified pool, dataset, or zvol. Due to COW, snapshots initially take no additional space. The size of a snapshot increases over time as changes to the files in the snapshot write to disks. You can use snapshots to provide a copy of data at the point in time you created the snapshot. When you delete a file, ZFS adds the file disk blocks to the free list. However, ZFS does not add the blocks for that file in any existing snapshots to the free list until you remove all referencing snapshots. Snapshots are a clever way to keep a history of files, and they are useful for recovering an older copy of a file or a deleted file. For this reason, many administrators take snapshots often and store them for a period of time on another system. Such a strategy allows the administrator to roll the system back to a specific time. For example, if there is a catastrophic loss, you can use an off-site snapshot to restore the system to the last snapshot interval within 15 minutes of the data loss.

ZFS stores snapshots locally, but you can also replicate them to a remote ZFS pool. During replication, ZFS does not do a byte-for-byte copy but instead converts a snapshot into a stream of data. This design means that the ZFS pool on the receiving end does not need to be identical and can use a different RAIDZ level, volume size, or compression settings.

ZFS Boot Environments

ZFS boot environments allow you to recover from a failed upgrade. TrueNAS automatically takes a snapshot of the dataset the operating system resides on before upgrading or updating a system. TrueNAS automatically saves the boot environment to the GRUB boot loader. If the upgrade or configuration change fails, restart and select the previous boot environment from the boot menu. Users can also create boot environments in TrueNAS as needed, such as before making configuration changes. This way, you can restart the system into a snapshot of the system that did not include the new configuration changes.

ZFS Write Cache

ZFS provides a write cache in RAM as well as a ZFS Intent Log (ZIL . The ZIL is a storage area that temporarily holds synchronous writes until writing them to the ZFS pool . Adding a fast (low-latency), power-protected SSD as a SLOG (Separate Log) device permits much higher performance. This is a necessity for ESXi over NFS, and highly recommended for database servers or other applications that depend on synchronous writes. More detail on SLOG benefits and usage is available in these blog and forum posts:

Synchronous writes are relatively rare with SMB, AFP, and iSCSI, and adding a SLOG to improve the performance of these protocols only makes sense in special cases. You can run the zilstat utility from the TrueNAS Shell to determine if the system can benefit from a SLOG. See this discussion about interpreting Zilstat data for additional information.

ZFS currently uses 16 GiB of space for SLOG. You can install larger SSDs, but ZFS does not use the extra space. You cannot share SLOG devices between pools. Each pool requires a separate SLOG device. Bandwidth and throughput limitations require that you only use a SLOG device for this single purpose. Do not attempt to add other caching functions on the same SSD, or performance suffers.

In mission-critical systems, we highly recommend a mirrored SLOG device. ZFS pools at ZFS version 19 or earlier require mirrored SLOG devices. Check the ZFS pool version from the TrueNAS Shell with zpool get version {poolname}. A version value of - means the ZFS pool is version 5000 (also known as Feature Flags) or later.

ZFS Read Cache

ZFS provides a read cache in RAM, known as the ARC, which reduces read latency. TrueNAS adds ARC stats to top(1) and includes the arc_summary.py and arcstat.py tools for monitoring the ARC efficiency. If an SSD is dedicated as a cache device, it is known as an L2ARC . Additional read data is cached here, which can increase random read performance. L2ARC does not reduce the need for sufficient RAM because it needs RAM to function. If the system does not have enough RAM for an adequately-sized ARC, adding an L2ARC does not increase performance. Performance decreases in most cases, potentially causing system instability. RAM is always faster than disks, so always add as much RAM as possible before considering whether the system can benefit from an L2ARC device.

When applications perform large amounts of random reads on a dataset small enough to fit into L2ARC, you can increase read performance by adding a dedicated cache device. SSD cache devices only help if the active data is larger than system RAM but small enough that a significant percentage fits on the SSD. Do not add L2ARC to a system with less than 32 GiB of RAM. The size of an L2ARC should not exceed ten times the amount of RAM. In some cases, two separate pools might be more efficient: one on SSDs for active data and another on HDDs for rarely-used content. After adding an L2ARC device, monitor its effectiveness using tools such as arcstat. To increase the size of an existing L2ARC, stripe another cache device with it. The web interface always stripes L2ARC instead of mirroring it since the system recreates L2ARC contents at boot. If an individual L2ARC pool SSD fails, it does not affect pool integrity, but it might impact read performance depending on the workload and the ratio of dataset size to cache size. You cannot share dedicated L2ARC devices between ZFS pools.

ZFS Redundancy and RAID

ZFS provides redundancy while addressing some inherent limitations of hardware RAID, such as the write-hole and corrupt data written over time before the hardware controller provides an alert. ZFS provides three levels of redundancy, known as RAIDZ, where the number after the RAIDZ indicates how many disks per vdev you can lose without losing data. ZFS also supports mirrors, with no restrictions on the number of disks in the mirror. ZFS uses commodity disks and does not need a RAID controller. While you can also use ZFS with a RAID controller, we recommend that you put the controller into JBOD mode so that ZFS has full disk control.

When determining the type of ZFS redundancy to use, consider whether the goal is to maximize disk space or performance:

  • A RAIDZ1 maximizes disk space and generally performs well when data is written and read in large chunks (128K or more).

  • A RAIDZ2 offers better data availability and significantly better mean time to data loss (MTTDL) than RAIDZ1.

  • A mirror consumes more disk space but generally performs better with small random reads. For better performance, a mirror is strongly favored over any RAIDZ, particularly for large, uncacheable, random read loads.

We do not recommend using more than 12 disks per vdev. The recommended number of disks per vdev is between 3 and 9. With more disks, use multiple vdevs.

Some older ZFS documentation recommends using a certain number of disks for each type of RAIDZ to achieve optimal performance. The recommendation is outdated on systems using LZ4 compression, the default for FreeNAS 9.2.1 and later.

These resources can also help determine the RAID configuration best suited to the specific storage requirements:

Important

RAID and disk redundancy are not substitutes for a reliable backup strategy. Bad things happen, so you always need a good backup strategy to protect valuable data. We recommend configuring TrueNAS with periodic snapshots and automated replication as part of a ZFS snapshot backup strategy.

ZFS Device Management

ZFS manages devices. When a user replaces a failed drive in a mirror or RAIDZ, ZFS adds the replacement device to the vdev and copies redundant data to it in a process called resilvering. Hardware RAID controllers usually do not know which blocks are in use, so they copy every block to the new device. ZFS only copies blocks in use, reducing the time it takes to rebuild the vdev. Resilvering is also interruptable. After an interruption, resilvering resumes where it left off rather than starting from the beginning.

While ZFS provides many benefits, there are some caveats:

  • Disk capacity

    At 90% capacity, ZFS switches from performance- to space-based optimization, which has massive performance implications. For maximum write performance and to prevent problems with drive replacement, add more capacity before a pool reaches 80%.

  • Disk number

    When considering the number of disks to use per vdev, consider the size of the disks and the amount of time required for resilvering, which is the process of rebuilding the vdev. The larger the size of the vdev, the longer the resilvering time. When replacing a disk in a RAIDZ, it is possible another disk could fail before the resilvering process completes. If the number of failed disks exceeds the number allowed per vdev for the type of RAIDZ, the data in the pool is lost. For this reason, RAIDZ1 is not recommended for drives over 1 TiB in size.

  • Disks size

    We recommend using equal-sized drives when creating a vdev. While ZFS can create a vdev using disks of differing sizes, its capacity is limited by the smallest disk size.

For those new to ZFS, the Wikipedia entry on ZFS provides an excellent starting point to learn more about its features. These resources are also useful for reference:

ZFS Feature Flags

To differentiate itself from Oracle ZFS version numbers, OpenZFS uses feature flags. Feature flags tag features with unique names to provide portability between OpenZFS implementations running on different platforms, as long as all of the feature flags enabled on the ZFS pool are supported by both platforms. TrueNAS uses OpenZFS, and each new version of TrueNAS keeps up-to-date with the latest feature flags and OpenZFS bug fixes.

See zpool-features(7) for a complete listing of all OpenZFS feature flags available on FreeBSD.

ZFS dRAID Primer

Introduced in OpenZFS version 2.1.0 and initially supported in TrueNAS 23.10 (Cobia), declustered RAID (dRAID) is an alternate method for creating OpenZFS data virtual devices (vdevs).

Intended for storage arrays with numerous attached disks (>100), the primary benefit of a dRAID vdev layout is to reduce resilver times. It does this by building the dRAID vdev from multiple internal raid groups that have their own data and parity devices, using precomputed permutation maps for the rebuild IO, and using a fixed stripe width that fills storage capacity with zeroes when necessary.

Depending on data block size and compression requirements, a dRAID pool could have significantly less total storage, especially in situations where large numbers of small data blocks are being stored.

dRAID Usage Recommendations

Due to concerns with storage efficiency, dRAID vdev layouts are only recommended in very specific situations where the TrueNAS storage array has numerous (>100) attached disks that are expected to fail frequently and the array is storing large data blocks. If deploying on SSDs, dRAID can be a viable option for high-performance large-block workloads, such as video production and some HPC storage, but test the configuration thoroughly before putting it into production.

Current investigations between dRAID and RAIDz vdev layouts find that RAIDZ layouts store data more efficiently in all general use case scenarios and especially where small blocks of data are being stored. dRAID is not suited to applications with primarily small-block data reads and writes, such as VMware and databases that are better suited to mirror and RAIDz vdevs.

In general, consider dRAID where having greatly-reduced resilver time and returning pools to a healthy state faster is needed. The implementation of dRAID is very new and has not been tested to the same extent as RAIDZ. If your storage project cannot tolerate risk, consider waiting until dRAID becomes more well-established and widely tested.

These images demonstrate the differences between dRAID and RAIDz layouts in OpenZFS:

dRAID and raidz characterizations
Figure 2: dRAID Characterization

Thanks to Zhi (George) Qiao, Song Fu, Hsing-bung Chen, and Bradley Wade Settlemyer (Source )

Concepts

Fixed Stripe Width

Stripe width is fixed in dRAID, with zeroes added as padding. This can have a significant effect on usable capacity, depending on the data stored.

In a redundancy group of eight data disks using 4k sector disks, the minimum allocation size is 32k. Any files smaller than 32k still fill an entire stripe, with zeroes appended to the write to fill the entire stripe. This greatly reduces the pool usable capacity when the pool stores large numbers of small files.

dRAID vdevs typically benefit greatly from larger record sizes and have some hard limitations on dataset and zvol record sizes. The absolute minimum dataset record size is 128k and zvol record size is 64k to 128k for zvols. However, this does not account for typical data access patterns.

When datasets are expected to have a heavy sequential I/O pattern, a 1MB record size can be beneficial for compression. However, datasets, and typically zvols, are expected to have heavy random I/O patterns, it is recommended to remain closer to the minimum 128k (or 64k for zvols) record size. Selecting a record/block size smaller than the minimum allocation size is catastrophic for pool capacity.

Permutation Maps

dRAID uses an array of predetermined permutation maps to determine where data, parity, and spare capacity reside across the pool. This ensures that during resilvers, all IO (reads and writes) distribute evenly across all disks, reducing the load on any one disk.

Because a permutation map automatically selects during pool creation, distributed spares cannot be added after pool creation. If adding spares after pool creation is a critical requirement, create the pool using a RAIDz layout.

Distributed Hot Spare

dRAID uses a different methodology from RAIDz to provide hot spare capacity to the data vdev. Distributed hot spares are allocated as blocks on each disk in the pool. This means that hot spares must be allocated during vdev creation, cannot be modified later, and that every disk added to the vdev is active within the storage pool.

Disk failure results in the dRAID vdev copying the parity and data blocks onto the spare blocks in each fixed stripe width disk. Because of this behavior and inability to add distributed hot spares later, it is recommended to always create a dRAID vdev with at least one or more distributed hot spares and to take additional care to replace failed drives as soon as possible.

Sequential Resilver

This is a new resilver type used by dRAID where blocks are read and restored sequentially. This greatly increases resilver operation speed as it does not require block tree traversal.

Sequential resilver is made possible by the use of fixed stripe width in dRAID. During a sequential resilver data is read from all pool members.

Checksums are not validated during a sequential resilver. However, a scrub begins after the sequential resilver finishes and verifies data checksums.

Rebalancing

This process occurs after a disk failure results in a distributed hot spare replacing a failed drive. This is essentially a resilver, but data redistributes across the pool to meet the original distributed configuration.

During rebalancing, a traditional resilver is performed as the pool is not in a degraded state. Checksums are also verified during this process.

Healing Resilver

The traditional ZFS resilver. The entire block tree is scanned and traversed. Checksums are verified during the repair process. This can be a slow process as it results in a largely random workload that is not ideal for performance. In a RAIDz deployment this also puts extra strain on the remaining disks in the vdev, as they are all being read from simultaneously.

Terminology

The terminology used for a dRAID layout is similar to that used for RAIDz, but could have a different meaning. We recommend reviewing this list of terms and definitions before attempting to create storage pools with a dRAID layout in TrueNAS.

TermDefinition
Children (C)Number of drives included in the dRAID deployment.
Data Devices (D)Number of data devices in a redundancy group. This number can be quite high, but generally a lower number results in greater performances and capacity is more effectively used.
Distributed hot spare (S)Unlike in a RAIDz configuration where spares remain inactive until needed, in a dRAID configuration spare capacity is distributed across the drives. This results in all drives being active members of the pool. This number cannot change after pool creation.
Parity Level (P)Distributed parity level of a dRAID redundancy group. This ranges from 1 to 3 and is similar to the RAIDz parity level.
Redundancy groupdRAID layouts use equivalent RAIDz vdevs as the foundation for the complete dRAID vdev. A redundancy group is composed of parity devices and data devices. Redundancy group size impacts storage performance and capacity.
VdevAn OpenZFS virtual device. dRAID layouts allow much larger vdevs. 100+ device vdevs are not uncommon. Distributed hot spares are shared across all redundancy groups in a vdev.

dRAID Capacity Estimations

A single dRAID vdev can have multiple redundancy groups, just as a RAIDz can have multiple vdevs. A dRAID redundancy group is roughly the equivalent of a RAIDz vdev. dRAID redundancy groups can be much wider than RAIDz vdevs and still have the same level of redundancy. dRAID variables in estimating layouts are:

  • Parity (P) in each redundancy group
  • Data disks (D) in each redundancy group
  • Spares (S)
  • Total number of drives, children (C), in the dRAID vdev

When configuring dRAID layouts consider the given number of disks and compare the capacity of those disks laid out in RAIDz and dRAID configurations. The ZFS Capacity Calculator and ZFS Capacity Graph allow you to make the comparison.

TrueNAS uses this formula to estimate the total capacity of a dRAID data vdev:

\[ Capacity = (C - S) \cdot \left(\frac{D}{{D + P}}\right) \cdot DS\]

Where:

  • C is the children number (total number of drives in the layout).
  • S is the distributed hot spare number.
  • D is the data device number in the redundancy group.
  • P is the parity level in the redundancy group.
  • DS is the minimum disk size common to all disks in the vdev.

For example, setting up a single dRAID1 vdev layout with matching 1.82 TiB disks, 8 data devices, 1 distributed hot spare, and 10 children results in an estimated 14.58 TiB (rounded) total capacity:

\[ (10 - 1) \cdot \left(\frac{8}{{8 + 1}}\right) \cdot 1.82 = 9 \cdot 0.89 \cdot 1.82 = 14.5782\]

This formula does not account for additional metadata reservations, so the total estimated capacity is likely to be slightly lower.

dRAID Visualizer

See how dRAID lays out and shuffles data. Specify any valid dRAID layout and see it both in a pre-shuffled and a post-shuffled state.

draid
:
d
:
c
:
s
Enter dRAID vdev parameters above
#
Disk
#
Parity
#
Data
#
Spare
#
Slice
Rows to Draw:

Click "Update" to show the vdev layout below. Click "Shuffle" to see how ZFS distributes the data across the disks.

Each set of colored blocks in the diagram below represents a redundancy group. The darker blocks represent parity information and the paler blocks are user data. Each block is 16MiB of physical capacity on each disk. This application uses the same RNG algorithm and seeds as the ZFS code, so it should accurately represent how everything gets distributed in a dRAID vdev. The average imbalance ratio of the vdev and the physical on-disk size of each box is displayed at the bottom.
dRAID Visualizer originally created by Jason Rose.

Caveats

dRAID Group Layout

ZFS allows groups to span multiple rows, which means it does not require each row to contain a whole number of redundancy groups. This layout has several advantages over requiring whole groups in each row:

  • Group count - Group count is not a relevant parameter when defining a dRAID layout. ZFS only needs the group width and all groups will have the desired size.
  • Group widths - ZFS can support all possible group widths (greater than or equal to the physical disk count).

ZFS determines the number of groups by the least common multiple (LCM) of the group width (D+P) and the number of physical drives minus spares (C-S). The logic within dRAID is simplified when the group width is the same for all groups, although some aspects, such as computing permutation numbers and drive offsets, are more complex. This flexible layout ensures even distribution of data and parity while maintaining high performance and resilvering efficiency.

See vdev_draid.c for more information.

dRAID layouts require more testing before we make layout recommendations on the number of spares or parity levels. When using dRAID, consider these factors:

  • dRAID does not support partial-stripe writes.

  • Small-block writes to dRAID vdev are padded with zeros to span a redundancy group, which creates a lot of wasted space. Add special allocation class vdevs (L2ARC, SLOG, and metadata) to a pool that uses dRAID data vdevs to handle this type of IO. The special vdevs themselves use mirror or RAIDZ layouts, not dRAID. Match the redundancy level of any metadata or dedup vdev to the parity level of the dRAID data vdev.

  • You cannot add virtual spares after creating the vdev because spare disks are distributed into the dRAID vdev.

  • dRAID performance should match that of an equivalent RAIDz pool. Vdev IOPS scale based on the quantity of redundancy groups per row and throughput scales based on the quantity of data disks per row.

  • If creating a dRAID pool with more than 255 disks, you need to use multiple vdevs with fewer disks rather than one vdev with the maximum number of 255. Adhering to best practices means keeping all vdevs alike. So rather than taking 300 disks and creating one 255-wide vdev and one 45-wide vdev, use two 150-wide or three 100-wide vdevs to improve performance and redundancy.

  • Use dRAID redundancy groups with similar numbers of drives and parity levels as in RAIDz vdevs.

  • dRAID pool expansion requires the addition of one or more new vdevs, just as with RAIDz. Because dRAID could have 100 or more disks in it, the best practice of using homogeneous vdevs in a pool still applies, which means expansion increments to dRAID-based pools can be very large.

Additional Resources

These resources go much further in-depth with dRAID concepts and usage details:

Drive Troubleshooting Flowchart

Before You Begin

These flowcharts help you diagnose the most common drive and ZFS-related problems using a systematic approach. There are five flowcharts:

Read each step carefully and answer each question exactly as written before proceeding. For help reading Self-Monitoring, Analysis, and Reporting Technology (SMART) output, see Appendix A . For commands referenced in the flowchart steps, see Appendix B .

You must run all commands as root or with sudo.

Seagate drives typically report Error Rates as wildly changing numbers. This is normal behavior for Seagate drives and does not necessarily indicate a failure. The flowcharts include specific guidance for evaluating Seagate error rates where applicable.

Warning

Some commands in these flowcharts can cause data loss if misused. Run all commands exactly as written.

ZFS Errors

If you get stuck in the same loop more than twice, stop and seek help on the TrueNAS community forums .

  1. Is your pool state ONLINE or DEGRADED?

    • Yes — Go to step 3.
    • No — Go to step 2.
  2. If you believe you have a drive failure, proceed to step 3. Otherwise, exit this procedure.

  3. Is Repaired Data from the zpool status output greater than zero?

    • Yes — Go to step 14.
    • No — Go to step 4.
  4. Do you have read, write, or checksum errors?

    • Yes — Go to step 5.
    • No — Go to step 9.
  5. Run zpool scrub poolname.

  6. Did the read, write, or checksum errors increase? Note any corrupt files.

    • Yes — Go to step 7.
    • No — Go to step 9.
  7. Have you been through this loop more than twice?

    • Yes — Go to step 8.
    • No — Go to step 4.
  8. Back up your data and seek additional help. Exit this procedure.

  9. Run zpool clear poolname.

  10. Run zpool scrub poolname.

  11. Do you still have errors?

    • Yes — Go to step 7.
    • No — Go to step 12.
  12. Use the TrueNAS Guide to perform things like “How to replace a drive.”

    • If the problem is solved, exit this procedure.
  13. Record the names of the corrupt files and delete them.

  14. Run zpool scrub poolname.

  15. Do you still have Repaired Data errors?

    • Yes — Go to step 14.
    • No — Go to step 17.
  16. Have you been through this loop more than twice?

    • Yes — Go to step 18.
    • No — Go to step 3.
  17. Are the errors associated only with one drive?

    • Yes — Go to step 18.
    • No — Go to step 19.
  18. Troubleshoot the drive using the Critical Drive Errors and Non-Critical Drive Errors flowcharts. Exit this procedure.

  19. Back up your data and seek additional help. Exit this procedure.

ZFS Slow Pool

  1. Is your used pool space over 80%?

    • Yes — The pool has limited space for write operations, which slows performance significantly. Usage above 90% causes severe slowdowns. Reduce pool usage below 80%. Exit this procedure.
    • No — Go to step 2.
  2. Do you have SMR drives?

    • Yes — ZFS does not work well with SMR (Shingled Magnetic Recording) drives during write operations. Replace them with CMR (Conventional Magnetic Recording) drives. Exit this procedure.
    • No — Go to step 3.
  3. Consider the following common causes of pool slowdowns and check each that applies:

    • Did you recently reboot?
    • Is the NAS currently busy with another operation?
    • Do you have a large number of snapshots?
    • Is swap space low?

    If none of these apply, seek additional help.

Critical Drive Errors

Media Wear Level

NA = Not applicable.

Media wear level can be reported as Wear Level or Percent Used.

Examine the Thresh value to interpret the wear level correctly:

  • If Thresh is below 50: 100 = new, 0 = worn out.
  • If Thresh is above 50: 0 = new, 100 = worn out.

See Appendix A for more information on SMART attributes and values.

  1. Can you obtain SMART data from the drive?

    • Yes — Go to step 2.
    • No — Go to step 3.
  2. Does the SMART status show FAIL, Media Error, or Critical Warning?

    • Yes — Go to step 3.
    • No — Go to step 4.
  3. Back up your data, then consider replacing the drive. Exit this procedure.

  4. Did a SMART short or long test fail?

    • Yes — Go to step 5.
    • No — Go to step 7.
  5. Run smartctl -t long /dev/diskID. After the test completes, run smartctl -a /dev/diskID to check the results. Did it pass or fail?

    • Pass — Go to step 6.
    • Fail — Go to step 3.
  6. Is the problem corrected? Monitor for recurrence. A subsequent failure indicates the drive is failing. Exit this procedure.

  7. For SSD/NVMe: is the wear level value 0? For HDD: is the helium value low?

    • Yes — Go to step 8.
    • No or NA — Go to step 9.
  8. Does the drive require immediate replacement? Exit this procedure.

  9. Is the Reallocated Sectors (ID 5) raw value less than 5?

    • Yes — Go to step 11.
    • No — Go to step 10.
  10. Replace the drive due to media or wear damage. Seek additional help. Exit this procedure.

  11. Run smartctl -t long /dev/diskID.

  12. Run smartctl -a /dev/diskID to check the results. Did the test pass or fail?

    • Fail — Go to step 3.
    • Pass — Go to step 13.
  13. Is Spin Retry Count (ID 10) raw value greater than 0?

    • Yes — Go to step 14.
    • No — Go to step 17.
  14. Does the drive sound like it is spinning up and down repeatedly?

    • Yes — Go to step 11.
    • No — Go to step 15.
  15. Check the power supply before replacing the drive — this could be a drive or power supply failure. Exit this procedure.

  16. Refer to the Non-Critical Drive Errors flowchart. The drive has no critical errors. Exit this procedure.

  17. Is Current Pending (ID 197) raw value greater than 0, or is Uncorrectable Sector (ID 198) raw value greater than 0?

    • Yes — Go to step 18.
    • No — Go to step 16.
  18. Refer to the Non-Critical Drive Errors flowchart and consider seeking additional help. Exit this procedure.

Non-Critical Drive Errors

  1. Can you obtain SMART data from the drive?

    • Yes — Go to step 3.
    • No — Go to step 2.
  2. Seek additional help. Exit this procedure.

  3. Is UDMA CRC Errors (ID 199) raw value increasing?

    • Yes — UDMA CRC errors indicate a connection problem between the drive and the controller, such as a loose or faulty SATA cable. Check and replace the cable. If errors persist after replacing the cable, seek additional help. Exit this procedure.
    • No — Go to step 4.
  4. Are Hardware ECC Recovered or MultiZone errors increasing and are they the only errors present?

    • Yes — Go to step 5. This is not an immediate issue.
    • No — Go to step 6.
  5. Monitor for increasing counts. Hardware ECC Recovered (ID 195) raw count does not indicate a typical drive failure. Exit this procedure.

  6. Are there any other errors?

    • Yes — Go to step 8.
    • No — Go to step 7.
  7. Monitor these non-critical errors. Hardware ECC Recovered (ID 195) indicates the drive hardware is automatically correcting data reads, which is expected behavior. MultiZone Error (ID 200) sometimes indicates a problem when associated errors are present, but is generally not an issue on its own. Exit this procedure.

  8. Is Current Pending Sectors (ID 197) raw value greater than 5?

    • Yes — Go to step 9.
    • No — Go to step 12.
  9. Run smartctl -t long /dev/diskID. After the test completes, run smartctl -a /dev/diskID to check the results. Does it pass?

    • Yes — Go to step 10.
    • No — Go to step 11.
  10. Monitor Current Pending Sectors (ID 197) raw value. If the count continues to increase, replace the drive. Post the full smartctl -x /dev/diskID output to the TrueNAS community forums for additional evaluation. Exit this procedure.

  11. Replace the drive. Exit this procedure.

  12. Is ID 1 (Raw Read Error Rate) or ID 7 (Seek Error Rate) the error you are evaluating?

    • Yes — Go to step 14.
    • No — Go to step 13.
  13. Seek additional help. Post the complete smartctl -x /dev/diskID output when requesting assistance. Exit this procedure.

  14. Do you have a Seagate drive?

    • Yes — Go to step 15.
    • No — Go to step 16.
  15. Subtract 4294967295 (0xFFFFFFFF) from the raw value to check for real failures. Seagate drives report these values differently and rapidly changing numbers can be normal. If the result is greater than zero, the drive has that many real failures. Go to step 9.

  16. Replace the drive. This indicates a failure of the armature or head mechanism. Exit this procedure.

Suspect Foul Play (Altered Drive Data)

With the prevalence of used drives on the market in 2024 and 2025, verify that a new drive is actually new before deploying it. The following procedure uses Field Access Reliability Metrics (FARM) data to check if drive SMART data has been reset. FARM data is currently available only for Seagate drives.

Western Digital has WDDA data, but reading it requires additional software not installed on TrueNAS and is not covered here.

  1. Check the installed version of smartmontools: smartctl --version

  2. Is smartmontools version 7.4 or later?

    • Yes — Go to step 4.
    • No — Go to step 3.
  3. Update to smartmontools version 7.4 or later to read FARM data. Exit this procedure.

  4. Obtain SMART drive data: smartctl -a /dev/diskID

  5. Obtain FARM data: smartctl -l farm /dev/diskID

  6. From both reports, record the following values:

    • Serial number
    • Power on hours
    • Spindle power on hours
    • Head flight hours
    • LBAs read and written
  7. Compare the values between the two reports. Is there a large discrepancy?

    • Yes — Go to step 9.
    • No — Go to step 8.
  8. Confirm the drive data appears valid. Exit this procedure.

  9. Investigate likely data alteration on this drive. If the drive was refurbished or previously used, the discrepancy might be expected. If in doubt, seek additional help. Exit this procedure.

Appendix A - Reading SMART Output

Self-Monitoring, Analysis, and Reporting Technology (SMART) attributes vary between drive types. SATA HDDs, SAS HDDs, SATA SSDs, and NVMe SSDs use different attribute sets, and some attributes are manufacturer-specific. The human-readable name for an attribute ID (for example, Reallocated Sectors Count for ID 5) can vary by software.

Each SMART attribute line contains the following values:

ColumnDescription
IDThe attribute identifier number.
VALUEThe normalized performance value for this attribute.
WORSTThe worst VALUE observed over the life of the drive.
THRESHThe minimum acceptable limit for VALUE and WORST. If VALUE or WORST drops below THRESH, the drive is considered failed. A THRESH of 0 means the attribute is not life-critical (for example, Power On Hours).
RAW_VALUEThe non-normalized value. This is the value referenced in the flowchart steps. The content of RAW_VALUE is generally vendor-specific.

When VALUE or WORST approaches THRESH and other errors are present, plan to replace the drive. Do not wait until a critical failure occurs, as data loss is possible.

Example — ID 5 (Reallocated Sectors Count): Fewer than five reallocated sectors indicates a drive to monitor. More than five indicates likely media damage. Adjust these thresholds based on your environment and risk tolerance.

Example — ID 1 (Raw Read Error Rate) for Seagate drives: Seagate drives report large RAW_VALUE numbers for error rates because the value represents more than a simple count of failures. Do not interpret a large Raw Read Error Rate RAW_VALUE as a failure on Seagate drives without evaluating it using the method described in step 15 of the Non-Critical Drive Errors flowchart.

If you are unsure how to interpret SMART data, post the full smartctl -x /dev/diskID output to the TrueNAS community forums for evaluation.

Appendix B - Troubleshooting Commands

The commands below apply to both TrueNAS FreeBSD-based versions and TrueNAS Debian-based versions unless marked otherwise. Replace diskID with your drive identifier and poolname with your pool name.

Warning

Some commands below have destructive potential if misused. Enter them exactly as written.

Zpool Commands

CommandDescription
zpool status -vShows pool status for all pools.
zpool scrub poolnameStarts a scrub on the specified pool.
zpool clear poolnameClears all Read, Write, and Checksum errors for the specified pool.

Identifying Drives

When cross-referencing by GPTID, a drive with multiple partitions shares one drive identifier. For example, ada0p1 and ada0p2 are both partitions on the physical drive ada0.

CommandPlatformDescription
lsblk -o +PARTUUID,NAME,LABEL,SERIALSCALELists disks, partitions, drive identifiers, and serial numbers for cross-referencing.
glabel statusCOREShows GPTID and drive identifier. Note: nvd0 = nvme0. Use the SMART data commands to cross-reference the drive identifier with the serial number.

Obtaining SMART Data

If a smartctl command returns an error reading the drive, try adding the interface type: smartctl -d interfaceType command /dev/diskID

Example: smartctl -d scsi -a /dev/sda

Run smartctl --scan to list interface types for all available drives.

CommandPlatformDescription
smartctl -a /dev/sdaSCALEReturns basic SMART data for the specified drive.
smartctl -a /dev/da0 or smartctl -a /dev/ada0COREReturns basic SMART data for the specified drive.
smartctl -x /dev/sdaSCALEReturns extended SMART data for the specified drive.
smartctl -x /dev/da0 or smartctl -x /dev/ada0COREReturns extended SMART data for the specified drive.

Obtaining FARM Data

CommandPlatformDescription
smartctl -l farm /dev/sdaSCALEReturns the Field Access Reliability Metrics (FARM) log.
smartctl -l farm /dev/da0 or smartctl -l farm /dev/ada0COREReturns the FARM log.

Running SMART Tests (HDD, SSD, Most NVMe)

CommandPlatformDescription
smartctl -t short /dev/sdaSCALERuns a short SMART test.
smartctl -t short /dev/da0 or smartctl -t short /dev/ada0CORERuns a short SMART test.
smartctl -t long /dev/sdaSCALERuns a long SMART test.
smartctl -t long /dev/da0 or smartctl -t long /dev/ada0CORERuns a long SMART test.
smartctl -X /dev/sdaSCALEAborts the current SMART test.
smartctl -X /dev/da0 or smartctl -X /dev/ada0COREAborts the current SMART test.

Running SMART Tests (NVMe, if smartctl Does Not Work)

Warning

Enter these commands exactly as written. Entering them incorrectly can be destructive.

Replace nvme0 with your NVMe drive identifier.

CommandPlatformDescription
nvme device-self-test /dev/nvme0 -s 1SCALERuns a short SMART test.
nvmecontrol selftest -c 1 nvme0CORERuns a short SMART test.
nvme device-self-test /dev/nvme0 -s 2SCALERuns a long SMART test.
nvmecontrol selftest -c 2 nvme0CORERuns a long SMART test.
nvme device-self-test /dev/nvme0 -s 0xfSCALEAborts the current SMART test.
nvmecontrol selftest -c 0xf nvme0COREAborts the current SMART test.

ZFS ZIL and SLOG

The ZIL and SLOG are two frequently misunderstood concepts in ZFS.

ZFS is taking extensive measures to safeguard your data and it should be no surprise that these two terms represent key data safeguards. What is not obvious, however, is that they only come into play under very specific circumstances.

The first thing to understand is that ZFS behaves like any other file system with regard to asynchronous and synchronous writes.

When data is written to disk, it can either be buffered in RAM by the operating system kernel prior to being written to disk, or it can be immediately written to disk. The buffered asynchronous behavior is often used because of the perceived speed that it provides the user, while synchronous behavior is used for the integrity it guarantees.

A synchronous write is only reported as successful to the application that requested it when the underlying disk has confirmed completion of it. Synchronous write behavior is determined by either the file being opened with the O_SYNC flag set by the application, or the underlying file systems being explicitly mounted in synchronous mode. Synchronous writes are desired for consistency-critical applications such as databases and some network protocols such as NFS but come at the cost of slower write performance. In the case of ZFS, the sync=standard property of a pool or dataset provides POSIX-compatible synchronous-only-if-requested write behavior while sync=always forces synchronous write behavior akin to a traditional file system being mounted in synchronous mode.

“Asynchronous unless requested otherwise” write behavior is taken for granted in modern computing with the caveat that buffered writes are simply lost in the case of a kernel panic or power loss.

Applications and file systems vary in how they handle such interruptions. ZFS guarantees that you can only lose the few seconds worth of writes that came after the last successful transaction group.

Given the choice between the performance of asynchronous writes with the integrity of synchronous writes, a compromise is achieved with the ZFS Intent Log or ZIL. Think of the ZIL as the street-side mailbox of a large office: it is fast to use from the postal carrier perspective and is secure from the office perspective, but the mail in the mailbox is by no means sorted for its final destinations yet. When synchronous writes are requested, the ZIL is the short-term place on disk where the data lands prior to being formally spread across the pool for long-term storage at the configured level of redundancy. There are however two special cases when the ZIL is not used despite being requested: if large blocks are used or the logbias=throughput property is set.

By default, the short-term ZIL storage exists on the same hard disks as the long-term pool storage at the expense of all data being written to disk twice: once to the short-term ZIL and again across the long-term pool.

Because each disk can only perform one operation at a time, the performance penalty of this duplicated effort can be alleviated by sending the ZIL writes to a separate ZFS intent log or SLOG, or simply log. While using a spinning hard disk as SLOG yields performance benefits by reducing the duplicate writes to the same disks, it is a poor use of a hard drive given the small size but high frequency of the incoming data.

The optimal SLOG device is a small, flash-based device such an SSD or NVMe card, thanks to their inherent high-performance, low latency and of course persistence in case of power loss.

You can mirror SLOG devices as an additional precaution and be surprised what speed improvements can be gained from only a few gigabytes of separate log storage. Your storage pool has the write performance of an all-flash array with the capacity of a traditional spinning disk array.

Thank you Matthew Ahrens of the OpenZFS project for reviewing this article.

ZFS Capacity Calculator

Use this calculator to plan your TrueNAS storage configuration before creating pools . Enter your total disk count and compare different RAID types to see usable capacity after accounting for redundancy and ZFS overhead.

Quick Configuration Guide

  • RAIDZ1: Good capacity efficiency, single-disk fault tolerance.
  • RAIDZ2: Balanced capacity and redundancy, double-disk fault tolerance.
  • Mirror: Best performance, 50% capacity efficiency.
  • dRAID : For storage arrays with numerous attached disks (>100) where greatly reduced resilver time is needed.

The calculator also shows TrueNAS Enterprise hardware requirements and expansion shelf planning.

Click the help icons (?) for detailed explanations of each setting.

For more background on ZFS concepts, see the ZFS Primer .

? ?
+
1
-
+
10
-
+
100
-
+
12
-
+
24
-
+
60
-
+
102
-
?
? ?
?
?
?
? ? ?
? ?
? ?
? ?
?
Configuration Help: Click the help icons (?) next to field labels above to see detailed explanations of each setting.
Loading TrueNAS shelf calculations...

Select a tab to view calculated data for different ZFS configurations. Hovering over a table cell loads the relevant data into the Calculation Values section below. You can click table cells to freeze or unfreeze those values.

Calculation Values

(Click table cells above to freeze/unfreeze)

ZFS Capacity Calculator originally created by Jason Rose.

ZFS Capacity Graph

Visualize and compare different RAID layouts and settings including stripe, mirror, RAIDZ1, RAIDZ2, RAIDZ3, and dRAID.

ZFS Capacity Graph originally created by Jason Rose.

RAIDZ Extension Calculator

RAIDZ extension allows TrueNAS users to add disks one at a time to an existing RAIDZ VDEV, incrementally expanding capacity. Use this calculator to estimate the storage capacity efficiency of a ZFS RAIDZ VDEV after incremental extension.

Existing data blocks retain their original data-to-parity ratio and block width, but are spread across the larger set of disks. New data blocks adopt the new data-to-parity ratio and width, or overhead. Because of this overhead, an extended RAIDZ VDEV can report a lower total capacity than a newly created VDEV with the same number of disks.

Extended VDEVs recover lost headroom as existing data is read and rewritten to the new parity ratio. This can occur naturally over the lifetime of the pool as you modify or delete data. To manually recover capacity, simply replicate and rewrite the data to the extended pool.

Info

While this process can recover the actual lost capacity, reported capacity continues to rely on the old data-to-parity ratio. An expanded vdev can continue to report a lower than expected capacity, even after rewriting old data to the new parity ratio. This accounting inconsistency does not impact the actual available capacity of the vdev.

See Extending a RAIDZ VDEV for more information, including a detailed overview, considerations, and a tutorial.

How to use this calculator

Edit the values to see how much lost headroom capacity is available to recover.

ValueDescription
Drive SizeEnter the size (in TB) of each disk in the existing VDEV. Added disks should be the same size or larger than existing drives.
RAIDZ Level / Number of Parity DisksEnter the RAIDZ level (RAIDZ1, RAIDZ2, or RAIDZ3) of the existing VDEV. Extending a VDEV does not change RAIDZ fault tolerance.
Data expansion thresholdEnter the percentage of pre-extension VDEV capacity that is filled before adding an additional disk.
Initial number of drivesEnter the width of the VDEV before extension.
Final number of drivesEnter the planned final width of the VDEV after extension.
How to interpret the results

Calculated values represent how much space on the final extended VDEV is lost to headroom, or data capacity that would be available in an equivalent VDEV created from scratch with the same width and data-to-parity ratio. This is the capacity available to recover by rewriting existing data to the extended width.

The calculator returns estimated capacity values for two scenarios:

ResultScenario
Extend VDEV to final width all at onceFill the existing VDEV to its threshold percentage, extend to the final width in one continuous process, then rewrite existing data.
Extend VDEV one drive at a timeFill the existing VDEV to its threshold percentage, the extend by one additional drive. Continue filling the VDEV until the threshold is reached, then extend by one more drive. Repeat until the final width is reached, then rewrite existing data. This scenario results in more lost headroom available for recovery because there is more data that is not written with the final data-to-parity ratio.

Results

Adapted from this spreadsheet with thanks to TrueNAS community member yorick (github).
Additional contributions from DayBlur and Louwrentius.