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
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.
-
Plasma Desktop Will Soon Ask for Donations
The next iteration of Plasma has reached the soft feature freeze for the 6.2 version and includes a feature that could be divisive.