3 ms·
> 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; a
by derefr 6y ago
> 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.)
- chromatin 6y agoIllumos/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.
- danudey 6y agoApt 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.