Btrfs (B-tree File System) is a Linux file system based on the copy-on-write (CoW) principle. It integrates volume management and file system layers, allowing administrators to manage multiple physical drives as a single storage pool without using LVM or MDADM. This architecture simplifies storage expansion and live partition management.
The CoW mechanism ensures that updates are written to new blocks, preserving the original data until the write operation is complete. This design prevents "write hole" issues during power failures and enables near-instantaneous snapshots. Btrfs uses checksums for all data and metadata to detect and automatically repair silent data corruption in redundant setups.
It is deployed in enterprise storage solutions, NAS devices, and modern Linux distributions to provide high availability and data integrity. Key features include transparent compression (zlib, lzo, zstd), out-of-band deduplication, and dynamic inode allocation.
How it works
Btrfs supports multiple RAID levels and subvolumes, which act as independent file system roots. For example, the command btrfs device add /dev/sdb /mnt adds a new drive to a live pool. The file system supports a maximum file size of 16 EiB, matching the theoretical limit of the 64-bit address space.