Btrfs and the future of the filesystem
Internals
Under the hood, Btrfs emulates its role model ZFS and relies on a technique called copy-on-write (CoW). The idea of CoW is to avoid unnecessary copies and copying actions. Therefore, changed blocks are only written physically if they are changed by one of the entities. For filesystems, CoW means that changed blocks are first written to free space without overwriting the original data; only the metadata is modified accordingly. CoW thus supports the creation of snapshots, because the original blocks are retained and form the snapshot. The metadata of the snapshot is stored with the first snapshot. In other snapshots, only changes to data blocks from the previous snapshot are incrementally stored.
Another advantage of the transaction-based CoW method is that the filesystem is always consistent, because changes to data do not overwrite the existing data but cause a block rebuild. This approach offers wear benefits on conventional hard drives with moving heads, because the mechanical system is not overtaxed; the write heads do not have to look for old data to overwrite but can simply write changes to a free part of the disk. This feature increases the write speed with less complexity than journaling-based filesystems like ReiserFS, ext3, and ext4.
Cards on the Table
The opinions on whether a filesystem needs the enormous functionality of Btrfs are as diverse as the views of its current production capability. However, many different application scenarios are implemented on Linux, and the kernel supports a number of different filesystems.
Whether or not Btrfs will inherit ext4's crown is currently unclear, because Btrfs's extensive feature set is widely regarded as overkill for normal desktop systems, and because the very useful snapshot function is also available on ext4, Btrfs currently serves as more of an alternative for specific use cases. Theodore T'so, the developer of the ext family, sees Btrfs as a successor to ext4 that is pushing its development limits. In addition to enthusiastic desktop users, the target group for Btrfs includes data centers, cloud computing environments, and large-scale storage, such as the massive storage required by developer Mason's current employer, Facebook.
Yes, No, But …
Btrfs requires some training time, which is not the case with conventional filesystems. Users also need to be confident about working at the terminal, because Btrfs does not integrate well with graphical file managers.
The undeniable advantage that Btrfs offers is currently bought at the price of additional coordination and configuration time for ordinary desktop users. One possible exception is openSUSE, which uses Btrfs as the default and thus offers good support for the system.
Infos
- Btrfs: https://btrfs.wiki.kernel.org/index.php/Main_Page
- CoW: https://en.wikipedia.org/wiki/Copy-On-Write
- OpenZFS: http://open-zfs.org/wiki/Main_Page
- WinBtrfs: https://github.com/maharmstone/btrfs
- B+ tree: https://en.wikipedia.org/wiki/B%2B_tree
- inode: https://en.wikipedia.org/wiki/Inode
- Deduplication: https://en.wikipedia.org/wiki/Data_deduplication
- Snapper GUI: https://github.com/ricardomv/snapper-gui
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.