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.
News
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.