Future of ZFS on Ubuntu desktop

After a very energetic initial push with ZFS on the desktop and tooling, the initiative seems to have fizzled out as of late. It is impossible at the moment to create an encrypted ZFS desktop installation on 22.10 for instance, and the new installer for 23.04 doesn’t have the option at all. Ubuntu server’s installer doesn’t even offer it as an option.

What is Canonical’s position on ZFS and zsys on Ubuntu Desktop going forward? I’m personally very keen since BTRFS is still lacking in some departments like encryption - LUKS on ssd means no trim, which is a problem.

7 Likes

I noticed the same thing, QA Testing.
I have the same question 2000260

4 Likes

Thank you for asking this question. I was about to build a new system and was planning on using ZFS this time. I’m glad I saw this before I got started…

1 Like

There have been patches, but the feedback has led to a redesign
Will it be available soon, maybe by 2023?

The new Flutter installer is a frontend for Subiquity and Subiquity does not have ZFS support yet, so no support for installing 23.04 on ZFS root.
Of course, you still can use ZFS for create storages.

3 Likes

But do you know whether ZFS root support is at all planned for subiquity? I know zsys is abandoned, and the main rationale for it was to sync rpool and bpool snapshots and add entries to grub, but there are other alternatives like zfsbootmenu that could be looked at.

It might not notice so much on modern SSD’s but i noticed on an old mechanical drive that ZFS seemed faster and smoother than Btrfs so i hope ZFS continues to be supported.

3 Likes

Does ZFS have SMR and Zoned device support?
Btrfs since kernel 5.12 has initial support for Zoned devices and in development to also enable Raid.

To date, Btrfs has advantages over even ext4 on SMR devices, which are popular among consumer users.

Nice that Btrfs is making Raid improvements but i can’t see that helping people on low end devices or laptops to be honest.

I still think Ubuntu ZFS is a better option.

3 Likes

I seem to remember hearing you can’t put a swapfile on a btrfs partition either… you’d have to revert back to a dedicated swap partition. Is this the case?

The swapfile is supported on Btrfs, the only limitation is that it must be “nocow”, the best solution is to put it on a “nocow” subvolume. Since btrfs-progs 6.1 you can do it with this command:

sudo btrfs filesystem mkswapfile swapfile
sudo swapon swapfile

example:

sudo btrfs filesystem mkswapfile --size 4g swapfile
create swapfile swapfile size 4.00GiB (4294967296)

From a feature request, as of today it seems feasible to create a COW swapfile, but as far as I know nobody is working on it: https://github.com/btrfs/btrfs-todo/issues/30

But does the swapfile make sense today? maybe not better zram? See the performance improvement on popOS (Fedora has it by default since several releases): https://www.omgubuntu.co.uk/2023/01/pop_os_zram-update

1 Like

https://www.phoronix.com/news/Ubuntu-23.04-New-Installer-Jan

https://www.omgubuntu.co.uk/2023/01/ubuntu-zfs-support-status

This situation has been reported on a couple of websites.

1 Like

Seems like the main issue at hand is GRUB and its lackluster ZFS support, mandating all the complexity around two boot pools and zsys to keep snapshotting in sync for recovery from GRUB.

I have a single, ZFS root pool with native encryption, and ditched GRUB entirely, going with ZFSBootMenu instead with automatic snapshots via sanoid. This works really well. Perhaps something that Ubuntu could ship for desktop, although it’s limited to EFI. There’s a guide here for the tinkerer: https://docs.zfsbootmenu.org/en/latest/guides/ubuntu/uefi.html

6 Likes

@copong

Thanks for posting the link, it looks quite daunting.

1 Like

Thanks for heads up on this. Having just committed to ZFS on root on my 22.04 install for my main work machine recently, this news is a bit disappointing. Hoping we see some movement on continued ZFS support in the next LTS releases…

2 Likes

It’s pretty straightforward actually, and afterwards you end up with a super-barebones install you can build on top of.

1 Like

I reinstalled my laptop some weeks ago. I had previously used the Ubuntu ZFS experimental option. This time I used https://github.com/Sithuk/ubuntu-server-zfsbootmenu, which makes the ZFSBootMenu install a lot simpler.

3 Likes

Hi all, any updates on a viable ubuntu installer using zfs?

My current modus operandi is to use an ubuntu kinetic installer, and then during the install use my zfs ppa to get a more recent version of zfs (2.2.0rc1) installed for use during the install from my ppa: https://launchpad.net/~satadru-umich/+archive/ubuntu/zfs-experimental

However, as of today, I can no longer update the kinetic build on that ppa to 2.2.0rc2, as I’m getting a “kinetic is obsolete and will not accept new uploads” message. I suppose I can create a focal backport, but that’s more frustrating as that requires modifications to the source to work.

There are patches for OpenZFS 2.2 to support kernel 6.5 going in, and hopefully it will be fully supported by the release version of 2.2, but it would be nice not to have to juggle multiple versions of OpenZFS and multiple ubuntu updates to get us to a working release when I’m doing a clean install.

(I’d prefer not to use ubuntu-server-zfsbootmenu as the existing grub integration seems to work quite well…)

I guess judging by https://github.com/canonical/subiquity/pull/1731 it looks like subiquity is going to have zfs support?

1 Like

https://www.phoronix.com/news/Ubuntu-23.10-ZFS-Install

Ubuntu 23.10 Restores ZFS File-System Support In Its Installer

2 Likes

That’s great news, but I think Canonical need to rethink the approach for root zfs. The current system is really cumbersome and let’s be honest, it’s held with saliva and swearwords with grub hacks and zsys.

The best implementation for a zfs root system, and that’s what I’ve been using for a year, goes by using a single zfs pool for root, ZFSBootMenu and sanoid (for fs, boot and snapshots) instead of separate root/boot pools, grub and zsys. It’s UEFI only (because of ZFS boot), but in this day and age for a desktop computer I don’t see the downside.

2 Likes