[1f1a9e9] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[8dfc5c3] | 7 | <!ENTITY btrfs-progs-download-http "&kernel-dl;/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v&btrfs-progs-version;.tar.xz">
|
---|
[1f1a9e9] | 8 | <!ENTITY btrfs-progs-download-ftp " ">
|
---|
[e6bce28] | 9 | <!ENTITY btrfs-progs-md5sum "130be469ced99b01948af64b6a6312f6">
|
---|
| 10 | <!ENTITY btrfs-progs-size "2.0 MB">
|
---|
| 11 | <!ENTITY btrfs-progs-buildsize "78 MB (add 6 MB for tests)">
|
---|
| 12 | <!ENTITY btrfs-progs-time "0.4 SBU (add 6.4 SBU for tests)">
|
---|
[1f1a9e9] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="btrfs-progs" xreflabel="btrfs-progs-&btrfs-progs-version;">
|
---|
| 16 | <?dbhtml filename="btrfs-progs.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>btrfs-progs-&btrfs-progs-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="btrfs-progs">
|
---|
| 26 | <primary sortas="a-btrfs-progs">btrfs-progs</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to btrfs-progs</title>
|
---|
| 31 |
|
---|
| 32 | <para>The <application>btrfs-progs</application> package contains administration
|
---|
| 33 | and debugging tools for the B-tree file system (btrfs).</para>
|
---|
| 34 |
|
---|
[e6bce28] | 35 | &lfs83_checked;
|
---|
[1f1a9e9] | 36 |
|
---|
| 37 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 38 | <itemizedlist spacing="compact">
|
---|
| 39 | <listitem>
|
---|
| 40 | <para>Download (HTTP): <ulink url="&btrfs-progs-download-http;"/></para>
|
---|
| 41 | </listitem>
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>Download (FTP): <ulink url="&btrfs-progs-download-ftp;"/></para>
|
---|
| 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>Download MD5 sum: &btrfs-progs-md5sum;</para>
|
---|
| 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>Download size: &btrfs-progs-size;</para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Estimated disk space required: &btrfs-progs-buildsize;</para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Estimated build time: &btrfs-progs-time;</para>
|
---|
| 56 | </listitem>
|
---|
| 57 | </itemizedlist>
|
---|
| 58 |
|
---|
| 59 | <bridgehead renderas="sect3">Btrfs-progs Dependencies</bridgehead>
|
---|
| 60 |
|
---|
[61439d5] | 61 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 62 | <para role="required">
|
---|
| 63 | <xref linkend="lzo"/>
|
---|
| 64 | </para>
|
---|
| 65 |
|
---|
[1f1a9e9] | 66 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 67 | <para role="recommended">
|
---|
| 68 | <xref linkend="asciidoc"/> and
|
---|
| 69 | <xref linkend="xmlto"/> (both required to generate man pages)
|
---|
| 70 | </para>
|
---|
| 71 |
|
---|
[292a840] | 72 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 73 | <para role="optional">
|
---|
[6eb166fa] | 74 | <xref linkend="lvm2"/> (<command>dmsetup</command> is used in tests),
|
---|
[0ecaac7] | 75 | <xref linkend="python2"/> (python bindings),
|
---|
[6eb166fa] | 76 | <xref linkend="reiserfs"/> (for tests), and
|
---|
| 77 | <ulink url='https://github.com/facebook/zstd/releases/'>zstd</ulink> (for tests)
|
---|
[292a840] | 78 | </para>
|
---|
| 79 |
|
---|
[1f1a9e9] | 80 | <para condition="html" role="usernotes">User Notes:
|
---|
| 81 | <ulink url="&blfs-wiki;/xfs"/></para>
|
---|
| 82 |
|
---|
| 83 | </sect2>
|
---|
| 84 |
|
---|
| 85 | <sect2 role="kernel" id="btrfs-progs-kernel">
|
---|
| 86 | <title>Kernel Configuration</title>
|
---|
| 87 |
|
---|
| 88 | <para>Enable the following option in the kernel configuration
|
---|
| 89 | and recompile the kernel:</para>
|
---|
| 90 |
|
---|
| 91 | <screen><literal>File systems --->
|
---|
| 92 | <*/M> Btrfs filesystem support [CONFIG_BTRFS_FS]</literal></screen>
|
---|
| 93 |
|
---|
[f1e50963] | 94 | <note><para>CONFIG_BTRFS_FS_POSIX_ACL and
|
---|
| 95 | CONFIG_REISERFS_FS_XATTR are required for some tests.
|
---|
[a4b8b2a7] | 96 | Other Btrfs options in the kernel are optional.</para></note>
|
---|
[1f1a9e9] | 97 |
|
---|
| 98 | <indexterm zone="btrfs-progs btrfs-progs-kernel">
|
---|
[2630345] | 99 | <primary sortas="d-btrfs-progs">BTRFS Programs</primary>
|
---|
[1f1a9e9] | 100 | </indexterm>
|
---|
| 101 |
|
---|
| 102 | </sect2>
|
---|
| 103 |
|
---|
| 104 | <sect2 role="installation">
|
---|
| 105 | <title>Installation of btrfs-progs</title>
|
---|
| 106 |
|
---|
| 107 | <para>Install <application>btrfs-progs</application> by running the following
|
---|
| 108 | commands:</para>
|
---|
[7b2b4b11] | 109 |
|
---|
[461c584] | 110 | <screen><userinput>sed -i '40,107 s/\.gz//g' Documentation/Makefile.in &&
|
---|
[c1ff74eb] | 111 |
|
---|
[6eb166fa] | 112 | ./configure --prefix=/usr \
|
---|
| 113 | --bindir=/bin \
|
---|
| 114 | --libdir=/lib \
|
---|
| 115 | --disable-zstd &&
|
---|
[1f1a9e9] | 116 | make</userinput></screen>
|
---|
| 117 |
|
---|
[bd9de06d] | 118 | <para>Before running tests, build a support program and
|
---|
| 119 | disable several that fail:</para>
|
---|
[1f1a9e9] | 120 |
|
---|
[bd9de06d] | 121 | <screen><userinput>make fssum &&
|
---|
| 122 |
|
---|
[f1e50963] | 123 | sed -i '/found/s/^/: #/' tests/convert-tests.sh &&
|
---|
| 124 |
|
---|
[4dc9669] | 125 | mv tests/mkfs-tests/013-reserved-1M-for-single/test.sh{,.broken} &&
|
---|
| 126 | mv tests/convert-tests/010-reiserfs-basic/test.sh{,.broken} &&
|
---|
[f1e50963] | 127 | mv tests/convert-tests/011-reiserfs-delete-all-rollback/test.sh{,.broken} &&
|
---|
[4dc9669] | 128 | mv tests/convert-tests/012-reiserfs-large-hole-extent/test.sh{,.broken} &&
|
---|
| 129 | mv tests/convert-tests/013-reiserfs-common-inode-flags/test.sh{,.broken} &&
|
---|
| 130 | mv tests/convert-tests/014-reiserfs-tail-handling/test.sh{,.broken} &&
|
---|
[e6bce28] | 131 | mv tests/misc-tests/004-shrink-fs/test.sh{,.broken} &&
|
---|
| 132 | mv tests/misc-tests/013-subvolume-sync-crash/test.sh{,.broken} &&
|
---|
[4dc9669] | 133 | mv tests/misc-tests/025-zstd-compression/test.sh{,.broken} &&
|
---|
| 134 | mv tests/fuzz-tests/003-multi-check-unmounted/test.sh{,.broken} &&
|
---|
[bd9de06d] | 135 | mv tests/fuzz-tests/009-simple-zero-log/test.sh{,.broken}</userinput></screen>
|
---|
[32bc8e4c] | 136 |
|
---|
| 137 | <para>To test the results, issue (as the <systemitem
|
---|
| 138 | class="username">root</systemitem> user): </para>
|
---|
| 139 |
|
---|
| 140 | <screen><userinput>pushd tests
|
---|
| 141 | ./fsck-tests.sh
|
---|
| 142 | ./mkfs-tests.sh
|
---|
[bd9de06d] | 143 | ./cli-tests.sh
|
---|
[32bc8e4c] | 144 | ./convert-tests.sh
|
---|
| 145 | ./misc-tests.sh
|
---|
| 146 | ./fuzz-tests.sh
|
---|
| 147 | popd</userinput></screen>
|
---|
| 148 |
|
---|
| 149 | <para>Install the package as the <systemitem
|
---|
| 150 | class="username">root</systemitem> user:</para>
|
---|
[1f1a9e9] | 151 |
|
---|
[01e86d88] | 152 | <screen role="root"><userinput>make install &&
|
---|
[1f1a9e9] | 153 |
|
---|
[555dcb4a] | 154 | ln -sfv ../../lib/$(readlink /lib/libbtrfs.so) /usr/lib/libbtrfs.so &&
|
---|
[2565779] | 155 | ln -sfv ../../lib/$(readlink /lib/libbtrfsutil.so) /usr/lib/libbtrfsutil.so &&
|
---|
| 156 | rm -fv /lib/libbtrfs.{a,so} /lib/libbtrfsutil.{a,so} &&
|
---|
[f50481de] | 157 | mv -v /bin/{mkfs,fsck}.btrfs /sbin</userinput></screen>
|
---|
[1f1a9e9] | 158 |
|
---|
| 159 | </sect2>
|
---|
| 160 |
|
---|
| 161 | <sect2 role="commands">
|
---|
| 162 | <title>Command Explanations</title>
|
---|
| 163 |
|
---|
| 164 | <para><command>sed ... Documentation/Makefile.in</command>: Disables
|
---|
| 165 | compressing man pages to be consistent with the rest of BLFS.</para>
|
---|
[32bc8e4c] | 166 |
|
---|
[61439d5] | 167 | <para><option>--disable-documentation</option>: This option
|
---|
| 168 | is needed if the recommended dependencies are not installed.</para>
|
---|
| 169 |
|
---|
[f1e50963] | 170 | <para><command>mv tests/{cli,convert,misc,fuzz}-tests/ ...</command>: Disables
|
---|
[32bc8e4c] | 171 | tests that fail and prevent tests from completing.</para>
|
---|
| 172 |
|
---|
[1f1a9e9] | 173 | <para><command>ln -s ... /usr/lib/libbtrfs.so</command>: Creates a
|
---|
| 174 | symbolic link in the directory where it is expected.</para>
|
---|
| 175 |
|
---|
| 176 | <para><command>rm /lib/libbtrfs.{a,so}</command>: Removes unneeded
|
---|
| 177 | library entries.</para>
|
---|
| 178 |
|
---|
| 179 | </sect2>
|
---|
| 180 |
|
---|
| 181 | <sect2 role="content">
|
---|
| 182 | <title>Contents</title>
|
---|
| 183 |
|
---|
| 184 | <segmentedlist>
|
---|
| 185 | <segtitle>Installed Programs</segtitle>
|
---|
| 186 | <segtitle>Installed Libraries</segtitle>
|
---|
| 187 | <segtitle>Installed Directories</segtitle>
|
---|
| 188 |
|
---|
| 189 | <seglistitem>
|
---|
| 190 | <seg>
|
---|
| 191 | btrfs,
|
---|
| 192 | btrfs-convert,
|
---|
| 193 | btrfs-debug-tree,
|
---|
| 194 | btrfs-find-root,
|
---|
| 195 | btrfs-image,
|
---|
| 196 | btrfs-map-logical,
|
---|
| 197 | btrfs-select-super,
|
---|
| 198 | btrfs-zero-log,
|
---|
| 199 | btrfsck (link to btrfs),
|
---|
| 200 | btrfstune,
|
---|
| 201 | fsck.btrfs, and
|
---|
| 202 | mkfs.btrfs
|
---|
| 203 | </seg>
|
---|
| 204 |
|
---|
| 205 | <seg>libbtrfs.so</seg>
|
---|
| 206 |
|
---|
| 207 | <seg>/usr/include/btrfs</seg>
|
---|
| 208 | </seglistitem>
|
---|
| 209 | </segmentedlist>
|
---|
| 210 |
|
---|
| 211 | <variablelist>
|
---|
| 212 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 213 | <?dbfo list-presentation="list"?>
|
---|
| 214 | <?dbhtml list-presentation="table"?>
|
---|
| 215 |
|
---|
| 216 | <varlistentry id="btrfs-prog">
|
---|
| 217 | <term><command>btrfs</command></term>
|
---|
| 218 | <listitem>
|
---|
| 219 | <para>
|
---|
| 220 | is the main interface into btrfs filesystem operations.
|
---|
| 221 | </para>
|
---|
| 222 | <indexterm zone="btrfs-progs btrfs-prog">
|
---|
| 223 | <primary sortas="b-btrfs">btrfs</primary>
|
---|
| 224 | </indexterm>
|
---|
| 225 | </listitem>
|
---|
| 226 | </varlistentry>
|
---|
| 227 |
|
---|
[292a840] | 228 | <varlistentry id="btrfs-convert">
|
---|
| 229 | <term><command>btrfs-convert</command></term>
|
---|
| 230 | <listitem>
|
---|
| 231 | <para>
|
---|
| 232 | converts from ext2/3/4 filesystem to btrfs.
|
---|
| 233 | </para>
|
---|
| 234 | <indexterm zone="btrfs-progs btrfs-convert">
|
---|
| 235 | <primary sortas="b-btrfs-convert">btrfs-convert</primary>
|
---|
| 236 | </indexterm>
|
---|
| 237 | </listitem>
|
---|
| 238 | </varlistentry>
|
---|
| 239 |
|
---|
| 240 | <varlistentry id="btrfs-debug-tree">
|
---|
| 241 | <term><command>btrfs-debug-tree</command></term>
|
---|
| 242 | <listitem>
|
---|
| 243 | <para>
|
---|
| 244 | queries various internal information.
|
---|
| 245 | </para>
|
---|
| 246 | <indexterm zone="btrfs-progs btrfs-debug-tree">
|
---|
| 247 | <primary sortas="b-btrfs-debug-tree">btrfs-debug-tree</primary>
|
---|
| 248 | </indexterm>
|
---|
| 249 | </listitem>
|
---|
| 250 | </varlistentry>
|
---|
| 251 |
|
---|
| 252 | <varlistentry id="btrfs-find-root">
|
---|
| 253 | <term><command>btrfs-find-root</command></term>
|
---|
| 254 | <listitem>
|
---|
| 255 | <para>
|
---|
| 256 | is a filter to find btrfs root.
|
---|
| 257 | </para>
|
---|
| 258 | <indexterm zone="btrfs-progs btrfs-find-root">
|
---|
| 259 | <primary sortas="b-btrfs-find-root">btrfs-find-root</primary>
|
---|
| 260 | </indexterm>
|
---|
| 261 | </listitem>
|
---|
| 262 | </varlistentry>
|
---|
| 263 |
|
---|
| 264 | <varlistentry id="btrfs-map-logical">
|
---|
| 265 | <term><command>btrfs-map-logical</command></term>
|
---|
| 266 | <listitem>
|
---|
| 267 | <para>
|
---|
| 268 | maps btrfs logical extent to physical extent.
|
---|
| 269 | </para>
|
---|
| 270 | <indexterm zone="btrfs-progs btrfs-map-logical">
|
---|
| 271 | <primary sortas="b-btrfs-map-logical">btrfs-map-logical</primary>
|
---|
| 272 | </indexterm>
|
---|
| 273 | </listitem>
|
---|
| 274 | </varlistentry>
|
---|
| 275 |
|
---|
| 276 | <varlistentry id="btrfs-select-super">
|
---|
| 277 | <term><command>btrfs-select-super</command></term>
|
---|
| 278 | <listitem>
|
---|
| 279 | <para>
|
---|
| 280 | overwrites primary superblock with a backup copy.
|
---|
| 281 | </para>
|
---|
| 282 | <indexterm zone="btrfs-progs btrfs-select-super">
|
---|
| 283 | <primary sortas="b-btrfs-select-super">btrfs-select-super</primary>
|
---|
| 284 | </indexterm>
|
---|
| 285 | </listitem>
|
---|
| 286 | </varlistentry>
|
---|
| 287 |
|
---|
| 288 | <varlistentry id="btrfs-zero-log">
|
---|
| 289 | <term><command>btrfs-zero-log</command></term>
|
---|
| 290 | <listitem>
|
---|
| 291 | <para>
|
---|
| 292 | recovers a damaged btrfs filesystem.
|
---|
| 293 | </para>
|
---|
| 294 | <indexterm zone="btrfs-progs btrfs-zero-log">
|
---|
| 295 | <primary sortas="b-btrfs-zero-log">btrfs-zero-log</primary>
|
---|
| 296 | </indexterm>
|
---|
| 297 | </listitem>
|
---|
| 298 | </varlistentry>
|
---|
| 299 |
|
---|
| 300 | <varlistentry id="btrfstune">
|
---|
| 301 | <term><command>btrfstune</command></term>
|
---|
| 302 | <listitem>
|
---|
| 303 | <para>
|
---|
| 304 | tunes various filesystem parameters.
|
---|
| 305 | </para>
|
---|
| 306 | <indexterm zone="btrfs-progs btrfstune">
|
---|
| 307 | <primary sortas="b-btrfstune">btrfstune</primary>
|
---|
| 308 | </indexterm>
|
---|
| 309 | </listitem>
|
---|
| 310 | </varlistentry>
|
---|
| 311 |
|
---|
[1f1a9e9] | 312 | <varlistentry id="fsck.btrfs">
|
---|
| 313 | <term><command>fsck.btrfs</command></term>
|
---|
| 314 | <listitem>
|
---|
| 315 | <para>
|
---|
| 316 | does nothing, but is present for consistency with fstab.
|
---|
| 317 | </para>
|
---|
| 318 | <indexterm zone="btrfs-progs fsck.btrfs">
|
---|
| 319 | <primary sortas="b-fsck.btrfs">fsck.btrfs</primary>
|
---|
| 320 | </indexterm>
|
---|
| 321 | </listitem>
|
---|
| 322 | </varlistentry>
|
---|
| 323 |
|
---|
| 324 | <varlistentry id="mkfs.btrfs">
|
---|
| 325 | <term><command>mkfs.btrfs</command></term>
|
---|
| 326 | <listitem>
|
---|
| 327 | <para>creates a btrfs file system.</para>
|
---|
| 328 | <indexterm zone="btrfs-progs mkfs.btrfs">
|
---|
| 329 | <primary sortas="b-mkfs.btrfs">mkfs.btrfs</primary>
|
---|
| 330 | </indexterm>
|
---|
| 331 | </listitem>
|
---|
| 332 | </varlistentry>
|
---|
| 333 |
|
---|
| 334 | </variablelist>
|
---|
| 335 |
|
---|
| 336 | </sect2>
|
---|
| 337 |
|
---|
| 338 | </sect1>
|
---|