Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

Btrfs · Linux Storage

Direct answer

Btrfs is a copy-on-write Linux file system with checksums, subvolumes, snapshots, compression and built-in RAID 1/10. RAID 5/6 is still not recommended for production use.

When to use this

Use this when using Btrfs subvolumes, snapshots, compression or RAID on Linux.

First 30 seconds

1. Btrfs: COW, snapshots, subvolumes, checksums, compression.

2. Use RAID1/10, not 5/6 for important data.

3. Watch metadata space.

4. Scrub and balance.

5. Snapper for snapshots.

Operational verification

files → Btrfs → devices

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • RAID 5/6 profiles for data — still not recommended due to write-hole issues.
  • Running out of metadata space while df shows free space — check btrfs filesystem usage and balance.
  • Running btrfs check --repair without backups.
  • Copy-on-write fragmentation for VM images and databases — use chattr +C on empty directories.
Platform / version applicability
Linux Storage
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformLinux Storage
Scope / prerequisiteUse this when using Btrfs subvolumes, snapshots, compression or RAID on Linux.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Btrfs RAID 5/6 is not recommended for production.
  • Free space can run out in metadata before data.
  • Snapshots are cheap but keep old data alive.
Key checks
  • btrfs filesystem show — devices
  • btrfs filesystem usage <mount> — allocation
  • btrfs device stats <mount> — errors
ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Btrfs on Linux: default root filesystem on openSUSE and Fedora Workstation, with subvolumes used for snapshot-based rollback (snapper).

btrfs subvolume list /
snapper list
snapper rollback 42
btrfs device add /dev/sdc /data; btrfs balance start -dconvert=raid1 -mconvert=raid1 /data
btrfs device stats /data           # per-device error counters

Keep 10–20 % free, schedule monthly scrubs, and watch btrfs device stats — non-zero corruption counters mean a disk or cabling problem.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Commands

mkfs.btrfs -L data /dev/sdb /dev/sdc -d raid1 -m raid1
btrfs subvolume create /data/projects
btrfs subvolume snapshot -r /data/projects /data/.snap/projects-$(date +%F)
btrfs filesystem usage /data
btrfs scrub start /data ; btrfs scrub status /data
btrfs balance start -dusage=50 /data

Documented example, not captured output. Avoid RAID5/6 for metadata in production; watch "unallocated" space (filesystem usage) — Btrfs can report free space but fail to allocate metadata. Default on openSUSE and Fedora desktops.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docLinux Storage current

Authoritative/upstream documentation reviewed for bounded claims in Linux Storage → Btrfs. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.kernel.org/block/index.html · confidence 94%
Confirmation

Confirm action

Continue?