One of the key pieces of technology underlying TrueNAS and FreeNAS is the ZFS filesystem. In 2001, developers at Sun Microsystems began work on ZFS and officially released it as part of OpenSolaris in 2005. Three years later, a port of ZFS was released as part of FreeBSD 7. When we took the helm of the FreeNAS project in 2009, we realized it would be a fundamental part of the OS. So what makes ZFS so great?
Data Integrity
The main reason TrueNAS and FreeNAS use ZFS is to ensure data integrity. One of the main ways ZFS protects your data is by putting volume management on the filesystem level. This makes Copy-on-Write (CoW) technology possible. Normally when a block of data is modified, it will change its current location on the disk before the new write is completed. If your system crashes or loses power in the process, that data will be lost.
With CoW, ZFS does not change the location of the data until the write is completed and verified, keeping your data safe in case your system has any problems.
To verify that data, ZFS utilizes checksum metadata to ensure that the data remains the same from write to write. Individual blocks of data exist in a ‘tree’ of data where each ‘parent’ block adds up the checksum data of its ‘children’, meaning that every new write is tested, eliminating bitrot. This eliminates what is known as the RAID write hole which allows for silent data corruption in standard RAID levels.
In addition to CoW, ZFS offers additional RAID protections over standard levels. The first RAID configuration is RAID-Z3, which allows for up to 3 disk failures in a data volume. Standard RAID only allows for 2 disk failures per volume. In addition, ZFS offers the ability to set up a multi-disk mirror (nRAID). Typically, your mirrors are composed of a single disk and its copy. With a multi-disk mirror, you can have multiple copies. It has a high cost in disk space, but it can add levels of data integrity not found in typical RAID and is great for read speeds.
Highly Scalable
ZFS is a 128 bit file that can handle enormous data pools of up to 1.84 × 10^19 times more data than 64-bit systems. This means that the data limitations of ZFS surpass other operating systems, making it scalable and relevant for the foreseeable future. ZFS also eliminates unnecessary limitations to file size along with the number of filesystems and directories, which can make system design difficult.
Intelligent Features
As mentioned previously, ZFS puts volume management on the filesystem level. This means that you don’t need an additional storage controller to set up and manage your RAID without losing performance. It also means you won’t need to manage your disks from another interface, simplifying administration.
FreeNAS and TrueNAS make setting up volumes a snap from its graphical Web Interface, keeping all your storage controls in one place.
ZFS’s transactional processing model also allows for ZFS to send writes to individual physical disks, rather than just the RAID volume. Because of this, ZFS can stripe writes across RAID volumes and place synchronous writes together in a physical disk location, speeding up write performance. The transactional model also means that there are no long waits for file system checking. In the case you need to sync mirrors with only a bit of information, you don’t have to wait for it to sync any of the empty disk space, which can take a good deal of time.
ZFS incorporates algorithms to make sure your Most Recently Used (MRU) and Most Frequently Used (MSU) data are stored in your fastest system storage media. Spinning disks are notoriously slow and all flash solutions drive up your dollar per gigabyte cost significantly. By utilizing these algorithms in combination with flash-based ZFS Intent Log write cache and L2ARC read cache devices, you can speed up your performance by orders of magnitude at minimal cost.
Built-In Snapshots and Replication
Another reason we use ZFS is for the intelligently designed Snapshot, Clone, and Replication features. ZFS allows for snapshots to be taken on a singular or periodic basis and allows you to backup individual datasets as often as needed. Snapshots allow for a simple rollback to prior states in case of file deletion or system instability. ZFS Snapshots save disk pointers for data that would be discarded and only update based on what has changed since the last snapshot.
This translates into speedy clone and replication tasks and saves substantial time over traditional replication technology since ZFS replicates what has changed. And because of the way ZFS manages snapshots and replication, you can have varying levels of compression between source and target servers.
Open Source
At iXsystems Open Source is in our veins.
We support and develop multiple open source projects as a company and implement it in our internal infrastructure. Because TrueNAS is based on FreeNAS, an Open Source project, it’s important that the file system it uses is Open as well. OpenZFS also enjoys a good deal of feature development and collaboration, is included in multiple products, and is a robust and mature filesystem. Features are also incorporated on a modular basis known as feature flags. This means that when there’s an update to something like Samba, it is added like a package rather than some sort of firmware.
Conclusion
ZFS is a mature, flexible file system that will be scalable well into the future. It is based on Open technology with many individuals and commercial products contributing to development and testing. It has many intelligently designed features that improve the performance and ease of use of TrueNAS and FreeNAS. Its volume management also comes with data integrity features not found in most file systems, ensuring that you have a safe place to store your data. To learn more about TrueNAS visit https://www.ixsystems.com/TrueNAS, call 1.855.GREP.4.IX or email sales@ixsystems.com.