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.
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.
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.
The main Btrfs features include:
- Extent based file storage (2^64 max file size)
- Space efficient packing of small files
- Space efficient indexed directories
- Dynamic inode allocation
- Writable snapshots
- Subvolumes (separate internal filesystem roots)
- Object level mirroring and striping
- Checksums on data and metadata (multiple algorithms available)
- Integrated multiple device support, with several raid algorithms
- Online filesystem check
- Very fast offline filesystem check
- Efficient incremental backup and FS mirroring
- Online filesystem defragmentation
Currently the code is in an early implementation phase, and not all of these have yet been implemented. See the Development timeline for detailed release plans.
(For more detail, see Changelog )
- 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.
- Linux Kernel 2.6.34 released (May 2010). Btrfs support for changing the default subvolume, a new userspace tool (btrfs), an ioctl that lists all subvolumes, an ioctl to allow improved df math, and other improvements.
- Linux Kernel 2.6.33 released (February 2010). Some minor -ENOSPC improvements for Btrfs.
- Linux Kernel 2.6.32 released (December 2009). Btrfs support for -ENOSPC file operations, snapshot/subvolume deletion, discard support and performance improvements.
- An interesting article about Btrfs: "A Btrfs update"
- Btrfs rescue live boot images available: Rescue me
- v0.19 released (June, 2009). For use with Linux Kernel 2.6.31-rc (FORWARD ROLLING FORMAT CHANGE)
- v0.18 released (January 2009). For use with Linux Kernel 2.6.29-rc2
- v0.17 released (January 2009). For use with Linux Kernel 2.6.29-rc1
- v0.16 released (August 2008).
- v0.15 released (May 29, 2008).
- v0.14 released (April 30, 2008).
- v0.13 released.
- FAQ -- About the Btrfs project and filesystem
- Getting started
- Problem FAQ -- Commonly-encountered problems and solutions
- Gotchas -- Known bugs and problems
- UseCases -- Recipes for how to do stuff with btrfs
- Using Btrfs with Multiple Devices
- Conversion from Ext3 and Ext4
Source Code Download
The benchmarks from IBM demonstrate some bottlenecks we have in the extent recording on large workloads. We're working on fixes for these.
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.