News for hackers. Stuff that matters.
Re:Bcachefs, an Introduction/Exploration by tuetuopay on Friday July 26, 2024 @08:31AM (#41078073)
Funny because I have the opposite experience. The main issue with btrfs is a lack of tooling for the layperson to not require btrfs-developer level knowledge to fix issues.

I've personally had drive failures, fs corruptions due to power loss (which is supposed not to happen on a cow filesystem), fs and file corruption due to ram bitflips, etc. All the times btrfs handled the situation perfectly, with the caveat that I needed the help from the btrfs developers. And they were very helpful!

So yeah, btrfs has a bad rep, but it is not as bad as the common feeling makes it look like.

(note that I still run btrfs raid 1, as I did not find real return of experience regarding raid 5 or 6)

Re:Bcachefs, an Introduction/Exploration by cpuguy83 on Friday July 26, 2024 @08:47AM (#41078173)
fs corruption due to power loss happens on ext4 because the default settings only journal metadata for performance. I guess if everything is on batteries all the time this is fine, intolerable on systems without battery.
Re:Bcachefs, an Introduction/Exploration by immibis on Friday July 26, 2024 @09:07AM (#41078309)
The FS should not be corrupted, only the contents of files that were written around the time of the power loss. Risking only file contents and not the FS itself is a tradeoff between performance and safety where you only get half of each. You can set it to full performance or full safety mode if you prefer.
Re:Bcachefs, an Introduction/Exploration by cpuguy83 on Friday July 26, 2024 @01:59PM (#41080725)
True this is file corruption.
Re:Bcachefs, an Introduction/Exploration by jauntywundrkind on Friday July 26, 2024 @09:53AM (#41078682)
It's funny because Facebook uses btrfs for their systems & doesn't have these issues.

ZFS lovers need to stop this CoW against CoW violence.

Re:Bcachefs, an Introduction/Exploration by SirGiggles on Friday July 26, 2024 @10:33AM (#41078940)
Someone correct me if I'm wrong but to my understanding FB uses Btrfs in either RAID 0, 1, or 10 only and not any of the parity options.

RAID56 under Btrfs has some caveats but I'm not aware of any annecdata (or perhaps I'm just not searching hard enough) within the past few weeks or months about data loss when those caveats are taken under consideration.

Re:Bcachefs, an Introduction/Exploration by tuetuopay on Friday July 26, 2024 @10:41AM (#41078997)
> RAID56 under Btrfs has some caveats but I'm not aware of any annecdata (or perhaps I'm just not searching hard enough) within the past few weeks or months about data loss when those caveats are taken under consideration.

Yeah this is something that makes me consider trying raid56 on it. Though I don't have enough drives to dump my current data while re-making the array :D (perhaps this can be changed on the fly?)

Re:Bcachefs, an Introduction/Exploration by SirGiggles on Friday July 26, 2024 @10:53AM (#41079110)
What's your starting array look like? If you're already on Btrfs then I recall you could do something like `btrfs balance -d raid6 -m raid1c3 /`

https://btrfs.readthedocs.io/en/latest/Balance.html

Re:Bcachefs, an Introduction/Exploration by tuetuopay on Friday July 26, 2024 @12:06PM (#41079743)
Yeah I'm on btrfs raid 1 currently, with 1x1TB + 2x3TB + 2x4TB drives. Gotta love btrfs's flexibility regarding drive size :D

I'll have a look, thanks! I guess failing this will make me test by backup strategy that I have never tested in the past.

Re:Bcachefs, an Introduction/Exploration by bscphil on Friday July 26, 2024 @01:37PM (#41080546)
Out of curiosity, how much total storage do you get with that drive configuration? I've never tried "bundle of disks" mode with any file system because it's difficult to reason about how much disk space you end up with and what guarantees you have (although raid 1 should be straightforward, I suppose).
Re:Bcachefs, an Introduction/Exploration by tuetuopay on Friday July 26, 2024 @02:01PM (#41080763)
I get half of the raw capacity, so 7.5TB. Well a bit less due to metadata, 7.3TB as reported by df (6.9TiB).

For btrfs specifically there is an online calculator [1] that shows you the effective capacity for any arbitrary configuration. I use it whenever I add a drive to check whether it’s actually useful.

1: https://carfax.org.uk/btrfs-usage/?c=2&slo=1&shi=1&p=0&dg=1&...

Re:Bcachefs, an Introduction/Exploration by tuetuopay on Friday July 26, 2024 @02:01PM (#41080754)
I get half of the raw capacity, so 7.5TB. Well a bit less due to metadata, 7.3TB as reported by df (6.9TiB).

For btrfs specifically there is an online calculator [1] that shows you the effective capacity for any arbitrary configuration. I use it whenever I add a drive to check whether it’s actually useful.

1: https://carfax.org.uk/btrfs-usage/?c=2&slo=1&shi=1&p=0&dg=1&...

Here are raw outputs:

$ sudo btrfs fi df /media/storage� Data, RAID1: total=6.34TiB, used=6.22TiB System, RAID1: total=32.00MiB, used=992.00KiB Metadata, RAID1: total=11.00GiB, used=8.71GiB GlobalReserve, single: total=512.00MiB, used=0.00B $ sudo btrfs fi us /media/storage� Overall: Device size: 13.64TiB Device allocated: 12.70TiB Device unallocated: 966.54GiB Device missing: 0.00B Device slack: 0.00B Used: 12.47TiB Free (estimated): 600.31GiB (min: 600.31GiB) Free (statfs, df): 547.55GiB Data ratio: 2.00 Metadata ratio: 2.00 Global reserve: 512.00MiB (used: 0.00B) Multiple profiles: no

Data,RAID1: Size:6.34TiB, Used:6.22TiB (98.20%) /dev/sdc 2.53TiB /dev/sdk 2.54TiB /dev/sdf 837.00GiB /dev/sdb 3.40TiB /dev/sdi 3.39TiB

Metadata,RAID1: Size:11.00GiB, Used:8.71GiB (79.22%) /dev/sdc 3.00GiB /dev/sdk 4.00GiB /dev/sdf 2.00GiB /dev/sdb 6.00GiB /dev/sdi 7.00GiB

System,RAID1: Size:32.00MiB, Used:992.00KiB (3.03%) /dev/sdc 32.00MiB /dev/sdk 32.00MiB

Unallocated: /dev/sdc 198.49GiB /dev/sdk 187.49GiB /dev/sdf 92.51GiB /dev/sdb 243.02GiB /dev/sdi 245.02GiB

Re:Bcachefs, an Introduction/Exploration by tuetuopay on Friday July 26, 2024 @02:01PM (#41080760)
I get half of the raw capacity, so 7.5TB. Well a bit less due to metadata, 7.3TB as reported by df (6.9TiB).

For btrfs specifically there is an online calculator [1] that shows you the effective capacity for any arbitrary configuration. I use it whenever I add a drive to check whether it’s actually useful.

1: https://carfax.org.uk/btrfs-usage/?c=2&slo=1&shi=1&p=0&dg=1&...

Here are raw outputs:

$ sudo btrfs fi df /media/storage� Data, RAID1: total=6.34TiB, used=6.22TiB System, RAID1: total=32.00MiB, used=992.00KiB Metadata, RAID1: total=11.00GiB, used=8.71GiB GlobalReserve, single: total=512.00MiB, used=0.00B $ sudo btrfs fi us /media/storage� Overall: Device size: 13.64TiB Device allocated: 12.70TiB Device unallocated: 966.54GiB Device missing: 0.00B Device slack: 0.00B Used: 12.47TiB Free (estimated): 600.31GiB (min: 600.31GiB) Free (statfs, df): 547.55GiB Data ratio: 2.00 Metadata ratio: 2.00 Global reserve: 512.00MiB (used: 0.00B) Multiple profiles: no

Data,RAID1: Size:6.34TiB, Used:6.22TiB (98.20%) /dev/sdc 2.53TiB /dev/sdk 2.54TiB /dev/sdf 837.00GiB /dev/sdb 3.40TiB /dev/sdi 3.39TiB

Metadata,RAID1: Size:11.00GiB, Used:8.71GiB (79.22%) /dev/sdc 3.00GiB /dev/sdk 4.00GiB /dev/sdf 2.00GiB /dev/sdb 6.00GiB /dev/sdi 7.00GiB

System,RAID1: Size:32.00MiB, Used:992.00KiB (3.03%) /dev/sdc 32.00MiB /dev/sdk 32.00MiB

Unallocated: /dev/sdc 198.49GiB /dev/sdk 187.49GiB /dev/sdf 92.51GiB /dev/sdb 243.02GiB /dev/sdi 245.02GiB

Re:Bcachefs, an Introduction/Exploration by SirGiggles on Saturday July 27, 2024 @06:01PM (#41089636)
Just want to do a follow up and make a correction that the command to go from whatever to RAID 6 for data and RAID 1c3 for metadata in Btrfs is instead: `btrfs balance -dconvert=raid6 -mconvert=raid1c3 /` instead of what I originally posted
Re:Bcachefs, an Introduction/Exploration by riku_iki on Friday July 26, 2024 @01:51PM (#41080651)
> It's funny because Facebook uses btrfs for their systems & doesn't have these issues.

they likely have distributed layer on top which takes care of data corruption and losses happening on specific server