glfs/postlfs/filesystems/btrfs-progs.xml

310 lines
10 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY btrfs-progs-download-http "&kernel-dl;/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v&btrfs-progs-version;.tar.xz">
<!ENTITY btrfs-progs-download-ftp " ">
<!ENTITY btrfs-progs-md5sum "70c55c5c403251f5260285675cf35c1a">
<!ENTITY btrfs-progs-size "2.0 MB">
<!ENTITY btrfs-progs-buildsize "55 MB (add 29 MB for tests)">
<!ENTITY btrfs-progs-time "0.2 SBU (add 13 SBU for tests)">
]>
<sect1 id="btrfs-progs" xreflabel="btrfs-progs-&btrfs-progs-version;">
<?dbhtml filename="btrfs-progs.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>btrfs-progs-&btrfs-progs-version;</title>
<indexterm zone="btrfs-progs">
<primary sortas="a-btrfs-progs">btrfs-progs</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to btrfs-progs</title>
<para>The <application>btrfs-progs</application> package contains administration
and debugging tools for the B-tree file system (btrfs).</para>
&lfs90_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&btrfs-progs-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&btrfs-progs-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &btrfs-progs-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &btrfs-progs-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &btrfs-progs-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &btrfs-progs-time;</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Btrfs-progs Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="lzo"/>
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="asciidoc"/> and
<xref linkend="xmlto"/> (both required to generate man pages)
</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="lvm2"/> (<command>dmsetup</command> is used in tests),
<xref linkend="python2"/> (python bindings),
<xref linkend="reiserfs"/> (for tests), and
<ulink url='https://github.com/facebook/zstd/releases/'>zstd</ulink> (for tests)
</para>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/xfs"/></para>
</sect2>
<sect2 role="kernel" id="btrfs-progs-kernel">
<title>Kernel Configuration</title>
<para>Enable the following option in the kernel configuration
and recompile the kernel:</para>
<screen><literal>File systems ---&gt;
&lt;*/M&gt; Btrfs filesystem support [CONFIG_BTRFS_FS]</literal></screen>
<note><para>CONFIG_BTRFS_FS_POSIX_ACL and
CONFIG_REISERFS_FS_XATTR are required for some tests.
Other Btrfs options in the kernel are optional.</para></note>
<indexterm zone="btrfs-progs btrfs-progs-kernel">
<primary sortas="d-btrfs-progs">BTRFS Programs</primary>
</indexterm>
</sect2>
<sect2 role="installation">
<title>Installation of btrfs-progs</title>
<para>Install <application>btrfs-progs</application> by running the following
commands:</para>
<screen><userinput>./configure --prefix=/usr \
--bindir=/bin \
--libdir=/lib \
--disable-zstd &amp;&amp;
make</userinput></screen>
<note><para>Some tests require grep built with perl regular expressions. To
obtain this, rebuild grep with the LFS Chapter 6 instructions after
installing <xref linkend="pcre"/>.</para></note>
<para>Before running tests, build a support program and
disable several that fail:</para>
<screen remap="test"><userinput>make fssum &amp;&amp;
sed -i '/found/s/^/: #/' tests/convert-tests.sh &amp;&amp;
mv tests/convert-tests/010-reiserfs-basic/test.sh{,.broken} &amp;&amp;
mv tests/convert-tests/011-reiserfs-delete-all-rollback/test.sh{,.broken} &amp;&amp;
mv tests/convert-tests/012-reiserfs-large-hole-extent/test.sh{,.broken} &amp;&amp;
mv tests/convert-tests/013-reiserfs-common-inode-flags/test.sh{,.broken} &amp;&amp;
mv tests/convert-tests/014-reiserfs-tail-handling/test.sh{,.broken} &amp;&amp;
mv tests/misc-tests/025-zstd-compression/test.sh{,.broken}</userinput></screen>
<para>To test the results, issue (as the <systemitem
class="username">root</systemitem> user): </para>
<screen role="root" remap="test"><userinput>pushd tests
./fsck-tests.sh
./mkfs-tests.sh
./cli-tests.sh
./convert-tests.sh
./misc-tests.sh
./fuzz-tests.sh
popd</userinput></screen>
<para>Install the package as the <systemitem
class="username">root</systemitem> user:</para>
<screen role="root"><userinput>make install &amp;&amp;
ln -sfv ../../lib/$(readlink /lib/libbtrfs.so) /usr/lib/libbtrfs.so &amp;&amp;
ln -sfv ../../lib/$(readlink /lib/libbtrfsutil.so) /usr/lib/libbtrfsutil.so &amp;&amp;
rm -fv /lib/libbtrfs.{a,so} /lib/libbtrfsutil.{a,so} &amp;&amp;
mv -v /bin/{mkfs,fsck}.btrfs /sbin</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para><option>--disable-documentation</option>: This option
is needed if the recommended dependencies are not installed.</para>
<para><command>mv tests/{cli,convert,misc,fuzz}-tests/ ...</command>: Disables
tests that fail and prevent tests from completing.</para>
<para><command>ln -s ... /usr/lib/libbtrfs.so</command>: Creates a
symbolic link in the directory where it is expected.</para>
<para><command>rm /lib/libbtrfs.{a,so}</command>: Removes unneeded
library entries.</para>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
btrfs,
btrfs-convert,
btrfs-find-root,
btrfs-image,
btrfs-map-logical,
btrfs-select-super,
btrfsck (link to btrfs),
btrfstune,
fsck.btrfs, and
mkfs.btrfs
</seg>
<seg>
libbtrfs.so and
libbtrfsutil.so
</seg>
<seg>/usr/include/btrfs</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="btrfs-prog">
<term><command>btrfs</command></term>
<listitem>
<para>
is the main interface into btrfs filesystem operations.
</para>
<indexterm zone="btrfs-progs btrfs-prog">
<primary sortas="b-btrfs">btrfs</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="btrfs-convert">
<term><command>btrfs-convert</command></term>
<listitem>
<para>
converts from an ext2/3/4 filesystem to btrfs.
</para>
<indexterm zone="btrfs-progs btrfs-convert">
<primary sortas="b-btrfs-convert">btrfs-convert</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="btrfs-find-root">
<term><command>btrfs-find-root</command></term>
<listitem>
<para>
is a filter to find btrfs root.
</para>
<indexterm zone="btrfs-progs btrfs-find-root">
<primary sortas="b-btrfs-find-root">btrfs-find-root</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="btrfs-map-logical">
<term><command>btrfs-map-logical</command></term>
<listitem>
<para>
maps btrfs logical extent to physical extent.
</para>
<indexterm zone="btrfs-progs btrfs-map-logical">
<primary sortas="b-btrfs-map-logical">btrfs-map-logical</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="btrfs-select-super">
<term><command>btrfs-select-super</command></term>
<listitem>
<para>
overwrites the primary superblock with a backup copy.
</para>
<indexterm zone="btrfs-progs btrfs-select-super">
<primary sortas="b-btrfs-select-super">btrfs-select-super</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="btrfstune">
<term><command>btrfstune</command></term>
<listitem>
<para>
tunes various filesystem parameters.
</para>
<indexterm zone="btrfs-progs btrfstune">
<primary sortas="b-btrfstune">btrfstune</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="fsck.btrfs">
<term><command>fsck.btrfs</command></term>
<listitem>
<para>
does nothing, but is present for consistency with fstab.
</para>
<indexterm zone="btrfs-progs fsck.btrfs">
<primary sortas="b-fsck.btrfs">fsck.btrfs</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="mkfs.btrfs">
<term><command>mkfs.btrfs</command></term>
<listitem>
<para>creates a btrfs file system.</para>
<indexterm zone="btrfs-progs mkfs.btrfs">
<primary sortas="b-mkfs.btrfs">mkfs.btrfs</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>