76 points · by mariuz · 6y ago · 89 comments
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.
* 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.
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.)
> 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.
Incredibly frustrating if you don’t know about it, and incredibly helpful if you do.
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.
You have a snapshot to go back to in that case. It saves you exactly from power-loss kind of situation.
Yes, but even so it is far rarer than being frustrated waiting for f'ing grub update.
* https://docs.oracle.com/cd/E86824_01/html/E54764/beadm-1m.ht...
Understandably some people may be more interested in not losing their data than the licensing headaches it may come with, so ZFS it is.
Some, like yours truly, run FreeBSD on their NAS, where there are no license issues either, and are very happy it rebased on OpenZFS recently.
Btrfs has been working fine for years and is used largely at Facebook. RAID 5 and RAID 6 are still unstable (and marked as such) but the rest just works.
I get the feeling that if you are a ZFS user then RAID 5 & 6 not working is just a deal breaker.
The RAID5/6 issues are significant, but don't pretend that Btrfs would be OK if these problems were resolved. There are still many others waiting to be fixed as well.
Btrfs was originally introduced in Linux 2.6.29 in March 2009. It is still flakey in many situations.
ZFS was first release in Solaris 10 6/06 in June 2006, with it being open source almost right away. OpenZFS was forked in August 2010.
Should Btrfs at some point simply be declared a sunk cost and something new be created? Because from the outside it looks like it's hardly gaining any traction because of its reputation for eating data (maybe only with its RAID code, but still).
That's why btrfs RAID5/6 mode is in the sorry state it is. Nobody capable of paying the piper is interested in it. It is a domain of datahoarders, but that's not where the money is. Even Synology has put btrfs on top of mdraid for that.
Outside the parity modes, btrfs is stable and reliable. It is here to stay.
[1] https://www.zdnet.com/article/why-raid-5-stops-working-in-20...
ZFS will never be part of the Linux kernel due to both licensing issues and it including its own crypto, cache and other subsystems.
Personally I have high hopes for bcachefs, but Btrfs is here to stay.
btrfs was removed from RHEL because RedHat themselves don't have the time or energy to support it or support systems using it. That's going to hurt adoption. Ubuntu is working actively towards ZFS as an available/default option, and once it is there's not much point in using btrfs unless you have specific use cases. Everyone else I know either uses ZFS or XFS in production. For my systems, I would definitely not trust btrfs with critical data.
Here's the thing: btrfs is 'fine', but it's not 'good'. It's the only filesystem since 2001 where I've suffered unrecoverable filesystem corruption as a result of a power outage (on a fresh 18.04 installation last November) and had to salvage data and reinstall.
The tooling, in a lot of cases, does the opposite of ZFS and touts it as a feature. For example, snapshots are not recursive and they say that this is great for if you want to snapshot / but not /home; this is true, but it also means that I cannot subdivide datasets.
For example, on ZFS I divide up /var/lib/mysql/ into /var/lib/mysql/tablespace/ and var/lib/mysql/logdb, for example, since both of those have different access patterns and block sizes (16k and 128k respectively). ZFS lets me do this to optimize reads and writes, but I can also atomically snapshot them both. btrfs doesn't let me do an atomic, recursive snapshot at all (and I'm not sure if it can handle different block sizes per subvolume either).
Basically, ZFS is a better, production-ready, enterprise-proven, and surprisingly intuitive filesystem and volume management system, and has been for 14 years. btrfs has weird tooling, incomplete features (which they don't just remove from the roadmap for some reason), data loss issues, and the only large-scale use I've heard of it Facebook, who also work on it (easier to use btrfs when you've hired all the experts).
With Ubuntu shipping ZFS enabled by default, most reasons to use btrfs go away; it's not mainlined in the kernel, but that doesn't matter if your distribution has it enabled and supported by default.
Like Mir, Unity, Upstart and all the other technologies Ubuntu adopted, but removed after a while again? I always have the feeling that the Canonical engineers try to advance the Linux ecosystem by introducing new technologies, but somehow always pick the wrong ones, which end up not being adopted anywhere else. Granted that's different with ZFS, as ZFS already has a large user base, but there is nothing guaranteeing that Ubuntu won't remove ZFS in a few years again.
It had a long run, and it’s still more usable than gnome3 for power users. Unity wasn’t successful but wasn’t deficient.
Upstart wasn’t as good as systemd that cane after it or daemontools that came before, but it WAS an upgrade compared to the knit scripts.
Ubuntu/canonical are not afraid to try, which I think deserves more credit.
They don’t have the clout/pockets to push less popular things like systemd the way RedHat does, until all the problems are sufficiently minor.
Oh, and snap and Mir we’re both attempts at grabbing control and both deserve the scorn.
The other projects were (for the most part) anonical originals" that they tried to create -- primarily on their own -- to replace existing products. ZFS is going on 15 years old, quite mature, highly trusted, and, of course, it already has a huge existing userbase.
It's certainly not an internal Canonical project that requires them to devote huge teams of developers to it. Unlike the others you mentioned, ZFS will continue to exist and grow regardless of Canonical's involvement.
Is still used in some maintained RedHat distros, I assume this burns people like you each time is mentioned.
FWIW, SUSE is the Enterprise Linux vendor that has went "all in" on btrfs.
---
Two semi-related, personal thoughts:
1. btrfs today feels a lot like reiserfs did (going on / nearly) 20 years ago.
2. I expect Oracle to -- at some point -- integrate ZFS into Oracle (Enterprise) Linux. That seems like a great way for them to win over some "converts" from RHEL.
---
Btrfs goes though a rapid development; so Redhat has to backport everything to their ancient 3.10 (RHEL7) kernel all the time. That's a lot of work.
Fedora, on the other hand, uses current kernels. They do not have to do this work.
Redhat also cannot choose ZFS while in the license limbo; that's why they push for Stratis.
It is stable, certainly stable enough for enterprise production use according to SUSE.
Also, do these Debian cautionary notes still apply to new code:
> There is currently (2019-07-07, linux ≤ 5.1.16) a bug that causes a two-disk raid1 profile to forever become read-only the second time it is mounted in a degraded state
Still, I’d love to see more people adopt btrfs because I think diversity in filesystems is a good thing.
I like btrfs because it is just a `cinst winbtrfs` away on win32
or perhaps my impression after this recommendation is wrong and this actually isn't working well?
much confuse
OpenZFS is still open source and available on FreeBSD (amongst others). The licence might not be GPL compatible but the way ZFS is shipped on Linux there isn't any GPL/CDDL mixed code bases (and it's not like there isn't already a long history of GPL-incompatible software licences with Linux kernel modules anyway).
Hence, Canonical (or anyone else trying to re-release under the CDDL) cannot distribute binaries of the kernel modules.
However, you are fully allowed to compile and link the two on your own. This is why the alternative to binary distribution is compiling yourself with the help of DKMS.
As a result, it would be extraordinarily difficult for Oracle to sue since it would not be the CDDL licence terms which were infringed.
I believe the bug which caused this is now fixed, but who really knows what other nasties linger on waiting to be triggered.
In comparison, ZFS has been a dream. I even moved terabytes of data between a Linux system and a FreeBSD server simply by swapping the discs over and running "zpool import". Superb data portability.