Btrfs Filesystem

- 4 mins

Fedora 33 will be released in mid to late October 2020 and Fedora has announced that it will use Btrfs as the default filesystem on Fedora 33 by default although you should be able to use Ext4 as your file system when you install Fedora.

This has caused a lot of discussion in the community about fil esystems and why this could be a bad or good decision.

In this post I’ll be talking about file systems and what they do and what advantages Btrfs offers.

What is filesystem?

In simple terms a file system allow a user a to organize and store files on a storage device.

When we format a partition, we usually choose a file system for our partition and the file system stores information about all of the files that are saved on our media such as names, permissions, where each file is located.

Different Types of Filesystems

There are various types of file systems out there and each one of them was created for a reason. Each file system has it’s own set of strengths and weaknesses. Some of them are better at handling file corruption, some are faster and some are better and controlling large amount of data.

Normally when you format a thumb drive and you choose a file system, other machines may face some difficulties when it comes to reading your thumb drive. This is a common issue and people usually go back and reformat their media and choose a different one.

If you tried to format your USB disk with Ext4, it can be used only with Linux systems but let’s say you chose FAT instead of Ext4 or NTFS (Windows-only) then you can use it with all devices.

As we’ve said before there are many file systems out there but we can’t discuss all of them but if you like to learn more about filesystems visit this link: Comparison of file systems

Ext4 (Extended File system)

Before Ext4 there were older versions (ext, ext2, ext3) but they lacked some features. For example Ext was the first version and it was introduced in 1992 and it didn’t have most features that Ext4 now offers.

Then Ext2 was introduced but unfortunately there was no journaling (prevents data corruption from crashes and sudden power loss) and Ext3 tried to solve this issue and be more robust but this came at a cost and the speed wasn’t ideal.

Nowadays “Ext4” is considered the default file system on most Linux distributions. It offers journaling and is quite stable and fast. Up until now Fedora used Ext4 as well but it has decided to move to Btrfs.

NTFS

NTFS (New Technology File System) is the file system designed by Microsoft and was introduced many years ago. NTFS uses journaling to record metadata changes to the volume and resizing is also allowed. This is the most common file system in the world. If you want to learn more about here: NTFS

APFS

This file system was introduced in WWDC 2016 and it replaced HFS+ and is used on Apple devices. Apple File System is optimized for flash and solid-state drive storage and Apple designed APFS to be able to scale more consistently. Launch of applications is prioritized and directory re-sizing should be fast. In 2018 it was noted that APFS had a bug that allowed an attacker to retrieve disk encryption password in plain-text.

Btrfs

Btrfs which is an abbreviation for “b-tree file system” was initially designed at 2007 by Oracle. The main motivation behind this file system was to allow scaling for storage. Most Linux distributions will probably adopt it in the near future as it gets more stable. Main advantages include:

How to Check Filesystem

There are few commands you can use to check what file system you’re using and you don’t have to leave terminal to do this.

One simple of way is using df command, to use this type this:

	df -Th

Alternatively you can use this command too:

	lsblk -f

lsblk is used to display block devices and -f prints file systems as well. There are other ways too like using fstab or fsck. It depends which one you’re more comfortable with.

Wrapping up

It seems btrfs would be an improvement over Ext4 and this move by Fedora could push other distributions to use this file system as default for their next release. openSUSE have been using it for many years now, Facebook uses it on millions of machines as well.

The problem is stability and how it affects users but we’ll have to wait and see what happens. Some have criticized this decision but with time we’ll see this decision was right or wrong.

If you plan on using btrfs-convert utility it’s recommended to make a backup before changing your file system.

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora