btrfs-progs-6.19.1

#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-517

### Chapter 5. File Systems and Disk Management

- Prev

  About initramfs

- Next

  dosfstools-4.2

- Up
- Home

# btrfs-progs-6.19.1

## Introduction to btrfs-progs

The btrfs-progs package contains administration and debugging tools for the B-tree file system (btrfs).

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v6.19.1.tar.xz

- Download MD5 sum: a06ba5c0b7d9f8e5a80f14e15818bd92

- Download size: 4.8 MB

- Estimated disk space required: 69 MB (transient files created during tests need up to 10 GB)

- Estimated build time: 0.3 SBU (with parallelism=4; add 4.4 SBU for tests, up to 14 SBU on slow disks)

### Btrfs-progs Dependencies

#### Required

LZO-2.10

#### Optional

LVM2-2.03.40 (dmsetup is used in tests), ntfs-3g-2026.2.25, sphinx-9.1.0 and sphinx_rtd_theme-3.1.0 (required to build documentation), and reiserfsprogs (for tests).

## Kernel Configuration

Enable the following option in the kernel configuration and recompile the kernel:

    File systems --->
      <*/M> Btrfs filesystem support                                      [BTRFS_FS]

In addition to the above and to the options required for LVM2-2.03.40, the following options must be set for running tests. The options marked as empty should not be selected because they are for developers and make some tests fail.

    File systems --->
      <*/M> Btrfs filesystem support                                      [BTRFS_FS]
      [*]     Btrfs POSIX Access Control Lists                  [BTRFS_FS_POSIX_ACL]
      [ ]     Btrfs will run sanity tests upon loading   [BTRFS_FS_RUN_SANITY_TESTS]
      [ ]     Btrfs debugging support                                  [BTRFS_DEBUG]
      [ ]     Btrfs assert support                                    [BTRFS_ASSERT]

## Installation of btrfs-progs

Install btrfs-progs by running the following commands:

    ./configure --prefix=/usr           \
                --disable-static        \
                --disable-documentation &&
    make

Before running tests, build a support program:

    make fssum

Now, remove a test that is known to fail. As `root`:

    rm -rf tests/fuzz-tests/010-simple-sb

To test the results, issue (as the `root` user):

    pushd tests
       ./fsck-tests.sh
       ./mkfs-tests.sh
       ./cli-tests.sh
       ./convert-tests.sh
       ./misc-tests.sh
       ./fuzz-tests.sh
    popd

### Note

If the above mentioned kernel options are not enabled, some tests fail, and prevent all the remaining tests from running because the test disk image is not cleanly unmounted. Also make sure that the btrfs kernel module is loaded.

Install the package as the `root` user:

    make install

If you have passed `--disable-documentation` to configure and you need the manual pages, install them by running, as the `root` user:

    for i in 5 8; do
       install Documentation/*.$i /usr/share/man/man$i
    done

## Command Explanations

`--disable-static`: This switch prevents installation of static versions of the libraries.

`--disable-documentation`: This switch disables rebuilding the manual pages, because it requires sphinx-9.1.0.

## Contents

Installed Programs: btrfs, btrfs-convert, btrfs-find-root, btrfs-image, btrfs-map-logical, btrfs-select-super, btrfsck (link to btrfs), btrfstune, fsck.btrfs, and mkfs.btrfs
Installed Libraries: libbtrfs.so and libbtrfsutil.so
Installed Directories: /usr/include/btrfs

### Short Descriptions

btrfs | is the main interface into btrfs filesystem operations
btrfs-convert | converts from an ext2/3/4 or reiserfs filesystem to btrfs
btrfs-find-root | is a filter to find btrfs root
btrfs-map-logical | maps btrfs logical extent to physical extent
btrfs-select-super | overwrites the primary superblock with a backup copy
btrfstune | tunes various filesystem parameters
fsck.btrfs | does nothing, but is present for consistency with fstab
mkfs.btrfs | creates a btrfs file system

- Prev

  About initramfs

- Next

  dosfstools-4.2

- Up
- Home