Btrfs File System: An overview
Btrfs, the short form for “B-Tree File System,” is a Linux kernel-based, state-of-the-art file system that seeks to replace the current standard ext4 file system for Linux distributions while simultaneously providing next-generation features.
These features include acting as a RAID array manager, volume manager, and much more. Btrfs has five different multiple disk topologies that include btrfs-raid0, btrfs-raid1, btrfs-raid10, btrfs-raid5, and btrfs-raid6. Despite Btrfs entering the mainline in 2009, it wasn’t yet production-ready and continued to display scary messages to the admin. However, over the years, Btrfs has fixed many problems, but many age-old issues remain unaddressed.
Btrfs is not an Oracle project, although it was created by the founding developer, Chris Mason, who began working on it in 2007. Btrfs was accepted into the mainline Linux kernel 2.6.29 in 2009. As a single-disk filesystem, Btrfs is stable and performs well, but if users go deeper into its newer features, the ground gets shakier.
In addition to being a simple single-disk filesystem, Btrfs provides various functionalities such as multiple disk topologies, volume-managed storage, atomic copy-on-write snapshots, asynchronous incremental replication, automatic corrupt data healing, and on-disk compression. Btrfs has only one real competitor, OpenZFS, which also offers a similar feature set, but with subtle differences.
Compared to a legacy storage stack, building a system without Btrfs or ZFS requires a stack of discrete layers, and the system still lacks some of Btrfs’ theoretically compelling features. For instance, LVM offers atomic snapshots but no direct snapshot replication. Neither ext4 nor xfs offers inline compression, and mdraid can offer data healing, but it is not perfect.
However, using a legacy storage stack, it is impossible to replicate Btrfs’ entire feature set. Thus, to use all of Btrfs’ features, you need either Btrfs or OpenZFS. Nonetheless, users must keep in mind that despite Btrfs providing various features, several age-old problems remain unaddressed, and it is not yet a perfect replacement for legacy storage stacks.
The sources for this piece include an article in ArsTechnica.