this post was submitted on 23 Nov 2024
63 points (86.2% liked)

Linux

48413 readers
1195 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

i've instaled opensuse tumbleweed a bunch of times in the last few years, but i always used ext4 instead of btrfs because of previous bad experiences with it nearly a decade ago. every time, with no exceptions, the partition would crap itself into an irrecoverable state

this time around i figured that, since so many years had passed since i last tried btrfs, the filesystem would be in a more reliable state, so i decided to try it again on a new opensuse installation. already, right after installation, os-prober failed to setup opensuse's entry in grub, but maybe that's on me, since my main system is debian (turns out the problem was due to btrfs snapshots)

anyway, after a little more than a week, the partition turned read-only in the middle of a large compilation and then, after i rebooted, the partition died and was irrecoverable. could be due to some bad block or read failure from the hdd (it is supposedly brand new, but i guess it could be busted), but shit like this never happens to me on extfs, even if the hdd is literally dying. also, i have an ext4 and an ufs partition in the same hdd without any issues.

even if we suppose this is the hardware's fault and not btrfs's, should a file system be a little bit more resilient than that? at this rate, i feel like a cosmic ray could set off a btrfs corruption. i hear people claim all the time how mature btrfs is and that it no longer makes sense to create new ext4 partitions, but either i'm extremely unlucky with btrfs or the system is in fucking perpetual beta state and it will never change because it is just good enough for companies who can just, in the case of a partition failure, can just quickly switch the old hdd for a new one and copy the nightly backup over to it

in any case, i am never going to touch btrfs ever again and i'm always going to advise people to choose ext4 instead of btrfs

(page 2) 23 comments
sorted by: hot top controversial new old
[–] fmstrat@lemmy.nowsci.com 2 points 6 days ago (1 children)

Won't say it.. Won't say it.. ZFS!! Oops.

[–] bunitor@lemmy.eco.br 1 points 6 days ago (1 children)

i've been meaning to try it, but i installed freebsd to an ufs partition instead of zfs because ufs was marked by default in the installer 🤦

[–] fmstrat@lemmy.nowsci.com 1 points 6 days ago* (last edited 6 days ago) (1 children)

It's fantastic, IMO. Still use LUKS and software raid for root, but everything else is encrypted raidz.

[–] ReversalHatchery@beehaw.org 1 points 6 days ago (1 children)

what's the point in using software raid? or do you mean the raidz setups of zfs?

load more comments (1 replies)
[–] dingdongitsabear@lemmy.ml 46 points 1 week ago (1 children)

I realize this is a rant but you coulda included hardware details.

I'm gonna contrast your experience with about 300 or so installs I did in the last couple of years, all on btrfs, 90% fedora, 9% ubuntu and the rest debian and mint and other stragglers, nothing but the cheapest and trashiest SSDs money can buy, the users are predominantly linux illiterate. I also run all my stuff (5 workstations and laptops) exclusively on btrfs and have so for 5+ years. not one of those manifested anything close to what you're describing.

so I hope the people that get your recommendations also take into consideration your sample size.

load more comments (1 replies)
[–] Atemu@lemmy.ml 25 points 1 week ago (2 children)

could be due to some bad block or read failure from the hdd (it is supposedly brand new, but i guess it could be busted)

I'd suspect the controller or cable first.

shit like this never happens to me on extfs, even if the hdd is literally dying

You say that as if it's a good thing. If you HDD is "literally dying", you want the filesystem to fail safe to make you (and applications) aware and not continue as if nothing happened. extfs doesn't fail here because it cannot even detect that something is wrong.

btrfs has its own share of bugs but, in theory, this is actually a feature.

i have an ext4 and an ufs partition in the same hdd without any issues.

Not any issue that you know of. For all extfs (and, by extension, you) knows, the disk/cable/controller/whatever could have mangled your most precious files and it would be none the wiser; happily passing mangled data to applications.

You have backups of course (right?), so that's not an issue you might say but if the filesystem isn't integer, that can permeate to your backups because the backup tool reading those files is none the wiser too; it relies on the filesystem to return the correct data. If you don't manually verify each and every file on a higher level (e.g. manual inspection or hashing) and prune old backups, this has potential for actual data loss.

If your hardware isn't handling the storage of data as it should, you want to know.

even if we suppose this is the hardware's fault and not btrfs's, should a file system be a little bit more resilient than that? at this rate, i feel like a cosmic ray could set off a btrfs corruption.

While the behaviour upon encountering an issue is in theory correct, btrfs is quite fragile. Hardware issues shouldn't happen but when they happen, you're quite doomed because btrfs doesn't have the option to continue despite the integrity of a part of it being compromised.
btrfs-restore disables btrfs' integrity; emulating extfs's failure mode but it's only for extracting files from the raw disks, not for continuing to use it as a filesystem.

I don't know enough about btrfs to know whether this is feasible but perhaps it could be made a bit more log-structured such that old data is overwritten first which would allow you to simply roll back the filesystem state to a wide range of previous generations, of which some are hopefully not corrupted. You'd then discard the newer generations which would allow you to keep using the filesystem.
You'd risk losing data that was written since that generation of course but that's often a much lesser evil. This isn't applicable to all kinds of corruption because older generations can become corrupted retroactively of course but at least a good amount of them I suspect.

[–] pupbiru@aussie.zone 3 points 6 days ago (2 children)

I don't know enough about btrfs to know whether this is feasible but perhaps it could be made a bit more log-structured such that old data is overwritten first which would allow you to simply roll back the filesystem state to a wide range of previous generations, of which some are hopefully not corrupted. You'd then discard the newer generations which would allow you to keep using the filesystem.

i’m not sure i understand quite what you’re suggesting, but BTRFD is a copy on write filesystem

so when you write a block, you’re not writing over the old data: you’re writing to empty space, and then BTRFS is marking the old space as unused - or in the case of snapshots, marking it to be kept as old data

load more comments (2 replies)
[–] bad_news@lemmy.billiam.net 1 points 1 week ago (1 children)

I've had some issues with btrfs. I have a Fedora 41 box where the 1TB drive just magically lost 300+GB of capacity that shows up in use but there is nothing using it, and I used to have a 39/40 box where booting would take like 3+ mins that was all btrfs being unhappy with the primary drive on initial mount. Snapshots and the duplicate stuff are pretty killer features, though...

[–] Atemu@lemmy.ml 1 points 6 days ago (1 children)

the 1TB drive just magically lost 300+GB of capacity that shows up in use but there is nothing using it

How did you verify that "nothing" is using it? That's not a trivial task with btrfs because any given btrfs filesystem can contain an arbitrary amount of filesystem roots and that filesystem roots can be duplicated in seconds.

If you have ever done a snapshot or enabled automatic snapshots via e.g. snapper or btrbk, data that you have since deleted may still be present in a snapshot. Use btrfs subvolume list / to list all subvolumes and snapshots.

If you ever feel lost in analysing btrfs data usage, you can use btdu to visually explore where data is located. Note that it never shows 100% accurate usage as it's based on probabilistic sampling. It's usually accurate enough to figure out what's using your data after a little while though, so let it scan for a good minute.

[–] bad_news@lemmy.billiam.net 1 points 5 days ago (1 children)

I looked at net use in whatever the KDE utility is to find current use (this was also a jarring shift, suddenly everything was broken because the drive was full overnight when it should have been 30% free and only 600-ish GB WERE per the utility). Figuring it was snapshots, I installed btrfs assistant and there were no snapshots. Btrfs subvolume just shows my root, home, and a snapshot I made just before I upgraded to Fedora 41, which was well after the memory disappeared. My theory has been it is somehow NFS caching gone wrong because this is connected to an NFS volume and maybe it's FUSE or whatever the modern equivalent is fucking up below btrfs even? I don't have btdu, what package provides that on Fedora?

[–] Atemu@lemmy.ml 1 points 5 days ago (1 children)
[–] bad_news@lemmy.billiam.net 1 points 5 days ago (1 children)

I get not enough arguments: 0 but 1 expected, am I mis-parsing your suggestion?

[–] Atemu@lemmy.ml 1 points 5 days ago (1 children)

You need to point it at your btrfs, so i.e. /.

[–] bad_news@lemmy.billiam.net 1 points 5 days ago (1 children)

Well that kiiind of shows the problem, 235GB are "Device unallocated" and my volume shows up as /dev/nvmeblah as 711GB

load more comments (1 replies)
load more comments
view more: ‹ prev next ›