I’ve recently told you about the Ext–Ext2–Ext3–Ext4 series of Linux file systems, and the XFS file system originally invented by Silicon Graphics and now the default file system in many Linux distributions.
Where are things going?
Linux came from humble beginnings, just consider Linus Torvalds’ original announcement. Meanwhile the engineers at Sun Microsystems were working on large-scale high-performance file systems. So here’s a question:
Why did Oracle buy Sun?
At the time, I assumed it was so you could buy a complete database system in one purchase. Oracle was known for the database itself, but they had to tell you to run it within someone else’s operating system running on someone else’s hardware. Oracle bought Sun and now you could simply buy an Oracle database server. It ran on the Solaris operating system, which was running on an UltraSPARC platform, and the database, the OS, and the hardware all came from the one company.
But not long after purchasing Sun, Oracle was suggesting that you run your Solaris OS and Oracle database on an Intel/AMD platform. OK, those processors are quite fast, and new motherboards support large amounts of RAM.
Soon after that, they were suggesting that you use Linux instead of Solaris. They provided you with both enterprise-class Intel/AMD hardware and the Linux operating system, and now they even have their own Oracle Linux distribution. What’s going on? They bought a manufacturer of hardware and an operating system, and then seem to have discarded both…
What is a blog without wild speculation from time to time? My current theory is that Oracle bought Sun for the ZFS file system. ZFS integrates logical volume management with a file system. It protects against data corruption with continuous integrity checking and automatic live repair, it supports very high capacity and file size, snapshots and copy-on-write clones for backing up and consistency checking without down time, and more.
The B-tree file system, called Btrfs and pronounced several ways (Butter F S, Better F S, Bee-tree F S, B-T-R-F-S) is a Linux-native file system developed at Oracle using the ZFS concepts. Copy-on-write B-tree data structures were proposed by an IBM researcher at USENIX 2007. Later that year, Btrfs development began at Oracle.
The following year, 2008, Theodore T’so, the main developer of Ext4, described that file system as ”a stop-gap” and said that Btrfs was clearly the way forward. By the year after that, 2009, Btrfs support was in the mainline Linux kernel.
So why aren’t we using Btrfs yet? There has been a lot of growth since 2009, many features have been added. So while some see Btrfs as ready for production, others see it as just now coming out of its development phase. Red Hat, for example, included it as a ”technology preview” in 2014’s RHEL 7, going with XFS as their default. Let’s see what that large feature set includes.
RAID and LVM are now integrated into the file system. You can add and remove block devices without shutting down, assuming you can hot-plug disks into your interfaces and controllers. Several versions of RAID are supported. The file systems on top of that can be grown and shrunk while in use. Data is automatically moved to balance I/O load across physical volumes and improve performance.
Online defragmentation, consistency checking, and repair are supported. Data deduplication is under development.
Transparent compression is supported, encryption at the file system level is under development. (for now, the recommendation for encryption is to do it at the block device level)
Snapshots support making backups with no downtime. Subvolumes, multiple separately mountable file system roots within a partition, can make file system use and backup more efficient. Quotas can be enforced in a hierarchical fashion using those subvolumes.
While we follow Red Hat’s lead and use the XFS file system in Learning Tree’s Linux server administration course, we show you the Btrfs file system commands. It’s time to create at least a small Btrfs file system on a test machine and start experimenting with this exciting technology.