News for hackers. Stuff that matters.
Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by kstenerud on Monday August 31, 2020 @06:16AM (#24329954)
Oh thank god there's a way to disable autosnapshot! It's been filling my drive with useless snapshots ever since I installed Ubuntu with zfs support, drowning out my real snapshots. Who needs a snapshot after calling "apt install htop" anyway? The ZFS snapshot and grub update processes increase the install time 3-fold, and run the risk of seriously hooping the system if the power goes out unexpectedly.

Has anyone had any real problems with apt install or apt remove busting their systems? Seems more like a solution in search of a problem.

Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by jka on Monday August 31, 2020 @07:06AM (#24330189)
Problems due to apt operations should be pretty rare, but even uncommon events can be worth de-risking. The value in providing this kind of feature is:

* For expert users who have hosed a system -- particularly if it happens to be a production host -- there's an immediate sense of relief and ability to rollback safely, confidently and quickly.

* For less-experienced users who run into problems, there is a convenient and straightforward way for their technical support to explain to them how they can restore their system to a previous state.

Since hosts and their installed packages have varying hardware and configuration states and update/maintenance schedules, incompatibilities and breaking changes are likely to occur occasionally and that's where snapshots can help.

Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by derefr on Monday August 31, 2020 @11:14AM (#24332279)
> Who needs a snapshot after calling “apt install htop” anyway?

I’d think the more useful feature would be taking a snapshot at the beginning of the apt run; and then tossing it away if apt manages to complete successfully. That way, apt returning a nonzero exit status could be caught by a wrapper script, that would then transactionally revert the changes.

I believe NTFS still does this for Windows updates, even if “transactional filesystem” features are no longer “available” (i.e. exposed to userland.)

Of course, unlike NTFS’s filesystem transactions, ZFS snapshots aren’t MVCC — you can’t have multiple parallel ones going on at once that get merged on success. So that apt-wrapper-script reverting, might throw away something else you’ve done to your rootfs (and hopefully only your rootfs; such a technique would effectively require moving all user-mutable data to other mounted volumes.)

Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by danudey on Monday August 31, 2020 @06:48PM (#24336646)
Apt completing successfully is not the same thing as the installation completing successfully. For example, Apt could successfully update a bunch of libraries, versions, etc. which now breaks your application, but because apt's actual tasks succeeded the snapshot gets removed and now you can't roll back.

> and hopefully only your rootfs; such a technique would effectively require moving all user-mutable data to other mounted volumes

I believe that zfs installation creates a separate dataset for /home, meaning that it won't be rolled back along with everything else. The same should be true for things like /var/lib/, but I haven't done such an install in a while, since the first 20.04 build with zfs enabled.

Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by chromatin on Monday August 31, 2020 @02:41PM (#24334613)
Illumos/Solaris does this and calls the snapshot a “boot environment”. # man beadm

Incredibly frustrating if you don’t know about it, and incredibly helpful if you do.

Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by craftkiller on Monday August 31, 2020 @12:59PM (#24333409)
> The ZFS snapshot and grub update processes increase the install time 3-fold

Creating ZFS snapshots is almost instantaneous due to the CoW nature of the filesystem. Is it deleting old snapshots during that process? If so, I'd suggest checking to make sure you have the async_destroy feature enabled for your pool.

Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by viraptor on Monday August 31, 2020 @06:40AM (#24330067)
> run the risk of seriously hooping the system if the power goes out unexpectedly.

You have a snapshot to go back to in that case. It saves you exactly from power-loss kind of situation.

Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by kstenerud on Monday August 31, 2020 @06:42AM (#24330075)
Except that a power outage during the grub update leaves your machine unbootable. It's why I try to do as few grub updates as possible.
Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by curt15 on Monday August 31, 2020 @08:17AM (#24330662)
Fedora patches grub to read kernel information from drop-in config files (https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefau...). This lets them update the list of kernels without modifying grub.cfg.
Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by boomboomsubban on Monday August 31, 2020 @07:16AM (#24330236)
It should throw you into a recovery terminal, where you can manually point to the things necessary to boot. Grub updates don't really do much.
Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by jlgaddis on Monday August 31, 2020 @07:17AM (#24330241)
And, if that happens, this will still make it easier (and quicker) to get the machine vack up and running.
Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by necheffa on Monday August 31, 2020 @09:21AM (#24331158)
Not a big deal if you have a live USB/disk laying around.
Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by amaccuish on Monday August 31, 2020 @02:37PM (#24334562)
I mean, that would happen without the snapshots?
Re:Ubuntu 20.04’s zsys adds ZFS snapshots to package management by AnIdiotOnTheNet on Monday August 31, 2020 @09:54AM (#24331456)
> Has anyone had any real problems with apt install or apt remove busting their systems?

Yes, but even so it is far rarer than being frustrated waiting for f'ing grub update.