The default filesystem on a freshly provisioned Linux VM depends on the distro. RHEL-family images default to xfs. Debian and Ubuntu default to ext4. Both are journalled, both are stable, both will run a typical workload without complaint. The choice still matters for a handful of scenarios — and once a filesystem is created on a partition, switching means a copy, not a flag.
What’s actually happening
ext4 is the long-standing default. It is simpler, has predictable behaviour on small filesystems, supports both online growth and (cold) shrinking, and recovers cleanly from crashes. Its weak point is metadata-heavy workloads on very large filesystems — operations that touch millions of files spend more time in the journal than in the data path.
xfs was designed for large, parallel I/O. It scales metadata operations across multiple allocation groups, handles very large files and very large directories without slowdown, and supports online growth. It cannot shrink — at all. It also requires a recent enough kernel to enable features like reflinks (cheap copy-on-write copies), which mailbox and container workloads make heavy use of.
Both deliver effectively the same throughput on a single sequential workload. The split shows up on directories with millions of entries, on heavy metadata operations (find, rsync of huge trees, mail spools), and on the day someone asks if the volume can be shrunk.
How to verify
Identify what is currently mounted where:
df -hT
findmnt -t ext4,xfs
Inspect filesystem-specific tunables:
# ext4
sudo tune2fs -l /dev/mapper/vg0-var | head -40
# xfs
sudo xfs_info /var
For a workload comparison before committing, run fio with a metadata-heavy profile (file creation/deletion) on a scratch volume on each filesystem and compare op/s, not just MB/s.
The fix
For a database volume, an application data volume on a medium-sized VM, or any volume that might someday need to shrink, choose ext4. The behaviour is well understood, the tooling is familiar, and the limits rarely bind for the target workload.
For a mail spool, a /var/lib/docker or /var/lib/containers volume on a busy node, a large media library with millions of files, or a fileserver with deep directory trees, choose xfs. The metadata scaling and reflink support both pay off.
What does not work is converting in place. Switching means provisioning a new volume with the desired filesystem, syncing the data (rsync -aHAX), and cutting over. Plan it during a normal change window, not when the existing filesystem is already in trouble.
Stack Harbor selects filesystems on a per-volume basis at provisioning time as part of Cloud Compute. If you have inherited a fleet with the wrong default and want to plan a migration, we can scope it.