10 ms·
Bcachefs Merged into the Linux 6.7 Kernel
- the_duke 3y agoExciting! I've played around with it a few times, since it's been easily available in NixOS for a while. Didn't run into any issues with a few disks and a few hundred GB of data. Some very interesting properties, including (actually efficient) snapshots, spreading data over multiple disks, using a fast SSD as a cache layer for HDDs, built-in encryption (not audited yet though!), automatic deduplication, compression, ... A lot of that is already available through other file systems (btfs, zfs) and/or by layering different solutions (LVM, dm-crypt, ...) , but getting all of it out of the box with a single FS that's in the mainline kernel is quite appealing.
- mike_hock 3y agoI don't find this lack of separation of concerns appealing, especially for crypto since it dilutes auditing resources. And blockdev-level crypto is simpler and harder to fuck up. Snapshots and compression OTOH are better done on the FS level.
- kevincox 3y ago> blockdev-level crypto is simpler and harder to fuck up. Simpler yes, but since generally no extra metadata is allocated it is vulnerable to some cryptanalysis notably comparing different snapshots of the drive. Doing this properly requires storing unique keys for different versions of data. Doing this with typical blockdev-level encryption is very expensive (you either need to reduce the effective block size which disrupts lots of software that assumes things about block size or store the data out-of-line (typically at the end of the disk) which requires up to 2x writes. Doing this in the filesystem allows strong encryption with minimal performance impact (as the IV write is co-located with data that is changing anyways).
- Hello71 3y ago> or store the data out-of-line [...] which requires up to 2x writes and because writes to separate sectors aren't atomic, you probably want to add journaling or some kind of CoW for crash safety, and oh look now you're actually just writing a filesystem and it's not simpler anymore.
- mike_hock 3y agoNo, you're writing something that happens to resemble a small subset of the functionality of a filesystem. Most importantly, you're not duplicating the effort for every filesystem that you want to support encryption for, and the code can largely remain fixed once mature.
- Tobu 3y agokernel developers are free to factor in common functionality, calling into it library style, without making it into an externally visible layer. IIRC fs encryption and case insensitivity are often done that way, and I think I'd count the page cache and bios as larger library-style components as well (as opposed to the VFS layer which is more in a framework style).
- jhoechtl 3y agoIt should be highlighted that all these features are supported by btrfs too which has certainly seen much more test in the last years. Yes there have been issues in the past but since quite a a while its stable and feature-rich. Easily the most advanced free file system
- Ecco 3y agoHaving just heard of bcachefs when reading this article, I tried to understand what makes it better than other existing FS but couldn't quite find a clear answer. It feels like it's feature set is equivalent to ZFS. Do you guys know why someone should get excited by bcachefs?
- fodkodrasz 3y agoIt is (soon) officially in kernel, as opposed to zfs. It has a more limited feature set and said to have simpler codebase than zfs/btrfs. It has a single outstanding non-stable feature. It seems to be in active development, while btrfs seems to have become stagnant/abandonware before it was finished/stabilised completely. I have read several horror stories about data loss, so I have avoided it so far. On the other hand it is not widely deployed yet, there is less accumulated knowledge than in case of zfs. I'm looking forward to trying it in my NAS when buying new disks next year. The COW snapshots would fit my needs (automatic daily snapshots, weekly backups). (Now using LUKS+LVM+ext4, this would give a better, more integrated, deduplicated solution, I have lots of duplicated data right now)
- viraptor 3y ago> while btrfs seems to have become stagnant/abandonware before it was finished/stabilised completely Why would you think so? I can't remember the last time a kernel was released without something at least a bit exciting about btrfs https://kernelnewbies.org/LinuxChanges#Linux_6.5.File_systems https://kernelnewbies.org/LinuxChanges#Linux_6.5.File_system...
- Geezus_42 3y agoBecause they still haven't fixed the write hole issues in certain RAID configurations,which have been known for a decade or more.
- viraptor 3y agoA project not finishing some feature is not the same as being abandoned. It seems lots of people are happy to use btrfs in production without that raid mode. In other words, for all the complaining about raid5 that happens every time btrfs is mentioned, you'd think there would be at least one person who cares enough to implement it. Yet people use it in production and keep improving the other parts of that project instead.
- _joel 3y agoBrilliant, I played with this for Ceph OSD's waaaaay back and it worked quite well, albeit a little fragile to deploy.
- throw0101c 3y agoOne pet peeve is with some of nomenclature/UI that they are using (§2.5): > Snapshots are writeable and may be snapshotted again, creating a tree of snapshots. * https://bcachefs.org/bcachefs-principles-of-operation.pdf https://bcachefs.org/bcachefs-principles-of-operation.pdf > bcachefs provides btrfs style writeable snapshots, at subvolume granularity. * https://bcachefs.org/Snapshots/ https://bcachefs.org/Snapshots/ Every other implementation of the concept has the implicit idea that snapshots are read-only: * https://en.wikipedia.org/wiki/Snapshot_(computer_storage) https://en.wikipedia.org/wiki/Snapshot_(computer_storage) The word "clone" seems to have been settled on for a read-write copy of things.
- pm215 3y agoI'm not sure that's completely standard terminology. For example LVM has "snapshots" that are read-write.
- tw04 3y agoIt is basically universal in the enterprise storage world.
- throw0101c 3y agoFrom lvcreate(1) on an Ubuntu 22.04 LTS system I have CLI on: -s|--snapshot Create a snapshot. Snapshots provide a "frozen image" of an ori‐ gin LV. The snapshot LV can be used, e.g. for backups, while the origin LV continues to be used. This option can create a […] * Also: https://manpages.ubuntu.com/manpages/lunar/en/man8/lvcreate.8.html https://manpages.ubuntu.com/manpages/lunar/en/man8/lvcreate.... The word 'frozen' to me means unmoving / fixed. As mentioned in the Wikipedia article, the analogy comes from photography where a picture / snap(shot) is a moment frozen in time. I've admined NetApps in the past, used Veritas VxFS back in the day, and currently run a lot of ZFS (first using it on Solaris 10), and "snapshot" has meant read-only for the past few decades whenever I've run across it.
- pm215 3y ago
- treesciencebot 3y agoPrevious discussion: https://news.ycombinator.com/item?id=38071842 https://news.ycombinator.com/item?id=38071842
- sekao 3y agoAs I said in the last thread, the author could use support: https://www.patreon.com/join/bcachefs https://www.patreon.com/join/bcachefs This has been a solitary and largely self-financed effort by Kent over many years. He must feel pretty great to finally see this happen!
- KMag 3y agoWhen I became a supporter yesterday, the average was under $10 per supporter per month. There's no shame in being a small supporter. Edit: I currently see 279 supporters for a total of $2,328 per month, so $8.34 average per month per supporter.
- KennyBlanken 3y agoIt's currently 428 @ $2382, $5.5/per. The pre-populated options are $20 and $100 a month, which is a lot. I think he'd get a lot more supporters if he dropped those asks to more like $1 and $5.
- KMag 3y agoI should have said "paid members" instead of "supporters" to be more precise. He's currently at 432 members, but of those only 283 are paid members. Either way, $5 is probably both the median and the mode for the payment distribution, whether you include non-paying members or not.
- tpetry 3y agoIts not like that more people will pay with $1. most probably the same amount will pay but he‘ll just get only 10% of the funding.
- unixhero 3y agoHuh 10%???
- slyall 3y agoI used to support him for $1/month previously, I think it was a specific tier. From memory I stopped because I was adding other creators and I got the impression he was doing okay.
- jbverschoor 3y agoFrom the FAQ https://bcachefs.org/FAQ/ https://bcachefs.org/FAQ/ : Bcachefs is safer to use than btrfs and is also shown to outperform zfs in terms of speed and reliability So what makes it more reliable? I can't find a simple overview of the design / reasoning behind the whole thing and what makes it 'better' than the rest.
- dralley 3y agoWell, keep in mind that language has remained unchanged for a few years now. Certainly BcacheFS has some theoretical advantages (lack of write hole etc.) but BTRFS has nonetheless improved since then and BcacheFS has gotten more complex. It's still a very exciting filesystem so I'm sure we'll be seeing third parties test it rigorously very soon.
- kevincox 3y ago> Bcachefs is safer to use than btrfs Citation needed. With a sample size of 1 it ate my data and BTRFS has been running perfectly fine on that system (after I bailed off of bcachefs) and other systems. I think it is great that they consider data safety very important but it will take lots of testing and real-world experience to validate that claim.
- __turbobrew__ 3y ago>Bcachefs is safer to use than btrfs That is a pretty bold claim given that Facebook runs btrfs in prod across the majority of their fleet and almost nobody uses bcachefs.
- MrDrMcCoy 3y agoCould just mean that RAID5/6 isn't broken...
- KennyBlanken 3y agoFacebook et al generally structure their systems to tolerate node failures through redundancy at higher levels. In short: they can not care, or work around, design problems most others can't - or use it for a specific purpose, such as logging, etc. Btrfs was terrible in the early days, took ages to "git gud", and given a filesystem is supposed to be among the most stable code in the OS, that burned a lot of bridges. It wasn't until fairly recently that btrfs could tolerate being completely filled. I have no idea how valid the claims are, but bcache's developer claims that btrfs suffers from a lot of terrible early design decisions that can't be undone. The show-stopper for me is that bcachefs lacks a scrub: > We're still missing scrub support. Scrub's job will be to walk all data in the filesystem and verify checksums, recovery bad data from a good copy if it exists or notifying the user if data is unrecoverable. The only argument I see for btrfs is that it supports throwing random drives into a pool and btrfs magically handles redundancy across them. ...but it doesn't support tiered storage like bcachefs does. We're well past "I want to have a redundant filesystem I can randomly add a drive to and magically my shit is mirrored." These days people want to have a large pile of spinning rust with some SSD in front of it, and doing that in all but ZFS is kind of a pain.
- contr-error 3y agoSo not Bca chefs!
- withinboredom 3y agoI can't unsee this. Thanks!
- seanw444 3y agoFinally! I've been waiting to give this a try. I thought about adding it manually, but didn't realize it required patching and recompiling my kernel, which wasn't a worthwhile endeavour to me.
- ksec 3y agoAm I correct to assume this is GPL and not BSD or MIT? If this is GPL I guess there is no chance this will ship with BSD. And ZFS is sadly ( but not deal breaking ) CDDL.
- rollcat 3y agoWhich BSD? ;) DragonFly has HAMMER2, and the CDDL doesn't seem to be negatively impacting the development and integration of ZFS in FreeBSD. I too am not a big fan of the GPL, especially if the text of the license is longer than the program itself. But any filesystem (let alone a modern one) is very much a non-trivial feat of engineering; the author should have the full right to protect their (and their users') interests.
- ksec 3y agoI am just thinking if we could have one decent FS across both BSD and Linux. And it would still be better than CDDL.
- rollcat 3y agoIf you just want to exchange data on removable media, use ExFAT. What problem are you trying to solve? Different OS's prefer different filesystems, because filesystems tend to be both complicated and heavily opinionated in design and implementation - just like different OS's. Linux is the odd one by supporting several dozen, all the other OS's stick to 1 or 2 (usually "old" and "new" like HFS+/APFS, FAT/NTFS, etc), plus UDF&FAT as the lowest common denominator for data interchange. There is very little precedent / use cases for sharing volumes like you suggest: non-removable disks tend to stay in one machine for their lifetime; dual-booting is extremely niche (where Linux/BSD themselves are all niche) and mostly a domain of enthusiasts.
- klardotsh 3y agoSure, but something as mundane as licensing being the reason we can't even try is kinda depressing. One ZFS-grade filesystem that could have Windows, Linux, and BSD implementations, allowing robust external storage with all the promises of modern snapshotting filesystems? Ah. What a dream. Maybe in 10-20 years if someone white-rooms a bcachefs or ZFS implementation, I guess.
- olavgg 3y agoI love storage and filesystems, and I am really looking forward to play with bcachefs. Now bcachefs can be tested easily by millions and build a solid reputation as a true next generation Linux filesystem.
- shmerl 3y agoNice and congrats! How stable it to use for day to day desktop tasks?
- lillecarl 3y agoIt's surprising no one has mentioned the fact that ZFS doesn't support suspend/resume. So it's a fat no-go for laptops, whereas btrfs and hopefully bcachefs can shine bright supporting all cool features on my laptop so I can learn by playing with them. (LVM + LUKS + BTRFS does it for me right now)
- kaliszad 3y agoWhy wouldn't ZFS support suspend/resume? Me and several other people I know happily suspend/ resume a laptop with Root-on-ZFS with Debian or FreeBSD every day without problems.
- lillecarl 3y agohttps://github.com/openzfs/zfs/issues/260 https://github.com/openzfs/zfs/issues/260 I stand corrected, last time I checked they didn't support freeze/unthaw on ZoL, it's always worked on FreeBSD though.