News for hackers. Stuff that matters.
Re:Bcachefs Merged into the Linux 6.7 Kernel by pantalaimon on Tuesday October 31, 2023 @07:50AM (#38083348)
ZFS will never be integrated into the Linux kernel due to it's licence. btrfs is complicated to use and has many pitfalls that can lead to it eating your data.
Re:Bcachefs Merged into the Linux 6.7 Kernel by ndsipa_pomu on Tuesday October 31, 2023 @07:58AM (#38083417)
> btrfs is complicated to use and has many pitfalls that can lead to it eating your data

I use btrfs in preference over ext4 for Linux filesystems and turn on zstd compression for performance and a bit of space saving. It seems simple enough for my use case, though I'm not doing any snapshots etc.

What are some of the potential pitfalls?

Re:Bcachefs Merged into the Linux 6.7 Kernel by pantalaimon on Tuesday October 31, 2023 @08:07AM (#38083508)
I was very excited about btrfs' advanced features, but that meant that btrfs would bite me multiple times when I expected it to 'just work™':

- RAID5/6 are still not stable

- it will not mount a RAID in degraded mode automatically, failing the high availability promise that might tempt you towards RAID.

- swapfile support exists, but it breaks snapshots (and I don't want to snapshot the swapfile)

- Just an Ubuntu/Debian thing, but snapshots are not integrated into the update process unless you install `apt-btrfs-snapshot` (and know that package exists)

Re:Bcachefs Merged into the Linux 6.7 Kernel by ndsipa_pomu on Tuesday October 31, 2023 @08:18AM (#38083622)
> Just an Ubuntu/Debian thing, but snapshots are not integrated into the update process unless you install `apt-btrfs-snapshot` (and know that package exists)

Thanks - I did not know about that.

I agree with the stance of not mounting a degraded RAID automatically as then the danger is that someone might not notice it and be subjected to total data loss later on. The best option would be to allow over-riding that choice if the RAID is otherwise monitored.

Re:Bcachefs Merged into the Linux 6.7 Kernel by webstrand on Tuesday October 31, 2023 @09:16AM (#38084353)
Can you not just place the swapfile inside of another subvolume? Since subvolumes are not included in snapshots. There's generally a bunch of stuff in /var that you don't want to include in snapshots, too, so it's not like putting the swapfile inside of a subvolume is an exotic task.
Re:Bcachefs Merged into the Linux 6.7 Kernel by pantalaimon on Tuesday October 31, 2023 @09:30AM (#38084517)
I guess so, I just didn't know when I created the swapfile and was surprised later when I tried to create a snapshot.
Re:Bcachefs Merged into the Linux 6.7 Kernel by xorcist on Tuesday October 31, 2023 @02:12PM (#38089017)
Be careful, just like disk images, you probably don't want to place swapfiles on a CoW filesystem.
Re:Bcachefs Merged into the Linux 6.7 Kernel by Bu9818 on Wednesday November 01, 2023 @04:25AM (#38095793)
You can mark individual files as No_COW in btrfs, and No_COW + preallocation is a requirement for swapfiles anyway due to how the swap subsystem works.
Re:Bcachefs Merged into the Linux 6.7 Kernel by rini17 on Tuesday October 31, 2023 @09:35AM (#38084580)
- RAID5/6 are still not stable

Why does everyone insist on RAID5? I am completely fine with btrfs RAID1, survived few disk crashes as advertised.

- it will not mount a RAID in degraded mode automatically

it will if using -o degraded, it's the tooling which generally sucks and won't support this. I had problems setting up / on multi-device btrfs using recommended tools (dracut, grub-mkconfig), the bugs are known and unfixed, ended up rolling out own initramfs.

- swapfile support exists, but it breaks snapshots

you are supposed to have all your stuff in a subvolume, and snapshot that, not whole toplevel root filesystem...and yes it should be documented better that it interferes with snapshots

- but snapshots are not integrated..

yep tooling sucks

Re:Bcachefs Merged into the Linux 6.7 Kernel by dinosaurdynasty on Tuesday October 31, 2023 @10:39AM (#38085556)
RAID1 is a lot more expensive and/or stores a lot less data than RAID5/6.
Re:Bcachefs Merged into the Linux 6.7 Kernel by rini17 on Tuesday October 31, 2023 @10:49AM (#38085707)
How much is the "a lot"?
Re:Bcachefs Merged into the Linux 6.7 Kernel by pantalaimon on Tuesday October 31, 2023 @11:03AM (#38085945)
You can try yourself: https://carfax.org.uk/btrfs-usage/

But generally, RAID1 gets you 50% of storage space, whereas RAID5 gets you 66% (and any odd combination of disks).

Re:Bcachefs Merged into the Linux 6.7 Kernel by bmicraft on Tuesday October 31, 2023 @12:58PM (#38087902)
RAID5 should actually get you n-1 disks of space (if they're equally large), while raid1 only gets you n/2
Re:Bcachefs Merged into the Linux 6.7 Kernel by __david__ on Tuesday October 31, 2023 @06:45PM (#38092403)
Raid1 actually gets you less than that. If you mirror 5 drives that only gives you 1 drive worth of data (with 4 redundancies).

But… you have to weigh it against losing all your data. With raid5 if any 2 of your disks die at the same time then you've lost your volume and most likely 100% of your data (no matter how many disks you have).

With raid1 you have to lose _all_ your disks before that happens. Typically that's also just 2 but you can mirror 3 or more drives if you need some data to be _really_ resistant to disk failures and you don't care about "wasting" n-1 times the space.

So you end up trading off efficiency of storage space and resiliency to data loss.

Myself, disks got cheap enough that I always just buy 2 disks and mirror them. I find it easier to reason about overall, especially in the face of a degraded array.

Re:Bcachefs Merged into the Linux 6.7 Kernel by rini17 on Tuesday October 31, 2023 @07:28PM (#38092732)
We're talking about btrfs raid1 here which always gives you half of total capacity of all disks (except for extreme cases). With 5 drives it's 2.5 drive worth of data. If 2 drives die means 1 drive worth of data was lost (more or less, depends on balance).
Re:Bcachefs Merged into the Linux 6.7 Kernel by keep_reading on Tuesday October 31, 2023 @10:08AM (#38085051)
> it will not mount a RAID in degraded mode automatically,

I remember when btrfs was very young and they announced the ability to create mirrors. I tested this out and was pleased, and then I tested the failure scenario: pull a drive, try to boot.

It wouldn't boot!

I jump into IRC and ask if it's expected that you can't boot from a degraded mirror and the answer was "not supported" which means the mirror is pointless.

Obviously it has improved since then as there's a way to force it to work, but I returned to ZFS on FreeBSD and never looked back

Re:Bcachefs Merged into the Linux 6.7 Kernel by nwmcsween on Tuesday October 31, 2023 @06:33PM (#38092304)
Yeah this is the probably the worst default for a fs that supports raid.
Re:Bcachefs Merged into the Linux 6.7 Kernel by wtallis on Tuesday October 31, 2023 @07:50PM (#38092886)
It's the safest default. If you want a filesystem that automatically downgrades the safety of your data when things go wrong, you should have to opt-in to such behavior (and btrfs does make that possible).
Re:Bcachefs Merged into the Linux 6.7 Kernel by keep_reading on Tuesday October 31, 2023 @08:44PM (#38093284)
There's less risk of damage from running off a single disk in a faulted mirror than to rebuild the mirror. The stress the drive is under to rebuild can and will kill drives at the end of their life.
Re:Bcachefs Merged into the Linux 6.7 Kernel by wtallis on Tuesday October 31, 2023 @09:26PM (#38093548)
If one half of a mirrored pair dies, you're left with one copy of the data on a drive that's at risk of also dying, plus whatever portion of the data you have backed up. If you then write new data to that drive, it isn't mirrored anywhere and is also guaranteed to not be backed up yet. So the newly written data is at equal or higher risk than the data that was already on the surviving drive. It's not hard to see how silently accepting new writes that cannot be mirrored could be an unacceptable risk to some end users.

With btrfs, you can easily add a new drive so that new writes can be accepted and mirrored immediately, then start rebuilding the old data with lost redundancy (possibly after running another incremental backup, which will be less stressful to the drive than the full rebuild). But the "add a new drive" step happens outside the kernel, in userspace and possibly in meatspace, so it can't be a default action for the kernel to take.

Re:Bcachefs Merged into the Linux 6.7 Kernel by ndsipa_pomu on Wednesday November 01, 2023 @07:54AM (#38097090)
If that is a concern, then it sounds like running mirrored disks isn't sufficient for your use case and maybe require three disks to enable a disk failure and a rebuild to not cause an issue.

Also, if you're happy running off a single disk in a faulted mirror, then I'd question why you've got the mirror setup at all.

Re:Bcachefs Merged into the Linux 6.7 Kernel by viraptor on Tuesday October 31, 2023 @08:14AM (#38083571)
One that seems to catch out many people is that you need to explicitly add the "degraded" option to allow mounting raid volumes which contain a broken drive. This is opposite to almost all other filesystems. I've seen people confused and thinking they lost the whole volume, even though they just need to replace the bad drive and rebuild as usual.
Re:Bcachefs Merged into the Linux 6.7 Kernel by ndsipa_pomu on Tuesday October 31, 2023 @08:21AM (#38083648)
Personally, I agree with that. It's good practise for systems to fail quickly if they find themselves in an uncertain state and with RAID, it's important for the operator to know if they've suddenly lost redundancy so that they can resolve the issue.
Re:Bcachefs Merged into the Linux 6.7 Kernel by viraptor on Tuesday October 31, 2023 @08:26AM (#38083702)
It really depends on what's your situation. At home I probably want the disks to stay idle until replacement. In a bigger production system I want to keep the availability and ping the on-call person to replace the drive in the background.
Re:Bcachefs Merged into the Linux 6.7 Kernel by ndsipa_pomu on Tuesday October 31, 2023 @08:34AM (#38083811)
Exactly - the default should be to get someone to pay attention to it when something breaks, and if you're planning on high availability, then you can choose that, assuming you keep an eye on the health of the RAID.
Re:Bcachefs Merged into the Linux 6.7 Kernel by keep_reading on Tuesday October 31, 2023 @10:10AM (#38085085)
If you can't even boot because of a mystery error how are you supposed to resolve the issue?

It should instead be giving the user error messages written to their terminal, in logs, etc instead of breaking the entire system until the user finds the manual

Re:Bcachefs Merged into the Linux 6.7 Kernel by wtallis on Tuesday October 31, 2023 @10:42AM (#38085606)
If your NAS has a hot spare drive installed then it should probably include the degraded mount option by default and automatically add the hot spare drive to the filesystem in the event of a failure. Alternatively, if there's enough free space on the surviving drives to rebalance the array and restore redundancy without replacing the failed drive, that operation could be kicked off automatically. Or the filesystem can be (hopefully temporarily) set to not store new data redundantly, if that is an acceptable risk for the user. But the filesystem cannot know which method the user would prefer; automatically rebuilding the array involves policy decisions that are outside the scope of the filesystem and requires userspace tooling.

If the system doesn't have spare capacity ready, the only sane response is to not boot/mount normally. "giving the user error messages written to their terminal, in logs, etc" isn't a real solution for something like a NAS with no terminal connected and nobody looking at the logs as long as they can still establish a SMB connection; it's too likely to be a silent failure in practice. Mounting the filesystem degraded but read-only makes sense if it's necessary to boot the system so that the user (or their pre-configured userspace tooling) can decide how to deal with the problem, but a lot of Linux distros aren't happy with the root filesystem being read-only.

In summary: there's no single right answer to the problem of a failed drive, and btrfs defaults to what is the safest behavior based on the information available to the filesystem itself. Userspace tooling with more information can make other, less universal choices.

Re:Bcachefs Merged into the Linux 6.7 Kernel by keep_reading on Tuesday October 31, 2023 @01:22PM (#38088269)
> If the system doesn't have spare capacity ready, the only sane response is to not boot/mount normally.

It doesn't need the spare to "boot normally" and the system can turn on a scary LED, ring bells, call you, text you, hit you up on WhatsApp, DM you on Instagram, or whatever method you want your NAS to use to notify you there's a degradation. (You're monitoring it right??)

This explanation of "it's dangerous to boot off a degraded array" is lunacy. I will not take this terrible advice from armchair experts when I've been doing this for over 25 years

Re:Bcachefs Merged into the Linux 6.7 Kernel by wtallis on Tuesday October 31, 2023 @02:14PM (#38089056)
I didn't say it's dangerous to boot off a degraded array. I said it's dangerous to boot off a degraded array normally. Mounting it degraded but read-only is reasonable, because that prevents silently writing new data without the level of redundancy the user previously requested.

There's nothing terrible about advice against responding to a drive failure by putting the system into an even more precarious state without user interaction.

Re:Bcachefs Merged into the Linux 6.7 Kernel by nwmcsween on Tuesday October 31, 2023 @06:39PM (#38092349)
Just wondering have you worked on any large DCs or large NAS or SAN systems? Drive failures are a daily occurrence in places with a lot of spinning metal, having things fail to boot by default would be a nightmare.
Re:Bcachefs Merged into the Linux 6.7 Kernel by wtallis on Tuesday October 31, 2023 @07:56PM (#38092925)
> having things fail to boot by default would be a nightmare.

Having things fail to boot would just mean you haven't configured your system appropriately for your environment. If you are using a btrfs RAID filesystem for your root filesystem, and you need that fs to be writeable in order to boot, and you want it to boot even if it's missing a drive, then you need to add an extra mount option and a few lines to your init scripts to persist new downgraded RAID settings in the event a degraded mount was necessary.

But that's hardly the only valid use case for btrfs; plenty of users want strong guarantees about the redundancy of their data rather than silent downgrading.

Also, do you really expect me to believe that any of the large shops still running enough spinning rust to have daily drive failures are still booting off those arrays instead of having separate SSDs as their boot drives? Separate storage of the OS from storage of the important data is such a common and long-ingrained practice that it is embodied in the physical layout of typical server systems, and the primary reason for it is the need for different tradeoffs between performance, redundancy, capacity and cost.

Re:Bcachefs Merged into the Linux 6.7 Kernel by curt15 on Tuesday October 31, 2023 @08:33AM (#38083789)
It performs poorly for certain workloads -- notably DBs -- unless you disable copy-on-write, compression, and checksumming. But then why use it over ext4 in the first place?
Re:Bcachefs Merged into the Linux 6.7 Kernel by ndsipa_pomu on Tuesday October 31, 2023 @08:44AM (#38083922)
That's not surprising though, as DBs usually work best when given raw storage - the features of the filesystem are being duplicated by the DB and thus doing almost twice the work.

What seems particularly interesting about Bcachefs is how much it seems to be using database concepts to implement a general filesystem. Ultimately, it seems inevitable that filesystems and databases will converge as they're both supposed to manage data.

Re:Bcachefs Merged into the Linux 6.7 Kernel by PlutoIsAPlanet on Tuesday October 31, 2023 @11:33AM (#38086424)
The "fix" to databases and VMs on btrfs by disabling CoW unfortunately disables nearly all the useful features.
Re:Bcachefs Merged into the Linux 6.7 Kernel by throw0101c on Tuesday October 31, 2023 @08:07AM (#38083513)
> What are some of the potential pitfalls?

RAID-5/6:

* https://btrfs.readthedocs.io/en/latest/btrfs-man5.html#raid5...

Re:Bcachefs Merged into the Linux 6.7 Kernel by viraptor on Tuesday October 31, 2023 @08:18AM (#38083606)
Wouldn't describe that as a pitfall. As far as I can tell, every place in the docs/help which talks about those raid modes tell you they're experimental and shouldn't be used. At that point it's "you've done a stupid thing and discovered the consequences you were told about".
Re:Bcachefs Merged into the Linux 6.7 Kernel by throw0101c on Tuesday October 31, 2023 @08:27AM (#38083713)
It's a feature that other file systems have: why should I choose Btrfs when (e.g.) ZFS can do everything it can and more on top of that?

I remember when Btrfs was announced in 2007 as I was already running Solaris 10 with ZFS in production (and ZFS had non-"experimental" RAID-5-like RAID-Z from day one). Here we are 15+ years later and Btrfs still doesn't have it?

Re:Bcachefs Merged into the Linux 6.7 Kernel by viraptor on Tuesday October 31, 2023 @08:32AM (#38083779)
I'm just saying it's not a pitfall, because it's clearly documented up front and warned about. That's orthogonal to whether you should choose this filesystem and why a feature is implemented or not.
Re:Bcachefs Merged into the Linux 6.7 Kernel by pantalaimon on Tuesday October 31, 2023 @08:33AM (#38083793)
The nice thing about btrfs is that you can add/remove drives at will. That allows for easy expansion of an existing pool.
Re:Bcachefs Merged into the Linux 6.7 Kernel by chasil on Tuesday October 31, 2023 @02:20PM (#38089136)
The one thing that ZFS cannot do is defragment a pool.

There are abuse patterns that are toxic for ZFS pools (and all other filesystems). Btrfs appears to be able to repair this damage.

https://tim.cexx.org/?p=1236

https://www.usenix.org/system/files/login/articles/login_sum...

Re:Bcachefs Merged into the Linux 6.7 Kernel by pantalaimon on Tuesday October 31, 2023 @08:28AM (#38083715)
eh 10 years ago RAID56 was already declared 'pretty much ready', that hint was added later when major data loss bugs were discovered.
Re:Bcachefs Merged into the Linux 6.7 Kernel by Ridj48dhsnsh on Tuesday October 31, 2023 @09:09AM (#38084263)
Just an anecdote, but when I used gocryptfs on a btrfs partition, I'd always end up with a few corrupted files on power failure. After switching to gocryptfs on ext4, I never have any corruption.
Re:Bcachefs Merged into the Linux 6.7 Kernel by redneb on Tuesday October 31, 2023 @09:37PM (#38093631)
I have used heavily[1] the combination btrfs+gocryptfs for many years and had no problems. The only quirk is that I have to pass the -noprealloc flag to gocryptfs, otherwise the performance is really bad.

[1] by heavily, I mean that I use it for my home directory

Re:Bcachefs Merged into the Linux 6.7 Kernel by Ridj48dhsnsh on Wednesday November 01, 2023 @03:31AM (#38095489)
I used it for my home directory too for several years up until a few months ago, but with default settings. The corrupted files were almost always Firefox cookies db and cache files. Maybe there's something specific about how Firefox writes them that makes them prone to corruption.
Re:Bcachefs Merged into the Linux 6.7 Kernel by lproven on Tuesday October 31, 2023 @10:56AM (#38085811)
Aside from the issues described further downthread:

• On Btrfs the `df` command lies. You can't get an accurate count of free space.

• There is no working `fsck` and the existing repair tools come with dire warnings. Take these very very seriously. I have tested them. They do not work and will destroy data.

• The main point of Btrfs is snapshots. [open]SUSE, Spiral Linux, Garuda Linux and siduction all use these heavily for transactional updates.

But the snapshot tool cannot test that there's enough free space for the snapshot, because `df` lies. So, it will fill up your disk.

Writing to a full Btrfs volume will corrupt it. In my testing it destroyed my root partition roughly once per year. It was the most unstable fs I have tried since the era of ext2 in the mid-1990s. (Yes I am that old.)

Re:Bcachefs Merged into the Linux 6.7 Kernel by VancouverMan on Tuesday October 31, 2023 @11:19AM (#38086163)
I've experienced corruption and data loss with Btrfs each of the times I've tried using it, too, after only about a week of use at most.

Thankfully, all of those incidents were with some non-critical, throw-away VMs where the data loss wasn't really an issue.

I've also used ext4 under the same circumstances for years, and I can't think of a single time that I've lost data, nor have I experienced corruption that fsck couldn't easily deal with.

I, too, would have to go back to the 1990s to think of a filesystem I used that was that unreliable.

After what I experienced, I don't trust Btrfs at all, and I have no plans to ever use it again.

Re:Bcachefs Merged into the Linux 6.7 Kernel by lproven on Tuesday October 31, 2023 @12:33PM (#38087470)
I am glad to hear it's not just me!

I worked at SUSE for 4Y and used it every day. The company is in deep denial about its problems, or that there are any problems, and when I pointed at ZFS as a more mature tool, this was actually mocked.

Re:Bcachefs Merged into the Linux 6.7 Kernel by jhoechtl on Tuesday October 31, 2023 @12:50PM (#38087747)
When did you run in any of these issues recently? These issues were a fact in the past but have been sorted out.

df is not lying because the fs layer reports corrupt data but because of dedup and fs layering.

Re:Bcachefs Merged into the Linux 6.7 Kernel by lproven on Wednesday November 01, 2023 @08:22AM (#38097287)
I left SUSE close to the end of 2021, and I had had to reinstall my work laptop twice that year alone. I consider that recent enough to call it current.

> df is not lying

To me, that reads as "df isn't lying because $EXCUSES."

I disagree. I don't care about excuses. I want a 100% accurate accounting of free space at all times via the standard xNix free-disk-space reporting command, and the same from the APIs that command uses so that applications can also get an accurate report of free space.

If a filesystem cannot report free space reliably and accurately, then that filesystem is IMHO broken. Excuses do not exonerate the FS, and having other FS-specific commands that can report free space do not exonerate it. The `df` command must work, or the FS is broken.

The primary point of Btrfs is that it is the only GPL snapshot-capable FS. The other stuff is gravy: it's a bonus. There are distros that use Btrfs that don't use snapshots, such as Fedora.

Some Btrfs advocates use this to claim that the problems are not problematic. If the filesystem is of interest on the basis of feature $FOO, then "product $BAR does not exhibit this problem" is not an endorsement or a refutation if $BAR does not use feature $FOO.

Btrfs RAID is broken in important ways, but that is not a deal-breaker because there are other perfectly good ways of obtaining that functionality using other parts of the Linux stack. If no feature or functionality is lost considering the OS and stack as a whole, then that isn't a problem. However, this remains serious and an issue.

Additional problems include:

• Poor integration into the overall industry-wide OS stack.

Examples:

- Existing commands do not work or give inconsistent results.

- Duplication of functionality (e.g. overlap with `mdraid`)

• Poor integration into specific vendors' OS stacks.

Examples:

- SUSE uses Btrfs heavily.

But SUSE's `zypper` package manager is not integrated with its `snapper` tool. Zypper doesn't include snapshot space used by Snapper in its space estimation.

Snapper is integrated with Btrfs; licence restrictions notwithstanding, I would be much reassured if Snapper supported other COW filesystems.

(This has been attempted but I don't think anything shipped -- https://github.com/openSUSE/snapper/issues/145 . I welcome correction on this!)

The transactional features of SUSE's MicroOS family of distros rely heavily on Btrfs. As such, this lack of awareness of snapshot space utilization deeply worries me. I have raised this with SUSE management, but my concerns were dismissed. That worries me.

What I want to see, for clarity, is for Zypper to look at what packages will be replaced, then ask the FS how big the consequent snapshot will be, and include that snapshot in its space estimation checks before beginning the operation so that at least the packaging operation can be safely aborted before starting.

A better implementation would be to integrate package management with snapshot management so that older snapshots could be automatically pruned to ensure necessary space is made available, while also ensuring that a pre-operation snapshot is retained for rollback. That's harder but would work better.

As it is, currently neither is attempted, and Zypper will start actions that result in filling the disk and thus trashing the FS, and there are no working repair tools to recover.

- Red Hat removed Btrfs support from RHEL. As a result it has had to bodge transactional package management together by grafting Git-like functionality into OStree, then building two entirely new packaging systems around OStree, one for the OS itself and a different one for GUI-level packages. The latter is Flatpak, of course.

This strikes me as prime evidence that:

1. Btrfs isn't ready.

2. Linux needs an in-kernel COW filesystem -- because much of the complexity of OStree, Flatpak, Nix/NixOS, Guix, SUSE's `transactional-update` commands and so on would be rendered unnecessary if it were in there.

Re:Bcachefs Merged into the Linux 6.7 Kernel by yencabulator on Thursday November 02, 2023 @04:11PM (#38119386)
> To me, that reads as "df isn't lying because $EXCUSES."

In that case, df also lies on ZFS, bcachefs, and LVM+snapshots. It's in the nature of thin allocation and CoW; if you ask two things sharing storage how much space they have available, that doesn't mean that space is available to both of them at the same time.

Re:Bcachefs Merged into the Linux 6.7 Kernel by lproven on Tuesday November 07, 2023 @06:25PM (#38184560)
> df also lies on ZFS, bcachefs, and LVM+snapshots.

It is possible. Got any examples?

And more saliently do you have reports of disk corruption occurring as a result of falsely reported free space which was not in fact available? As has corrupted multiple Btrfs volumes for me, on multiple machines, in production, and with disastrous consequences and resultant need for complete system reinstallation?

Re:Bcachefs Merged into the Linux 6.7 Kernel by yencabulator on Tuesday November 07, 2023 @06:29PM (#38184602)
You're moving the goalposts. You said

> I want a 100% accurate accounting of free space at all times via the standard xNix free-disk-space reporting command

You don't get that on many modern storage systems, because of thin provisioning.

You don't get that even on old school unix if you ask separately in two different directories, and fail to account for whether they're on the same filesystem or not.

Re:Bcachefs Merged into the Linux 6.7 Kernel by lproven on Wednesday November 08, 2023 @06:14PM (#38198621)
And again, since you seem not to have noticed:

[[citation needed]]

All xNix owners who can use the shell competently know that different directories may have different free-space counts. The problem is when the filesystem won't tell you a real free-space count at all.

Re:Bcachefs Merged into the Linux 6.7 Kernel by creatonez on Tuesday October 31, 2023 @06:17PM (#38092188)
> There is no working `fsck` and the existing repair tools come with dire warnings

This stems from a misunderstanding. Fsck and fsck-adjacent tools have three purposes:

1. Replay journal entries in a journalled filesystem, so that the filesystem is repaired to a good state for mounting

2. Scrub through checksums and recover any data/metadata that has a redundant copy

3. In rare cases, a fsck tool encountering invalid data can make guesses as to how the filesystems should be structured -- basically, shot in the dark attempts at recovery.

Btrfs does not need #1 because it is not journalled. Assuming write barriers are working, any partially written copy of the filesystem is valid and will simply appear as if the pending writes had been rolled back. This aspect alone greatly diminishes the need for a fsck tool that filesystems like ext4 have.

As for #2, Btrfs already has scrub support. No issues there.

As for #3, it's questionable whether you should ever rely on such functionality, and fsck tools that do implement such functionality tend to have little maneuverability in the first place.

Re:Bcachefs Merged into the Linux 6.7 Kernel by lproven on Wednesday November 01, 2023 @08:33AM (#38097370)
See my reply below.

I disagree.

You seem to be attempting to justify a profound failing by quibbling about the meaning of words or commands.

The real problem is: Btrfs corrupts readily, and it lacks tools to fix the corruption.

What the tools are called, what their functional role is theoretically meant to be, and whether this is justified in a tool of a given name is tangential and relatively speaking unimportant.

Re:Bcachefs Merged into the Linux 6.7 Kernel by curt15 on Wednesday November 01, 2023 @02:49PM (#38103062)
>The real problem is: Btrfs corrupts readily, and it lacks tools to fix the corruption.

Here's a recent example of corruption unearthed by users after Fedora started defaulting to btrfs: https://bugzilla.redhat.com/show_bug.cgi?id=2169947.

Re:Bcachefs Merged into the Linux 6.7 Kernel by hulitu on Thursday November 02, 2023 @05:32AM (#38110985)
I thought that the main purpose of fsck was to rebuild the inode table and to put the filesystem in a correct state (all inodes linked in inode table).
Re:Bcachefs Merged into the Linux 6.7 Kernel by ThatPlayer on Wednesday November 01, 2023 @12:50AM (#38094691)
The df issue to me seems like an artifact of new data's RAID level being undecided. Because one of the planned features is per-subvolume raid level. Or at the very least metadata and data can have different RAID levels.
Re:Bcachefs Merged into the Linux 6.7 Kernel by lproven on Wednesday November 01, 2023 @08:34AM (#38097378)
Nope. It's still an issue on single volume on a single disk.
Re:Bcachefs Merged into the Linux 6.7 Kernel by ThatPlayer on Wednesday November 01, 2023 @12:29PM (#38100683)
You can use duplicate on a single disk. IIRC metadata defaults to that.
Re:Bcachefs Merged into the Linux 6.7 Kernel by chasil on Tuesday October 31, 2023 @02:05PM (#38088905)
With ZFS, if a redundant member of a pool goes offline for a time but is then returned, only the updated blocks are written to bring it up to date, and this happens automatically.

Unfortunately, btrfs is not that smart, and you must trigger a rebalance event to rewrite every block in the filesystem to return to full redundancy.

This rebalance behavior is a deal-killer for many uses.