News for hackers. Stuff that matters.
Re:Btrfs Coming to Fedora 33 by jiggawatts on Monday August 24, 2020 @05:41AM (#24258973)
I'm reading through the links, and at first I thought this was a historical problem that was last reported in 2016/2017, but then gems like this from mid 2020 are popping up:

    "When 'btrfs scrub' is used for a raid5
    array, it still runs a thread for each disk, but each thread reads data
    blocks from all disks in order to compute parity.  This is a performance
    disaster, as every disk is read and written competitively by each thread"
I have no words. Why would anyone ever think that this is a good idea? Who sat down at their computer and typed the code that does this!? How was this never tested?

You know what, thinking about it, I do actually have some rather choice words to describe the situation:

This boggles the mind to a level that requires further explanation, because the casual observer would likely fail to grasp the enormity of the failure that has occurred here. This isn't like, "oops, I forgot to up-shift gears in my car when going on the onramp", this is more like "the pilot forgot about the flaps after takeoff and the plane ran out of fuel.". There's a fundamental difference in the expectation of quality between, say, a random command line utility and a RAID filesystem.

To give some context: BTRFS was developed largely concurrent with, and in direct competition to Sun's ZFS. Unlike all previous SAN arrays, RAID cards, and filesystems, ZFS was explicitly designed for reliability. Sun famously had a 'test rig' where they abused each new build to death. Physically pulling disks. Randomly corrupting blocks. Running multiple operation types in parallel, while pulling disks. That kind of thing.

When I read ZFS whitepapers, I was amazed at how many fundamental flaws in RAID integrity protection they discovered, and then solved. Rigorously.

Meanwhile, BTRFS literally says, in 2020: Don't trust is, especially not for metadata, or data, or while scrubbing, which you had better baby-sit, otherwise say goodbye to your production environment!

More fun quotes:

    - plan for the filesystem to be unusable during recovery.
    - be prepared to reboot multiple times during disk replacement.
    - btrfs raid5 does not provide as complete protection against 
      on-disk data corruption as btrfs raid1 does.
    - scrub and dev stats report data corruption on wrong devices
      in raid5.
    - scrub sometimes counts a csum error as a read error instead
      on raid5.
    - errors during readahead operations are repaired without
      incrementing dev stats, discarding critical failure information.
      This is not just a raid5 bug, it affects all btrfs profiles.
You'd have to be nuts to use BTRFS for RAID 5 or 6, and I would question its use for any form of RAID.

PS: To the people downvoting this, please explain how you like people to be uninformed about catastrophic data corruption going ignored for 4 years below in the comments.

Re:Btrfs Coming to Fedora 33 by viraptor on Monday August 24, 2020 @05:47AM (#24259005)
> How was this never tested?

You're describing this like it's supposed to work. Btrfs-raid5 is clearly labelled as a bad idea in pretty much every relevant doc. It's not an issue that the tool is broken for this use case because you're not expected to actually try that configuration. mkfs.btrfs specifically says: "RAID5/6 is still considered experimental and shouldn’t be employed for production use."

It's really not that big of an issue in that context. "How was running with scissors never tested for safety?" - just don't try it in the first place.

Re:Btrfs Coming to Fedora 33 by buster on Monday August 24, 2020 @06:32AM (#24259260)
Probably yes, but i think the comment was also about why was it implemented that way in the first place, questioning the ability and quality of the corresponding developers or how it was possible to be introduced into the filesystem code, when everybody seems to know that this is horribly broken.

Personally, i would understand if some developers tried a new approach on this raid5/6 and possibly come up with new and better solutions. I am wondering why it seems to be available in mainline. Why wasn't the patch/fork/branch rejected or why wasn't the option disabled or the code completely removed? I don't have btrfs installed but it sounds like this option is available in every btrfs release, although it is warned about to NOT USE IT. Why is it available in the first place?!

Re:Btrfs Coming to Fedora 33 by maccam94 on Monday August 24, 2020 @06:24AM (#24259218)
> BTRFS was developed largely concurrent with, and in direct competition to Sun's ZFS

ZFS started development in 2001, and released on Solaris 10 in 2006. Btrfs started development in 2007, and the disk format was stabilized in 2013. ZFS has continued to gain features over the years, but I would say btrfs was largely developed after ZFS and still hasn't reached feature parity with the original release of ZFS due to the RAID5 issue.