Bcachefs, an Introduction/Exploration
Bcachefs is a next-generation copy-on-write filesystem offering features like checksums, multi-device support, and RAID. It aims to improve performance and stability compared to existing filesystems like ext4 and Btrfs.
Read original articleBcachefs is a next-generation copy-on-write (COW) filesystem developed by Kent Overstreet, designed to offer features similar to Btrfs and ZFS while improving performance. It includes full checksums, multi-device support, replication, RAID, caching, compression, encryption, sub-volumes, and snapshots, and has been tested for scalability up to 50+ TB. The need for bcachefs arises from the limitations of existing filesystems like ext4, XFS, Btrfs, and ZFS, which either lack modern features or have complex implementations. Bcachefs aims for stability, speed, and a compact codebase, making it accessible for developers.
The filesystem supports various RAID configurations, though some features are still experimental. It allows for degraded mode operation, enabling users to access data even when some devices are unavailable. Bcachefs also provides automation capabilities through user space tools and interfaces like sysfs and debugfs, although a high-level API is still in development.
Documentation and user support are noted to be lacking, with some error messages being cryptic. Users can create and mount filesystems easily, and the filesystem can handle different physical sector sizes. Bcachefs is positioned as a robust alternative for users seeking a modern filesystem with strong data integrity features, particularly in environments where data corruption is a concern. Overall, bcachefs represents a significant advancement in filesystem technology, addressing many shortcomings of its predecessors.
Related
Show HN: EtchaOS – Secure, immutable, in-memory remixes of popular Linux distros
EtchaOS is a secure, minimal, and immutable Linux distribution for cloud, on-premise, and embedded systems. It prioritizes security, consistency, automatic upgrades, flexibility, and customization. Developed by Candid Development LLC.
Linux 6.10 Released
The Linux 6.10 release by Linus Torvalds featured increased activity in filesystems, driver updates, and miscellaneous changes. No extra release candidates were needed. Version 6.11's merge window will open soon, coinciding with Europe's summer vacation. Various subsystems received fixes and improvements, including ARM64, USB, networking, SPI, MMC, USB, ALSA, and more. The bcachefs filesystem underwent corrections and optimizations.
Rust for Filesystems
At the 2024 Linux Summit, Wedson Almeida Filho and Kent Overstreet explored Rust for Linux filesystems. Rust's safety features offer benefits for kernel development, despite concerns about compatibility and adoption challenges.
Bcachefs for Linux 6.11 Lands Accounting Rewrite and Self-Healing on Read Error
The Bcachefs update for Linux 6.11 introduces disk accounting code rewrite, self-healing for read and checksum errors, and stripe sectors accounting. Kent Overstreet leads these enhancements for improved file-system performance and reliability.
Arch-based CachyOS promises speed but trips over its laces
CachyOS, a performance-focused Arch Linux distribution, offers speed and customization but faces installation challenges and reliability issues. It supports various desktop environments but may not suit older hardware users.
- Users express concerns about the maturity and reliability of Bcachefs, given its recent integration into the kernel.
- There are mixed feelings about RAID functionality, with some users highlighting issues with disk management and others seeking improvements.
- Comments reflect skepticism about Bcachefs being more reliable than established filesystems like Btrfs, which has extensive real-world testing.
- Some users are eager for Bcachefs to reach production readiness, citing its promising features like caching and encryption.
- Discussions also touch on the limitations of existing filesystems, such as ZFS's deduplication capabilities and Btrfs's performance with databases and VMs.
The results vary between annoying (need to restore / “resilver” and have no redundancy until it’s done; massively increased risk of data loss while doing so due to heavy IO load without redundancy and pointless loss of the redundancy that already exists) to catastrophic (outright corruption). The corollary is that RAID invariably works poorly with disks connected over using an interface that enumerates slowly or unreliably.
Yet most competent active-active database systems have no problems with this scenario!
I would love to see a RAID system that thinks of disks as nodes, properly elects leaders, and can efficiently fast-forward a disk that’s behind. A pile of USB-connected drives would work perfectly, would come up when a quorum was reached, and would behave correctly when only a varying subset of disks is available. Bonus points for also being able to run an array that spans multiple computers efficiently, but that would just be icing on the cake.
That's a weird argument. Even if it's true, it is now stable, and has been for a long time. btrfs has long been my default, and I'd be wary of switching to something newer just because someone was mad that development took a long time.
That's been implemented; in Linux 6.11 bcachefs will correct errors on read. See
> - Self healing on read IO/checksum error
in https://lore.kernel.org/linux-bcachefs/73rweeabpoypzqwyxa7hl...
Making it possible to scrub from userspace by walking and reading everything (tar -c /mnt/bcachefs >/dev/null).
- Stability but also
- Constant refactorings
and later
"Disclaimer, my personal data is stored on ZFS"
A bit troubling, I find
"RAID0 behavior is default when using multiple disks" never have I ever had the need for RAID0 or have I seen a customer using it. I think it was at one time popular with gamers before SSDs became popular and cheap.
"RAID 5/6 (experimental)
This is referred to as erasure coding and is listed as “DO NOT USE YET”, "
Well, you got to start somewhere, but a comparison with btrfs and ZFS seems premature.AFAIK ZFS has had deduplication support for a very long time (2009) and now even does opportunistic block cloning with much less overhead.
btrfs doesn't have a built-in encryption.
> ZFS Encryption Y
I cannot find the discussion right now but I remember reading that they were considering a warning when enabling encryption because it was not really stable and people were running into crashes.
https://github.com/openzfs/zfs/issues?q=is%3Aissue+label%3A%...
I bought new a new ssd and hdd for my desktop this year and looked into running bcachefs because it offers caching as well as native encryption and cow. I also determined that it is not production ready yet for my use case, my file system is the last thing I want to beta tester of. Investigated using bcache again, but opted to use lvm caching, as it offers better tooling and saves on one layer of block devices (with luks and btrfs on top). Performance is great and partition manipulations also worked flawless.
Hopefully bcachefs gains more traction and will be ready for production use, as it combines several useful features. My current setup still feels like making compromises.
why is this a bad thing?
Never again.
I eagerly await bcachefs reaching maturity!
Btrfs is also far more reliable than ZFS in my view, because it has far far more real world testing, and is also much more actively developed.
Magical perfect elegant code isn't what makes a good filesystem: real world testing, iteration, and bugfixing is. BTRFS has more of that right now than anything else ever has.
Related
Show HN: EtchaOS – Secure, immutable, in-memory remixes of popular Linux distros
EtchaOS is a secure, minimal, and immutable Linux distribution for cloud, on-premise, and embedded systems. It prioritizes security, consistency, automatic upgrades, flexibility, and customization. Developed by Candid Development LLC.
Linux 6.10 Released
The Linux 6.10 release by Linus Torvalds featured increased activity in filesystems, driver updates, and miscellaneous changes. No extra release candidates were needed. Version 6.11's merge window will open soon, coinciding with Europe's summer vacation. Various subsystems received fixes and improvements, including ARM64, USB, networking, SPI, MMC, USB, ALSA, and more. The bcachefs filesystem underwent corrections and optimizations.
Rust for Filesystems
At the 2024 Linux Summit, Wedson Almeida Filho and Kent Overstreet explored Rust for Linux filesystems. Rust's safety features offer benefits for kernel development, despite concerns about compatibility and adoption challenges.
Bcachefs for Linux 6.11 Lands Accounting Rewrite and Self-Healing on Read Error
The Bcachefs update for Linux 6.11 introduces disk accounting code rewrite, self-healing for read and checksum errors, and stripe sectors accounting. Kent Overstreet leads these enhancements for improved file-system performance and reliability.
Arch-based CachyOS promises speed but trips over its laces
CachyOS, a performance-focused Arch Linux distribution, offers speed and customization but faces installation challenges and reliability issues. It supports various desktop environments but may not suit older hardware users.