[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 " ">
|
---|
[8feee67] | 9 | <!ENTITY btrfs-progs-md5sum "31112fa4de9b9286b2bb1a560addc0f4">
|
---|
[6f75ffc] | 10 | <!ENTITY btrfs-progs-size "2.2 MB">
|
---|
[5ff076a6] | 11 | <!ENTITY btrfs-progs-buildsize "51 MB (up to 8.2 GB are used during tests)">
|
---|
[8feee67] | 12 | <!ENTITY btrfs-progs-time "0.2 SBU (add 5.7 SBU for tests, but will be longer on slow disks)">
|
---|
[1f1a9e9] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="btrfs-progs" xreflabel="btrfs-progs-&btrfs-progs-version;">
|
---|
| 16 | <?dbhtml filename="btrfs-progs.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <date>$Date$</date>
|
---|
| 20 | </sect1info>
|
---|
| 21 |
|
---|
| 22 | <title>btrfs-progs-&btrfs-progs-version;</title>
|
---|
| 23 |
|
---|
| 24 | <indexterm zone="btrfs-progs">
|
---|
| 25 | <primary sortas="a-btrfs-progs">btrfs-progs</primary>
|
---|
| 26 | </indexterm>
|
---|
| 27 |
|
---|
| 28 | <sect2 role="package">
|
---|
| 29 | <title>Introduction to btrfs-progs</title>
|
---|
| 30 |
|
---|
[29244b7] | 31 | <para>
|
---|
| 32 | The <application>btrfs-progs</application> package contains
|
---|
| 33 | administration and debugging tools for the B-tree file system (btrfs).
|
---|
| 34 | </para>
|
---|
[1f1a9e9] | 35 |
|
---|
[8feee67] | 36 | &lfs111_checked;
|
---|
[1f1a9e9] | 37 |
|
---|
| 38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem>
|
---|
[29244b7] | 41 | <para>
|
---|
| 42 | Download (HTTP): <ulink url="&btrfs-progs-download-http;"/>
|
---|
| 43 | </para>
|
---|
[1f1a9e9] | 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
[29244b7] | 46 | <para>
|
---|
| 47 | Download (FTP): <ulink url="&btrfs-progs-download-ftp;"/>
|
---|
| 48 | </para>
|
---|
[1f1a9e9] | 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
[29244b7] | 51 | <para>
|
---|
| 52 | Download MD5 sum: &btrfs-progs-md5sum;
|
---|
| 53 | </para>
|
---|
[1f1a9e9] | 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
[29244b7] | 56 | <para>
|
---|
| 57 | Download size: &btrfs-progs-size;
|
---|
| 58 | </para>
|
---|
[1f1a9e9] | 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
[29244b7] | 61 | <para>
|
---|
| 62 | Estimated disk space required: &btrfs-progs-buildsize;
|
---|
| 63 | </para>
|
---|
[1f1a9e9] | 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
[29244b7] | 66 | <para>
|
---|
| 67 | Estimated build time: &btrfs-progs-time;
|
---|
| 68 | </para>
|
---|
[1f1a9e9] | 69 | </listitem>
|
---|
| 70 | </itemizedlist>
|
---|
[5ff076a6] | 71 | <!--
|
---|
[ef94f43] | 72 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 73 | <itemizedlist spacing="compact">
|
---|
| 74 | <listitem>
|
---|
| 75 | <para>
|
---|
| 76 | Required patch if building with linux kernel headers version
|
---|
| 77 | before 5.12:
|
---|
| 78 | <ulink url="&patch-root;/btrfs-progs-&btrfs-progs-version;-headers_fix-1.patch"/>
|
---|
| 79 | </para>
|
---|
| 80 | </listitem>
|
---|
| 81 | </itemizedlist>
|
---|
[5ff076a6] | 82 | -->
|
---|
[1f1a9e9] | 83 | <bridgehead renderas="sect3">Btrfs-progs Dependencies</bridgehead>
|
---|
| 84 |
|
---|
[61439d5] | 85 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 86 | <para role="required">
|
---|
[8558044] | 87 | <xref linkend="lzo"/>
|
---|
[61439d5] | 88 | </para>
|
---|
| 89 |
|
---|
[1f1a9e9] | 90 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 91 | <para role="recommended">
|
---|
[6f75ffc] | 92 | <xref linkend="asciidoc"/> (or <xref role="nodep" linkend="asciidoctor"/>)
|
---|
| 93 | and <xref linkend="xmlto"/> (both required to generate man pages)
|
---|
[1f1a9e9] | 94 | </para>
|
---|
| 95 |
|
---|
[292a840] | 96 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 97 | <para role="optional">
|
---|
[85ac148] | 98 | <xref linkend="lvm2"/> (<command>dmsetup</command> is used in tests) and
|
---|
[f33b456] | 99 | <xref linkend="reiserfs"/> (for tests)
|
---|
[292a840] | 100 | </para>
|
---|
| 101 |
|
---|
[1f1a9e9] | 102 | <para condition="html" role="usernotes">User Notes:
|
---|
[0d4692d] | 103 | <ulink url="&blfs-wiki;/btrfs-progs"/></para>
|
---|
[1f1a9e9] | 104 |
|
---|
| 105 | </sect2>
|
---|
| 106 |
|
---|
| 107 | <sect2 role="kernel" id="btrfs-progs-kernel">
|
---|
| 108 | <title>Kernel Configuration</title>
|
---|
| 109 |
|
---|
[29244b7] | 110 | <para>
|
---|
| 111 | Enable the following option in the kernel configuration
|
---|
| 112 | and recompile the kernel:
|
---|
| 113 | </para>
|
---|
[1f1a9e9] | 114 |
|
---|
| 115 | <screen><literal>File systems --->
|
---|
| 116 | <*/M> Btrfs filesystem support [CONFIG_BTRFS_FS]</literal></screen>
|
---|
| 117 |
|
---|
[8388aa7] | 118 | <para>
|
---|
| 119 | In addition to the above and to the options required for
|
---|
| 120 | <xref linkend="lvm2"/> and <xref linkend="reiserfs"/>, the following
|
---|
| 121 | options must be enabled for running tests:
|
---|
| 122 | </para>
|
---|
| 123 |
|
---|
| 124 | <screen><literal>File systems --->
|
---|
| 125 | [*] Btrfs POSIX Access Control Lists [CONFIG_BTRFS_FS_POSIX_ACL]
|
---|
| 126 | [*] ReiserFS extended attributes [CONFIG_REISERFS_FS_XATTR]
|
---|
| 127 | [*] ReiserFS POSIX Access Control Lists [CONFIG_REISERFS_FS_POSIX_ACL]</literal></screen>
|
---|
[1f1a9e9] | 128 |
|
---|
| 129 | <indexterm zone="btrfs-progs btrfs-progs-kernel">
|
---|
[2630345] | 130 | <primary sortas="d-btrfs-progs">BTRFS Programs</primary>
|
---|
[1f1a9e9] | 131 | </indexterm>
|
---|
| 132 |
|
---|
| 133 | </sect2>
|
---|
| 134 |
|
---|
| 135 | <sect2 role="installation">
|
---|
| 136 | <title>Installation of btrfs-progs</title>
|
---|
[5ff076a6] | 137 | <!--
|
---|
[ef94f43] | 138 | <para>
|
---|
| 139 | If your system has linux kernel headers with version before 5.12, apply
|
---|
| 140 | the following patch:
|
---|
| 141 | </para>
|
---|
| 142 |
|
---|
| 143 | <screen><userinput>patch -Np1 -i ../btrfs-progs-&btrfs-progs-version;-headers_fix-1.patch</userinput></screen>
|
---|
[5ff076a6] | 144 | -->
|
---|
[29244b7] | 145 | <para>
|
---|
| 146 | Install <application>btrfs-progs</application> by running the following
|
---|
| 147 | commands:
|
---|
| 148 | </para>
|
---|
[7b2b4b11] | 149 |
|
---|
[a600176] | 150 | <screen><userinput>./configure --prefix=/usr &&
|
---|
[1f1a9e9] | 151 | make</userinput></screen>
|
---|
| 152 |
|
---|
[29244b7] | 153 | <note>
|
---|
| 154 | <para>
|
---|
| 155 | Some tests require grep built with perl regular expressions. To
|
---|
[170e308] | 156 | obtain this, rebuild grep with the LFS Chapter 8 instructions after
|
---|
[29244b7] | 157 | installing <xref linkend="pcre"/>.
|
---|
| 158 | </para>
|
---|
| 159 | </note>
|
---|
[85ac148] | 160 | <!-- Keeping this for now, but it seems that calling "make test" is
|
---|
[16d563c] | 161 | simpler and does the same thing -->
|
---|
[29244b7] | 162 | <para>
|
---|
[16d563c] | 163 | Before running tests, build a support program:
|
---|
[29244b7] | 164 | </para>
|
---|
[1f1a9e9] | 165 |
|
---|
[85ac148] | 166 | <screen remap="test"><userinput>make fssum</userinput></screen>
|
---|
[32bc8e4c] | 167 |
|
---|
[29244b7] | 168 | <para>
|
---|
| 169 | To test the results, issue (as the <systemitem
|
---|
[8558044] | 170 | class="username">root</systemitem> user):
|
---|
[29244b7] | 171 | </para>
|
---|
[32bc8e4c] | 172 |
|
---|
[5af02b37] | 173 | <screen role="root" remap="test"><userinput>pushd tests
|
---|
[85ac148] | 174 | ./fsck-tests.sh
|
---|
| 175 | ./mkfs-tests.sh
|
---|
| 176 | ./cli-tests.sh
|
---|
| 177 | ./convert-tests.sh
|
---|
| 178 | ./misc-tests.sh
|
---|
[61ed6e9] | 179 | #./fuzz-tests.sh
|
---|
[32bc8e4c] | 180 | popd</userinput></screen>
|
---|
[8388aa7] | 181 |
|
---|
[61ed6e9] | 182 | <para>
|
---|
| 183 | The fuzz-tests are currently broken.
|
---|
| 184 | </para>
|
---|
| 185 |
|
---|
[16d563c] | 186 | <!-- Template for failed test removal:
|
---|
[8388aa7] | 187 | <para>
|
---|
[37ede2a] | 188 | To test the results, first disable one test that fails and prevents
|
---|
[8388aa7] | 189 | the other ones to run:
|
---|
| 190 | </para>
|
---|
| 191 |
|
---|
[37ede2a] | 192 | <screen remap="test"><userinput>mv tests/fsck-tests/012-leaf-corruption/test.sh{,.broken}</userinput></screen>
|
---|
[8558044] | 193 | Substitute your test failure with the one above.
|
---|
[85ac148] | 194 | <para>
|
---|
| 195 | To test the results, run (as the
|
---|
[949387d0] | 196 | <systemitem class="username">root</systemitem> user):
|
---|
[85ac148] | 197 | </para>
|
---|
| 198 |
|
---|
[8388aa7] | 199 | <screen role="root" remap="test"><userinput>make -j1 -k test</userinput></screen>
|
---|
[16d563c] | 200 | -->
|
---|
[85ac148] | 201 | <note>
|
---|
| 202 | <para>
|
---|
| 203 | If the above mentioned kernel options are not enabled, some tests
|
---|
| 204 | fail, and prevent all the remaining tests to run, because the test
|
---|
| 205 | disk image is not cleanly unmounted.
|
---|
| 206 | </para>
|
---|
| 207 | </note>
|
---|
[16d563c] | 208 | <!--
|
---|
[85ac148] | 209 | <para>
|
---|
| 210 | Two tests fail for unknown reasons in the
|
---|
| 211 | <command>test-libbtrfsutil</command> section. Tests take a very long
|
---|
| 212 | time, and it may be interesting to run only part of them. Running tests
|
---|
| 213 | only in one directory can be done with
|
---|
| 214 | <command>make TEST=<DIR> test</command>.
|
---|
| 215 | </para>
|
---|
[16d563c] | 216 | -->
|
---|
[29244b7] | 217 | <para>
|
---|
| 218 | Install the package as the <systemitem
|
---|
| 219 | class="username">root</systemitem> user:
|
---|
| 220 | </para>
|
---|
[1f1a9e9] | 221 |
|
---|
[16d563c] | 222 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[1f1a9e9] | 223 |
|
---|
| 224 | </sect2>
|
---|
| 225 |
|
---|
| 226 | <sect2 role="commands">
|
---|
| 227 | <title>Command Explanations</title>
|
---|
| 228 |
|
---|
[29244b7] | 229 | <para>
|
---|
| 230 | <option>--disable-documentation</option>: This option
|
---|
| 231 | is needed if the recommended dependencies are not installed.
|
---|
| 232 | </para>
|
---|
[85ac148] | 233 | <!-- not anymore in the commands
|
---|
[29244b7] | 234 | <para>
|
---|
| 235 | <command>mv tests/{cli,convert,misc,fuzz}-tests/ ...</command>: Disables
|
---|
| 236 | tests that fail and prevent tests from completing.
|
---|
| 237 | </para>
|
---|
[16d563c] | 238 |
|
---|
[29244b7] | 239 | <para>
|
---|
[8558044] | 240 | <command>ln -s ... /usr/lib/libbtrfs.so</command>: Creates a
|
---|
[29244b7] | 241 | symbolic link in the directory where it is expected.
|
---|
| 242 | </para>
|
---|
[1f1a9e9] | 243 |
|
---|
[29244b7] | 244 | <para>
|
---|
| 245 | <command>rm /lib/libbtrfs.{a,so}</command>: Removes unneeded
|
---|
| 246 | library entries.
|
---|
| 247 | </para>
|
---|
[16d563c] | 248 | -->
|
---|
[1f1a9e9] | 249 | </sect2>
|
---|
| 250 |
|
---|
| 251 | <sect2 role="content">
|
---|
| 252 | <title>Contents</title>
|
---|
| 253 |
|
---|
| 254 | <segmentedlist>
|
---|
| 255 | <segtitle>Installed Programs</segtitle>
|
---|
| 256 | <segtitle>Installed Libraries</segtitle>
|
---|
| 257 | <segtitle>Installed Directories</segtitle>
|
---|
| 258 |
|
---|
| 259 | <seglistitem>
|
---|
| 260 | <seg>
|
---|
| 261 | btrfs,
|
---|
| 262 | btrfs-convert,
|
---|
| 263 | btrfs-find-root,
|
---|
| 264 | btrfs-image,
|
---|
| 265 | btrfs-map-logical,
|
---|
| 266 | btrfs-select-super,
|
---|
| 267 | btrfsck (link to btrfs),
|
---|
| 268 | btrfstune,
|
---|
| 269 | fsck.btrfs, and
|
---|
| 270 | mkfs.btrfs
|
---|
| 271 | </seg>
|
---|
| 272 |
|
---|
[5d01724] | 273 | <seg>
|
---|
| 274 | libbtrfs.so and
|
---|
| 275 | libbtrfsutil.so
|
---|
| 276 | </seg>
|
---|
[1f1a9e9] | 277 |
|
---|
| 278 | <seg>/usr/include/btrfs</seg>
|
---|
| 279 | </seglistitem>
|
---|
| 280 | </segmentedlist>
|
---|
| 281 |
|
---|
| 282 | <variablelist>
|
---|
| 283 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 284 | <?dbfo list-presentation="list"?>
|
---|
| 285 | <?dbhtml list-presentation="table"?>
|
---|
| 286 |
|
---|
| 287 | <varlistentry id="btrfs-prog">
|
---|
| 288 | <term><command>btrfs</command></term>
|
---|
| 289 | <listitem>
|
---|
| 290 | <para>
|
---|
[4c24eb0a] | 291 | is the main interface into btrfs filesystem operations
|
---|
[1f1a9e9] | 292 | </para>
|
---|
| 293 | <indexterm zone="btrfs-progs btrfs-prog">
|
---|
| 294 | <primary sortas="b-btrfs">btrfs</primary>
|
---|
| 295 | </indexterm>
|
---|
| 296 | </listitem>
|
---|
| 297 | </varlistentry>
|
---|
| 298 |
|
---|
[292a840] | 299 | <varlistentry id="btrfs-convert">
|
---|
| 300 | <term><command>btrfs-convert</command></term>
|
---|
| 301 | <listitem>
|
---|
| 302 | <para>
|
---|
[37ede2a] | 303 | converts from an ext2/3/4 or reiserfs filesystem to btrfs
|
---|
[292a840] | 304 | </para>
|
---|
| 305 | <indexterm zone="btrfs-progs btrfs-convert">
|
---|
| 306 | <primary sortas="b-btrfs-convert">btrfs-convert</primary>
|
---|
| 307 | </indexterm>
|
---|
| 308 | </listitem>
|
---|
| 309 | </varlistentry>
|
---|
| 310 |
|
---|
| 311 | <varlistentry id="btrfs-find-root">
|
---|
| 312 | <term><command>btrfs-find-root</command></term>
|
---|
| 313 | <listitem>
|
---|
| 314 | <para>
|
---|
[4c24eb0a] | 315 | is a filter to find btrfs root
|
---|
[292a840] | 316 | </para>
|
---|
| 317 | <indexterm zone="btrfs-progs btrfs-find-root">
|
---|
| 318 | <primary sortas="b-btrfs-find-root">btrfs-find-root</primary>
|
---|
| 319 | </indexterm>
|
---|
| 320 | </listitem>
|
---|
| 321 | </varlistentry>
|
---|
| 322 |
|
---|
| 323 | <varlistentry id="btrfs-map-logical">
|
---|
| 324 | <term><command>btrfs-map-logical</command></term>
|
---|
| 325 | <listitem>
|
---|
| 326 | <para>
|
---|
[4c24eb0a] | 327 | maps btrfs logical extent to physical extent
|
---|
[292a840] | 328 | </para>
|
---|
| 329 | <indexterm zone="btrfs-progs btrfs-map-logical">
|
---|
| 330 | <primary sortas="b-btrfs-map-logical">btrfs-map-logical</primary>
|
---|
| 331 | </indexterm>
|
---|
| 332 | </listitem>
|
---|
| 333 | </varlistentry>
|
---|
| 334 |
|
---|
| 335 | <varlistentry id="btrfs-select-super">
|
---|
| 336 | <term><command>btrfs-select-super</command></term>
|
---|
| 337 | <listitem>
|
---|
| 338 | <para>
|
---|
[4c24eb0a] | 339 | overwrites the primary superblock with a backup copy
|
---|
[292a840] | 340 | </para>
|
---|
| 341 | <indexterm zone="btrfs-progs btrfs-select-super">
|
---|
| 342 | <primary sortas="b-btrfs-select-super">btrfs-select-super</primary>
|
---|
| 343 | </indexterm>
|
---|
| 344 | </listitem>
|
---|
| 345 | </varlistentry>
|
---|
| 346 |
|
---|
| 347 | <varlistentry id="btrfstune">
|
---|
| 348 | <term><command>btrfstune</command></term>
|
---|
| 349 | <listitem>
|
---|
| 350 | <para>
|
---|
[4c24eb0a] | 351 | tunes various filesystem parameters
|
---|
[292a840] | 352 | </para>
|
---|
| 353 | <indexterm zone="btrfs-progs btrfstune">
|
---|
| 354 | <primary sortas="b-btrfstune">btrfstune</primary>
|
---|
| 355 | </indexterm>
|
---|
| 356 | </listitem>
|
---|
| 357 | </varlistentry>
|
---|
| 358 |
|
---|
[1f1a9e9] | 359 | <varlistentry id="fsck.btrfs">
|
---|
| 360 | <term><command>fsck.btrfs</command></term>
|
---|
| 361 | <listitem>
|
---|
| 362 | <para>
|
---|
[4c24eb0a] | 363 | does nothing, but is present for consistency with fstab
|
---|
[1f1a9e9] | 364 | </para>
|
---|
| 365 | <indexterm zone="btrfs-progs fsck.btrfs">
|
---|
| 366 | <primary sortas="b-fsck.btrfs">fsck.btrfs</primary>
|
---|
| 367 | </indexterm>
|
---|
| 368 | </listitem>
|
---|
| 369 | </varlistentry>
|
---|
| 370 |
|
---|
| 371 | <varlistentry id="mkfs.btrfs">
|
---|
| 372 | <term><command>mkfs.btrfs</command></term>
|
---|
| 373 | <listitem>
|
---|
[29244b7] | 374 | <para>
|
---|
[4c24eb0a] | 375 | creates a btrfs file system
|
---|
[29244b7] | 376 | </para>
|
---|
[1f1a9e9] | 377 | <indexterm zone="btrfs-progs mkfs.btrfs">
|
---|
| 378 | <primary sortas="b-mkfs.btrfs">mkfs.btrfs</primary>
|
---|
| 379 | </indexterm>
|
---|
| 380 | </listitem>
|
---|
| 381 | </varlistentry>
|
---|
| 382 |
|
---|
| 383 | </variablelist>
|
---|
| 384 |
|
---|
| 385 | </sect2>
|
---|
| 386 |
|
---|
| 387 | </sect1>
|
---|