‹ BackHN Continuity

Thread

Btrfs/ZFS/bcachefs under workloads classic benchmarks skip

179 points · 190 comments · farlight

  1. lproven · · focus · HN ↗
    Interesting although I'd have liked more summaries: there's an awful lot there.

    But the reasons I choose filesystems are more about reliability, failure modes, surrounding tooling, and so on.

    Btrfs fails in several critical areas:

    1. No way to accurately find free space

    2. catastrophic failure on write if a volume fills up, the probability of which is greater because of #1

    3. repair tools usually do not recover a corrupted volume and in my testing are most likely to render as damaged volume completely unreadable, which makes #2 worse

    Put these things together and I can never trust Btrfs again. In the 9 years since I encountered these, I see no effort to fix them, just fooling around witg unimportant side details like performance tweaks.

    Fix the critical issues first then make it faster.

    1. raegis · · focus · HN ↗
      Does the report say any of this? I only see "FAIL" on a few tests with ext4 and one with xfs.
      1. koverstreet · · focus · HN ↗
        It's hard to show with any accuracy how likely a filesystem is to not break when the SHTF or something weird happens, or if they've handled all the weird corner cases, with any kind of automated test.

        For that you have to dig into the methodology, look at the code, look at user reports, etc.

        But you can get a pretty good approximation just from the philosophies and attitudes of the engineers and what they're talking about.

        The talk I just gave at the Rust for Linux conference was all about that - how do we make the system debugable, the community aspect of how we respond to bug reports and talk to users, the prep work for the Rust conversion and formal verification and how we're approaching all that.

        Reliability doesn't come out of nowhere, "all bugs are shallow with enough eyeballs" really doesn't apply to filesystems. You just have to plan for it, come up with a methodology, and do the work.

      2. lproven · · focus · HN ↗
        It's not just me and it's had serious problems for years:

        <a href="https:&#x2F;&#x2F;arstechnica.com&#x2F;gadgets&#x2F;2021&#x2F;09&#x2F;examining-btrfs-linuxs-perpetually-half-finished-filesystem&#x2F;" rel="nofollow">https:&#x2F;&#x2F;arstechnica.com&#x2F;gadgets&#x2F;2021&#x2F;09&#x2F;examining-btrfs-linu...

        &lt;- 5Y ago.

        It&#x27;s not materially better now. The devs are in denial about the problems because lots of big users are saying &quot;works fine on my machine.&quot;

        Sure, if you have lots of backups, if you have huge volumes on huge disks and they never fill up...

        But it&#x27;s the default in Fedora, Spiral Linux, Garuda Linux, siduction and others. Personal distros for people&#x27;s own PCs and those are not well-supported enterprise kit.

        1. chasil · · focus · HN ↗
          SUSE also famously uses btrfs on the root file system.

          Don&#x27;t ever let it fill up!

          1. lproven · · focus · HN ↗
            Exactly.

            SUSE takes snapshots before packages are installed. The package manager cannot tell if the disk will fill up as a result because on Btrfs the `df` command lies.

            If its Btrfs root fills up and the OS writes to it, it 100% will self-destruct, and the `btrfs-repair` tool (`fsck` replacement) cannot fix drives and usually makes the corruption worse and renders the drive unreadable.

            This is why in the earlier thread about swapfiles...

            <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49618087">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49618087

            ... I advised 2 commenters not to recommend keeping the OS and data in a single big volume. I got downvoted for it. I was rude. Well, I was, but I stand by my comments even though I&#x27;m sorry for my tone when I made them.

            1. chasil · · focus · HN ↗
              You were absolutely correct to be rude.

              A pragmatic fix would trigger read-only failure mode at 90% usage of the mount as a whole, with all subvolumes.

              1. lproven · · focus · HN ↗
                Thanks!

                And you know what, that&#x27;s a great idea.

                1. chasil · · focus · HN ↗
                  The more practical advice is to resize hard partitions down by 5-10%.

                  I have a loopback mount on an fallocate file with a btrfs filesystem inside of it at work. I&#x27;m using send&#x2F;receive to make sure there is hope of recovery.

                  I wrote this several years ago.

                  <a href="https:&#x2F;&#x2F;www.linuxjournal.com&#x2F;content&#x2F;btrfs-centos-living-loopback" rel="nofollow">https:&#x2F;&#x2F;www.linuxjournal.com&#x2F;content&#x2F;btrfs-centos-living-loo...

                  1. lproven · · focus · HN ↗
                    That is excellent stuff -- thank you!
    2. sandreas · · focus · HN ↗
      This. Btrfs blew up without ANY reason at all in my case. Rebooted and the system won&#x27;t even recognize any filesystem. All btrfs tools fails to recover a single file.

      Here is my journey: <a href="https:&#x2F;&#x2F;forum.cgsecurity.org&#x2F;phpBB3&#x2F;viewtopic.php?p=39143" rel="nofollow">https:&#x2F;&#x2F;forum.cgsecurity.org&#x2F;phpBB3&#x2F;viewtopic.php?p=39143

      I switched to ZFS and never Bad a Problem again.

      1. burnt-resistor · · focus · HN ↗
        I used ZFS until it self-corrupted and refused to mount rw ever again. Community support was totally unhelpful and there was no resolution except buy another array and use something else. There&#x27;s way too much ZFS cult fanboy glazing out there it doesn&#x27;t deserve.
        1. lproven · · focus · HN ↗
          Now that&#x27;s something I&#x27;ve not heard of before. On what OS? What happened, as far as you know or can tell?

          It would mount read-only, then? So you could copy your stuff off onto other media? Because if so, it&#x27;s better than my experiences with Btrfs.

      2. FrinkleFrankle · · focus · HN ↗
        I&#x27;ve had a ZFS array running since ~2009. It&#x27;s gone through upgrades and disk replacements, etc. Have not suffered a data loss in that time. ZFS I&#x27;d the goat.
    3. KrOctave · · focus · HN ↗
      This is why I have fully switched to Bcachefs, which is just way more stable and performant than btrfs
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.