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