Btrfs on Oracle Linux today: a UEK-exclusive module, absent from the installer, with subvolumes and snapshots measured on loopback
What you will learn
Section titled “What you will learn”Btrfs’s real position in the Oracle Linux ecosystem: where it works, where it explicitly does not, how its core features (subvolumes/snapshots) measure under UEK, and which scenarios justify choosing it.
Three boundaries (all measured)
Section titled “Three boundaries (all measured)”- The installer has no Btrfs scheme — the manual-partitioning dropdown offers only ‘Standard Partition / LVM / LVM Simple Config’. Btrfs root? The distribution does not support that path;
- The module is UEK-only —
btrfs.ko.xzis in place in UEK; the RHCK btrfs directory is empty. A system booted with RHCK cannot mount Btrfs; - The toolchain is complete —
btrfs-progs 6.12installs straight from the UEK repository.
One-line positioning: on OL, Btrfs is a “UEK-exclusive data-volume option”, not a root-filesystem candidate.
The core value, measured: subvolumes and readonly snapshots
Section titled “The core value, measured: subvolumes and readonly snapshots”dnf install -y btrfs-progsdd if=/dev/zero of=/tmp/btrfs.img bs=1M count=200 status=nonelosetup /dev/loop7 /tmp/btrfs.imgmkfs.btrfs -L oltest /dev/loop7mount /dev/loop7 /mnt/btSubvolume and snapshot measured:
btrfs subvolume create /mnt/bt/snap1 # ID 256 subvolumeecho v1 > /mnt/bt/file.txtbtrfs subvolume snapshot -r /mnt/bt /mnt/bt/ro_snap # readonly snapshotecho v2 > /mnt/bt/file.txt # the source keeps writingcat /mnt/bt/ro_snap/file.txt # → v1 (the readonly snapshot frozen at its point)Snapshots are copy-on-write: creation is near-zero cost and occupies no extra space (until a divergent write). Typical uses:
- Snapshot before an upgrade or change; roll back in seconds when something breaks (with
btrfs subvolume set-default); btrfs send/receivefor incremental backups to another disk — a built-in capability neither xfs nor ext4 has.
When to choose Btrfs
Section titled “When to choose Btrfs”| Scenario | Recommendation |
|---|---|
| Root filesystem | xfs (the default) — the installer does not support Btrfs root, and xfs has the widest compatibility surface with Ksplice and the toolchain |
| Backup/snapshot-heavy data volumes | Btrfs fits: send/receive incremental backup is the killer feature |
| Database data directories | Careful: CoW causes write amplification on large-file random writes — chattr +C to disable CoW, or just use xfs |
| VM disk image pools | Btrfs fits: snapshots + compression (zstd) save space |
The trade-offs against xfs at a glance
Section titled “The trade-offs against xfs at a glance”| Capability | xfs (OL default) | Btrfs (UEK-exclusive) |
|---|---|---|
| Online growth | ✅ (lvextend -r) | ✅ (btrfs filesystem resize; can even add disks) |
| Online shrink | ❌ | ✅ (filesystem resize smaller) |
| Snapshots | ❌ (via LVM snapshots) | ✅ native, second-level, readonly-capable |
| Database random writes | ✅ mature | ⚠️ CoW write amplification; needs no-CoW |
| RHCK compatibility | ✅ | ❌ module absent |
Evidence and limits on this page
Section titled “Evidence and limits on this page”- Measured: the installer’s scheme list (screenshot), the dual-kernel module-directory comparison, and the full loopback flow (mkfs/subvolume/readonly snapshot/data reads) (E3);
- Not measured: the send/receive incremental backup chain (needs a second real disk) and multi-device profiles (raid1);
- Sources: the UEK 8 Release Notes (Btrfs support),
btrfs(5).