Your submission was sent successfully! Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

You have successfully unsubscribed! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates about Ubuntu and upcoming events where you can meet our team.Close

ZFS focus on Ubuntu 20.04 LTS: what’s new?

Tags: 20.04 LTS , pu , Ubuntu , zfs

This article is more than 4 years old.


Ubuntu has supported ZFS as an option for some time. In 19.10, we introduced experimental support on the desktop. As explained, having a ZFS on root option on our desktop was only a first step in what we want to achieve by adopting this combined file system and logical volume manager. I strongly suggest you read the 2 blog posts, linked above, as introductions to this blog series we are starting. Here we cover what’s new compared to 19.10 in term of installation and general features.

We then look at what ZSys, our dedicated helper for ZFS systems, can do for you and how you can interact with it. Finally, for the more tech savy, we deep dive into how we use ZFS, store properties and understand how the puzzle fits together. We will give you tips on how to tweak it at your convenience if you are a ZFS sysadmin expert, while still keeping ZSys advanced capabilities compatible.

Without further ado, let’s dive into this!

ZFS & Ubuntu 20.04 LTS

The first thing to note is that our ZFS support with ZSys is still experimental. The installer highlights this in the corresponding screen. With OpenZFS on Ubuntu 20.04 LTS, we are building the first steps of getting the Ubuntu bulletproof desktop.

We hope to be able to drop this experimental support in the coming cycle, and backport to a 20.04.x release.

OpenZFS Version

We updated from 19.10 to 20.04 LTS OpenZFS to its latest and greatest available release (0.8.3). As usual, those releases (0.8.2 and 0.8.3) bring a lot of improvements and fixes, (note though that we backported some fixes in Ubuntu 19.10 from 0.8.2 into our package to fix some critical issues for our users). We also backported in Ubuntu 20.04 LTS other fixes in our kernel from the incoming 0.8.4 (and OpenZFS 2.0) release, like encryption performance enhancements. ZSys and other components (for instance ZFS bindings) have been updated to work with the new libzfs version.

We also backported in Ubuntu 20.04 LTS other fixes in our kernel from the incoming 0.8.4 (and OpenZFS 2.0) release, like encryption performance enhancements. ZSys and other components (for instance ZFS bindings) have been updated to work with the new libzfs version.

Thanks to this, we are committed to deliver the best OpenZFS on Linux experience to our audience by continuing to fix any important issues that arise, and backporting any critical fixes from newer releases.

More streamline desktop with ZFS on root installation

The installer experience has been reworked to be clearer and to offer more focused options for the user. Installing ZFS on root has never been simpler, especially if you compare to the excellent, but very long and manual How-To Ubuntu Root on ZFS created by the OpenZFS community.

We support, for now, only full disk setup. The options related to this (LVM, LVM+encryption and ZFS) are all under the “Advanced features” screen.

Select ‘Advances features’ and ‘Erase disk and install Ubuntu’

You will find there the Experimental ZFS support option. Choose this option.

“ZFS selected” should now be displayed.

If you have multiple disks available, an additional screen will present the available choices. Once validated, a recap of the different partitions that we are going to create is waiting upon your approval.

In a later blog post, we will see why and what all those partitions are about. Their sizes and various decisions which lead to that layout.

The installation will then proceed as usual. Upon reboot, your newly installed Ubuntu 20.04 LTS system will be powered with ZFS on root!

Here are some proofs (but you don’t need to type those commands):

And that’s it! For your daily driver, you don’t need to do anything more. Unless you want to understand a little more about what this will bring to you in addition to all the ZFS robustness, checksuming, decompression and such, this is where you can stop! The system will work silently for you and you can forget about it. 🙂

Pool enhancements

For more technical savy users, you will be delighted to know that we upgraded the bpool version to 5000 (previously, it was at version 28). We created – only on bpool – a selection of features to ensure that grub will be able to read and boot from any ZFS filesystem or snapshot datasets.

However, zpool command-line users were encouraged then to upgrade the pool to enable new features on it, those being incompatible with grub! Worse, once the pool was upgraded, it was impossible to downgrade and your system was basically broken. Seeing this happening and until there is a dedicated version-by-components (discussions started upstream), we removed this message on bpool from zpool status and prevented to upgrade is with zpool upgraderpool doesn’t have this limitation and have a bunch of features enabled.

Boot enhancements

With ZSys installed, building a boot grub menu sees some great enhancements. We basically divided by 4 the time to generate this menu, thanks to multiple profiling technics, which will make any operation needing to rebuild way more enjoyable.

Building the menu is something, but starting grub is another. With a number of state saves, you can rapidly hit the score of more than a hundred of them. Under those conditions, we saw performance degradation in navigating grub menus. In particular, displaying the first menu was taking 14s and navigating the history of state was taking more than 80s!

We made some drastic enhancements thereby making both of them instantaneous! And came up with multiple -hem- “””creative””” strategies for fixing that one (reducing grub.cfg from 7329 lines that grub didn’t really like to 728, each new history entry being 3 additional lines instead of 50 :p). We crafted all of this to still be readable for advanced users to edit the boot command line before starting a system.

Similarly, we were able to significantly speed up the boot time and make the systemd ZFS mount generator more robust. Basically, unless you revert to another system state, ZSys will be out of the way, not taking any additional time on the critical boot path. Also, if some pools to import are not in a coherent status, you will be dropped to system emergency state, asking you to fix this before booting. However, this should only be the case of a failing revert. Booting in the current, last known good state, should work. This is an area we will continue to work on, of course.

Finally, we fixed a bunch of issues on both grub and boot chainload that people testing ZFS on 19.10 reported to us, like external pools being systematically exported, some configurations issues and more. Thanks to everyone here, it helps to deliver a more solid experience with ZFS on Ubuntu 20.04 LTS!

ZSys is now installed by default

Some Ubuntu flavours already shipped it in 19.10, but ZSys has seen a number of changes and new capabilities. After a security review, it is now seeded by default on the Ubuntu desktop 20.04 LTS installation!

There are a lot of things to discuss around this component, in term of features and what it exactly brings to the user. Not only does this allow for system revert (and grub bootloader will now present them), but it is not limited to being a boot environment. In fact, there is so much to talk about that the next four blog posts focus on it alone.

The good news is that most of the features are completely working under the hood and transparent to the user. However, if you need to revert an upgrade, get back old files from a user, or are just interested in it, those posts should be of interest to you! This, the first in the series, is the only instalment that will appear on Ubuntu.com. For the next, head over to didrocks’ own blog.

Ubuntu desktop

Learn how the Ubuntu desktop operating system powers millions of PCs and laptops around the world.

Newsletter signup

Get the latest Ubuntu news and updates in your inbox.

By submitting this form, I confirm that I have read and agree to Canonical's Privacy Policy.

Related posts

Canonical at India Mobile Congress 2024 – a retrospective

With an ambition to become Asia’s technology hub for telecommunications in the 5G/6G era, India hosts the annual India Mobile Congress (IMC) in Pragati...

6 facts for CentOS users who are holding on

Considering migrating to Ubuntu from other Linux platforms, such as CentOS? Find six useful facts to get started!

What is Ubuntu used for?

The launch of Ubuntu in 2004 was a step-change for everyday users and developers everywhere. Nicknamed “Ubuntu Linux” in its early days, to differentiate it...