Main Page

From btrfs Wiki
(Difference between revisions)
Jump to: navigation, search
(News: progs 6.0.2)
 
(605 intermediate revisions by 75 users not shown)
Line 1: Line 1:
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.
+
__NOTOC__
 +
<!-- Welcome Block -->
 +
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; align:right; ">
 +
[[File:Btrfs_logo_small.png|200px|left|btrfs]]
  
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 a modern copy on write (CoW) filesystem for Linux aimed at implementing advanced features while also focusing on fault tolerance, repair and easy administration. Its main features and benefits are:
  
'''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.'''
+
* '''Snapshots''' which do not make the full copy of files
 +
* '''RAID''' - support for software-based RAID 0, RAID 1, RAID 10
 +
* '''Self-healing''' - checksums for data and metadata, automatic detection of silent data corruptions
 +
 
 +
Development of Btrfs started in 2007. Since that time, Btrfs is a part of the Linux kernel and is under active development.
 +
 
 +
Jointly developed by multiple companies (https://btrfs.readthedocs.io/en/latest/Contributors.html, Btrfs is licensed under the GPL and open for contribution from anyone.
 +
 
 +
[[Production_Users|List of companies using btrfs in production]].
 +
</div>
 +
 
 +
{| width="100%"
 +
|-
 +
|style="vertical-align:top" |
 +
 
 +
<!-- Development and Issue Reporting Block -->
 +
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#dcf5ff; align:right;">
 +
== Development and Issue Reporting ==
 +
 
 +
'''For feature status, please refer to the [[Status]] page.'''
 +
 
 +
The Btrfs code base is stable. However, new features are still under development. Every effort is made to ensure that it remains stable and fast at each and every commit. This rapid pace of development means that the filesystem improves ''noticeably'' with every new Linux release so it's ''highly'' recommended that users run the most modern kernel possible.
 +
 
 +
For benchmarks, it's recommended to test the latest stable Linux version, and not any older, as well as the latest Linux development versions. Also, it's recommended to test the various [[Manpage/btrfs(5)#MOUNT_OPTIONS|mount options]] such as different [[compression]] options.
 +
 
 +
If you find any behavior you suspect to be caused by a bug, performance issues, or have any questions about using Btrfs, please email the [[Btrfs mailing list]] (no subscription required). Please report bugs on [[Problem_FAQ#How_do_I_report_bugs_and_issues.3F|Bugzilla]].
 +
</div>
 +
 
 +
<!-- Features Block -->
 +
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#F8F8FF; align:right;">
 
== Features ==
 
== Features ==
  
The main Btrfs features include:
+
Linux has a wealth of filesystems from which to choose, 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.
  
* Extent based file storage (2^64 max file size)
+
=== Major Features Currently Implemented ===
* Space efficient packing of small files
+
* Extent based file storage
* Space efficient indexed directories
+
* 2^64 byte == 16 EiB maximum file size (practical limit is 8 EiB due to Linux VFS)
 +
* [https://btrfs.readthedocs.io/en/latest/Inline-files.html Space-efficient packing of small files]
 +
* Space-efficient indexed directories
 
* Dynamic inode allocation
 
* Dynamic inode allocation
* Writable snapshots
+
* Writable snapshots, read-only snapshots
* Subvolumes (separate internal filesystem roots)
+
* [https://btrfs.readthedocs.io/en/latest/Subvolumes.html Subvolumes] (separate internal filesystem roots)
* Object level mirroring and striping
+
* [https://btrfs.readthedocs.io/en/latest/Checksumming.html Checksums on data and metadata] (crc32c, xxhash, sha256, blake2b)
* Checksums on data and metadata (multiple algorithms available)
+
* [https://btrfs.readthedocs.io/en/latest/Compression.html Compression] (ZLIB, LZO, ZSTD), heuristics
* Compression
+
* Integrated [[Multiple_Device_Support|multiple device support]]
* Integrated multiple device support, with several raid algorithms
+
** File Striping
* Online filesystem check
+
** File Mirroring
* Very fast offline filesystem check
+
** File Striping+Mirroring
* Efficient incremental backup and FS mirroring
+
** Single and Dual Parity implementations (experimental, not production-ready)
* Online filesystem defragmentation
+
* SSD (flash storage) awareness
 +
** [https://btrfs.readthedocs.io/en/latest/Trim.html TRIM/Discard] for reporting free blocks for reuse
 +
** Optimizations (e.g. avoiding unnecessary seek optimizations, sending writes in clusters, even if they are from unrelated files. This results in larger write operations and faster write throughput)
 +
* Background [https://btrfs.readthedocs.io/en/latest/Scrub.html scrub] process for finding and repairing errors of files with redundant copies
 +
* Online filesystem [https://btrfs.readthedocs.io/en/latest/Defragmentation.html defragmentation]
 +
* [https://btrfs.readthedocs.io/en/latest/btrfs-check.html Offline filesystem check]
 +
* In-place [[Conversion_from_Ext3|conversion]] of existing ext2/3/4 and reiserfs file systems
 +
* [https://btrfs.readthedocs.io/en/latest/Seeding-device.html Seeding devices]. Create a (readonly) filesystem that acts as a template to seed other Btrfs filesystems. The original filesystem and devices are included as a readonly starting point for the new filesystem. Using copy on write, all modifications are stored on different devices; the original is unchanged.
 +
* Subvolume-aware [https://btrfs.readthedocs.io/en/latest/Qgroups.html quota support]
 +
* [https://btrfs.readthedocs.io/en/latest/Send-receive.html Send/receive] of subvolume changes, efficient incremental filesystem mirroring and [[Incremental_Backup|backup]]
 +
* Batch, or out-of-band [[deduplication]] (happens after writes, not during)
 +
* [https://btrfs.readthedocs.io/en/latest/Swapfile.html Swapfile] support
 +
* [https://btrfs.readthedocs.io/en/latest/Tree-checker.html Tree-checker], post-read and pre-write metadata verification
 +
* [[Zoned]] mode support (SMR/ZBC/ZNS friendly allocation)
 +
* fsverity integration
  
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.
+
=== Features by kernel version ===
  
== News ==
+
* features by kernel version https://btrfs.readthedocs.io/en/latest/Feature-by-version.html
* Linux 2.6.32 released, with btrfs support for -ENOSPC, snapshot/subvolume deletion, discard support and performance improvements. More details in the [[ Changelog ]]
+
 
* An interesting article about Btrfs: "[http://lwn.net/Articles/358940/ A Btrfs update]"
+
=== Documentation ===
* Btrfs rescue live boot images available [[ Rescue me ]]
+
 
* v0.19 Released (June 2009) For 2.6.31-rc (FORWARD ROLLING FORMAT CHANGE) [[ Changelog ]]
+
* https://btrfs.readthedocs.org or https://btrfs.rtfd.io
* v0.18 Released (Jan 2009) For 2.6.29-rc2 [[ Changelog ]]
+
* the #btrfs channel is at [https://libera.chat libera.chat], matrix.org bridge works (persistent room #btrfs:matrix.org).
* v0.17 Released (Jan 2009) Included in 2.6.29-rc1 [[ Changelog ]]
+
 
* v0.16 Released (Aug, 2008) [[ Changelog ]]
+
</div>
* v0.15 Released (May 29, 2008)
+
 
* v0.14 Released (April 30, 2008)
+
<!-- Documentation Block -->
* v0.13 Released
+
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#fffff0; align:right; ">
  
 
== Documentation ==
 
== Documentation ==
  
* [[FAQ]]
+
=== Guides and usage information ===
* [[Changelog]]
+
* [[Getting started]]
+
* [[Using Btrfs with Multiple Devices]]
+
* [[Conversion from Ext3|Conversion from Ext3 and Ext4]]
+
* [[Btrfs design]]
+
* [[Multiple Device Support]]
+
* [[Code documentation]]
+
  
== Contact ==
+
* [[Getting started]] — first steps, distributions with btrfs support
 +
** [https://btrfs.readthedocs.io/en/latest/btrfs-man5.html#mount-options Mount options]
 +
* [[FAQ]] — About the btrfs project and filesystem
 +
* [[UseCases]] — Recipes for how to do stuff with btrfs
 +
* [[SysadminGuide]] — A more in-depth guide to btrfs's concepts and a bit of its internals, to answer all those "but what ''is'' a subvolume?" kind of questions.
 +
* [[Using Btrfs with Multiple Devices|Multiple devices]] – A guide to the RAID features of Btrfs
 +
* [[Conversion_from_Ext3|Conversion from Ext3 and Ext4]] or reiserfs
 +
* [[Problem FAQ]] — Commonly-encountered problems and solutions.
 +
** [[Gotchas]] — lists known bugs and issues, but not necessarily solutions.
  
* [[Btrfs mailing list]]
+
=== Manual pages ===
* [http://en.wikipedia.org/wiki/Internet_Relay_Chat IRC] on freenode.net in the channel [irc://irc.freenode.net:6667/btrfs #btrfs]
+
  
== Source Code Download ==
+
* Manual pages generated from git ([https://btrfs.readthedocs.io/en/latest/man-index.html complete list]):
 +
** [https://btrfs.readthedocs.io/en/latest/btrfs.html btrfs] — main administration tool
 +
** [https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html mkfs.btrfs] — creating the filesystem
 +
** [https://btrfs.readthedocs.io/en/latest/btrfs-check.html btrfs check] — repairing file systems
 +
** [https://btrfs.readthedocs.io/en/latest/btrfs-convert.html btrfs-convert] — tool to convert in-place from ext2/3/4 filesystems to btrfs. For a greater detail of how the algorithm works, please see the [[Conversion from Ext3]] page.
  
* [[Btrfs source repositories]]
+
* Original wiki documentation (obsolete, will be removed)
* [[Hot Fixes]]
+
** [[Restore|restore and find-root]] — utilities to find and restore data from an unmountable filesystem
* [http://git.kernel.org/?p=linux/kernel/git/mason/btrfs-unstable.git;a=tree;f=fs/btrfs;hb=HEAD Gitweb source viewer]
+
  
== Benchmarking ==
+
=== Developer documentation ===
* [[Multi-device Benchmarks]]
+
* [http://btrfs.boxacle.net 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 [http://www.phoronix.com/scan.php?page=article&item=btrfs_benchmarks&num=1 Phoronix performance test on fedora 11 preview]
+
* [[Development setup]] - how to build btrfs from sources and prepare a development environment
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 [http://www.phoronix.com/scan.php?page=article&item=btrfs_ssd_mode&num=1 Phoronix test with ssd mode]
+
* [https://github.com/btrfs/btrfs-dev-docs Developer documentation on Github] - collection of documents describing internals of BTRFS
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.
+
* [[Developer's FAQ]] — hints and answers for contributors and developers, general information about patch formatting
 +
* [[Development notes]] — notes, hints, checklists for specific implementation tasks (eg. adding new ioctls)
 +
* [[Data Structures]] — detailed on-disk data structures
 +
* [[On-disk_Format | On-disk Format]] - Details of data structures written on disk
 +
* [[Trees]] — detailed in-tree representation of files and directories
  
== Planning ==
+
* [[Btrfs design]] — design notes (possibly out of date in places)
 +
* [[Multiple Device Support]] — design notes
 +
* [[Design_notes_on_Send/Receive]] — notes from initial impelentation, protocol V2 updates draft
 +
* [[Qgroups status quo]] - notes on some qgroups observations/pain points
  
* [[Development timeline]]
+
* [[Debugging Btrfs with GDB]]
 +
* [[Writing patch for btrfs]]
 +
* [[Btree_Items]] - Mapping from Btrfs key to item-data
 +
* [[Resolving_Extent_Backrefs]] - How back references are resolved to root owners
 +
 
 +
* Original COW B-tree: Source code in C that implements the COW B-tree algorithms [https://github.com/orodeh/bt repository]. Written by Ohad Rodeh at IBM Research in 2006, and released under a BSD license. This is a reference implementation, that works in user space.
 +
 
 +
* [[User notes on dedupe]] — User/tester notes for using in-band deduplication feature
 +
</div>
 +
 
 +
| width="50%" style="vertical-align:top" |
 +
 
 +
<!-- News Block -->
 +
<div style="margin:0; margin-top:10px; border:1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#f0e0d0; align:left;">
 +
 
 +
== News ==
 +
 
 +
''' btrfs-progs v6.0.2 (Nov 2022) '''
 +
* Please see the release notes at [https://btrfs.readthedocs.io/en/latest/CHANGES.html readthedocs.io]
 +
 
 +
''' btrfs-progs v6.0 (Oct 2022) '''
 +
* Please see the release notes at [https://btrfs.readthedocs.io/en/latest/CHANGES.html#btrfs-progs-6-0-2022-10-11 readthedocs.io]
 +
 
 +
''' linux v6.0 (Oct 2022) '''
 +
 
 +
''' linux v5.19 (Aug 2022) '''
 +
 
 +
''' linux v5.18 (Jun 2022) '''
 +
 
 +
''' util-linux v2.38 (Apr 2022) '''
 +
 
 +
blk* utilities and libraries finally recognize btrfs formatted with zoned mode
 +
 
 +
</div>
 +
 
 +
<!-- Changelog Block -->
 +
<div style="margin:0; margin-top:10px; border:1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#dfefdf; align:left; margin-top:10px">
 +
 
 +
== Changelog ==
 +
 
 +
Changelogs and other related information are also tracked at https://btrfs.readthedocs.io:
 +
 
 +
* features by kernel version https://btrfs.readthedocs.io/en/latest/Feature-by-version.html
 +
* [[Changelog#By_version_.28linux_kernel.29|kernel changes for each release]]
 +
* btrfs-progs changes for each release https://btrfs.readthedocs.io/en/latest/CHANGES.html
 +
</div>
 +
 
 +
<!-- Source code Block -->
 +
<div style="margin:0; margin-top:10px; border:1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#dfefdf; align:left; margin-top:10px">
 +
 
 +
== Source code download ==
 +
 
 +
[[Btrfs source repositories]] describes purpose and contents, here are a few quick links:
 +
 
 +
* repository for kernel pull requests: git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git ([https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git gitweb])
 +
* kernel development repository: git://github.com/kdave/btrfs-devel.git ([https://github.com/kdave/btrfs-devel.git web access])
 +
* kernel development repository (mirror): git://gitlab.com/kdave/btrfs-devel.git ([https://gitlab.com/kdave/btrfs-devel.git web access])
 +
* btrfs-progs development and release repository: git://github.com/kdave/btrfs-progs.git ([https://github.com/kdave/btrfs-progs.git web access])
 +
* released tarballs of btrfs-progs: https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/
 +
</div>
 +
 
 +
<!-- Articles Block -->
 +
<div style="margin:0; margin-top:10px; border:1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#dfefdf; align:left; margin-top:10px">
 +
== Articles, presentations, podcasts ==
 +
* '''Video:''' [https://www.youtube.com/watch?v=U7gXR2L05IU Deploying Btrfs at Facebook Scale] by Josef Bacik at the Open Source Summit 2020 (2020-06-29)
 +
* '''Video:''' [https://youtu.be/qHalOdCZO9Q btrfs is awesome, except when it isn't] by Richard Brown at openSUSE Conferece 2018 (2018-05-25)
 +
* '''Video:''' [https://youtu.be/-m01x3gHNjg btrfs: The Best Filesystem You've Never Heard Of] by poiupoiu at PhreakNIC 21 (2017-11-3)
 +
* '''Video''' [https://youtu.be/iwNg_fusT9A TUT91782 Getting the most out of the btrfs filesystem by Thorsthen Kukuk and Jeff Mahoney] (SUSECON, 2017)
 +
* '''Video:''' [https://www.youtube.com/watch?v=W3QRWUfBua8 NYLUG Presents: Chris Mason on Btrfs (May 14th 2015)] by Chris Mason at the 192nd meeting of the NYLUG
 +
* '''Video:''' [https://www.youtube.com/watch?v=6DplcPrQjvA Why you should consider using btrfs ... like Google does.] by Marc Merlin at linux.conf.au 2015. [http://marc.merlins.org/linux/talks/Btrfs-LCA2015/ talk slides]
 +
* '''Article:''' [http://arstechnica.com/information-technology/2014/01/bitrot-and-atomic-cows-inside-next-gen-filesystems Bitrot and atomic COWs: Inside “next-gen” filesystems] (ars technica, 2014/01)
 +
* '''Article:''' [https://lwn.net/Articles/579009/ Btrfs: Subvolumes and snapshots] (LWN.net, 2014/01)
 +
* '''Article:''' [https://lwn.net/Articles/577961/ Btrfs: Working with multiple devices] (LWN.net, 2013/12)
 +
* '''Article:''' [http://lwn.net/Articles/577218/ Btrfs: Getting started] (LWN.net, 2013/12)
 +
* '''Article:''' [http://www.zdnet.com/btrfs-hands-on-an-extremely-cool-file-system-7000023734 Btrfs hands on: An extremely cool file system] (ZDNet, 2013/11)
 +
* '''Technical report:''' [http://domino.watson.ibm.com/library/cyberdig.nsf/1e4115aea78b6e7c85256b360066f0d4/9e29fdded06e5de785257c1d005e7e9e!OpenDocument Visualizating Block IO Workloads]. Section six shows a visual comparison of the IO patterns for BTRFS, XFS, and EXT4. Submitted to ACM Transactions on Storage, November 2013.
 +
* '''Paper:''' [http://dl.acm.org/citation.cfm?id=2501623 BTRFS: The Linux B-Tree Filesystem] describing the overall concepts and architecture, appeared in ACM Transactions on Storage, August 2013. Includes a detailed comparison with ZFS. There is a free ACM authorized link, from O. Rodeh's [https://sites.google.com/site/ohadrodehshomepage/research] page. Otherwise, try [http://domino.research.ibm.com/library/cyberdig.nsf/papers/6E1C5B6A1B6EDD9885257A38006B6130/$File/rj10501.pdf IBM Research link]
 +
</div>
 +
 
 +
<!-- Historical Block -->
 +
<div style="margin:0; margin-top:10px; border:1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#dfefdf; align:left; margin-top:10px">
 +
== Historical resources ==
 +
 
 +
Links to old or obsolete documentation, articles. Kept for historical reasons. Stuff that's more than 3 years old.
 +
 
 +
=== Articles, presentations, podcasts ===
 +
 
 +
* [http://marc.merlins.org/perso/btrfs/post_2014-05-21_My-Btrfs-Talk-at-Linuxcon-JP-2014.html Marc MERLIN's Btrfs talk at Linuxcon JP 2014] which gives an overview of Btrfs, best practices, and its more interesting features.
 +
* '''Article:''' [http://www.howtoforge.com/a-beginners-guide-to-btrfs A Beginner's Guide To Btrfs] (2012-11-26)
 +
* '''Article:''' [http://www.oracle.com/technetwork/articles/servers-storage-admin/advanced-btrfs-1734952.html How I Use the Advanced Capabilities of Btrfs] by Margaret Bierman with Lenz Grimmer (2012-08-11)
 +
* '''Article:''' [http://www.oracle.com/technetwork/articles/servers-storage-admin/gettingstarted-btrfs-1695246.html How I Got Started with the Btrfs File System for Oracle Linux] by Margaret Bierman with Lenz Grimmer (2012-07-11)
 +
* '''Video:''' [http://video.linux.com/videos/btrfs-filesystem-status-and-new-features Btrfs Filesystem: Status and New Features] by Chris Mason at the 2012 Linux Foundation Collaboration Summit (2012-04-05)
 +
* '''Article''' [http://static.usenix.org/publications/login/2012-02/openpdfs/Bacik.pdf Btrfs - The Swiss Army Knife Of Storage] by Josef Bacik (2012-02)
 +
* '''Video:''' [http://www.youtube.com/watch?v=hxWuaozpe2I I Can't Believe This is Butter! A tour of btrfs] by Avi Miller at linux.conf.au (2012-01-18)
 +
* '''Article:''' [http://lwn.net/Articles/465160/ A btrfs update at LinuxCon Europe] on lwn.net (2011-11-02)
 +
* '''Podcast:''' [http://feedproxy.google.com/~r/OracleLinux/~3/kRqpaCdTlLg/10491325_Btrfs_071311.mp3 Podcast with Chris Mason: Btrfs overview and status update] (2011-07-13)
 +
* '''Video:''' [http://vimeo.com/15325851 The Story So Far] by Josef Bacik at LinuxCon Brazil (2010-08-31)
 +
* '''Article:''' [http://www.linux.com/learn/tutorials/371623-weekend-project-get-started-with-btrfs Linux.com Weekend Project: Get Started with Btrfs] (2010-10-15)
 +
* '''Webcast:''' [https://event.on24.com/eventRegistration/EventLobbyServlet?target=registration.jsp&eventid=233161&sessionid=1&key=D0B1D3285FA444C5745C344A1C859CE0&partnerref=banner&sourcepage=register State of "Btrfs" File System for Linux by Chris Mason] (2010-08-26) [email registration and flash required]
 +
* '''Article:''' [http://lwn.net/Articles/342892/ Valerie Aurora: A short history of btrfs] (2009-07-22)
 +
</div>
 +
 
 +
<!-- Project Block -->
 +
<div style="margin:0; margin-top:10px; border:1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#dfefdf; align:left; margin-top:10px">
 +
 
 +
== Project information/Contact ==
 +
 
 +
* Development statistics, contributors, commits — https://btrfs.readthedocs.io/en/latest/Contributors.html#statistics-for-5-x-series
 +
* [https://btrfs.readthedocs.io/en/latest/Glossary.html Glossary]
 +
* Contact information:
 +
** [[Btrfs mailing list]]
 +
** [http://en.wikipedia.org/wiki/Internet_Relay_Chat IRC] on [https://libera.chat libera.chat] in the channel [irc://irc.libera.chat:6667/btrfs #btrfs], matrix.org bridge works (persistent room #btrfs:matrix.org)
 +
** Reporting bugs:
 +
*** for kernel code see [[Problem_FAQ#How_do_I_report_bugs_and_issues.3F | the Bugzilla FAQ]], quick tip: use product ''File System'' and component ''btrfs''.
 +
*** for btrfs-progs please use [https://github.com/kdave/btrfs-progs/issues/ github issues] (and not kernel.org bugzilla anymore)
 +
*** for documentation please use [https://github.com/kdave/btrfs-progs/issues/ github issues] -- report unclear wording, typos, suggest examples, formatting
 
* [[Project ideas]]
 
* [[Project ideas]]
 +
* [[Project_ideas#Cleanup_projects|Cleanup ideas]]
 +
* [[Project_ideas#Userspace_tools_projects|Userspace tools projects]]
 +
</div>
 +
 +
<!-- Wiki Block -->
 +
<div style="margin:0; margin-top:10px; border:1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#dfefdf; align:left; margin-top:10px">
 +
 +
== Wiki accounts, editing ==
 +
 +
The wiki is still in use, however the main portion of documenation is being migrated to https://btrfs.readthedocs.io.
 +
 +
Wiki edits and fixups are welcome and may be copied to the RTD documentation eventually. Please create an account and wait for approval (this is a necessary spam protection and we cannot remove it). You can try to catch some of the wiki admins on [[#Project_information.2FContact|IRC]] (or ping user 'kdave' in a query) to expedite the account creation.
 +
 +
The registration requires full name for account but it's not mandatory from our perspective. The wiki User and User talk pages are created automatically but removed after account is approved. If you want to use the pages, create them manually, they won't be deleted.
 +
</div>
 +
 +
|}

Latest revision as of 16:57, 24 November 2022

btrfs

btrfs is a modern copy on write (CoW) filesystem for Linux aimed at implementing advanced features while also focusing on fault tolerance, repair and easy administration. Its main features and benefits are:

  • Snapshots which do not make the full copy of files
  • RAID - support for software-based RAID 0, RAID 1, RAID 10
  • Self-healing - checksums for data and metadata, automatic detection of silent data corruptions

Development of Btrfs started in 2007. Since that time, Btrfs is a part of the Linux kernel and is under active development.

Jointly developed by multiple companies (https://btrfs.readthedocs.io/en/latest/Contributors.html, Btrfs is licensed under the GPL and open for contribution from anyone.

List of companies using btrfs in production.

[edit] Development and Issue Reporting

For feature status, please refer to the Status page.

The Btrfs code base is stable. However, new features are still under development. Every effort is made to ensure that it remains stable and fast at each and every commit. This rapid pace of development means that the filesystem improves noticeably with every new Linux release so it's highly recommended that users run the most modern kernel possible.

For benchmarks, it's recommended to test the latest stable Linux version, and not any older, as well as the latest Linux development versions. Also, it's recommended to test the various mount options such as different compression options.

If you find any behavior you suspect to be caused by a bug, performance issues, or have any questions about using Btrfs, please email the Btrfs mailing list (no subscription required). Please report bugs on Bugzilla.

[edit] Features

Linux has a wealth of filesystems from which to choose, 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.

[edit] Major Features Currently Implemented

  • Extent based file storage
  • 2^64 byte == 16 EiB maximum file size (practical limit is 8 EiB due to Linux VFS)
  • 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 (crc32c, xxhash, sha256, blake2b)
  • Compression (ZLIB, LZO, ZSTD), heuristics
  • Integrated multiple device support
    • File Striping
    • File Mirroring
    • File Striping+Mirroring
    • Single and Dual Parity implementations (experimental, not production-ready)
  • SSD (flash storage) awareness
    • TRIM/Discard for reporting free blocks for reuse
    • Optimizations (e.g. avoiding unnecessary seek optimizations, sending writes in clusters, even if they are from unrelated files. This results in larger write operations and faster write throughput)
  • Background scrub process for finding and repairing errors of files with redundant copies
  • Online filesystem defragmentation
  • Offline filesystem check
  • In-place conversion of existing ext2/3/4 and reiserfs file systems
  • Seeding devices. Create a (readonly) filesystem that acts as a template to seed other Btrfs filesystems. The original filesystem and devices are included as a readonly starting point for the new filesystem. Using copy on write, all modifications are stored on different devices; the original is unchanged.
  • Subvolume-aware quota support
  • Send/receive of subvolume changes, efficient incremental filesystem mirroring and backup
  • Batch, or out-of-band deduplication (happens after writes, not during)
  • Swapfile support
  • Tree-checker, post-read and pre-write metadata verification
  • Zoned mode support (SMR/ZBC/ZNS friendly allocation)
  • fsverity integration

[edit] Features by kernel version

[edit] Documentation

[edit] Documentation

[edit] Guides and usage information

[edit] Manual pages

  • Original wiki documentation (obsolete, will be removed)

[edit] Developer documentation

  • Development setup - how to build btrfs from sources and prepare a development environment
  • Original COW B-tree: Source code in C that implements the COW B-tree algorithms repository. Written by Ohad Rodeh at IBM Research in 2006, and released under a BSD license. This is a reference implementation, that works in user space.

[edit] News

btrfs-progs v6.0.2 (Nov 2022)

btrfs-progs v6.0 (Oct 2022)

linux v6.0 (Oct 2022)

linux v5.19 (Aug 2022)

linux v5.18 (Jun 2022)

util-linux v2.38 (Apr 2022)

blk* utilities and libraries finally recognize btrfs formatted with zoned mode

[edit] Changelog

Changelogs and other related information are also tracked at https://btrfs.readthedocs.io:

[edit] Source code download

Btrfs source repositories describes purpose and contents, here are a few quick links:

[edit] Articles, presentations, podcasts

[edit] Historical resources

Links to old or obsolete documentation, articles. Kept for historical reasons. Stuff that's more than 3 years old.

[edit] Articles, presentations, podcasts

[edit] Project information/Contact

[edit] Wiki accounts, editing

The wiki is still in use, however the main portion of documenation is being migrated to https://btrfs.readthedocs.io.

Wiki edits and fixups are welcome and may be copied to the RTD documentation eventually. Please create an account and wait for approval (this is a necessary spam protection and we cannot remove it). You can try to catch some of the wiki admins on IRC (or ping user 'kdave' in a query) to expedite the account creation.

The registration requires full name for account but it's not mandatory from our perspective. The wiki User and User talk pages are created automatically but removed after account is approved. If you want to use the pages, create them manually, they won't be deleted.

Personal tools