Choosing the Root Filesystem for openSUSE Leap: Btrfs, ext4 or XFS
A concise decision guide that compares Btrfs, ext4 and XFS for the openSUSE Leap root partition, covering snapshot support, performance, encryption compatibility and validation steps.
26 Dec 2025, 02:50 UTC

Problem: selecting the root filesystem for a new openSUSE Leap install
When preparing a fresh openSUSE Leap installation you must decide which filesystem will hold the root directory (/). The choice affects snapshot and rollback capabilities, performance under different workloads, compatibility with the default YaST tools and GRUB2, and the effort required for future maintenance. This guide walks you through the decision, compares the three installer‑supported options, and shows how to verify the result after installation.
Decision and constraints
The decision is: pick a root filesystem that is fully supported by the openSUSE Leap installer, works with GRUB2, can be placed on an encrypted block device if needed, and can be managed with standard system tools (YaST, snapper, fsck). The constraints are:
- Installer support – the filesystem must be selectable during the guided install.
- Bootloader compatibility – GRUB2 must be able to read the kernel and initrd from the filesystem (or from a separate /boot partition).
- Encryption – if you use LUKS, /boot must remain unencrypted so GRUB2 can load the kernel.
- Maintainability – you should be able to check and repair the filesystem with available utilities.
Comparison of supported options
| Feature | Btrfs | ext4 | XFS |
|---|---|---|---|
| Native snapshots | Yes (subvolume based) | No | No |
| Rollback via snapper | Yes (default configuration) | No (requires external tools) | No |
| Online defragmentation | Yes | Limited (e4defrag) | No |
| Checksums on data & metadata | Yes | Metadata only | Metadata only |
| Typical CPU usage on heavy writes | Higher (copy‑on‑write, checksums) | Lower | Lower |
| Performance on large parallel I/O | Good | Good | Excellent (extent based, allocation groups) |
| Maturity and tooling | Maturing, but fsck can be long | Very mature, fast fsck | Mature, xfs_repair fast |
Trade‑offs
Btrfs gives you snapshot and rollback out of the box, which integrates with YaST’s snapper plugin and enables easy system state recovery. The trade‑off is increased CPU and I/O overhead on workloads with many small writes, and a filesystem check (btrfs check) that may require unmounting and can take considerable time on large volumes.
ext4 offers predictable, low‑overhead performance and a very fast fsck. It lacks native snapshots, so you must rely on external solutions (LVM snapshots, third‑party tools) if rollback is a requirement. It is the safest choice when you want minimal complexity and proven reliability.
XFS excels at handling large files and high‑throughput parallel I/O, making it suitable for data‑intensive workloads (databases, media rendering). Like ext4, it does not provide snapshots, and its repair tool (xfs_repair) assumes the filesystem is unmounted. Choose XFS when raw throughput matters more than snapshot convenience.
Concrete implementation during installation
In the openSUSE Leap installer, reach the “Partitioning” step:
- Select “Guided Setup” or “Expert Partitioner” depending on your preference.
- If you want Btrfs with snapshots, choose “Btrfs” as the filesystem for the root partition (
/). The installer will automatically create a@subvolume for the root and a@/.snapshotssubvolume for snapper. - If you prefer ext4 or XFS, select the respective filesystem for
/. Ensure a separate/bootpartition (typically ext4, 500 MiB) is present if you plan to encrypt the root with LUKS. - Complete the installation and reboot.
Example of a manual /etc/fstab entry for a Btrfs root (UUID shown as placeholder):
UUID=12345678-90ab-cdef-1234-567890abcdef / btrfs defaults 0 0
For an encrypted LUKS root with ext4, the /etc/crypttab might contain:
cryptroot UUID=abcdef12-3456-7890-abcd-ef1234567890 none luks
and the matching /etc/fstab line:
/dev/mapper/cryptroot / ext4 defaults 0 1
Validation after installation
Run the following commands as root (or with sudo) to confirm that the chosen filesystem is active and that snapshot tools are ready:
- Verify the filesystem type of the root mount:
findmnt -n -o FSTYPE /
- If Btrfs was selected, list subvolumes to ensure the default layout exists:
btrfs subvolume list /
- Check that snapper has a default configuration and can list existing snapshots:
snapper list
- Confirm that GRUB2’s menu entry points to the correct root device (UUID or device name):
grep -i rootfs /boot/grub2/grub.cfg
Each command should return a non‑empty result that matches your choice. No output is shown here because the actual values depend on your system.
Limitations and practical checks
Btrfs: A full filesystem check (btrfs check --repair) requires the volume to be unmounted. Before relying on snapshots for critical data, ensure you have a recent backup of the subvolume you intend to roll back.
Encryption: If you encrypt the root partition, keep /boot on an unencrypted partition (ext4 is the default) so that GRUB2 can load the kernel and initrd.
Performance verification: You can run a simple sequential write test with dd if=/dev/zero of=/tmp/testfile bs=1M count=1024 oflag=direct and compare the throughput across filesystems on identical hardware. This is optional but helps confirm that the expected performance class is observed.
By following the decision guide, comparing the options in the table, and validating with the commands above, you can confidently select and confirm the root filesystem that best matches your openSUSE Leap workload and operational requirements.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.