Btrfs is a new copy on write filesystem for Linux aimed at implementing advanced features while focusing on fault tolerance, repair and easy administration. Initially developed by Oracle, Btrfs is licensed under the GPL and open for contribution from anyone.
Btrfs is under heavy development, but every effort is being made to keep the filesystem stable and fast. As of 2.6.31, we only plan to make forward compatible disk format changes, and many users have been experimenting with Btrfs on their systems with good results. Please email the Btrfs mailing list if you have any problems or questions while using Btrfs.
Note that Btrfs does not yet have a fsck tool that can fix errors. While Btrfs is stable on a stable machine, it is currently possible to corrupt a filesystem irrecoverably if your machine crashes or loses power on disks that don't handle flush requests correctly. This will be fixed when the fsck tool is ready.
Linux has a wealth of filesystems to choose from, but we are facing a number of challenges with scaling to the large storage subsystems that are becoming common in today's data centers. Filesystems need to scale in their ability to address and manage large storage, and also in their ability to detect, repair and tolerate errors in the data stored on disk.
The main Btrfs features available at the moment include:
- Extent based file storage
- 2^64 byte == 16 EiB maximum file size
- Space-efficient packing of small files
- Space-efficient indexed directories
- Dynamic inode allocation
- Writable snapshots, read-only snapshots
- Subvolumes (separate internal filesystem roots)
- Checksums on data and metadata
- Compression (gzip and LZO)
- Integrated multiple device support
- RAID-0, RAID-1 and RAID-10 implementations
- Efficient incremental backup
- Background scrub process for finding and fixing errors on files with redundant copies
- Online filesystem defragmentation
Additional features in development, or planned, include:
- Very fast offline filesystem check (coming soon!)
- RAID-5 and RAID-6
- Object-level mirroring and striping
- Alternative checksum algorithms
- Online filesystem check
- Efficient incremental filesystem mirroring
- Linux 2.6.39 released (May 2011) Per-file compression and nocow control. Support for bulk TRIM on SSDs.
- Linux 2.6.38 released LZO compression. Forced read-only mode for handling filesystem errors. Read-only snapshots.
- Linux 2.6.37 released (January 2011) On-disk free space cache, asynchronous snapshots, unprivileged subvolume deletion, extent buffer switches from a rbtree with spinlocks to a radix tree with RCU. Explanations of these features are described in this article.
- State of "Btrfs" File System for Linux by Chris Mason Web cast (August 26, 2010) [email registration and flash required]
- Linux Kernel 2.6.35 released (August 2010). Btrfs direct I/O support and -ENOSPC handling of volume management operations, completing the -ENOSPC support.
(Read about past releases in the Changelog )
- Getting started
- FAQ -- About the Btrfs project and filesystem
- Problem FAQ -- Commonly-encountered problems and solutions
- SysadminGuide -- A more in-depth guide to btrfs's internals, to answer all those "but what is a subvolume?" kind of questions.
- Gotchas -- Known bugs and problems
- UseCases -- Recipes for how to do stuff with btrfs
- Using Btrfs with Multiple Devices
- Conversion from Ext3 and Ext4
- Programs: Btrfs(command) - mkfs.btrfs - Btrfs.ko (kernel module)
- Code documentation -- trees, source files, sample code for manipulating trees
- Data Structures -- detailed on-disk data structures
- Btrfs design -- design notes (possibly out of date in places)
- Multiple Device Support -- design notes
Source Code Download
* 04-2008 Multi-device Benchmarks
* 10-2008 Btrfs performance analysis by Steven Pratt and IBM The benchmarks from IBM demonstrate some bottlenecks we have in the extent recording on large workloads. We're working on fixes for these.
* 04-2009 Phoronix Performance Test on Fedora 11 Preview The phoronix workload is mostly CPU based, but they do have a few filesystem benchmarks. Btrfs performs well, but you can see the checksumming and metadata duplication show up on their single disk streaming write workload. dbench in general measures lots of different caching effects, and is not a great measure of everyday performance.
* 05-2009 Phoronix Test With SSD Mode This test show that btrfs is slower with ssd option activated. Ssd code has been updated during 2.6.30-rc and is expected to be faster.
* 10-2010 One Billion Files Btrfs performs well in comparison to other filesystems, when there are a billion files in the filesystem.
* 11-2010 Phoronix: The Linux 2.6.37 Kernel With EXT4 & Btrfs Comparison between Btrfs and Ext4.
* 12-2010 Benchmarks Of The Btrfs Space Cache Option Comparing the performance of Btrfs using the default mount options, using the space_cache mount option, using the compress mount option for Btrfs file compression, and lastly using both the space_cache and compression mount options to benefit from the free space caching and Zlib compression.
* 03-2011 Btrfs LZO Compression Performance