The professional filesystem ZFS
In Practice
Because of the licensing issues, the integration of ZFS in the Linux universe is currently proceeding very hesitantly. Existing solutions are only suitable for use in larger environments, and most desktop distros still don't support ZFS.
Canonical stirred up much dust with its announcement to integrate ZFS in Ubuntu 16.04 LTS. On closer investigation, this "integration" turns out to be far from finished; even power users are likely to fail when faced with the practical implementation.
The Ubuntu Installer Ubiquity lacks an option for using ZFS when setting up the mass storage. Users, instead, need to switch to the command line and set up the entire system manually. Completing the configuration requires good knowledge of the nomenclature and workings of ZFS. Users of Ubuntu and its official derivatives will find a guide to installing with virtualized containers on the Internet [7].
The Arch derivative Antergos has distinguished itself as a pioneer of ZFS integration on the Linux desktop. Without much media fanfare, the Antergos developers have integrated ZFS on the basis of OpenZFS and also modified the Cnchi installer.
Although Cnchi does not allow users to harness the full capabilities of ZFS, it does provide an easy option for using the operating system with ZFS out of the box. You can then define further configuration options, if required, at the command line. During the installation of Antergos from within the Live system, you first define whether you want to use ZFS with your own home volume (Figure 1).
In a further step, the installer then prompts you for the basic filesystem parameters (Figure 2). You can specify the block size and define the ZFS operating mode, from a selection list in Pool type. Various RAID levels are available, so you can also enable mirroring or striping in systems with multiple physical storage media.
Please note that Cnchi is context sensitive: Faulty or incompatible settings prevent users from moving to the next step, which is done, in each case, by clicking on the right arrow at top right in the install window. It is thus impossible to define a RAID level as the pool type for computers with only one physical storage medium: In this case, the corresponding option must stay set to None.
Antergos also sets up a swap partition without further intervention. The installer automatically configures the GRUB boot manager on legacy BIOS and on EFI systems, thus removing the need for manual adjustments. The routine also creates a 512MB boot partition formatted with ext4.
During the first reboot after installation, you need to avoid calling the alternative kernel variants, which Antergos offers in the GRUB boot manager in addition to the default kernel: These options do not include ZFS support and therefore cause an immediate crash.
Details
After the initial setup, you then configure the ZFS parameters at the command line if necessary. For example, you can specify features such as data compression and quota definitions.
Just two commands – zfs
and zpool
– let you configure and manage your ZFS filesystem. The zfs
command configures the filesystem and zpool
manages the disks. To enable data compression for a storage pool, type the following command at the root prompt:
# zfs set compression=on pool_name
If you created multiple storage pools, you can find the one you need, including its current status data, with the zpool list
command. After a system reboot, query the compression rate by typing the command:
# zfs get compressratio pool_name
The command shows the data in clear text in a neatly arranged list. Compression rates that can be achieved for previously compressed data, such as images or video and audio files, are low. The compression feature works much better with plain text files (Figure 3).
Deduplication
ZFS also supports efficient mechanisms for data deduplication. This technique is used to avoid the redundant storage of data, which also saves space. You can enable data deduplication using the command:
# zfs set dedup=on pool_name
To determine the duplication rate in the further course of working with the filesystem, use the following command:
# zpool get dedupratio pool_name
Clearly noticeable deduplication rates are usually only obtained with memory sizes of more than 4GB and several pools. Larger installations, in which multiple virtualized operating systems work in containers, are better suited for deduplication than desktop PCs with just one pool.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.