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
Btrfs-progs Dependencies
Required
LZO-2.10
Optional
LVM2-2.03.29 (dmsetup is used in tests),
sphinx-8.1.3 and sphinx_rtd_theme-3.0.2 (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.29, 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]
[ ] Btrfs with the ref verify tool compiled in [BTRFS_FS_REF_VERIFY]
Installation of btrfs-progs
Install btrfs-progs by running the
following commands:
./configure --prefix=/usr \
--disable-static \
--disable-documentation &&
make
Note
Some tests require grep built with perl regular expressions. To
obtain this, rebuild grep with the LFS Chapter 8 instructions
after installing pcre2-10.44.
Before running tests, build a support program:
make fssum
Now remove one test known to fail. As root
:
mv tests/misc-tests/041-subvolume-delete-during-send/test.sh{,broken}
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-8.1.3.