Ubuntu 10.10's New File System: btrfs
Between ext3, ext4, reiserfs and others, Ubuntu has no shortage of file systems to choose from when installing a new system. And those options are set to become yet more numerous in Ubuntu 10.10, which will introduce support for btrfs. Wondering what this new file system is all about and why it might matter to you? Read on for an introduction.
Introduced last year, btrfs is a new file system intended to address the shortcomings in ext4, which is currently the default choice for Ubuntu and most other Linux distributions. While ext4 is pretty robust and efficient, it lacks some advanced features, such as support for snapshots and advanced scalability, that are particularly important in the enterprise environment.
As ext4 developer Ted Ts’o has stated, the file system that currently predominates in modern Linux distributions was never intended to be a longterm solution. It was created only as a temporary means of addressing the problems with its predecessor, ext3, until something like btrfs could be brought to maturity.
The ultimate aspiration of the developers behind btrfs is to bring the power of Sun’s venerable ZFS file system to Linux. btrfs still has a ways to go before all the features of the latter are implemented, but even as it exists in Ubuntu 10.10, btrfs offers a number of improvements over ext4 and its other competitors.
btrfs in Maverick
btrfs is not yet stable, but it’s close enough for Ubuntu 10.10 to support its use for root file systems. If you’ve tested the alpha builds of Maverick, you may have noticed btrfs listed as a file system choice in the Ubuntu installer. The last I checked, the option didn’t actually work under the live CD, but it does from the alternate CD.
In addition to creating new systems from scratch on a btrfs partition, existing ext4 file systems can be converted to btrfs easily and safely using the btrfs-convert tool. The one catch is that /boot can’t be on btrfs, so it would have to be moved to a separate partition if it’s not already.
Another of the cool features in btrfs is support for snapshots using btrfsctl, which make it possible to save the state of a live system instantaneously and revert to it at any later point. This is certainly a useful tool on servers, where incremental backups are crucial, but it is applicable on the desktop as well: Fedora already has a system that uses btrfs snapshots to allow users to test new software packages and easily roll back to a stable system in case something goes wrong. This is a fantastic idea, and I’d love to see Ubuntu implement it as well.
On the performance front, Phonorix did some benchmarking last February in which btrfs came out behind ext3 and ext4 in most tests. Those comparisons are already outdated, however, and we can expect btrfs’s benchmarks to improve as development continues.
As far as production goes, btrfs is not yet an appropriate choice; as its documentation makes explicitly clear, it is “not suitable for any uses other than benchmarking and review.” So while the Ubuntu installer might provide btrfs as an option, I wouldn’t go putting it on the root partition of any production system until it has matured a little more.
All the same, the new file system promises a number of significant advances on both Ubuntu desktops and servers. In my experiments with it, it’s also worked pretty well, and I’m excited to explore the new possibilities it offers to Ubuntu users as it continues to develop.