ext4 vs Btrfs: which Linux file system should you use?

Honestly, very few people think about which file system to use for their computers.

Windows and MacOS have a specific reason to search, as they have only one choice for your system – NTFS and HFS+ respectively. Linux, on the other hand, has many different file systems, the default is the Fourth Extended Filesystem (ext4). You wanted to change it to a B-Tree (Btrfs)? Let’s see which is better.

What do the file system?

Image Credit: Maksym Kaharlytskyi/Unsplash

As physical file systems, such as folders and cabinets, digital file system manage files. They control how your operating system stores data that are not used, what other information (known as metadata) attached to data, who or what has access to the data and so on.

The file system running in the background. Like the rest of the operating system kernel, they are largely invisible in daily use. File managers apps that you use to manage files, basically work the same way, regardless of which file system running under them.

The file system is incredibly complex programming. Developers are constantly reviewing the system to include more functionality and thus make them more effective.

Why switch file system?

None of the code is not suitable for all use cases, this also applies to file systems. Some file systems allocate for different reasons. File system File Allocation Table (FAT) is supported by almost all modern operating systems.

USB flash drives and SD cards use a FAT system so that your computer can read them regardless of whether you work on Linux, Windows, macOS or another operating system.

But nowadays, FAT is not as robust and powerful as some other file systems that have been developed since then. Therefore, while You will use FAT, you will see how it manages the data on Your hard drive.

Current Linux file system

Most desktop Linux distributions by default use ext4 file system. She became an improved version of the ext3 file system, which was improved compared to the ext2 file system.

ext4 has been very reliable file system, but it is outdated. Some Linux users looking for features that ext4 is unable to cope independently. There is software that solves some of these problems, but the ability to perform these actions on the file system level would provide the best performance. Hence the desire of users to Btrfs.

Understanding ext4: pros and cons

Restrictions ext4 are quite impressive. The largest volume/partition that can be created with ext4 – 1 exbibit, equivalent to about 1 921,5 152 terabytes. The maximum file size is 16 tebibayt or approximately a 17.6 terabytes, much larger than any hard drive that a standard user can purchase currently.

It is known that ext4 provides faster performance compared to ext3 through the use of several different techniques. Like most modern file systems, ext4 journaling, which means that it keeps a log of where files reside on disk and any other disk changes.

Despite all its capabilities, it does not support transparent compression, transparent encryption or data deduplication. Technically, snapshots are supported, but this feature is experimental.

Theodore TS’o, the developer played a key role in creating ext4, called her release based on obsolete technology of the 1970-ies and to believe that Btrfs will offer the best development. That was over ten years ago.

Understanding Btrfs: pros and cons

Btrfs, which can be pronounced as “Butter FS”, “Better FS”, or “B-Tree FS” is the newer file system from scratch. It exists because the developers wanted to extend the functionality of the file system to include additional functionality such as merging into pools, snapshots and checksums.

The project started in Oracle, but has since been developed by other major companies. The list includes Facebook, Netgear, Red Hat and SUSE.

While the improvements found in btrfs, can benefit ordinary users, some additional features are more interesting for corporate use. This functionality is intended for more demanding use cases, which often require more durable hard drives.

For organizations that use very large databases, the existence of a seemingly continuous file system across multiple hard drives can greatly simplify the consolidation of data. Data deduplication reduces the size of the actual space occupied by the data, and data mirroring becomes more simple, when there would be a single, large file system that you want to mirror.

Of course, you can still create multiple partitions, so as not to mirror everything. The maximum partition size for the btrfs file system is 16 exbibit, as well as the maximum file size.

Given that btrfs can span multiple hard drives, good that it supports 16 times more disk space than ext4.

Linux distributions made the switch?

Btrfs is a stable part of the Linux kernel in 2013, and you can reformat the hard disks today. But btrfs is the file system Linux by default. Most distributions continue to use ext4 by default.

Why? Files are the most important data on your hard drive. Personal data is irreplaceable. You can reinstall the OS and restart the app, but no backup of the lost files will be gone forever. That is why it is very important that the file system was checked for reliability before switching millions of people to use it by default.

Ext4 may be old and possibly fragile, but it has already proven its stability and reliability. If the power was disconnected and the computer turns off, then it is highly likely that ext4 will preserve your data.

For most people such situations are the most important factor. It’s not a matter of how well the file system when things are going well, but what happens when things go wrong.

One known distribution is determined that enough time has passed to switch. OpenSUSE now uses btrfs by default for the partition /root, which is the operating system. However, for the /home partition where your personal files are kept, openSUSE decided to use it instead of XFS.

So no, the transition was not quite as expected. But, as we know, new technologies sometimes require a lot of time to spread around the Linux environment.

Source: omgubuntu.ru

(Visited 149 times, 3 visits today)