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.

2 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.

2 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…

1 Like

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

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.

1 Like