Finally. I got used to this on solaris 10 and missed it until FreeBSD got it.. ZFS and beadm are the included in the reasons i continue to run FreeBSD as a workstation, but these days with k8s and such I do tend to run a lot of linux VMs to do my daily work (devops stuff)...
The work lappy runs ubuntu with zfs on root, and it's pretty seamless, I'm very much onboard with it having boot environments! (zsys)
They make adaptors that let you replace the optical drive with another SATA drive. But my FreeBSD laptop has one disk and it's fine. You don't have redundancy, but you still get all the other features (snapshots, clones, compression), and even if it can't correct errors it will still catch data errors which is more than most other filesystems will do.
In 20.04 they will have ZFS on root with BEs as an install option, looking forward to seeing the first major Linux distro making it available as a default.
I'm surprised that they did not do that yet. While ZFS license status is questionable, Canonical seems to be sure that everything's OK, so they should embrace its technical superiority. Something like full system rollback after bad update is trivial with snapshots and it's extremely useful feature.
Looks to be that's what they have done. They've developed a new tool called `zsys` https://github.com/ubuntu/zsys which will help with system administration, rollbacks, auto snapshots before and after package changes. I believe it will also support boot environments.
Oh, this is cool! We'll need to check out this plugin mechanism as a thought for bectl -- it's fairly inflexible at the moment.
libze_util_temporary_mount would be a good candidate for using (or being replaced by?) the recently-introduced zfs_mount_at in libzfs once that's widely available enough. That was a fairly trivial addition to libzfs that was initially made to support libbe's be_mount(), which previously used the effectively non-portable amount() [post-mortem: should read zmount, but autocorrect is alwayscorrect]
loader ZFS integration is really great on FreeBSD, do people occasionally want to use something else? Is that why you would consider looking to support other options? Really would be nice to see loader ported to Linux - I know it was recently brought over to Solaris. Maybe a project for another day...
Thanks for the tip, the temporary mounting seems a bit like a hack so that's good to know there's a better option.
I've seen the occasional rumbling about folks wanting to use grub for one reason or another- while not necessarily ideal (having the caveats of a non-loader environment), I can see the value in it if you really don't need the amenities loader offers (debugging support, kmods).
Looks cool. Currently only one machine which I have with zfs is NixOS, which has it own mechanism to handle such versioning, or do you see some advantages of using zfs approach?
I used to use NixOS, and I do have some of the best ZFS support out of the box I've seen on Linux. I'm not sure if the approach of using zfs boot environments would play well with NixOS considering how they manage the configuration and rollbacks separately. They also manage the bootloader, so I don't know if the changes would survive. Something could probably be set up to work, but it would probably feel as though you were working against the intended way the system should work.
I haven't tried it myself with encryption, but I can't see it making a difference. The bootloader, and initial ZFS setup will be what needs to be changed to facilitate encryption.
Hmm, how/when/where would the ‘zfs load-key’ happen?
I only know how to use the systemd-ask-password hack to decrypt non-root datasets, but can’t get my head around how that would work with fully encrypted root dataset.
Presumably it would be like FreeBSD's GELI, where early boot stuff would need to detect that it's looking at an encrypted root and know to prompt. In theory, this is relatively straightforward- with boot environments, the zpool bootfs property indicates the root dataset, so I wouldn't think you need to look too far.
[edit: this is done in our loader, so presumably you'd use grub?]
The work lappy runs ubuntu with zfs on root, and it's pretty seamless, I'm very much onboard with it having boot environments! (zsys)