Check out btrfs, the semi-final Linux file system

This review of the btrfs file system highlights some of its long-standing shortcomings. Btrfs - stands for "B-Tree File System" and often "butter" or "butter eff ess" - the most advanced file system in the Linux kernel. In some ways, btrfs simply seeks to replace ext4 which is the default file system for most Linux distributions. But btrfs also intends to offer next-generation features that eliminate the simple "file system" format and combine the functions of a RAID array manager, a volume manager, and much more.

We have good news and bad news about that. First, btrfs is a complete replacement for ext4 single disk compression. But if you're hoping to replace ZFS - or a more complex array that relies on separate RAID, volume management, and a simple file system - the picture isn't very pretty. Although the btrfs project resolved many of its obvious problems in 2009, 12 years later the main problems remained largely unchanged. which started in 2007 while working at Oracle. This leads many people to believe that btrfs is an oracle project - it is not. This project belongs to Mason and not his employer, and it is a social enterprise that the company has not yet owned. In 2009, btrfs 1.0 was adopted in Linux 2.6.29 core.

Although btrfs entered the mainstream in 2009, it was not actually ready for production. Over the next four years, creating a btrfs filesystem will show the following terrifying intended message to the administrator who dared to mkfs a btrfs, and the non-default Y is needed to continue working:

Btrfs New Filesystem with Extensive, writable snapshot, Multi-device support and many more features. Btrfs is very experimental and disk formatting is not finished yet. You should say N here unless you are interested in testing Btrfs with non-core data.

Linux users have ignored many of these warnings—and surprisingly a lot of data was lost as a result. This extensive four-year beta release may have a lasting impact on the btrfs developer community, because in my experience whenever a bug fix is ​​reported by a user, it goes to "Okay, everything is in beta anyway". This happened after mkfs.btrfs lost its dreaded chat in late 2013.


It hasn't been classified as "beta" for nearly eight years now, but many older btrfs issues remain unaddressed and unaddressed. They actually change, so we repeat this one more time. As a single disk file system, btrfs has been stable for many years and has the highest performance. But the more you learn about the new features of btrfs, the more shaky the ground becomes - and that's what we're focusing on today.


Btrfs has only one real competitor in the Linux and BSD file system space: OpenZFS. It is almost impossible to avoid comparing btrfs with OpenZFS, because the Venn diagram is little more than a single, slightly massive circuit. But we try as much as possible to avoid direct comparisons and comparisons between the two. If you're an OpenZFS administrator, you already know; And if you're not an OpenZFS admin, it's not really useful.

Read more Bitrot and atomic COWs: Inside a "next generation" file system

In addition to being a simple single-disk file system, btrfs offers multiple disk structures (RAID) and volume management (Nick, Linux Logical Volume Manager) ), copy snapshots on writing, asynchronous incremental redundancy, automatic recovery of corrupted data, and disk compression.

Compare with older storage

If you want to create a btrfs and ZFS-free system with similar features, you need a separate layer set - mdraid at the bottom for RAID, LVM Next to get snapshots, then a file system like ext4 or xfs on top of your storage sundae.

The mdraid + LVM + ext4 stack unfortunately still misses some of the most compelling theoretical features of btrfs. LVM provides atomic snapshots but does not have direct snapshots. Neither ext4 nor xfs provides internal compression. And if mdraid can enable the dm-whole target, it can optimize the data, but that's very unpleasant. During the initial boot, as well as the need to completely overwrite each block of the replaced disk after a failure - as well as write an entire drive on initial boot.


In short, you can't really duplicate btrfs. Promised full feature on legacy backup stack requires btrfs or ZFS to get the full set.

Btrfs Multi-Disk Structures

Now that we've looked at potential issues with an old volume, it's time. Take a look at where btrfs itself crashes. Hence, the first place we check is the topology of multiple btrfs disks. Btrfs offers five multiple disk topologies: btrfs-raid0, btrfs-raid1, btrfs-raid10, btrfs-raid5, and btrfs-brick 6. Although the documentation tends to simply refer to these structures—for example, just like raid1 and not btrfs. - raid1 - We highly recommend that you keep the prefix in mind. In some cases, these structures can be completely different from typical examples.

Regular version topology Btrfs version RAID0 Simple tape - any disk lost, Simple tape array lost - any disk is lost, RAID1 is lost Simple array - All data blocks on disk n and disk are guaranteed redundancy - Copies of all blocks are stored on two machines Separate RAID10 A set of corrugated mirrors - eg, a strip in three pairs of reflective disks A set of rippled mirrors - eg, a strip in three pairs of RAID5 pairs Diagonal parity disks RAID - Single parity (one parity block per strip ), RAID parity Fixed diagonal width - single parity (one parity block per bar) with variable bar width RAID6 paris RAID parity - double in each bar), fixed diagonal parity RAID - double parity (two parity blocks per bar) with Variable bandwidth

As you can see in the above graph, btrfs-raid1 is completely different from the model. It was common for Nalog to understand how, let's think of a hypothetical set of "unformatted" drives of unformatted size. If we have one 8T disk, three 4T disks and one 2T disk, it is difficult to create a typical useful RAID array from them - for example, RAID5 or RAID6 each must be as 2T disks (only 8T produces first storage before Equality).

However, btrfs-raid1 makes an interesting assumption. Since it doesn't actually connect the discs in pairs, it can use the entire set of discs without wasting. Each time a block is written to btrfs-raid1, it is written identically to two separate disks - both are separate disks. Since there are no static pairs, btrfs-raid1 is free to fill all disks with the same amount of net capacity.

The btrfs-raid5 and btrfs-raid6 topologies are somewhat similar to btrfs. - Fear 1 In this regard, unlike their regular counterparts, they can manage inappropriate drive sizes by dynamically changing the tape size as smaller drives are filled. Btrfs-raid5 and btrfs-raid6 should not be used in production, but for reasons we will address shortly.

The btrfs-raid10 and btrfs-raid0 topologies are much closer to their typical examples, and in most cases they can be considered direct alternatives with similar strengths and weaknesses.

Check out btrfs, the semi-final Linux file system
check-out-btrfs-the-semi-final-linux-file.html Apple Watch iFixit error involves theory about device latency

Apple Watch iFixit error involves theory about device latency

Screen challenges may have delayed startup. This time, let's take a look at the inside of the Apple Watch Series 7.

... Amazon makes it easy to bring different types of silicone to Alexa devices

Amazon makes it easy to bring different types of silicone to Alexa devices

More variety in SoCs may give products more control over things like battery life.

Alexa is on the move. Voice Assistant is available on all ... The shortage of cardboard is another blow to the strained supply chain

The shortage of cardboard is another blow to the strained supply chain

And right in times of holiday shopping excitement.

It was initially toilet paper. Then there was another processor and silicone. It is now ca... AMD and Microsoft release Ryzen slowdown in Windows 11

AMD and Microsoft release Ryzen slowdown in Windows 11

Both Microsoft and AMD have released patches to fix AMD Ryzen performance issues in older versions of Windows 11, according to a recently updated AMD ... MSI Summit E13 Flip Evo Review: Flip the Right Direction

MSI Summit E13 Flip Evo Review: Flip the Right Direction

Great performance, strong port selection, strong contender. Get great portability from a highly portable device from lightweight chassis just 1 inch t... Google is halving its share of in-app subscriptions in the Play Store

Google is halving its share of in-app subscriptions in the Play Store

This is the latest in a series of redistribution changes aimed at preventing regulation.

Google has made another change to the cost structure...