Since the Ext file system will not grow past Ext4, enterprise Linux server OSes need an alternative. Btrfs holds...
promise as a next-generation file system for Linux.
Btrfs (B-tree file system) is an alternative to Ext4 that introduces many features. Before the release of Red Hat Enterprise Linux (RHEL) 7 and SUSE Linux Enterprise Server (SLES) 12 in 2014, many Linux users anticipated a new file system and were sure Btrfs would become the default. SUSE had started including it in SLES 11 sp 2 in 2012.
However, interest in Btrfs dropped when Red Hat announced it didn't consider Btrfs stable enough to support in RHEL 7 for enterprise environments. SUSE took a different approach, integrating the parts of Btrfs that were stable enough into SLES 12, and disabling all functionality that wasn't production ready.
Snapper and snapshots
As Btrfs is a Copy on Write (CoW) file system, it is easy to keep old versions of files. In a CoW file system, data is copied to a new location before a write occurs, so the user can always access the latest version of the data. SUSE used this functionality in its Btrfs Snapper utility, which allows administrators to create a snapshot of the current state of a system.
Snapper benefits Linux admins when they apply large modifications to servers. Changes don't always work out well, but it's easy to revert to the previous state of the system using the snapper command.
The snapper functionality has been integrated into the GRUB2 boot loader that SLES servers use to start the operating system. From here, the administrator can select to revert to a previous working state of the server, which simply rolls back all subsequent modifications.
Best Btrfs performance
There are some best practices to make Btrfs stable and fully functional on production servers.
Btrfs should be the OS file system: Users put their root file system on it, but not the data file system.
While installing, SLES detects the size of the disk where it is installed, and if the disk is big enough, a separate XFS partition is proposed for /home. If you're considering storing additional data on your server, you should do that on a separate partition as well.
Allocate enough working space to make Btrfs stable and perform best with SLES 12. To efficiently use the file system, you'll need at least 40 GB of available disk space. If you try to install it on a smaller disk, some features will be missing, in particular the Snapper functionality to recover a failing system with CoW snapshots.
About the author:
Sander van Vugt is an independent trainer and consultant based in the Netherlands. He is an expert in Linux high availability, virtualization and performance. He has authored many books on Linux topics, including Beginning the Linux Command Line, Beginning Ubuntu LTS Server Administration and Pro Ubuntu Server Administration. He can be reached at firstname.lastname@example.org.
Dig into the SLES 12 OS roadmap
Mount and automount Linux file systems