MTE Explains: What Is Btrfs Filesystem (and Why Is It Better Than Ext4)?

There is more to a hard drive than its size. While the amount of disk space is all you see marketed about a hard drive on a sales page, there is actually an extensive amount of coding that goes into making a hard drive capable of handling your applications and data in the first place. Most Linux distributions currently default to using the ext4 file system, but the future for many of them lies with the B-tree file system, better known as Btrfs.

To put it simply, a file system is how a hard drive is able to store, access, and manage files. While different operating systems can run off of the same hard drive, they tend not to share the same file system. Windows users rely on the New Technology File System (NTFS) while Mac OS X currently runs on the HFS+ file system. Btrfs is a file system that is only used in the Linux operating system.

Btrfs is a modern file system that began development back in 2007. It was merged into the mainline Linux kernel in the beginning of 2009 and debuted in the Linux 2.6.29 release. Btrfs is GPL-licensed but currently considered unstable. Thus, Linux distributions tend to ship with Btrfs as an option but not as the default.

Btrfs is not a successor to the default Ext4 file system used in most Linux distributions, but it can be expected to replace Ext4 in the future. Theodore Ts’o, a maintainer for Ext3 and later, Ext4, has stated that he sees Btrfs as a better way forward than continuing to rely on the ext* technology.

Btrfs is expected to offer better scalability and reliability. It is a copy-on-write file system intended to address various weaknesses in current Linux file systems. Primary focus points include fault tolerance, repair, and easy administration.

Btrfs-hard-drive

Ext4 is a modern release, but it is an update of decades-old technology. It is a journaling file system, meaning it keeps a log or “journal” of changes that are made to a disk. However, Ext4 can be slow at checking a mounted hard disk, and this problem is only exasperated as hard disks continue to increase in size.

The largest partition Ext4 can support is 1 exbibyte, which is over a million terabytes. The largest file size Ext4 can support is 16 tebibytes, which is just under 18 terabytes. Btrfs, on the other hand, can support up to a 16 exbibyte partition and a file of the same size. If you are confused by the numbers, all you need to know is that Btrfs can support up to sixteen times of the data of Ext4. While this does not directly impact the local storage needs of a home user, this improvement is very important as Linux is increasingly used within various enterprises and for storing much of the data we trust to the cloud.

Btrfs-fire

Stability implies that something is unchanging. Considering the rapid development of Btrfs at the moment, the answer is no. Btrfs is currently considered experimental.

But stability is in the eyes of the beholder. According to the wiki maintained by the btrfs community, many of the current developers and testers of Btrfs run it as their primary file system with very few “unrecoverable” problems. That said, if you are feeling adventurous enough to give Btrfs a try, you should back up your files regularly. Then again, you are already doing that, right? No matter how good a file system is, hard drives can and do occasionally fail.

Do you like what you read here?

Receive the latest update in your inbox.

Or connect with us: