Main Page

From btrfs Wiki
(Difference between revisions)
Jump to: navigation, search
(News: progs 5.12)
(External Btrfs Documentation / Guides: remove link, outdated content)
 
(15 intermediate revisions by one user not shown)
Line 104: Line 104:
  
 
* "[https://docs.oracle.com/cd/E37670_01/E37355/html/ol_btrfs.html The Btrfs File System]" chapter in the [https://docs.oracle.com/cd/E37670_01/E37355/html/index.html Oracle Linux 6 Administrator's Solutions Guide]
 
* "[https://docs.oracle.com/cd/E37670_01/E37355/html/ol_btrfs.html The Btrfs File System]" chapter in the [https://docs.oracle.com/cd/E37670_01/E37355/html/index.html Oracle Linux 6 Administrator's Solutions Guide]
* Oracle Linux [https://wikis.oracle.com/display/oraclelinux/Hands-on+lab+-+Storage+Management+with+Btrfs Hands-on lab - Storage Management with Btrfs]
 
 
* [https://documentation.suse.com/sles/15-GA/single-html/SLES-storage/#sec-filesystems-major-btrfs Major File Systems in Linux] chapter in the [https://documentation.suse.com/en-us/sles/15-GA/single-html/SLES-storage/ SLES 15 Storage Administration Guide]
 
* [https://documentation.suse.com/sles/15-GA/single-html/SLES-storage/#sec-filesystems-major-btrfs Major File Systems in Linux] chapter in the [https://documentation.suse.com/en-us/sles/15-GA/single-html/SLES-storage/ SLES 15 Storage Administration Guide]
* [https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ch-btrfs.html Btrfs] chapter in the [https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ Red Hat Enterprise Linux 6 Storage Administration Guide]
 
 
* [https://help.ubuntu.com/community/btrfs Btrfs Wiki page] on the [https://help.ubuntu.com/community Ubuntu Community Help Wiki]
 
* [https://help.ubuntu.com/community/btrfs Btrfs Wiki page] on the [https://help.ubuntu.com/community Ubuntu Community Help Wiki]
 
* [https://wiki.archlinux.org/index.php/Btrfs Btrfs Wiki page] on the [https://wiki.archlinux.org/ Arch Linux Wiki]
 
* [https://wiki.archlinux.org/index.php/Btrfs Btrfs Wiki page] on the [https://wiki.archlinux.org/ Arch Linux Wiki]
* [http://www.funtoo.org/BTRFS_Fun BTRFS Fun Wiki page] on the [http://www.funtoo.org/ Funtoo Wiki]
 
 
* [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.
 
* [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.
  
Line 159: Line 156:
 
== News ==
 
== News ==
  
''' IRC '''
+
''' IRC channel at libera.chat '''
  
Due to changes in ownership of freenode.net, there's a new #btrfs channel at [https://libera.chat libera.chat]
+
The #btrfs channel is at [https://libera.chat libera.chat], matrix.org bridge works (persistent room #btrfs:matrix.org).
  
''' btrfs-progs v5.12.1 (May 2021) '''
+
''' btrfs-progs v5.14.2 (Oct 2021) '''
  
* build: fix missing symbols in libbtrfs
+
* fixes
* mkfs: check for minimal number of zones
+
** zoned mode
* check: fix warning about cache generation when free space tree is enabled
+
**** properly detect non-zoned devices in emulation mode
* fix superblock write in zoned mode on 16K pages
+
**** properly create quota tree
 
+
**** raid1c3/4 also excluded from unsupported profiles
 
+
** use sysfs-based detection of device discard capability, fix mkfs-time trim for non-standard devices
''' btrfs-progs v5.12 (May 2021) '''
+
** mkfs: fix creation of populated filesystem with free space tree
 
+
** detect multipath devices (needs libudev)
* libbtrfsutil: relicensed to LGPL v2.1+
+
* replace start: add option -K/--nodiscard, similar to what mkfs or device add has
* mkfs: zoned mode support (kernel 5.12+)
+
* dump-tree: print complete root_item
* fi df: show zone_unusable per profile type in zoned mode
+
* mkfs: add option --verbose
* fi usage: show total amount of zone_unusable
+
* sb-mod: better help, no checksum calculation on read-only actions
* fi resize: fix message for exact size
+
* subvol show:
* image: fix warning and enlarge output file if necessary
+
** print more information (regarding send and receive)
* core
+
** print warning if read-write subvolume has received_uuid set
** refactor chunk allocator for more modes
+
* property set:
** implement zoned mode support: allocation and writes, sb log
+
** add parameter -f to force changes
** crypto/hash refactoring and cleanups
+
** changing ro->rw switch now needs -f if subvolume has received_uuid set, (see documentation)
** refactoring and cleanups
+
* build: optional libudev (on by default)
 
* other
 
* other
** test updates
+
** remove deprecated support for CREATE_ASYNC bit for subvolume ioctl
 
** CI updates
 
** CI updates
**** travis-ci integration disabled
+
** new and updated tests
**** docker images updated, more coverage
+
*** incomplete build support for Android removed
+
* doc updates
+
** chattr mode m for 'NOCOMPRESS"
+
** swapfile used from fstab
+
** how to add a new export to libbtrfsutil
+
** update status of mount options since 5.9
+
  
''' linux v5.12 (Apr 2021) '''
+
''' linux v5.14 (Aug 2021) '''
  
* features
+
Hilights
** [[Zoned|zoned mode]] (SMR/ZBC/ZNS friendly allocation mode), first working version with limitations
+
* new sysfs knob to limit scrub IO bandwidth per device
* misc performance improvements
+
* device stats are also available in /sys/fs/btrfs/FSID/devinfo/DEVID/error_stats
** flushing and ticket space reservations
+
* support cancellable resize and device delete ioctls
** preemptive background flushing
+
* change how the empty value is interpreted when setting a property, so far we have only 'btrfs.compression' and we need to distinguish a reset to defaults and setting "do not compress", in general the empty value will always mean 'reset to defaults' for any other property, for compression it's either 'no' or 'none' to forbid compression
** less lock contention for delayed refs
+
* performance improvements (xattrs, truncate)
** dbench-like workload (+7% throughput, -20% latency)
+
* space handling improvements, preemptive flushing
* core changes:
+
* more subpage support preparation
** subpage block size support peparations
+
* for other changes see the [https://git.kernel.org/linus/122fa8c588316aacafe7e5a393bb3e875eaf5b25 pull request]
* fixes
+
** swapfile fixes (vs scrub, activation vs snapshot creation)
+
  
 
</div>
 
</div>
Line 287: Line 275:
 
* Contact information:
 
* Contact information:
 
** [[Btrfs mailing list]]
 
** [[Btrfs mailing list]]
** [http://en.wikipedia.org/wiki/Internet_Relay_Chat IRC] on freenode.net in the channel [irc://irc.freenode.net:6667/btrfs #btrfs]
+
** [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]
 
** Reporting bugs:
 
** 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 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''.
Line 299: Line 287:
 
<!-- Wiki Block -->
 
<!-- 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">
 
<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 ==
 
== Wiki accounts, editing ==
  

Latest revision as of 16:02, 20 October 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. 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 at multiple companies, 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) 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
  • Zoned mode support (SMR/ZBC/ZNS friendly allocation)

[edit] Features by kernel version

As part of the changelog you can also review

[edit] Features Currently in Development or Planned for Future Implementation

  • DAX/persistent memory support
  • The file/directory -level encryption support (fscrypt)
  • fsverity integration

[edit] Documentation

[edit] Guides and usage information

[edit] External Btrfs Documentation / Guides

Links to Btrfs documentation of various Linux distributions:

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

[edit] News

IRC channel at libera.chat

The #btrfs channel is at libera.chat, matrix.org bridge works (persistent room #btrfs:matrix.org).

btrfs-progs v5.14.2 (Oct 2021)

  • fixes
    • zoned mode
        • properly detect non-zoned devices in emulation mode
        • properly create quota tree
        • raid1c3/4 also excluded from unsupported profiles
    • use sysfs-based detection of device discard capability, fix mkfs-time trim for non-standard devices
    • mkfs: fix creation of populated filesystem with free space tree
    • detect multipath devices (needs libudev)
  • replace start: add option -K/--nodiscard, similar to what mkfs or device add has
  • dump-tree: print complete root_item
  • mkfs: add option --verbose
  • sb-mod: better help, no checksum calculation on read-only actions
  • subvol show:
    • print more information (regarding send and receive)
    • print warning if read-write subvolume has received_uuid set
  • property set:
    • add parameter -f to force changes
    • changing ro->rw switch now needs -f if subvolume has received_uuid set, (see documentation)
  • build: optional libudev (on by default)
  • other
    • remove deprecated support for CREATE_ASYNC bit for subvolume ioctl
    • CI updates
    • new and updated tests

linux v5.14 (Aug 2021)

Hilights

  • new sysfs knob to limit scrub IO bandwidth per device
  • device stats are also available in /sys/fs/btrfs/FSID/devinfo/DEVID/error_stats
  • support cancellable resize and device delete ioctls
  • change how the empty value is interpreted when setting a property, so far we have only 'btrfs.compression' and we need to distinguish a reset to defaults and setting "do not compress", in general the empty value will always mean 'reset to defaults' for any other property, for compression it's either 'no' or 'none' to forbid compression
  • performance improvements (xattrs, truncate)
  • space handling improvements, preemptive flushing
  • more subpage support preparation
  • for other changes see the pull request

[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 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