Main Page

From btrfs Wiki
(Difference between revisions)
Jump to: navigation, search
m (typo: gitlabs -> gitlab)
(restructure the main page)
Line 1: Line 1:
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. One of its main features are snapshots, which do not make the full copy of files.
+
__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]]
 +
 
 +
'''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. One of its main features are snapshots, which do not make the full copy of files.
  
 
Development of Btrfs started in 2007. Since that time, Btrfs is a part of the Linux kernel and is under active development.
 
Development of Btrfs started in 2007. Since that time, Btrfs is a part of the Linux kernel and is under active development.
Line 6: Line 12:
  
 
Not too many companies have said that they are using Btrfs in production, but we welcome those who can say so on the [[Production_Users|production users]] page.
 
Not too many companies have said that they are using Btrfs in production, but we welcome those who can say so on the [[Production_Users|production users]] page.
 +
</div>
  
 +
<!-- Stability status 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;">
 
== Stability status ==
 
== Stability status ==
  
Line 18: Line 27:
  
 
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]].
 
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>
 +
 +
{| width="100%"
 +
|-
 +
|style="vertical-align:top" |
  
 +
<!-- 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 ==
  
Line 62: Line 78:
 
* DAX/persistent memory support
 
* DAX/persistent memory support
 
* The file/directory -level encryption support (fscrypt)
 
* The file/directory -level encryption support (fscrypt)
 +
</div>
  
== News ==
+
<!-- Documentation Block -->
 
+
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#fffff0; align:right; ">
''' btrfs-progs v5.10.1 (Feb 2021) '''
+
 
+
* static build works again
+
* libmount 2.24+ required, not available on Cent OS 7 and the like (fix planned)
+
 
+
''' btrfs-progs v5.10 (Jan 2021) '''
+
 
+
* scrub status:
+
** print percentage of progress
+
** add size unit options
+
* fi usage: also print free space from statfs
+
* convert: copy full 64 bit timestamp from ext4 if availalble
+
* check:
+
** add ability to repair extent item generation
+
** new option to remove leftovers from inode number cache (-o inode_cache)
+
* check for already running exclusive operation (balance, device add/...) when starting one
+
* preliminary json output support for 'device stats'
+
* fixes:
+
** subvolume set-default: id 0 correctly falls back to toplevel
+
** receive: align internal buffer to allow fast CRC calculation
+
** logical-resolve: distinguish -o subvol and bind mounts
+
* build: new dependency libmount
+
* other
+
** doc fixes and updates
+
** new tests
+
** ci on gitlab temporarily disabled
+
** debugging output enhancements
+
 
+
''' linux v5.10 (Dec 2020) '''
+
* hilights
+
** performance improvements in fsync (dbench workload: higher throughput, lower latency)
+
** sysfs exports current exclusive operataion (balance, resize, device add/del/...)
+
** sysfs exports supported send stream version
+
* core
+
** direct io uses iomap infrastructure (no more ''struct buffer_head'')
+
** space reservations for data now use ticket infrastructure
+
** cleanups, refactoring, preparatory work
+
** error handling improvements
+
** fixes
+
 
+
== Changelog ==
+
 
+
Read about past releases in the separate [[Changelog]] page
+
 
+
* [[Changelog#By_feature|features by kernel version]]
+
* [[Changelog#By_version_.28linux_kernel.29|kernel changes for each release]]
+
* [[Changelog#By_version_.28btrfs-progs.29|btrfs-progs changes for each release]]
+
 
+
 
== Documentation ==
 
== Documentation ==
  
Line 193: Line 162:
 
** In-band (write) time deduplication
 
** In-band (write) time deduplication
 
*** [[User notes on dedupe]] — User/tester notes for using in-band deduplication feature
 
*** [[User notes on dedupe]] — User/tester notes for using in-band deduplication feature
 +
</div>
  
==== Source code download ====
+
| 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 v5.10.1 (Feb 2021) '''
 +
 
 +
* static build works again
 +
* libmount 2.24+ required, not available on Cent OS 7 and the like (fix planned)
 +
 
 +
''' btrfs-progs v5.10 (Jan 2021) '''
 +
 
 +
* scrub status:
 +
** print percentage of progress
 +
** add size unit options
 +
* fi usage: also print free space from statfs
 +
* convert: copy full 64 bit timestamp from ext4 if availalble
 +
* check:
 +
** add ability to repair extent item generation
 +
** new option to remove leftovers from inode number cache (-o inode_cache)
 +
* check for already running exclusive operation (balance, device add/...) when starting one
 +
* preliminary json output support for 'device stats'
 +
* fixes:
 +
** subvolume set-default: id 0 correctly falls back to toplevel
 +
** receive: align internal buffer to allow fast CRC calculation
 +
** logical-resolve: distinguish -o subvol and bind mounts
 +
* build: new dependency libmount
 +
* other
 +
** doc fixes and updates
 +
** new tests
 +
** ci on gitlab temporarily disabled
 +
** debugging output enhancements
 +
 
 +
''' linux v5.10 (Dec 2020) '''
 +
* hilights
 +
** performance improvements in fsync (dbench workload: higher throughput, lower latency)
 +
** sysfs exports current exclusive operataion (balance, resize, device add/del/...)
 +
** sysfs exports supported send stream version
 +
* core
 +
** direct io uses iomap infrastructure (no more ''struct buffer_head'')
 +
** space reservations for data now use ticket infrastructure
 +
** cleanups, refactoring, preparatory work
 +
** error handling improvements
 +
** fixes
 +
</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 ==
 +
 
 +
Read about past releases in the separate [[Changelog]] page
 +
 
 +
* [[Changelog#By_feature|features by kernel version]]
 +
* [[Changelog#By_version_.28linux_kernel.29|kernel changes for each release]]
 +
* [[Changelog#By_version_.28btrfs-progs.29|btrfs-progs changes for each release]]
 +
</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:
 
[[Btrfs source repositories]] describes purpose and contents, here are a few quick links:
Line 203: Line 233:
 
* btrfs-progs development and release repository: git://github.com/kdave/btrfs-progs.git ([https://github.com/kdave/btrfs-progs.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/
 
* released tarballs of btrfs-progs: https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/
 +
</div>
  
=== Wiki accounts, editing ===
+
<!-- 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">
The wiki contributions are welcome! 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.
+
 
+
 
== Articles, presentations, podcasts ==
 
== 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://www.youtube.com/watch?v=U7gXR2L05IU Deploying Btrfs at Facebook Scale] by Josef Bacik at the Open Source Summit 2020 (2020-06-29)
Line 224: Line 251:
 
* '''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.
 
* '''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]
 
* '''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 -->
== Benchmarking ==
+
<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 ==
 
== Historical resources ==
  
Line 247: Line 273:
 
* '''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]
 
* '''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)
 
* '''Article:''' [http://lwn.net/Articles/342892/ Valerie Aurora: A short history of btrfs] (2009-07-22)
 +
</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 contributions are welcome! 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>
 +
 +
|}

Revision as of 17:07, 18 February 2021


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. One of its main features are snapshots, which do not make the full copy of files.

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

Jointly developed at multiple companies, Btrfs is licensed under the GPL and open for contribution from anyone.

Not too many companies have said that they are using Btrfs in production, but we welcome those who can say so on the production users page.

Stability status

For feature status and stability, please refer to the Status page. The filesystem disk format is stable; this means that it is not expected to change unless there are very strong reasons to do so. If there is a format change, filesystems which implement the previous disk format will continue to be mountable and usable by newer kernels.

The Btrfs code base is under heavy development. Not only is every effort being made to ensure that it remains stable and fast but to make it more so with 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.

As with all software, newly added features may need a few releases to stabilize.

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.

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.

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) and 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)
  • Efficient incremental backup
  • 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
  • Seed 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
  • Batch, or out-of-band deduplication (happens after writes, not during)
  • Swapfile support
  • Tree-checker, post-read and pre-write metadata verification

Features by kernel version

As part of the changelog you can also review

Features Currently in Development or Planned for Future Implementation

  • SMR (zoned block device) support
  • DAX/persistent memory support
  • The file/directory -level encryption support (fscrypt)

Documentation

Guides and usage information

External Btrfs Documentation / Guides

Links to Btrfs documentation of various Linux distributions:

Project information/Contact

Manual pages

  • Original wiki documentation (obsolete, will be removed)

Developer documentation

  • 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.
  • Unmerged features
    • In-band (write) time deduplication

News

btrfs-progs v5.10.1 (Feb 2021)

  • static build works again
  • libmount 2.24+ required, not available on Cent OS 7 and the like (fix planned)

btrfs-progs v5.10 (Jan 2021)

  • scrub status:
    • print percentage of progress
    • add size unit options
  • fi usage: also print free space from statfs
  • convert: copy full 64 bit timestamp from ext4 if availalble
  • check:
    • add ability to repair extent item generation
    • new option to remove leftovers from inode number cache (-o inode_cache)
  • check for already running exclusive operation (balance, device add/...) when starting one
  • preliminary json output support for 'device stats'
  • fixes:
    • subvolume set-default: id 0 correctly falls back to toplevel
    • receive: align internal buffer to allow fast CRC calculation
    • logical-resolve: distinguish -o subvol and bind mounts
  • build: new dependency libmount
  • other
    • doc fixes and updates
    • new tests
    • ci on gitlab temporarily disabled
    • debugging output enhancements

linux v5.10 (Dec 2020)

  • hilights
    • performance improvements in fsync (dbench workload: higher throughput, lower latency)
    • sysfs exports current exclusive operataion (balance, resize, device add/del/...)
    • sysfs exports supported send stream version
  • core
    • direct io uses iomap infrastructure (no more struct buffer_head)
    • space reservations for data now use ticket infrastructure
    • cleanups, refactoring, preparatory work
    • error handling improvements
    • fixes

Source code download

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

Articles, presentations, podcasts

Historical resources

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

Articles, presentations, podcasts

Wiki accounts, editing

The wiki contributions are welcome! 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